| 14 Oct 2023 |
Lily Foster | In reply to @ahbk:matrix.org
No sorry not cached. I'm not sure I understand this, but when the flake is changed I think the yarn package has to be recalculated or evaluated which takes some time (about 15 seconds), even if the change didn't affect the package. This is different from the other packages in the flake which are evaluated almost immediately if they haven't been changed. I experienced this as a cache miss but I realize now that it is not about that. Here's the flake:
https://github.com/ahbk/ahbk/blob/main/flake.nix#L39
Ah, you might want to look into something like https://github.com/numtide/nix-filter | 14:44:13 |
I use NixOS btw | neat, thanks! | 14:45:29 |
Dandellion | In reply to @lily:lily.flowers Hmmmm if i remember i'll try to investigate later of it's just our fetcher not doing something right or if npm is the one who is choking on it I made an impure derivation, and now it's failing with:
out-of-your-element> npm ERR! command git --no-replace-objects ls-remote https://git.sr.ht/~cadence/nodejs-discord-markdown
out-of-your-element> npm ERR! fatal: unable to access 'https://git.sr.ht/~cadence/nodejs-discord-markdown/': OpenSSL/3.0.10: error:16000069:STORE routines::unregistered scheme
out-of-your-element> npm verb exit 128
out-of-your-element> npm verb unfinished npm timer reify 1697324205527
out-of-your-element> npm verb unfinished npm timer reify:unpack 1697324205560
out-of-your-element> npm verb unfinished npm timer reifyNode:node_modules/discord-markdown 1697324205573
out-of-your-element> npm verb code 128
I don't know if it's very relevant, but it's kind of sus
| 22:59:52 |
Lily Foster | In reply to @dandellion:dodsorf.as
I made an impure derivation, and now it's failing with:
out-of-your-element> npm ERR! command git --no-replace-objects ls-remote https://git.sr.ht/~cadence/nodejs-discord-markdown
out-of-your-element> npm ERR! fatal: unable to access 'https://git.sr.ht/~cadence/nodejs-discord-markdown/': OpenSSL/3.0.10: error:16000069:STORE routines::unregistered scheme
out-of-your-element> npm verb exit 128
out-of-your-element> npm verb unfinished npm timer reify 1697324205527
out-of-your-element> npm verb unfinished npm timer reify:unpack 1697324205560
out-of-your-element> npm verb unfinished npm timer reifyNode:node_modules/discord-markdown 1697324205573
out-of-your-element> npm verb code 128
I don't know if it's very relevant, but it's kind of sus
That is pretty weird, but i'm not sure how relevant it is. I'm assuming this is all an artifact of that npm does not consider sourcehut a source that it can pull tarballs from and must fall back to git checkout. As for where that is going wrong, i need to dive in to our tooling again and instrument npm to find why it doesn't like that | 23:02:16 |
Dandellion | fwiw running nix develop on the derivation, and then manually running the npmConfigHook and such does succesfully build it | 23:03:20 |
Lily Foster | In reply to @dandellion:dodsorf.as fwiw running nix develop on the derivation, and then manually running the npmConfigHook and such does succesfully build it That's expected since dev shell lets npm call out to the internet when it's not supposed to need to (npm gets very very happy about silently deciding something is wrong and deleting and redownloading from the internet....) | 23:04:12 |
Lily Foster | Dandellion: Do you think you could share your derivation for me to poke at later? | 23:04:49 |
Dandellion | sure! | 23:04:56 |
Dandellion | In reply to @lily:lily.flowers That's expected since dev shell lets npm call out to the internet when it's not supposed to need to (npm gets very very happy about silently deciding something is wrong and deleting and redownloading from the internet....) Ah right, yeah, I'm mainly confused about why the impure derivation then fails to build | 23:05:30 |
Dandellion | since nix develop should also come with npmDeps from the npm fetcher | 23:05:52 |
Lily Foster | Yeah it should make those available for npm when running the config hook | 23:06:14 |
Dandellion | https://github.com/dali99/nixos-matrix-modules/commit/ad76e1a94ebb99b34e1fa021e5a0e0b870f7016f | 23:08:11 |
| 15 Oct 2023 |
| felschr joined the room. | 20:53:53 |
felschr | Lily Foster, I guess buildNpmPackage could add a npmWorkspaces option to simplify building multiple workspaces. It's not really an issue, though, to just build the other packages in a preBuild. | 20:55:25 |
felschr | Also, thank you for your help on that PR again. | 20:57:18 |
Lily Foster | In reply to @felschr:matrix.org Lily Foster, I guess buildNpmPackage could add a npmWorkspaces option to simplify building multiple workspaces. It's not really an issue, though, to just build the other packages in a preBuild. It's weird to understand what that would mean though. Like do they all just get installed side-by-side in $out/lib/node_modules and bins all installed in $out/bin? | 20:57:22 |
felschr | hmm, right | 20:57:56 |
Lily Foster | I guess that could make sense | 20:58:14 |