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

made spago and purescript optional (provided); providing basic shell.nix #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

@bbarker bbarker mentioned this pull request Feb 8, 2021
@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