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
With release 3.27.0 of Flutter and the Dart 3.6.0 release, support was added for Dart workspaces.
This speeds up the analyzer, and keeps all dependency resolutions in a single place (the root of the repo).
For our large projects, we are dividing our apps in subpackages, and manage the shared dependencies through melos, as well add some custom scripts to the melos.yaml file.
When adding a Dart workspace to our repository, melos bootstrap fails with the following error:
Cannot override workspace packages.
Package `app_health` at `../../../packages/core/app_health` is overridden in `../../../packages/providers/api/pubspec.yaml`.
Failed to update packages.
I believe this error is due to this particular part in the workspaces documentation: we can only override a package once in a workspace. But, since melos creates a pubspec_overrides.yaml file for each subpackage, subpackages can be overridden multiple times.
Ideally, we could add a parameter to the melos.yaml file to configure where the pubspec_overrides should be created: for each package found, or only on the root level (or maybe even that is not needed, and we can just skip this step altogether).
Steps to reproduce
Install and use Flutter 3.27.0
Create a new monorepo with some subpackages depending on each other. It's important at least two subpackages depend on the same third subpackage.
Configure a Dart workspace in the repo.
Add melos to the repo.
Run dart pub get
Run melos bootstrap
Expected behavior
melos bootstrap should work together with Dart workspaces.
Screenshots
No response
Additional context and comments
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Version
6.2.0
Description
With release 3.27.0 of Flutter and the Dart 3.6.0 release, support was added for Dart workspaces.
This speeds up the analyzer, and keeps all dependency resolutions in a single place (the root of the repo).
For our large projects, we are dividing our apps in subpackages, and manage the shared dependencies through melos, as well add some custom scripts to the melos.yaml file.
When adding a Dart workspace to our repository,
melos bootstrap
fails with the following error:I believe this error is due to this particular part in the workspaces documentation: we can only override a package once in a workspace. But, since melos creates a pubspec_overrides.yaml file for each subpackage, subpackages can be overridden multiple times.
Ideally, we could add a parameter to the melos.yaml file to configure where the pubspec_overrides should be created: for each package found, or only on the root level (or maybe even that is not needed, and we can just skip this step altogether).
Steps to reproduce
Expected behavior
melos bootstrap should work together with Dart workspaces.
Screenshots
No response
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: