-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve resolution comment #380
base: master
Are you sure you want to change the base?
Conversation
It would actually even better if the resolution comment of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this improvement.
Glad the edge label is finally useful! ;)
I had one suggestion if you are willing to take and I would be happy to merge.
@@ -376,7 +376,8 @@ object Writer { | |||
s"""# duplicates in ${coord.unversioned.asString} $status\n""" + | |||
vs.filterNot(e => replaced(e.source)) | |||
.map { e => | |||
s"""# - ${e.source.asString} wanted version ${e.destination.version.asString}\n""" | |||
val evicted = if (e.label) " (evicted)" else "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than using Boolean can we add to DepsModel.scala
something like:
sealed abstract class EvictionState(val isEvicted: Boolean)
object EvictionState {
case object Evicted extends EvictionState(true)
case object Retained extends EvictionState(false)
}
so we don't have "boolean blindess" type bugs? I'd rather have Edge[MavenCoordinate, EvictionState]]
and e.label.isEvicted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I thought about that as well, it'd be much better!
However, I'm still concerned that with this fix we're just fixing a side effect of a different normalizer bug, see my latest comment on #379. We could continue the conversation there and if we find that this is indeed the right fix, and not something else, then I'll do the fix you recommended and we can merge, but first it'd be great to make sure. Thanks!
See #379. This changes the current resolution comment from:
to: