Skip to content
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

Nix build is broken #242

Closed
toast003 opened this issue Dec 7, 2023 · 13 comments
Closed

Nix build is broken #242

toast003 opened this issue Dec 7, 2023 · 13 comments

Comments

@toast003
Copy link

toast003 commented Dec 7, 2023

I use flakes and I tried both using the repo as-is and making it follow nixpkgs 2c7f3c0fb7c08a0814627611d9d7d45ab6d75335

Here are the nix logs:

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/0wglhmf2ww2n3sclwvz11kxg2bzxpf3s-qlsdf7pgv9q5z8xi1ybc64kmf22nkiyn-source
source root is qlsdf7pgv9q5z8xi1ybc64kmf22nkiyn-source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
➤ YN0000: · Yarn 4.0.2
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 309ms
➤ YN0000: ┌ Fetch step
➤ YN0056: │ @rollup/rollup-linux-arm64-gnu@npm:4.6.0: Cache entry required but missing for @rollup/rollup-linux-arm64-gnu@npm:4.6.0; consider defining supportedArchitectures to cache packages for multiple systems
➤ YN0056: │ @rollup/rollup-linux-x64-gnu@npm:4.6.0: Cache entry required but missing for @rollup/rollup-linux-x64-gnu@npm:4.6.0; consider defining supportedArchitectures to cache packages for multiple systems
➤ YN0000: └ Completed in 0s 263ms
➤ YN0000: · Failed with errors in 0s 666ms

@nekowinston
Copy link
Contributor

nekowinston commented Dec 7, 2023

What's your system architecture? I just tried on my aarch64-darwin and it works fine for me, I'm currently checking aarch64-linux.

@nekowinston
Copy link
Contributor

The build should be fixed with 6d7abef, it passed on CI.
Thanks for reporting the build problem 🙂

@toast003
Copy link
Author

toast003 commented Dec 8, 2023

Can confirm, it builds now!

Thank you for the fix ^^

@toast003 toast003 closed this as completed Dec 8, 2023
@toast003
Copy link
Author

It broke again :(

@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/b98xgj1fmj955m31kh34v53xlzgw0pvw-pd1s3j2gid0rfr82shsfsn9w843qbhrk-source
source root is pd1s3j2gid0rfr82shsfsn9w843qbhrk-source
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
➤ YN0000: · Yarn 4.0.2
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 545ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 1s 307ms
➤ YN0000: ┌ Link step
➤ YN0007: │ esbuild@npm:0.19.8 must be built because it never has been before or the last one failed
➤ YN0007: │ keytar@npm:7.9.0 must be built because it never has been before or the last one failed
➤ YN0007: │ esbuild@npm:0.18.20 must be built because it never has been before or the last one failed
➤ YN0007: │ es5-ext@npm:0.10.62 must be built because it never has been before or the last one failed
➤ YN0000: │ keytar@npm:7.9.0 STDOUT 
➤ YN0000: │ keytar@npm:7.9.0 STDOUT > [email protected] build
➤ YN0000: │ keytar@npm:7.9.0 STDOUT > node-gyp rebuild
➤ YN0000: │ keytar@npm:7.9.0 STDOUT 
➤ YN0000: │ keytar@npm:7.9.0 STDERR sh: line 1: /build/pd1s3j2gid0rfr82shsfsn9w843qbhrk-source/node_modules/.bin/node-gyp: cannot execute: required file not found
➤ YN0009: │ keytar@npm:7.9.0 couldn't be built successfully (exit code 127, logs can be found here: /build/xfs-1afc7355/build.log)
➤ YN0000: └ Completed in 36s 132ms
➤ YN0000: · Done in 38s 640ms
configurePhase completed in 48 seconds
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
undefined:1


SyntaxError: /build/pd1s3j2gid0rfr82shsfsn9w843qbhrk-source/package.json: Unexpected end of JSON input
    at parse (<anonymous>)
    at Module._extensions..json (node:internal/modules/cjs/loader:1453:39)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at JoyCon.recusivelyResolve (/build/pd1s3j2gid0rfr82shsfsn9w843qbhrk-source/node_modules/joycon/lib/index.js:78:22)
    at async loadTsupConfig (/build/pd1s3j2gid0rfr82shsfsn9w843qbhrk-source/node_modules/tsup/dist/chunk-7G76EW2R.js:39:22)
    at async build (/build/pd1s3j2gid0rfr82shsfsn9w843qbhrk-source/node_modules/tsup/dist/index.js:2643:51)
    at <anonymous> (/build/pd1s3j2gid0rfr82shsfsn9w843qbhrk-source/build.ts:16:3)

Node.js v20.10.0

@toast003 toast003 reopened this Dec 13, 2023
@nekowinston
Copy link
Contributor

I can't reproduce this 🤔

Are you using any overrides?

@toast003
Copy link
Author

toast003 commented Dec 13, 2023

Yes, but nothing that affects anything node related afaik
Let me check

EDIT: Missread it, thought you said overlays
I do, nixpkgs follows a9bf124c46ef298113270b1f84a164865987a91c

@toast003
Copy link
Author

toast003 commented Dec 13, 2023

Strangely enough I can't reproduce it either, took a break to do some other stuff earlier and now it just builds?
I'll build my flake on my server and see if I can reproduce it there

@nekowinston
Copy link
Contributor

nekowinston commented Dec 13, 2023

Yes, but nothing that affects anything node related afaik Let me check

It does, the rebuild changes the package.json, just before bundling the VSIX.
And I meant overrides like pkgs.catppuccin-vsc.overrides { accent = "pink"; }.

@toast003
Copy link
Author

I don't

@nekowinston
Copy link
Contributor

If you're not applying any overrides (which are the main reason for using this flake), I'd recommend just using https://github.com/nix-community/nix-vscode-extensions.
It will save you a ton of rebuild time.

@toast003
Copy link
Author

toast003 commented Dec 13, 2023

I know, I started using the flake so that I can use overrides but I got distracted with something else, so I never ended up using them 😅

I happen to use mauve too so as the accent color so I didn't remember either

@toast003
Copy link
Author

Yeah I can't reproduce it now

@nekowinston
Copy link
Contributor

Reducing the number of dependencies and the other improvements mentioned in #218 should hopefully make this a faster and more reliable flake in the future.

Feel free to re-open this issue if your builds start failing again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants