-
Notifications
You must be signed in to change notification settings - Fork 14
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
Pure nix yarn.lock parsing #10
Comments
Hi @bouk, wow, it looks awesome! 🙂
Yeah, this I a really good developer experience I think and the The tool was implemented in JS initially for a single reason, to make the PoC asap and iterate over with a reasonable pace. I would love to see it implemented in Nix where possible/reasonable. I am not sure, however, if this is something that can be easily done in Nix language: besides a pure representation of a A potentially interesting aspect of having on-fly Thanks for sharing your implementation, it's very interesting digging into reading through it! |
Yes exactly, it'd like to avoid IFD whenever possible, performance being the main reason! The readFile would cause an IFD if the yarn.lock file was generated as well, so if you're packaging up your own code that should be fine. I'll look at the cyclic dependency thing, it should be solvable. But I'm glad you're interested, I'll have to see if I can implement a function that generates the equivalent of the whole yarn.lock.nix file. |
Oh, you are right. I read it again and it seems as long as you Wow, that actually looks exciting if we can remove IFD from this tool. The IFD is not a blocker for us at the moment but it brings some complexity into pipelines and definitely slows down parallel Nix build execution. Thanks for your suggestion, I look forward to getting the change in 🙂 |
Thinking about it some more, I think the IFD would only appear if you are packaging an external source, that is you're using js2nix on a project fetched from GitHub or something—in that case you'd need to vendor the yarn.lock. |
Hi there,
I've implemented a pure nix yarn.lock parser: https://gist.github.com/bouk/95f565b744168a3a0fcf396c1ebb805e
I was thinking this can be used in
js2nix
so it can work without having to generate and commit ayarn.lock.nix
file. This would make the user experience a lot nicer since you'd only have to runyarn update
to upgrade a version for example, without having to then runjs2nix
as well. Let me know if this is useful and if you need any help integrating it!The text was updated successfully, but these errors were encountered: