Packages under pkg
in this repo should override deps using pubspec_overrides.yaml
#51952
Labels
area-infrastructure
Use area-infrastructure for SDK infrastructure issues, like continuous integration bot changes.
Today SDK packages (and all SDK code) rely on the top level package config from the SDK for package resolution. Accidentally running a
dart pub get
can either fail, or cause other random problems. At best it will give you versions of dependencies that are not kept in step with the SDK versions of those dependencies.We can resolve this by committing
pubspec_overrides.yaml
files next to ourpubspec.yaml
files. These only affect local development. See an example from thebuild
mono_repo here https://github.com/dart-lang/build/blob/master/build/pubspec_overrides.yaml.This would eliminate confusion around running
dart pub get
by accident - it would now be supported and load the correct version of the packages (it would be a different, smaller package_config.json than the normal SDK one, but the result would be the same outside of some very weird situations).This would also alleviate concerns around
dart run <script>
,dart test
, etc doing a pub get, which causes issues in the SDK (whether that change sticks is largely irrelevant to this change though).cc @bkonyi @mit-mit @natebosch @leafpetersen @jonasfj @sigurdm
The text was updated successfully, but these errors were encountered: