Skip to content

Conversation

@stuartmorgan-g
Copy link
Collaborator

Updates all packages to use <4.0.0 instead of <3.0.0 for Dart SDK constraints.

Also updates the update-min-sdk tooling command to special-case this 3.0.0->4.0.0 transformation when determining the upper bound to use for a given lower bound, so that the command won't undo this change when run.

This fixes out-of-band breakage in publishable due to a new pub.dev error when using '<3.0.0'.

This does not update any versions or changelogs because it's a no-op for clients due to the special casing in the pub resolver. It's just necessary for future publishing.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM


environment:
sdk: '>=2.17.0 <3.0.0'
sdk: ">=2.17.0 <4.0.0"
Copy link
Collaborator Author

@stuartmorgan-g stuartmorgan-g Mar 21, 2023

Choose a reason for hiding this comment

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

The changes to all of the packages were auto-generated (by a slightly-locally-modified version of update-min-sdk) which is why the quoting changed in packages that were using ' instead of ".

min: _dartMinVersion,
includeMin: true,
max: _dartMinVersion.nextMajor)
VersionRange(min: _dartMinVersion, includeMin: true, max: upperBound)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The changes in this file are the only non-automated changes in the PR.

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

If CI is happy, I'm happy!

Comment on lines +73 to +74
// pub special-cases 3.0.0 as an upper bound to be treated as 4.0.0, and
// using 3.0.0 is now an error at upload time, so special case it here.
Copy link
Member

Choose a reason for hiding this comment

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

I had heard about this special casing, I think it only kicks in if your lower bound is modern enough (but I guess packages in this repo have been kept up to date so the 3 -> 4 applies everywhere.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Modern enough is 2.12 (NNBD), so we're definitely way past that.

Copy link
Contributor

@tarrinneal tarrinneal left a comment

Choose a reason for hiding this comment

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

number get bigger!

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

LGTM - to infinity & beyond!

Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

@tarrinneal
Copy link
Contributor

Merging on red to fix the tree.

@tarrinneal tarrinneal merged commit e893fdc into flutter:main Mar 22, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 22, 2023
@stuartmorgan-g stuartmorgan-g deleted the update-dart-sdk-max branch March 27, 2023 15:13
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
* Update script command

* Mass change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.