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

code-server: 3.4.1 -> 3.6.0 #101628

Merged
merged 1 commit into from Jan 7, 2021
Merged

Conversation

@dguenther
Copy link
Contributor

@dguenther dguenther commented Oct 25, 2020

Motivation for this change

Updates code-server to a newer version. It now bundles a Go executable for connecting to Coder Cloud. Also cleaned up a few instances where yarn and npm packages were attempting to hit the network, causing the sandboxed build to fail.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Result of nixpkgs-review pr 101628 1

1 package built:
  • code-server

@dguenther dguenther force-pushed the code-server3.6.0 branch from da0d1af to 2356e81 Oct 25, 2020
pkgs/servers/code-server/default.nix Outdated Show resolved Hide resolved
@dguenther dguenther force-pushed the code-server3.6.0 branch 2 times, most recently from 8bf53a0 to d26290e Nov 1, 2020
@dguenther
Copy link
Contributor Author

@dguenther dguenther commented Nov 1, 2020

This should build now, could I get a re-review?

@tscholak
Copy link

@tscholak tscholak commented Nov 23, 2020

hey, I’d like to let you know that I was able to adapt the code of this PR for code-server 3.7.2, see https://github.com/hasktorch/hasktorch/blob/4dd5f3b7556e85a2aab47c55f8563e2cbfc70a35/nix/code-server.nix

@dguenther
Copy link
Contributor Author

@dguenther dguenther commented Nov 23, 2020

Oh great, thanks for letting me know! Did you open a PR to nixpkgs with that? Otherwise I'll close this one and open a new one with your changes, if that's okay with you.

@tscholak
Copy link

@tscholak tscholak commented Nov 23, 2020

no, I haven't opened a new pr for that. I had to modify one sed call because it was otherwise destroying the postinstall.sh file, and I've tried to make it work on macOS, but so far without success.

@dguenther
Copy link
Contributor Author

@dguenther dguenther commented Nov 23, 2020

I was debating the value of replacing the build steps with a download of the release artifacts, similar to what the vscode expression does, as it would certainly simplify the whole thing and make macOS compatibility much easier as well. I'm not sure what the general nixpkgs stance is on those types of expressions, since I suppose it would lose the benefit of tracking build dependencies through Nix.

@tscholak
Copy link

@tscholak tscholak commented Nov 23, 2020

I suppose it would simplify things, but so far this particular from-source derivation is working well. It would definitely be a regression to switch to release artifacts. Besides, I attribute my failure wrt macOS to my own ignorance, I know virtually nothing about building npm code.

@tscholak
Copy link

@tscholak tscholak commented Nov 23, 2020

btw, here's the error I'm currently stuck with (on macOS, linux x86-64 works fine):

building
yarn install v1.22.10
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
error Can't make a request in offline mode ("https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz")
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
builder for '/nix/store/3g7khm0qwzwki0jzz6l98rln73idjvwl-code-server-3.7.2.drv' failed with exit code 1
error: build of '/nix/store/3g7khm0qwzwki0jzz6l98rln73idjvwl-code-server-3.7.2.drv' failed

@dguenther
Copy link
Contributor Author

@dguenther dguenther commented Nov 23, 2020

Hm, there's probably a macOS-specific yarn package included. Maybe running nix-build -A code-server.prefetchYarnCache will return a different outputHash for yarnCache to use?

@tscholak
Copy link

@tscholak tscholak commented Nov 23, 2020

yes, that worked, thanks. I got the same hash as for linux, 0860h4x4yvi56452bc67avpiv29l7dkn4579pqki3fybi0fpacqf. Will try to build the code again on macOS.

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Dec 28, 2020

Result of nixpkgs-review pr 101628 run on x86_64-linux 1

1 package built:
  • code-server

patchPhase should not be overridden, use postPatch instead.

@dguenther dguenther force-pushed the code-server3.6.0 branch from d26290e to 680df51 Dec 29, 2020
@dguenther
Copy link
Contributor Author

@dguenther dguenther commented Dec 29, 2020

Pushed an update to use postPatch instead.

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Jan 1, 2021

This is a semi-automatic executed nixpkgs-review. If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 101628 run on x86_64-linux 1

1 package failed to build and are new build failure:
  • code-server

did a nix-collect-garbage before and the disk has over 100GB free.

  [2/4] Fetching packages...                                                                                                                                                                  error Could not write file "/tmp/nix-build-code-server-3.6.0-x86_64-linux-yarn-cache.drv-0/source/lib/vscode/build/yarn-error.log": "ENOSPC: no space left on device, open '/tmp/nix-build-code-server-3.6.0-x86_64-linux-yarn-cache.drv-0/source/lib/vscode/build/yarn-error.log'"                                                                                                     error An unexpected error occurred: "ENOSPC: no space left on device, mkdir '/tmp/nix-build-code-server-3.6.0-x86_64-linux-yarn-cache.drv-0/source/.cache/yarn/v6/npm-node-abort-controller-1.0.4-4095e41d58b2fae169d2f9892904d603e11c7a39-integrity'".                                                                                                                                 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.                                                                                                    yarn install v1.22.10                                                                                                                                                                       [1/4] Resolving packages...                                                                                                                                                                 [2/4] Fetching packages...                                                                                                                                                                  error Could not write file "/tmp/nix-build-code-server-3.6.0-x86_64-linux-yarn-cache.drv-0/source/lib/vscode/build/lib/watch/yarn-error.log": "ENOSPC: no space left on device, open '/tmp/nix-build-code-server-3.6.0-x86_64-linux-yarn-cache.drv-0/source/lib/vscode/build/lib/watch/yarn-error.log'"                                                                                 error An unexpected error occurred: "ENOSPC: no space left on device, mkdir '/tmp/nix-build-code-server-3.6.0-x86_64-linux-yarn-cache.drv-0/source/.cache/yarn/v6/npm-vscode-gulp-watch-5.0.2-0060ba8d091284a6fbd7e608aa318a9c1d73b840-integrity'".                                                                                                                                     info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.                                                                                                  cannot build derivation '/nix/store/2qs60rs4rirkb3sv770h54xl289wb34c-code-server-3.6.0.drv': 1 dependencies couldn't be built                                                               cannot build derivation '/nix/store/znzi3rg1z5qfcq6xr9w5hdrw6bw4q95w-env.drv': 1 dependencies couldn't be built 

@dguenther
Copy link
Contributor Author

@dguenther dguenther commented Jan 1, 2021

I ran nixpkgs-review pr 101628 locally and it completed successfully for me, would you mind trying it again or helping me out with some suggestions for reproduction steps?

@contrun
Copy link
Contributor

@contrun contrun commented Jan 4, 2021

Can you please kindly update code server to 3.8.0?

@dguenther
Copy link
Contributor Author

@dguenther dguenther commented Jan 5, 2021

Sure, this may take some time as 3.8.0 brings some changes to the VS Code patch process.

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Jan 7, 2021

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 101628 run on x86_64-linux 1

1 package built:
  • code-server

@SuperSandro2000 SuperSandro2000 merged commit cc8db6e into NixOS:master Jan 7, 2021
19 checks passed
@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Jan 7, 2021

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 101628 run on x86_64-linux 1

1 package built:
  • code-server

@dguenther dguenther mentioned this pull request Jan 24, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants