| 13 Nov 2023 |
@keiichi:matrix.org | I build it with :
pulumiSdks = pkgs.buildNpmPackage {
pname = "ci-runner";
version = "1.0.0";
src = ./.;
npmDepsHash = "sha256-mUNksrt+S90RoXTofPSwhRAMw5wqrdjKtINkUA0KrQE=";
dontNpmBuild = true;
dontBuild = true;
};
and a nixpkgs of 8ac5c1191b06206f8508595f0c17332b851240f0
| 17:10:01 |
@keiichi:matrix.org | let me regenerate the log | 17:10:50 |
Lily Foster | i mean i've got it building on my end now | 17:13:18 |
Lily Foster | oh it's happening during prune...?? | 17:14:22 |
Lily Foster | what the hell | 17:14:26 |
Lily Foster | (why does npm prune logic always have to be so horribly busted) | 17:15:37 |
@keiichi:matrix.org | yes. I haven't tried dontNpmPrune = true yet, trying | 17:25:18 |
Lily Foster | apparently npm prunes deps but then decides that the node_modules/@pulumi/query (that already has been reified when deps were built) is insufficient and needs to be re-reified. which would be fine except it also decides that the cache is for losers and ignores or otherwise gets too spooked by the existing entry for query-0.3.0.tgz | 17:27:43 |
Lily Foster | whic | 17:28:00 |
Lily Foster | * which | 17:28:01 |
Lily Foster | makes no sense | 17:28:03 |
Lily Foster | npm is very eager to silently get spooked and redownload though so i'm ultimately not surprised | 17:28:21 |
Lily Foster | it would be nice to know whether it got spooked or didn't try the cache to begin with though (and even npm's debug logging does not log a lot of the situations where it gets spooked and bails for, unfortunately) | 17:28:54 |
@keiichi:matrix.org | dontNpmPrune "fixed" the build ty for help I hope this helps improving the understanding of npm xD | 17:30:03 |
Lily Foster | i'm trying to root out the bug now | 17:33:18 |
Lily Foster | in npm | 17:33:20 |
Lily Foster | which upstream will invariably ignore a PR for but oh well | 17:33:28 |
Lily Foster | okay so npm is actually just removing the cache value from npmrc? | 17:39:14 |
Lily Foster | what the hell? | 17:39:15 |
Lily Foster | oh we actually remove that | 17:39:50 |
Lily Foster | in the hook | 17:39:51 |
Lily Foster | the bugs are coming from inside the nixpkgs | 17:39:56 |
Lily Foster | okay | 17:39:57 |
Lily Foster | well give me a bit and i'll be able to have a "fix" for that | 17:40:10 |
Lily Foster | (it is probably bug on our end, but npm still shouldn't be trying to re-reify stuff regardless when pruning) | 17:40:25 |
Lily Foster | * (it is probably partly a bug on our end, but npm still shouldn't be trying to re-reify stuff regardless when pruning) | 17:40:35 |
Lily Foster | teto: can you try from github:lilyinstarlight/nixpkgs/fix/npm-pack-shenanigans and see if that works without compromising prune? | 17:44:51 |
@keiichi:matrix.org | awesome. There is no hurry on my side since dontNpmPrune works well. Now there is one question I've asked on the discourse without any answer is how people work with typescript on nix ? I had solved it with dream2nix but with the rewrite I stopped using it and I would like to use buildNpmPackage since it works reasonably well. Usually in my shellHook, I export NODE_PATH=${drvBuiltBy_buildNpmPackage}/lib/node_modules but typescript ignores NODE_PATH I believe so I end with TSError: ⨯ Unable to compile TypeScript: and index.ts(1,25): error TS2307: Cannot find module '@pulumi/pulumi' or its corresponding type declarations. | 17:45:42 |
@keiichi:matrix.org | I'll have to merge that in my own nixpkgs. Gotta do some shopping before it closes than I try ty ! | 17:46:29 |
Lily Foster | In reply to @keiichi:matrix.org awesome. There is no hurry on my side since dontNpmPrune works well. Now there is one question I've asked on the discourse without any answer is how people work with typescript on nix ? I had solved it with dream2nix but with the rewrite I stopped using it and I would like to use buildNpmPackage since it works reasonably well. Usually in my shellHook, I export NODE_PATH=${drvBuiltBy_buildNpmPackage}/lib/node_modules but typescript ignores NODE_PATH I believe so I end with TSError: ⨯ Unable to compile TypeScript: and index.ts(1,25): error TS2307: Cannot find module '@pulumi/pulumi' or its corresponding type declarations. It should "just work" for the most part. Is there a reproducer on the discourse post? (feel free to tag me on those btw, i don't watch discourse super closely) | 17:46:33 |