-
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
Ignore optional dependency if wrong platform #1438
Conversation
This exclusion already happens in |
I saw that too but still there is one issue left: Yarn will not try to install that module especially (here Trying to install a package with appdmg in optional dependency on Linux will fail miserably... |
And the test are failing but I am investigating but I think the tests might not be right. Installing |
@pierrefourgeaud, ping regarding the broken tests. |
@bestander I haven't got the time to look into it. I can do that this week hopefully. |
I believe #1997 should resolve this, please have a look |
I will check that right now. Thanks for the heads up. Is it in 0.18.0 ? |
@mvestergaard After testing on 0.18.0 with MSYS on Windows the error still happen: |
Create an issue I suppose. There's been a bunch of other changes since my PR. |
I think this was fixed in some other commit |
@bestander this is definitely not fixed. #1435 is still open, and a number of bugs in other projects such as this and this appear to be caused by it. You can easily repro it on linux:
It's a hard blocker for being able to use yarn with electron-forge, or I imagine any project with an optional dependency that has a dependency that isn't compatible with all OS's. |
Ok, let's rebase it and merge it then. |
@bendemboski if you want to get it merged fast, in case PR author is busy, would you want take over the PR? |
Sure, I can give it a shot. |
Replaced with #2811 |
#1435
Expect to solve the issue where optional dependencies' dependencies are not ignored as they should be.
What is the current behavior?
I get an error while using yarn install instead of just ignoring the dependency.
If the current behavior is a bug, please provide the steps to reproduce.
Here is an excerpt of my
package.json
:Then :
yarn install
Result:
As a comment, it is important to underline that appdmg has actually a dependency named ds-store that has one named macos-alias.
What is the expected behavior?
Yarn should completely ignore appdmg, therefore any dependency related to it.
Please mention your node.js, yarn and operating system version.
Node: 6.5.0
OS: Linux Ubuntu 16.04 (work on OSX 10.10.5 since appdmg is for Darwin).