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

Update package:frontend_server_client constraint to >=3.0.0 <5.0.0 #3662

Merged

Conversation

derekxu16
Copy link
Member

No description provided.

@@ -24,7 +24,7 @@ dependencies:
collection: ^1.15.0
crypto: ^3.0.0
dart_style: ^2.0.0
frontend_server_client: ^3.0.0
frontend_server_client: ^4.0.0
Copy link
Contributor

Choose a reason for hiding this comment

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

If we don't need any changes, then >=3.0.0 <5.0.0 should work just fine and avoid needing to also update package:test.

But, we would want to run through CI once with version 4.0.0 pinned just to make sure it does work:

dependency_overrides:
  frontend_server_client: 4.0.0

Copy link
Member Author

Choose a reason for hiding this comment

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

@a-siva is looking to delete the AppJIT snapshot of frontend_server, which requires all dependents of package:frontend_server_client to stop using versions < 4.0.0. I was going to make the breaking change request for deleting the AppJIT snapshot after updating packages' constraints on package:frontend_server_client, but now I think it makes sense to get approval for the breaking change first and use that approval to contextualize why constraints need to be updated. So, I'll make the breaking change request first.

Copy link
Contributor

@jakemac53 jakemac53 Mar 28, 2024

Choose a reason for hiding this comment

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

It actually still makes sense to keep the constraint at wide in this package. This is because:

  • A ^4.0.0 constraint won't actually help anybody get onto the latest version (the workflow is the same, there is no scenario where a pub upgrade would give a newer version due to this constraint). If a user can't get version 4.x of frontend_server_client for some reason, it would just select an older version of this package, which allows the older frontend_server_client.
  • Increasing the constraint means users on older SDKs (where frontend_server_client version 3.x is valid) won't be able to get new versions of this package.

So, there is some downside but no actual upside.

Copy link
Contributor

Choose a reason for hiding this comment

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

Put another way, version constraints on dependencies are useful only to express the versions of those dependencies that your package is API compatible with. They are not useful (do not work) for enforcing that your users get a certain bug fix.

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense. Thanks for clarifying. I've changed the constraints and have included the 4.0.0 dependency_override for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we actually don't need to make a breaking change request to delete the AppJIT frontend_server snapshot. frontend_server_client 4.0.0 is the first version of the package to have an SDK constraint that accepts SDK versions >= 3.0.0. The frontend_server_client 3.3.0 verison that you referred to here (dart-lang/webdev#2263 (comment)) was never published.

@derekxu16 derekxu16 force-pushed the update-frontend-server-client-constraint branch from 5962197 to 8da48d3 Compare March 28, 2024 14:36
@derekxu16 derekxu16 changed the title Update package:frontend_server_client constraint to ^4.0.0 Update package:frontend_server_client constraint to >=3.0.0 <5.0.0 Mar 28, 2024
@derekxu16 derekxu16 marked this pull request as ready for review March 28, 2024 14:39
Co-authored-by: Jacob MacDonald <jakemac@google.com>
@jakemac53
Copy link
Contributor

@derekxu16 do we need a release of this soon?

@derekxu16
Copy link
Member Author

@derekxu16 do we need a release of this soon?

That would be ideal. Thanks!

@derekxu16 derekxu16 merged commit 8bd0527 into dart-lang:master Mar 28, 2024
68 checks passed
@derekxu16 derekxu16 deleted the update-frontend-server-client-constraint branch March 28, 2024 16:48
@jakemac53
Copy link
Contributor

#3663 will do the release

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.

2 participants