Skip to content

Conversation

@bbarker
Copy link
Contributor

@bbarker bbarker commented Feb 1, 2021

NPM doesn't have the concept of provided dependencies, but we can make dependencies optional. If there is a failure installing the optional dependencies, it won't cause a failure overall. Binaries distributed via npm are a problem on certain OSes (e.g. NixOS) that have somwhat different linking conventions than most Linux distributions. As far as I can tell, this shouldn't affect users not on Nix-based environments (including in my testing).

I also provide a very basic (strictly optional) shell.nix to load the required binaries.

@ajnsit
Copy link
Member

ajnsit commented Feb 9, 2021

I suppose purescript and spago should also live in dev dependencies?

@bbarker
Copy link
Contributor Author

bbarker commented Feb 9, 2021

In principle, they should live in "optionalDevDependencies", but it doesn't exist. If they were in devDependencies, if you install them on a system where there is a version of the package available, but the npm installation of the same package fails, the entire build is halted. Whereas in optionalDependencies, things will keep working fine. Of course, if the user doesn't have spago or purs AND the npm installation fails, well, what can you do :-) it would have failed anyway.

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 this pull request may close these issues.

2 participants