-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
put application source and dependencies in separate nix packages #7
Comments
I'd really like this, but unfortunately there were issues with that last I tried. (Possibly it broke module resolution at run-time, or something along those lines.) But I haven't tried in a while, certainly not since Yarn 3. Even if it breaks things, maybe it could be made to work with some upstream changes. I'm currently not working on this, though. 🙂 |
From my limited tests, I found that replacing I think it could be beneficial to add an argument to the generate
Have you're needs changed, or have you found a better solutions for packaging node applications with nix? |
Sorry, I meant this specific feature. I do use the plugin in general at work, but admittedly not as much as I had planned. We use it for projects that drive our deployments and require integration with Nix. We did make an attempt at deploying client projects, but the developer experience wasn't great compared to Docker, which is what everyone is used to. (Perhaps extra difficult to sell because we're a Mac shop.) So I'm pretty much the only one enthusiastic about Nix in the team. 🤷♂️ |
cool, happy to submit a PR for this. How would you like me to name the argument? Would a boolean |
Sounds good! Even if you'd rather have it default false for now, maybe we can make it default true for PnP in the future with more testing. I think Yarn's config system allows |
This would be very beneficial! |
Hi all I spent quite a bit of time on this since it turned out that what I wrote in the comment above was wrong. I had to jump through a bunch of hoops, including making changes to yarn itself to make it work nicely with pnp (not sure about the node_modules mode since I'm not interested in it). You can see all the work I've done so far on dev branch of my fork. The initial implementation resorted to patching I haven't opened a PR with these changes here due to the fact that I don't like the first solution and the second one requires changes to yarn which have not been upstreamed yet (I initiated the process with this issue however I haven't heard back from the maintainers after initial exchange. Note, the dev branch of my fork also contain support for private npm registries and git repos which I'd be happy to submit as a separate PR. |
One other feature I've got in the pipeline is support for |
This is exciting!
Couldn't nix ignore the provided hash for a |
Currently, it seems, all node deps are bundled together with application source in a single package. This leads to wasted disk space and network bandwidth when only application code changes. Would it be possible to separate those, for example by symlinking the packages into
.yarn/cache
during nix-build instead of copying them?The text was updated successfully, but these errors were encountered: