NU1608 warning for packages above dependency upper bounds#1678
Merged
Conversation
Member
|
@emgarten How is this ever allowed? |
Member
Author
|
@davidfowl nearest wins, if the user has a direct dependency of y 2.0.0, but package x has an exact dependency on 1.0.0. Do you think this will be too common? Suggestions on the message text are welcome. |
Member
Author
|
Note that an actual conflict does fail, this is only when that isn't happening due to nearest wins. |
Member
|
That's by design though. Nearest wins clips the dependency graph to allow this. A warning isn't bad though I guess you can always suppress it. |
Member
Author
|
Agreed that it is by design, the current thinking is that now that warnings can be suppressed or turned into errors this will give users an option to deal with it as needed. |
9da0d9b to
9ab7ecb
Compare
Package versions that exceed the upper bound of a dependency should warn with NU1608 to let the user know that a constraint is invalid. Fixes NuGet/Home#2358
9ab7ecb to
4e3869a
Compare
mishra14
approved these changes
Aug 31, 2017
| /// </summary> | ||
| public static IEnumerable<RestoreLogMessage> GetBumpedUpDependencies( | ||
| IEnumerable<IRestoreTargetGraph> graphs, | ||
| List<IndexedRestoreTargetGraph> graphs, |
Contributor
There was a problem hiding this comment.
nit: change to IList
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warns when the flattened graph contains a version higher than an allowed upper bound version. This is essentially the reverse of a downgrade warning.
Example:
Fixes NuGet/Home#2358