Do you want to request a feature or report a bug?
Bug, since it seems like this is related somehow to specifically what dependencies are in use. Hard to say though.
What is the current behavior?
Reproduction repository: https://github.com/loganfsmyth/__yarn-workspace-bug
The structure
// Root package.json has dep on:
[email protected]
[email protected]
and
// Packages:
packages/[email protected]
packages/[email protected] depending on [email protected]
produces
node_modules/
[email protected]
[email protected]
There seems to be some installation issues when the root package depends on older versions of packages from npm, and they also exist in the yarn workspace packages themselves, they don't have their dependencies symlinked to the related packages.
If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/loganfsmyth/__yarn-workspace-bug
What is the expected behavior?
See repo. Packages should be symlinked as would be normally expected.
node_modules/
[email protected]
[email protected]
packages/babel-cli/node_modules/
[email protected] -> ../../babel-core
Please mention your node.js, yarn and operating system version.
Node: 6.9.1
Yarn: 0.27.5
OS: OSX 10.12.5
@byk @arcanis Any ideas on this one? My guess was that having a different version at the root compared to in the workspace itself was confusing Yarn, but I don't know much about how workspaces work internally.
I should clarify, this doesn't seem to be related to babel-core being in both places, but rather babel-cli. If I remove babel-cli dependency from the root package, the symlink from babel-cli to babel-core does get created.
I'm wondering, does the babel-cli in packages get skipped somehow because it's instead installing the version in the repo root?
We had to revert in Babel due to some issues ^
Sorry for not reacting fast, the team is aware of the problem
All good, we are just noticing everything is slow after moving babel-standalone into the repo 馃槃 to get some cool repl features and having to revert.
we are just noticing everything is slow after moving babel-standalone into the repo
lol, @hzoo you can probably blame me for that 馃槢 We can always move babel-standalone out of the repo, but I think the REPL functionality is very useful.
Ya, I was thinking that we should make a smaller version of babel-standalone (babel-repl, babel-standalone-repl) that only includes what we need to test PRs/repl?
I totally think it's useful and why I rushed to add it in the first place (but then now bootstrap is taking 200s instead of like 50s with workspaces 馃槃 and like 120 with standalone or something) https://github.com/hzoo/babel/commit/32e71b6a2c9198dc9813fb40b1ed2592524fd54b but dono it that actually does anything lol
Do you mean just for the plugins / presets modified in the PR? What if you want to test the interaction between the modified plugins and some other plugins? I suspect a lot of builds would want the 'full' REPL build available. Maybe we could split up the build into several files and only build the files that need to be rebuilt.
Anyways, we should move this discussion to the Babel repo 馃槢
This is can also be produced with non workspace dependencies like:
// Root package.json has dep on:
[email protected]
[email protected]
and
// Packages:
packages/[email protected] depending on [email protected]
does not install [email protected] anywhere.
After looking for hours it seems that the hoister does not support the case when a workspace-dependency cannot be symlinked in the root node_modules if a dependency with the same name is already going to be installed there. But installing dependencies in the workspace node_module folder does right now rely on being able to have the workspace linked in the root node_modules folder.
I created a PR that hopefully is going to fix this. #7289
I was trying to enable workspaces in Babel and then found this issue. Is there anything I can do to help moving it forward?
I gave another look and it sounds good to merge if the rebase is still green. I will make a pass on a few other PRs tomorrow and release all that 馃檪
Thanks :heart:
Thanks!
The 1.19.2 should be available - to upgrade inside the Babel repo, try running yarn policies set-version 1.19.2 馃檪
Most helpful comment
The 1.19.2 should be available - to upgrade inside the Babel repo, try running
yarn policies set-version 1.19.2馃檪