-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Sub dependency .bin symlinks can override top level dependency .bin symlink #4937
Comments
The problem I encountered was with LiveScript and livescript which is two different packages what both specifiy a binary called |
Can you explain it a bit? Did you mean that if you |
This is a recurring bug that keeps being marked fix and never quite is. Simple repro: |
@torifat This code tries to decide which top level bin links should be created. The problem is that it goes by package name, not the link name. And since packages can have bin links (even multiple ones) with whatever names they chose it will do the wrong thing in a lot of cases where differently named packages have bin links with the same name, such as in my reproduction above. |
@anders-advisa since you have figured out the root of the problem. Do you want to submit a PR? I would happy to assist you 😃 |
@torifat haha, I actually spent an hour on two on that (which is why I know what the problem is), but I couldn't get the test suite working properly (took very long time and I got a few failing tests in master). But I'll probably have time to look at it again next week or so. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Sub dependencies .bin symlinks override top level dependencies .bin symlinks in some cases (seems to be depending on which top level package is first when sorted alphabetically). Likely introduced in #3310
If the current behavior is a bug, please provide the steps to reproduce.
Example: https://github.com/anders-advisa/yarn-symlink-bug
What is the expected behavior?
Dependencies explicitly entered into
package.json
should have precedence over sub dependencies.Please mention your node.js, yarn and operating system version.
node: 8.9.1
yarn: 1.3.2
The text was updated successfully, but these errors were encountered: