[CP] Avoid confusing sdk-ranges in pub solve-error messages. #51101
Labels
area-tools
A general category for issues that we think should be addressed by tooling.
cherry-pick-approved
Label for approved cherrypick request
merge-to-stable
Commit(s) to merge
(Has not been merged to main yet)
Target
stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/279509
Issue Description
Pub can show wrong/misleading/confusing ranges for unfulfilled sdk constraints in 2.19.
We introduced an sdk rewrite to allow dart 3 to be compatible with dart 2.12 and later, such that internally it treats constraints like
>=2.12.0 <3.0.0
as>=2.12.0 <4.0.0
. But that was landed already in 2.19, where a constraint like>=2.19.5 <3.0.0
might give a message like:Because library requires SDK version >=2.19.0-beta.1 <4.0.0, version solving failed.
Details:
dart-lang/pub#3738
What is the fix
We disable the logic for treating
>=2.12.0 <3.0.0
as>=2.12.0 <4.0.0
for the 2.19 branch.Why cherry-pick
This has no functional consequences, but can lead to confusing error messages.
Risk
low
Issue link(s)
dart-lang/pub#3738
Extra Info
No response
The text was updated successfully, but these errors were encountered: