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

angular-language-server: init at 18.2.0 #343326

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bornedj
Copy link
Contributor

@bornedj bornedj commented Sep 20, 2024

Description of changes

Adds the angular language server for neovim, emacs, and eclipse users managing their own lsps via extraPackages.

homepage: https://github.com/angular/vscode-ng-language-service#readme

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Sep 20, 2024
@ofborg ofborg bot requested a review from Luflosi September 20, 2024 20:02
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 27, 2024
@lelgenio
Copy link
Contributor

Thanks for your first contribution!

It's a general consensus on nixpkgs to no longer add packages to nodePackages, and instead prefer to add them as standalone packages: #229475
I thinks this should be better communicated....

angular/language-server is packaged with yarn, I assume you could use the newly added yarn-specific hooks to package it: https://nixos.org/manual/nixpkgs/unstable/#javascript-yarn

@bornedj
Copy link
Contributor Author

bornedj commented Sep 27, 2024

  1. My bad I wasn't aware of that decision and was following the documentation here. Would it be useful to open a documentation PR to add a reference to issue Repackage node2nix generated packages using buildNpmPackage #229475 within the language-frameworks javascript section?

  2. I would be happy to package it via yarn. Would you prefer that I do that on another branch and PR and make reference to this one, or would it be better to revert my commit and continuing working on the same branch/PR?

@SuperSandro2000
Copy link
Member

2. Would you prefer that I do that on another branch and PR and make reference to this one

that would be fine

or would it be better to revert my commit and continuing working on the same branch/PR?

You can continue this PR but it must be force pushed. We want a cleanish history.

@lelgenio
Copy link
Contributor

  1. My bad I wasn't aware of that decision and was following the documentation here. Would it be useful to open a documentation PR to add a reference to issue

Ref: #319341

@bornedj bornedj closed this Sep 28, 2024
@bornedj bornedj changed the title nodePackages.@angular/language-server: init at 18.2.0 angular-language-server: init at 18.2.0 Sep 28, 2024
@bornedj
Copy link
Contributor Author

bornedj commented Sep 28, 2024

Reopening PR as it's been packaged as a derivation with mkYarnPackage.

@bornedj bornedj reopened this Sep 28, 2024
@github-actions github-actions bot added 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` and removed 6.topic: nodejs labels Sep 28, 2024
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 28, 2024
Comment on lines +43 to +42
buildPhase = ''
runHook preBuild

tsc -b && yarn bazel build :npm

runHook postBuild
'';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
buildPhase = ''
runHook preBuild
tsc -b && yarn bazel build :npm
runHook postBuild
'';
yarnBuildScript = "compile";

https://github.com/angular/vscode-ng-language-service/blob/1e4c92c156c0f1cdd2c9510000a6f41f070dd123/package.json#L224C6-L224C13

Assuming this would work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oddly, using the yarnBuildHook and package.json script directly results in yarn attempting to install bazel on my machine. Explicitly doing the command instead of the equivalent script does not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's because bazel isn't even run:

/nix/store/91d27rjqlhkzx7mhzxrir1jcr40nyc7p-stdenv-linux/setup: line 1709: tsc: command not found

Comment on lines +34 to +29
yarnConfigHook
yarnInstallHook
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
yarnConfigHook
yarnInstallHook
yarnConfigHook
yarnBuildHook
yarnInstallHook

pkgs/by-name/an/angular-language-server/package.nix Outdated Show resolved Hide resolved
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 and removed 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100 labels Sep 28, 2024
@bornedj bornedj closed this Sep 29, 2024
@bornedj bornedj reopened this Sep 29, 2024
@ofborg ofborg bot added 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 10.rebuild-linux: 1-10 10.rebuild-linux: 1 and removed 10.rebuild-linux: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Sep 29, 2024
@bornedj bornedj force-pushed the create-angular-ls branch from 7d48200 to 57047e0 Compare October 5, 2024 15:48
@bornedj bornedj force-pushed the create-angular-ls branch from 57047e0 to c8f25c6 Compare October 5, 2024 15:57
'';

meta = {
description = "Lsp for angular completions, AOT diagnostic, quick info and go to definitions";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "Lsp for angular completions, AOT diagnostic, quick info and go to definitions";
description = "LSP for angular completions, AOT diagnostic, quick info and go to definitions";

Comment on lines +43 to +42
buildPhase = ''
runHook preBuild

tsc -b && yarn bazel build :npm

runHook postBuild
'';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's because bazel isn't even run:

/nix/store/91d27rjqlhkzx7mhzxrir1jcr40nyc7p-stdenv-linux/setup: line 1709: tsc: command not found

@FliegendeWurst FliegendeWurst added the awaiting_changes (old Marvin label, do not use) label Nov 9, 2024
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 10, 2024
@SigmaSquadron SigmaSquadron removed the awaiting_changes (old Marvin label, do not use) label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants