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

Packages without dependencies #4

Open
functorism opened this issue Oct 11, 2018 · 0 comments
Open

Packages without dependencies #4

functorism opened this issue Oct 11, 2018 · 0 comments

Comments

@functorism
Copy link
Contributor

For packages without dependencies pnpm does not create a shrinkwrap.yaml file. This is not considered in the current code - and it therefore crashes on packages without dependencies.

I tried to amend this by exporting an identity object of the "internal" shrinkwrap structure. The code doing the import could then check if the file exists and either import the file (and send it over to rewriteShrinkWrap) or return the identity object. But this does not work in all situations. It breaks on one of the existing tests actually (file-dependencies) - because one can not use builtins.pathExists on paths belonging to other derivations (if I'm getting that right...).

The faulty solution I tried can be found here - together with a test that illustrates the problem.

https://github.com/functorism/pnpm2nix/commit/2946edc19ed1974e1de7940de2843a8e4f78f561

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

1 participant