Repository navigation
Migrate SDK constraints for record_use and data_asset integration test packages to ^3.13.0-0 - #192728
Conversation
…t packages to ^3.13.0-0
There was a problem hiding this comment.
Code Review
This pull request updates the SDK constraints in several integration test packages to use caret syntax and modifies the pinDependencies helper in native_assets_test_utils.dart to exclude the SDK constraint from being pinned. Feedback highlights a potential regression where the helper will fail with an assertion error if a pubspec.yaml contains no other caret dependencies, as the file content remains unchanged.
| expect(pubspecFile, exists); | ||
| final String oldPubspec = await pubspecFile.readAsString(); | ||
| final String newPubspec = oldPubspec.replaceAll(RegExp(r':\s*\^'), ': '); | ||
| final String newPubspec = oldPubspec.replaceAll(RegExp(r'(?<!sdk):\s*\^'), ': '); |
There was a problem hiding this comment.
By excluding the sdk constraint from being pinned, any pubspec.yaml that does not contain any other ^ dependencies (such as the test packages modified in this PR) will result in newPubspec being identical to oldPubspec. This will cause the assertion expect(newPubspec, isNot(oldPubspec)) on the next line to fail, breaking the integration tests. Consider removing this assertion or making it conditional so that the helper does not fail when there are no dependencies to pin.
References
- Check for potential regressions: Look for changes that might break existing functionality or introduce unexpected behavior in related areas. (link)
There was a problem hiding this comment.
Viewed pubspec.yaml.tmpl:1-127
The bot's claim is BS / false:
- Before this PR, those test packages (
record_use_test_package,data_asset_app,data_asset_package) hadsdk: '>=3.5.0-0 <4.0.0', which did not contain a^. That meansRegExp(r':\s*\^')was never matchingsdk:on them in the first place — it was only matching their package dependencies. - Every
pubspec.yamlpassed topinDependencieshas^package dependencies:record_use_test_package/pubspec.yaml:hooks: ^2.2.0,data_assets: ^0.20.0,record_use: ^1.1.1data_asset_app/pubspec.yaml:hooks: ^2.2.0,data_assets: ^0.20.0data_asset_package/pubspec.yaml:hooks: ^2.2.0,data_assets: ^0.20.0package_ffiand itsexampleapp templates:code_assets: ^2.0.0,hooks: ^2.2.0,flutter_lints: ^6.0.0, etc.record_use_test_app/pubspec.yaml(the only one without^package dependencies) is not passed topinDependencies.
- The assertion
expect(newPubspec, isNot(oldPubspec))inpinDependenciesis specifically there to catch ifpinDependencieswas called on a file where no package dependencies were pinned — ifsdk: ^...had satisfied that assertion, it would have masked a bug where no actual dependencies were pinned.
Piinks
left a comment
There was a problem hiding this comment.
LGTM! Thanks for aligning with the rest of the repo! :)
…12890) Manual roll requested by [email protected] flutter/flutter@27fec0e...8737f11 2026-09-15 [email protected] [flutter_tools] Migrate BuildBundleCommand to modular dependency injection (flutter/flutter#192462) 2026-09-15 [email protected] Migrate SDK constraints for record_use and data_asset integration test packages to ^3.13.0-0 (flutter/flutter#192728) 2026-09-15 [email protected] [tool] Defer app.restart until the app has finished starting (flutter/flutter#192650) 2026-09-15 [email protected] Suggest the -d flag after interactive device selection (flutter/flutter#188941) 2026-09-15 [email protected] Roll Packages from 9caa77c to bebbb57 (9 revisions) (flutter/flutter#192809) 2026-09-15 [email protected] Add a compiler warning for fragment shaders containing both texture samplers and early returns. (flutter/flutter#191969) 2026-09-15 [email protected] feat(flutter_tools): migrate Android build commands to typed options (flutter/flutter#192524) 2026-09-15 [email protected] Roll Fuchsia Linux SDK from 7R1l5MhSZZUr1Q6D1... to XCxrICzX1DWvyfqhA... (flutter/flutter#192789) 2026-09-15 [email protected] Roll Dart SDK from 7253dff72c96 to c870e8afe036 (1 revision) (flutter/flutter#192791) If this roll has caused a breakage, revert this CL and set the roller to dry run mode using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Follow up of #192649
I don't believe there is any reason the testing packages owned by me had a different SDK constraint.