ocaml-lsp icon indicating copy to clipboard operation
ocaml-lsp copied to clipboard

Do not rely on global yarn

Open cuihtlauac opened this issue 3 years ago • 1 comments

Install yarn (https://yarnpkg.com) in ocaml-lsp-server/test/e2e using npm --no-save --no-package-lock. Change Makefile targets and run_test_e2e in order to use project yarn. Introduce Makefile dependencies making sure yarn installation takes place before targets requiring yarn.

In Ubuntu and Debian, package cmdtest installs unrelated (python) /usr/bin/yarn and /bin/yarn which conflicts with globally installed (nodejs) yarn. Using a project-installed yarn resolves this issue. Incidentally, it reduces the contributor-facing dependencies to Node.js/npm.

cuihtlauac avatar Oct 15 '22 02:10 cuihtlauac

Unfortunately this breaks my nix setup.

What about just making your yarn installed npm available in PATH?

rgrinberg avatar Oct 15 '22 14:10 rgrinberg

I'll have a try with paths. How can I reproduce your nix break?

cuihtlauac avatar Oct 17 '22 11:10 cuihtlauac

It should be enough to do $ nix develop followed by running the tests

Rudi. On Oct 17, 2022, 5:46 AM -0600, Cuihtlauac Alvarado @.***>, wrote:

I'll have a try with paths. How can I reproduce your nix break? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

rgrinberg avatar Oct 18 '22 23:10 rgrinberg

please re-open once the issues are fixed

rgrinberg avatar Jan 13 '23 15:01 rgrinberg