Skip to content

Remove dependency overrides. #2634

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

Merged
merged 3 commits into from
Jun 20, 2025
Merged

Conversation

davidmorgan
Copy link
Contributor

Now that build_runner 2.5.0 is published :)

@davidmorgan
Copy link
Contributor Author

I'm not quite sure what to do with buildRunnerConstraint ... I updated it for the tests to 2.5.0 since that's the version with the changed log messages, but it looks like buildRunnerConstraint will check what users are using? They don't have to update to 2.5.0.

@srujzs
Copy link
Contributor

srujzs commented Jun 16, 2025

I think we might be able to just upgrade the hard-coded constraint especially since it's a dev dependency, but maybe @bkonyi knows more? It looks like that's what we've done before. Maybe we should adopt a version range instead? e.g. https://github.com/dart-lang/webdev/blame/f978b90cdfc97967b8caec1b5e2a4919ce9fa3d2/webdev/lib/src/pubspec.dart

@bkonyi
Copy link
Collaborator

bkonyi commented Jun 16, 2025

I'm not sure why buildRunnerConstraint needs to be changed if the range already includes 2.5.0. Am I missing something?

For the failing e2e_test.dart, I think we can just update the expectation to look for ^2.5.0.

@srujzs
Copy link
Contributor

srujzs commented Jun 16, 2025

I believe we're checking that the constraint is the same e.g. ^2.4.0 == ^2.4.0, not that the version lies within that constraint.

I'm not sure why buildRunnerConstraint needs to be changed if the range already includes 2.5.0.

Sorry, ignore my last sentence about using a version range. The issue would be the same whenever we need to update the constraint.

@bkonyi
Copy link
Collaborator

bkonyi commented Jun 16, 2025

I believe we're checking that the constraint is the same e.g. ^2.4.0 == ^2.4.0, not that the version lies within that constraint.

We're talking about the failure in e2e_test.dart right? I think that's fine to fail on version changes in this test as it's checking that we're using consistent versions across the test projects.

@davidmorgan
Copy link
Contributor Author

Updating e2e_test.dart sounds good; not quite sure what to update it to, I changed to check that the two versions are not incompatible (have some overlap), what do you think please?

expect(smokeYaml['dev_dependencies']['build_runner'],
equals(buildRunnerConstraint.toString()));
expect(
VersionConstraint.parse(smokeYaml['dev_dependencies']['build_runner'])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be checking that the constraints for build_runner in the pubspec are compatible with buildRunnerConstraints? Something like this:

expect(
  buildRunnerConstraints.allowsAny(
    VersionConstraint.parse(smokeYaml['dev_dependencies']['build_runner'])
  ),
  true
);

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm pretty sure what you have here is always going to return true since it's a union of versions, not an intersection.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, ehm, yes, I meant "intersection" :)

Updated to your version, thanks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

No problem! 😁

@davidmorgan davidmorgan merged commit 0c8a17b into dart-lang:main Jun 20, 2025
46 of 47 checks passed
@davidmorgan davidmorgan deleted the remove-overrides branch June 20, 2025 06:53
@davidmorgan
Copy link
Contributor Author

Thanks! Please let me know if you see any issues.

copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Jun 23, 2025
Revisions updated by `dart tools/rev_sdk_deps.dart`.

ai (https://github.com/dart-lang/ai/compare/f2b48c6..12ac0a4):
  12ac0a4  2025-06-18  Jacob MacDonald  make the log file test less flaky by retrying deletes and reads (dart-lang/ai#180)
  dbedc6d  2025-06-18  Jacob MacDonald  fix cruft in description (dart-lang/ai#179)
  3ab9482  2025-06-18  Jacob MacDonald  improve tool description for the dtd connection tool and improve error messages (dart-lang/ai#178)
  4ca0ff1  2025-06-18  Jacob MacDonald  Use shared Implementation type, add clientInfo field to MCPServer (dart-lang/ai#175)
  885a4c5  2025-06-18  Jacob MacDonald   Add `--log-file` argument to log all protocol traffic to a file (dart-lang/ai#176)
  7ca3eba  2025-06-17  Nate Bosch  Add JSON schema for test runner arguments (dart-lang/ai#169)

core (https://github.com/dart-lang/core/compare/dc97530..b59ecf4):
  b59ecf4c  2025-06-18  Lasse R.H. Nielsen  Optimize surrogate decoding. (dart-lang/core#894)

dartdoc (https://github.com/dart-lang/dartdoc/compare/4ceea6b..f1fe177):
  f1fe1775  2025-06-16  Sarah Zakarias  Refactor 404 error page to use div instead of p for search form (dart-lang/dartdoc#4064)

ecosystem (https://github.com/dart-lang/ecosystem/compare/64aac3a..d5233c6):
  d5233c6  2025-06-13  dependabot[bot]  Bump the github-actions group with 5 updates (dart-lang/ecosystem#351)

web (https://github.com/dart-lang/web/compare/c8c1c28..4b2f02e):
  4b2f02e  2025-06-18  nikeokoronkwo  Add Variable Declaration Support (dart-lang/web#382)

webdev (https://github.com/dart-lang/webdev/compare/661dafd..6dc3dde):
  6dc3ddef  2025-06-20  Jessy Yameogo  Fix duplicate connection/logs in Webdev (dart-lang/webdev#2635)
  0c8a17b4  2025-06-20  Morgan :)  Remove dependency overrides. (dart-lang/webdev#2634)
  a3218638  2025-06-16  Jessy Yameogo  modifying DWDS Injector to always inject client and introduce useDwdsWebSocketConnection flag (dart-lang/webdev#2629)
  2eb27546  2025-06-16  Morgan :)  Prepare for `build_runner` changes. (dart-lang/webdev#2633)

Change-Id: Ib323bea37dd77ed94387e77d9c504f889bfa8050
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436021
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
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.

3 participants