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
Melos is a command line tool for managing Dart monorepos. The primary benefits it would provide for this repo are:
Make development across projects easier. Currently some projects within the monorepo depend on the version in pub and others have dependency_overrides that have to be removed during publishing. Instead we could just have pub dependencies and Melos will transparently set overrides during local development.
Use local dependencies during CI runs. This is really just an extension of the previous point, but currently the inconsistent dependencies on pub vs local packages means checks on pull requests can't always be trusted. Melos can be used during the CI run to make sure tests run with code from the commit and not pub.dev.
Make publishing updates easier. Currently the varous dependency_overrides sections must be removed or pub publish will refuse to work. At time of writing this is step would be reduced to removing a single file, pubspec_overrides.yaml, from any packages to be published. Melos also has some convenience commands to do things like publish any packages that are newer than the version on pub, generate updated changelogs, etc. I personally find these a little fiddly to get working but they could be useful
Using melos would mean having developers install it with flutter pub global activate melos and then use it to install the projects' dependencies with melos bootstrap. CI tasks would be updated to do the same.
As an alternative, pubspec_overrides.yaml files could be added to each project instead and manually maintained. This mechanism for overriding dependencies during development was added in Dart 2.17 and is what Melos uses under the hood. Currently the presence of these files blocks pub publishing the same as using dependency_overrides, but future versions of pub should ignore the file entirely. This would lose some of the extra functionality provided by Melos but avoid a tool dependency while still solving the intra-repo dependency issue.
The text was updated successfully, but these errors were encountered:
Melos is a command line tool for managing Dart monorepos. The primary benefits it would provide for this repo are:
dependency_overrides
that have to be removed during publishing. Instead we could just have pub dependencies and Melos will transparently set overrides during local development.dependency_overrides
sections must be removed orpub publish
will refuse to work. At time of writing this is step would be reduced to removing a single file,pubspec_overrides.yaml
, from any packages to be published. Melos also has some convenience commands to do things like publish any packages that are newer than the version on pub, generate updated changelogs, etc. I personally find these a little fiddly to get working but they could be usefulUsing melos would mean having developers install it with
flutter pub global activate melos
and then use it to install the projects' dependencies withmelos bootstrap
. CI tasks would be updated to do the same.As an alternative,
pubspec_overrides.yaml
files could be added to each project instead and manually maintained. This mechanism for overriding dependencies during development was added in Dart 2.17 and is what Melos uses under the hood. Currently the presence of these files blocks pub publishing the same as usingdependency_overrides
, but future versions of pub should ignore the file entirely. This would lose some of the extra functionality provided by Melos but avoid a tool dependency while still solving the intra-repo dependency issue.The text was updated successfully, but these errors were encountered: