You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This compiles, and Pub doesn't complain. However, pubspec_parse version 1.5 requires Dart 3.6! Everything works because, coincidentally, I happen to have Dart 3.6 on my PC. But someone else might not, especially a CI workflow (this happens to me all the time). I have a use case where I need to be entirely offline, so I'd like to know if I need to upgrade my Dart SDK as far in advance as possible. In general, I want to know when updating a dependency will cause my project's minimum Dart version to increase
As for transitive dependencies, it's probably safer to check each package in .dart_config/package_config.json and flag the highest Dart version required by any dependency, preferring to show direct dependencies when possible.
The text was updated successfully, but these errors were encountered:
The sdk constraint is for the package itself, and doesn't cover the dependencies. It is a bit confusing, but I think it makes the most sense
Consider the case where a new version 1.5.1 of pubspec_parse was published with a lower sdk constraint. Now the project actually would work with the older sdk.
The sdk constraint is also used for specifying the language version, so that might be one reason to leave it lower than the dependencies.
If you look at the pubspec.lock, it has a section at the bottom like:
sdks:
dart: ">=3.5.0 <4.0.0"
It specifies the intersection of all sdk constraints of all packages in the resolution.
I remember discussing this before, but cannot find the exact issue to link.
(Duplicating this from Workiva/dependency_validator#141, since I think this has value being integrated into Pub directly).
Say I have the following project:
This compiles, and Pub doesn't complain. However,
pubspec_parse
version 1.5 requires Dart 3.6! Everything works because, coincidentally, I happen to have Dart 3.6 on my PC. But someone else might not, especially a CI workflow (this happens to me all the time). I have a use case where I need to be entirely offline, so I'd like to know if I need to upgrade my Dart SDK as far in advance as possible. In general, I want to know when updating a dependency will cause my project's minimum Dart version to increaseAs for transitive dependencies, it's probably safer to check each package in
.dart_config/package_config.json
and flag the highest Dart version required by any dependency, preferring to show direct dependencies when possible.The text was updated successfully, but these errors were encountered: