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
I expect melos' shared-dependencies feature to be able to understand the path reference I've set for a given dependency and use it based on the reference of the melos.yaml file. So, if my local package is under packages/core/my_local_package, I want to be able to set something like the following and it will adapt the path value based on the folder the package using this dependency is
When using shared dependencies feature, where one of the dependencies is referenced using path relation, and considering a monorepo structure where we have multiple levels of folders with packages in each of those, we can't just copy-paste the path reference defined inside the melos.yaml file. For instance, consider the following scenario:
If I define a library foo to be shared between all of those packages:
# melos.yaml# ...command:
bootstrap:
dependencies:
my_local_package:
path: packages/core/my_local_package # this is clear but won't work for any packagepath: ../core/my_local_package # this will only work for `package1` and `package2`path: ../../core/my_local_package # this will only work for `feature_package1` and `feature_package2`
We can't get a path to set that would work for all packages with that local dependency.
Additional context and comments
We probably do something similar with melos bs while creating the pubspec_overrides.yaml file, and I'm not sure shared-dependencies is the best feature for this tbh
The text was updated successfully, but these errors were encountered:
mugbug
changed the title
request: Smart support for path dependencies on shared-dependencies
request: Smarter support for path dependencies on shared-dependencies
Jul 22, 2024
Is there an existing feature request for this?
Command
No response
Description
I expect melos' shared-dependencies feature to be able to understand the
path
reference I've set for a given dependency and use it based on the reference of themelos.yaml
file. So, if my local package is underpackages/core/my_local_package
, I want to be able to set something like the following and it will adapt thepath
value based on the folder the package using this dependency isReasoning
When using shared dependencies feature, where one of the dependencies is referenced using
path
relation, and considering a monorepo structure where we have multiple levels of folders with packages in each of those, we can't just copy-paste the path reference defined inside themelos.yaml
file. For instance, consider the following scenario:Folder structure:
. ├── apps │ ├── app1 │ └── app2 ├── melos.yaml └── packages ├── context1 ├── context2 ├── core │ └── my_local_package ├── features │ ├── feature_package1 │ └── feature_package2 ├── package1 └── package2
If I define a library
foo
to be shared between all of those packages:We can't get a path to set that would work for all packages with that local dependency.
Additional context and comments
We probably do something similar with melos bs while creating the
pubspec_overrides.yaml
file, and I'm not sure shared-dependencies is the best feature for this tbhThe text was updated successfully, but these errors were encountered: