Skip to content
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 version solver output #1855

Merged
merged 2 commits into from
Mar 30, 2018
Merged

Improve version solver output #1855

merged 2 commits into from
Mar 30, 2018

Conversation

nex3
Copy link
Member

@nex3 nex3 commented Mar 30, 2018

Partially addresses #1853

We used to produce weird output like "Because no versions of foo match
<1.0.0 or >1.0.0 and foo 1.0.0 depends on bar, all versions of foo
require bar". Now we're able to just say "all versions of foo depend
on bar" without having to derive that.
@nex3 nex3 requested a review from munificent March 30, 2018 08:04
Previously it was possible for pub not to indicate the source of a
hosted dependency even when it was involved in a source conflict.
'baz': {'path': '../baz'}
}).create();
await expectResolves(error: equalsIgnoringWhitespace('''
Because every version of foo depends on bar any which depends on baz any,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "any" doesn't seem to add much value here and makes it a little harder to read. What do you think of just showing the package name if the constraint includes all versions?

Because every version of foo depends on bar which depends on baz, every version of foo requires baz from hosted.
So, because myapp depends on both baz from path and foo, version solving failed.

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered that, but I think it makes sense to reproduce the constraints from the packages' pubspecs here even if they're any. Just saying bar depends on baz risks making it unclear that there's no other version of bar that could work.

Also, since we discourage any constraints in real packages, this is unlikely to come up very often in practice.

@nex3 nex3 merged commit 929561d into master Mar 30, 2018
@nex3 nex3 deleted the better-output branch March 30, 2018 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants