Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn add is losing workspace symlinks #4635

Closed
ghost opened this issue Oct 5, 2017 · 1 comment · Fixed by #4757
Closed

yarn add is losing workspace symlinks #4635

ghost opened this issue Oct 5, 2017 · 1 comment · Fixed by #4757

Comments

@ghost
Copy link

ghost commented Oct 5, 2017

Using yarn 1.1.0, node 8.3.0:

ls node_modules # includes several symlinks from workspace modules
yarn add --dev jest
ls node_modules # symlinks are gone

There are no errors during the yarn add, it just seems to blow away workspace links. Running yarn again restores them.

@TxHawks
Copy link

TxHawks commented Oct 9, 2017

I can confirm being bitten by this as well

@BYK BYK closed this as completed in #4757 Oct 26, 2017
BYK pushed a commit that referenced this issue Oct 26, 2017
**Summary**

 Actual fix: changed fs.readlink to fs.realpath when checking if a symlink is a linked dependency in package-linker.js This fixes yarn removing linked deps when installing or updating.

Fixes #3288, fixes #4770, fixes #4635, fixes #4603.

Potential fix for #3202.

**Test plan**

See #3288 (comment) for repro steps.
See #3288 (comment) for my explanation of the problem.

With a real world test scenario this works, but I'm unable to have it break from a unit test. I added a test in the integration suite but with the bug added back in it still passes because both generated paths are identical. I would like some help with the unit test.
joaolucasl pushed a commit to joaolucasl/yarn that referenced this issue Oct 27, 2017
…#4757)

**Summary**

 Actual fix: changed fs.readlink to fs.realpath when checking if a symlink is a linked dependency in package-linker.js This fixes yarn removing linked deps when installing or updating.

Fixes yarnpkg#3288, fixes yarnpkg#4770, fixes yarnpkg#4635, fixes yarnpkg#4603.

Potential fix for yarnpkg#3202.

**Test plan**

See yarnpkg#3288 (comment) for repro steps.
See yarnpkg#3288 (comment) for my explanation of the problem.

With a real world test scenario this works, but I'm unable to have it break from a unit test. I added a test in the integration suite but with the bug added back in it still passes because both generated paths are identical. I would like some help with the unit test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant