!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

209 Members
59 Servers

Load older messages


SenderMessageTime
14 Oct 2023
@ahbk:matrix.orgI use NixOS btw
In reply to @lily:lily.flowers
Cache like upload to cachix or something?
*

No sorry not cached. I'm not sure I understand this, but I when the flake is changed, I guess the yarn package has to be recalculated or evaluated which takes some time (about 15 seconds). 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

14:40:47
@ahbk:matrix.orgI use NixOS btw *

No sorry not cached. I'm not sure I understand this, but when the flake is changed, I guess the yarn package has to be recalculated or evaluated which takes some time (about 15 seconds). 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

14:40:56
@ahbk:matrix.orgI use NixOS btw *

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

14:41:38
@ahbk:matrix.orgI use NixOS btw *

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

14:42:36
@lily:lily.flowersLily 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
@ahbk:matrix.orgI use NixOS btwneat, thanks!14:45:29
@dandellion:dodsorf.asDandellion
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:lily.flowersLily 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:dodsorf.asDandellion fwiw running nix develop on the derivation, and then manually running the npmConfigHook and such does succesfully build it 23:03:20
@lily:lily.flowersLily 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:lily.flowersLily Foster Dandellion: Do you think you could share your derivation for me to poke at later? 23:04:49
@dandellion:dodsorf.asDandellionsure!23:04:56
@dandellion:dodsorf.asDandellion
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:dodsorf.asDandellionsince nix develop should also come with npmDeps from the npm fetcher23:05:52
@lily:lily.flowersLily FosterYeah it should make those available for npm when running the config hook23:06:14
@dandellion:dodsorf.asDandellionhttps://github.com/dali99/nixos-matrix-modules/commit/ad76e1a94ebb99b34e1fa021e5a0e0b870f7016f23:08:11
15 Oct 2023
@felschr:matrix.orgfelschr joined the room.20:53:53
@felschr:matrix.orgfelschr 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:matrix.orgfelschrAlso, thank you for your help on that PR again.20:57:18
@lily:lily.flowersLily 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:matrix.orgfelschrhmm, right20:57:56
@lily:lily.flowersLily FosterI guess that could make sense20:58:14
@felschr:matrix.orgfelschr something like npmWorkspaceDeps? 20:58:17
@lily:lily.flowersLily Fosterreally npm should be doing this correctly tbh20:58:39
@felschr:matrix.orgfelschrin my case I only need those package to be built so the main workspace can use them as dependencies20:58:46
@lily:lily.flowersLily FosterYeah20:58:58
19 Oct 2023
@marie:marie.cologneMariethis missing integrity hash bug in npm just got me again, are there currently plans to handle this?12:54:20
@lily:lily.flowersLily Fosterplans yes12:54:57
@lily:lily.flowersLily Fostertime, we'll see12:55:02
@lily:lily.flowersLily Fosterif someone wants to work on it, i can push my wip code to refactor lockfile fixup and provide guidance12:55:18

Show newer messages


Back to Room ListRoom Version: 6