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

Analyze and report 'pub downgrade' issues. #1365

Merged
merged 8 commits into from
May 24, 2024
Merged

Conversation

isoos
Copy link
Collaborator

@isoos isoos commented May 10, 2024

@isoos isoos requested review from jonasfj and sigurdm May 10, 2024 13:59
@jonasfj
Copy link
Member

jonasfj commented May 13, 2024

I propose granted 20 points in the "Pass static analysis" section, as follows:
image

@mit-mit Any thoughts on giving 20 points when passing static analysis after dart pub downgrade. That's trying with a set of oldest versions that:

  • Is allowed by constraints in pubspec.yaml, and,
  • Is mutually compatible.

This effectively passing dart pub downgrade && dart analyze, do notice that downgrade will try to get an oldest set of versions, there may be multiple sets of oldest versions, and it may not be possible get oldest versions of some packages (due to incompatibilities, etc).

In an ideal world, we could prove that a package is compatible with the lower-bounds of its dependencies. This is an under-approximation such a test. But it's likely to catch a lot!

@jonasfj
Copy link
Member

jonasfj commented May 14, 2024

note: package authors can always fix this issue by running dart pub upgrade --tighten and republish a new version.

@isoos isoos force-pushed the downgrade branch 2 times, most recently from 5a8af86 to 698d149 Compare May 14, 2024 12:00
@isoos
Copy link
Collaborator Author

isoos commented May 14, 2024

Note: I've left the subsection inside the up-to-date dependencies section and set 20 points for it.

Copy link
Contributor

@sigurdm sigurdm left a comment

Choose a reason for hiding this comment

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

It would be nice if we had an end2end example that actually triggers this (such that it resolves and has some analysis error that was not present in the upgraded static analysis...

test/goldens/end2end/nsd_android-1.2.2.json_report.md Outdated Show resolved Hide resolved
test/goldens/end2end/nsd_android-1.2.2.json_report.md Outdated Show resolved Hide resolved
test/goldens/end2end/nsd_android-1.2.2.json_report.md Outdated Show resolved Hide resolved
test/goldens/end2end/dnd-2.0.1.json_report.md Show resolved Hide resolved
@isoos
Copy link
Collaborator Author

isoos commented May 21, 2024

Updated suggestion to "You may run dart pub upgrade --tighten to update your dependency constraints, or visit http://dart.dev/go/downgrade-testing for further help." PTAL.

@isoos isoos requested a review from sigurdm May 21, 2024 07:31
@isoos isoos merged commit e5d79d8 into dart-lang:master May 24, 2024
5 checks passed
@isoos isoos deleted the downgrade branch May 24, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants