Open JMS-1 opened 1 year ago
I'm wrong concerning yarn 1: it LOOKS as if it's working but it isn't! lib-2 gehts a COPY of lib-1 in its on node_modules which will break developing correctly in the mono-rep.
So maybe this is not a bug but somehow "by design": should yarn workspaces in any version work with git:// dependencies at all?
Sorry
Jochen
Self-service
Describe the bug
We would like to use the git[+ssh]:// protocol to cross reference repositories in a mono-rep. All repositories are git submodules. With yarn 3.2.4 dependencies between respositories are no longer detected. yarn 1.22.19 works fine.
To reproduce
I created a GITHUB Respository for reproduction. First the error itself (linux dev env):
git clone git@github.com:JMS-1/repro-ws.git --recursive cd repro-ws ./reset
You can see that repro-lib-1 does not create a symbolic link to the folder in the mono-rep. You can check the yarn.lock created to see that indeed there are two separate instance of repro-lib-1. Another indication is the execution order.
watch -n 0.1 yarn workspaces foreach --topological-dev -p -iv exec pwd
Shows alternation in order between lib-1 and lib-2.
Now you can go back back to yarn 1 by removing .yarnrc.yml and the packageManger field from the package.json. ./reset now shows hat all folders are correctly linked. Again checking yarn.lock looks very different but better. The manual test shows a stable execution order as well.
yarn workspaces run
As it should lib-1 is ALWAYS considered to run first.
Environment
Additional context
No response