-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
protoc-gen-es: init at 1.10.0, protoc-gen-connect-es: init at 1.4.0 #243432
Conversation
a226f10
to
5e7371b
Compare
For some reason the npm deps for unpacking sources
unpacking source archive /nix/store/12md47d55g0an07msckkazlynw6y1fz4-source
source root is source
patching sources
updateAutotoolsGnuConfigScriptsPhase
configuring
no configure script, doing nothing
building
DEBUG 1, out: "/nix/store/k7pzr462jply2x2mrjs9gg9ad1jpy8z1-protoc-gen-es-1.2.1-npm-deps"
Error: No such file or directory (os error 2) I've added some logging to I've tried creating the Validating consistency between /build/source/package-lock.json and /nix/store/k75l3phibjdsqgnbwfgz7mfwrn6r8rhn-protoc-gen-es-1.2.1-npm-deps/package-lock.json
Error: IO error for operation on /nix/store/k75l3phibjdsqgnbwfgz7mfwrn6r8rhn-protoc-gen-es-1.2.1-npm-deps/_cacache/index-v5: No such file or directory (os error 2)
Caused by:
No such file or directory (os error 2) The build for |
@winterqt, @lilyinstarlight, do you have any idea what might cause this? |
I just noticed, I've used the wrong The exact place where it fails is in
|
@ofborg build protoc-gen-es |
@felschr, these upstream lockfiles are busted and need to be deleted+regenerated. They contain hardly any The connect-es repo only works now because the package-lock.json in the latest release had that info, but it has since disappeared in the main branch since connectrpc/connect-es@411bba5 You'll probably either need to vendor a working package-lock.json or bug upstream to fix their package-lock.json files (are they using some old npm version or something? why would that information disappear?) We definitely need to have a better error message for this case in prefetch-npm-deps though, so I'll open a PR in a bit to detect and error out in this scenario |
@lilyinstarlight, ah, thank you. It's indeed been quite painful to debug this. |
Yeah, sorry about that 😅 I've opened #243458 with a better error message and an escape hatch if someone really was trying to generate an empty cache for some reason |
5e7371b
to
4743531
Compare
I've updated the PR to fix the Installing dependencies
npm WARN deprecated @types/lz-string@1.5.0: This is a stub types definition. lz-string provides its own type definitions, so you do not need this installed.
npm ERR! code ENOTCACHED
npm ERR! request to https://registry.npmjs.org/typescript failed: cache mode is 'only-if-cached' but no cached response is available.
npm ERR! A complete log of this run can be found in:
npm ERR! /build/cache/_logs/2023-07-14T15_29_02_932Z-debug-0.log
ERROR: npm failed to install dependencies
Here are a few things you can try, depending on the error:
1. Set `makeCacheWritable = true`
Note that this won't help if npm is complaining about not being able to write to the logs directory -- look above that for the actual error.
2. Set `npmFlags = [ "--legacy-peer-deps" ]` The |
Same problem when I completely regenerate the |
Did you update the After fixing the hash, the build still fails but that's due to missing type stubs for typescript |
4743531
to
69dc730
Compare
Might be, but I still get the cache error even with the correct hash. Installing dependencies
npm WARN deprecated @types/lz-string@1.5.0: This is a stub types definition. lz-string provides its own type definitions, so you do not need this installed.
npm ERR! code ENOTCACHED
npm ERR! request to https://registry.npmjs.org/typescript failed: cache mode is 'only-if-cached' but no cached response is available. |
69dc730
to
07fd2de
Compare
@ofborg build protoc-gen-es protoc-gen-connect-es |
07fd2de
to
0ab51e0
Compare
Moved the packages to |
👋 Hi! I'm looking to use the same npm packages via nix. Is there anything that can be done to move this PR along? |
@jtszalay I'm actually resuming work on the project where I need these dependencies. |
ae79806
to
188ded7
Compare
4cc200b
to
a24c9b5
Compare
I've updated the packages to the latest versions and automated the @jtszalay would you be interested in maintaining these packages with me? |
Result of 2 packages built:
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
@felschr We'll be using them at my work so, yes, I can do that. 👍 |
@jtszalay Awesome. You'll need to add yourself to the maintainer list first. |
a24c9b5
to
974b5eb
Compare
@felschr I started pulling this into my repo but I see the following:
|
@jtszalay I can't reproduce that issue. I was able to add both dependencies to a dev shell without issues. If you referenced the packages from this PR before, you might have to garbage collect your nix store. However, I do get a runtime error when trying to run ❯ protoc-gen-es
node:internal/modules/cjs/loader:1146
throw err;
^
Error: Cannot find module '@bufbuild/protoplugin'
Require stack:
- /nix/store/yrh9ikqfchzg00dv8j7i2gxirdvylh6x-protoc-gen-es-1.10.0/lib/node_modules/null/bin/protoc-gen-es
at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
at Module._load (node:internal/modules/cjs/loader:984:27)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/nix/store/yrh9ikqfchzg00dv8j7i2gxirdvylh6x-protoc-gen-es-1.10.0/lib/node_modules/null/bin/protoc-gen-es:3:21)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/nix/store/yrh9ikqfchzg00dv8j7i2gxirdvylh6x-protoc-gen-es-1.10.0/lib/node_modules/null/bin/protoc-gen-es'
]
} I'm looking into this. |
Description of changes
Add 2 protoc plugins for the ECMAScript ecosystem developed by Buf for use with Protobuf & Connect:
protoc-gen-es
protoc-gen-connect-es
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)