-
Notifications
You must be signed in to change notification settings - Fork 226
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
Add a way to have overridden dependencies versions checked. #4497
Comments
I think I would guess that (B) is just something that people happen to use Adding something like Suddenly, values under I'm not sure here, but I think we should be asking:
I imagine that (2) could be: dependency_sources:
foo:
- path: third_party/foo
- path: first_party/foo I'm not sure I like this idea either, because we generally embed identity in the location of a package. So it doesn't really make sense to say that |
What we currently call the "description" is what comes after the source-name. So in dependencies:
foo:
path: path/to/foo
version: ^2.1.0
You might still be right, and it is desirable to have the And yeah, maybe it would make sense to split Trouble is that the current |
I think this makes a lot of sense in the for the SDK where we want to override the source of the dependencies we build against. But you might be right that it is less useful in general. |
If we land See also #4496 that (as I read it) complains that it is surprising that using a non-hosted source in the root doesn't change the source everywhere. |
dependency_overrides have two main use cases:
Currently if you override a dependency, you are overriding both the version and the source. Thus, the version constraints on the dependency override are not validated.
For example in https://dart-review.googlesource.com/c/sdk/+/397164 we are trying to migrate the sdk to be a pub workspace. And all third party dependencies are overridden as path dependencies.
Ideally we would like that all version constraints on the third party packages would be validated, to prevent publishing new versions of the sdk packages with bad constraints.
I suggest this could be done by specifying a key next to the source description, something like:
We could also make it the default - but I'm afraid that would be too breaking.
@jonasfj WDYT?
The text was updated successfully, but these errors were encountered: