Nix NodeJS | 203 Members | |
| 58 Servers |
| Sender | Message | Time |
|---|---|---|
| 13 Nov 2023 | ||
| yeah i feel the low-on-cycles bit | 22:55:01 | |
| (i've been able to surprisingly do some stuff of late, but i haven't been able to choose what i am capable of working on and it's mostly been to distract from life stuff π) | 22:55:24 | |
In reply to @lily:lily.flowersWhat's the most proper way to do yarn packaging at the moment? I thought the last part of yarn2nix was the fixup_yarn_lock (or is it the one with dashes?) that's in a bunch of packages | 22:56:28 | |
* In reply to @lily:lily.flowerssends internet accolades | 22:56:57 | |
In reply to @ambroisie:belanyi.frwell i finally got the new fixup stuff in, so someone just needs to dust off https://github.com/NixOS/nixpkgs/pull/210814 now | 22:58:40 | |
| Oooh π | 22:58:53 | |
| ah yes, the classic "i'll reply later" a few months ago (oops....) | 22:59:09 | |
| forgot about that | 22:59:12 | |
| Turns out I'm already subscribed to the MR, I'd just forgotten it existed... :') | 23:00:56 | |
| 14 Nov 2023 | ||
| Ah this looks nicer than yarn2nix π€ | 04:13:02 | |
| I spent several hours Lily Foster to figure out why yarn2nix doesn't work. I get to a state where it's functioning, there was multiple problems:
Now it's a state when it can build selected modules even referencing each other, but yarn.lock is too big, and because of that any module build is 10 minutes due to very slow fixupPhase and eating up too much space. I cannot find anything that how could I exclude them from derivation, it wants to build a module for each packaging regardless of shared offlinecache. Nor I wasn't able to turn off fix up. So unless you have some any other idea, I gave up on this for now π i also tried to add yarn.lock to each module but itβs not maintable either. Anyway, I just wanted to thank you for your kind help π | 12:33:19 | |
In reply to @szucsitg:matrix.orgwhat's it trying to do during fixup? if it's just taking a while to strip stuff you could dontStrip = true; on the derivation | 12:57:49 | |
| also i'm glad you figured out at least those problems! sorry i didn't end up being more helpful π | 12:58:03 | |
| Thanks, dontstrip does made it much faster. Also I figured out that I had the unlink error I just forgot to mention due to parallel writes to cache. Unfortunately I ran into another issue. Infinite recursion... My colleagues made circular dependency between workspace modules π | 13:49:07 | |
In reply to @szucsitg:matrix.orgoof | 13:49:49 | |
| idk how yarn or yarn2nix does peer dep handling | 13:50:00 | |
| yarn 1.x treats peer dependencies as optional dependencies; it does not automatically install them, and just produce a warning if they are missing. this is what used to be the behaviour of npm as well. I don't know if newer Yarn versions have changed this | 13:51:37 | |
| * yarn 1.x treats peer dependencies as optional dependencies; it does not automatically install them, and just produces a warning if they are missing. this is what used to be the behaviour of npm as well. I don't know if newer Yarn versions have changed this | 13:51:43 | |
In reply to @joepie91:pixie.townbut it otherwise does the circular resolution okay? i figure it's probably a yarn2nix bug anyway (there seems to be no shortage of those, unfortunately...) | 13:52:32 | |
| I think circular dependencies are undefined behaviour in JS modules? | 13:54:36 | |
| not sure how Yarn handles those in general actually | 13:54:45 | |
| typical peer dependency use would involve one 'primary' package and a bunch of eg. plugin packages that peer-depend on that primary package; I've never really seen peer dependencies used outside of plugin architectures like that | 13:55:23 | |
| so that wouldn't be circular, exactly | 13:55:43 | |
| yeah i suppose they're not designed to be circular, but i thought they were designed to be used in scenarios that otherwise might be circular, like plugin deps | 13:57:30 | |
| idk i need coffee anyway and brain is not working well yet | 13:57:45 | |
| (i'd definitely trust your judgement way more than my own on this anyway) | 13:58:46 | |
| I checked the code they really cross-referenced the project while not even declaring the module in package.json ππ€¦ββοΈ | 13:59:51 | |
| perhaps there are circular plugin architecures, but usually it's more something like
and so both the "core" package and the plugin packages are loaded from the application code, the plugins don't load the core and the core doesn't load the plugins, the peer dependency constraint just serves to give people a warning if they have an incompatible core and plugins in the same project | 14:02:22 | |
| * perhaps there are circular plugin architecures, but usually it's more something like
and so both the "core" package and the plugin packages are loaded from the application code, the plugins don't load the core and the core doesn't load the plugins, the peer dependency constraint just serves to give people a warning if they have an incompatible core and plugins in the same project | 14:02:28 | |
| I wonder if it's possible to just install a list of dependencies https://github.com/svanderburg/node2nix#adding-unspecified-dependencies , like having a package.json
npm update doesn't work so I think not. My original issue is that right now I need to use | 14:09:55 | |