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 zero installs #96

Open
grrinchas opened this issue Sep 19, 2022 · 2 comments
Open

Yarn zero installs #96

grrinchas opened this issue Sep 19, 2022 · 2 comments

Comments

@grrinchas
Copy link

Using later Yarn versions with zero installs enabled node_modules folder is always deleted if you run yarn add or yarn remove commands. Therefore, you always have to rerun elm-tooling install after those commands.

Would be great if we can specify the path for symlinks. Maybe as part of configuration, or as a CLI option?.

@lydell
Copy link
Member

lydell commented Sep 19, 2022

Hi! Before talking about configurability, I would like to understand better because I have never used Yarn with zero installs.

The way npm works is that for dependencies with bin entries, it puts symlinks (or shell scripts) in node_modules/.bin/ pointing to the actual bin entries. npm run and npx add all node_modules/.bin/ folders up the directory tree to PATH, so they become available to call.

elm-tooling abuses that fact: It puts symlinks (or shell scripts that mimic npm’s ones) in node_modules/.bin/, which means that npm run and npx add them to PATH.

How does Yarn deal with bin entries in dependencies, when using zero installs?

@lydell
Copy link
Member

lydell commented Sep 19, 2022

Reading through https://yarnpkg.com/features/zero-installs, does it even make sense to use elm-tooling together with Yarn zero installs? Wouldn’t you want the Elm and elm-format binaries to be checked in to git?

@lydell lydell changed the title Allow to change path for symplinks Yarn zero installs Oct 1, 2022
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

No branches or pull requests

2 participants