Description
It would be useful for mono-repos if mono_repo.yaml
could contain an option like force_one_version: true
, to support mono-repos following the one version rule.
Features:
- Check that dependency constraints on a given package name, is the same in all
pubspec.yaml
files in the mono-repo. - Resolve all
pubspec.yaml
to the same versions when runningmono_repo pub get
.
(2) is probably a bit hard to do, might involve generating a single pubspec.yaml
containing all dependency constraints, resolving it, and writing the pubspec.lock
to all packages in the mono-repo before running pub get
for each package in the mono-repo.
(it's rather easy to generate such a pubspec.yaml
, save it in a temporary folder that is deleted after it's used for resolution).
@yjbanov, pointed out that many Flutter mono-repos would benefit from something like this, as they are currently using pinning and various scripts to ensure that they only have one version of each package.