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

bash-language-server: fix broken package #333701

Merged
merged 3 commits into from
Aug 10, 2024

Conversation

ck3d
Copy link
Contributor

@ck3d ck3d commented Aug 10, 2024

Description of changes

Fix the build phase of the package and add minor changes like, version test, remove unused variable and make shellcheck as default.

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.

Copy link
Member

@amarshall amarshall left a comment

Choose a reason for hiding this comment

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

Can confirm package was broken, and that this remedies it. Changes overall look good, but not familiar with this drv specifically.

ck3d added a commit to ck3d/ck3d-nvim-configs that referenced this pull request Aug 10, 2024
Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

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

I don't understand what this PR is for (besides the --suffix change), bash-language-server builds fine for me on branch master.

pkgs/by-name/ba/bash-language-server/package.nix Outdated Show resolved Hide resolved
Comment on lines 22 to 23
pnpmWorkspace = "bash-language-server";
pnpmDeps = pnpm_8.fetchDeps {
inherit (finalAttrs) pname version src pnpmWorkspace;
Copy link
Contributor

Choose a reason for hiding this comment

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

An explanation in the commit message for this change would be nice. pnpmWorkspace is an attribute added to support here:

#323493

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I remove the commit. I think this should be discussed in your mentioned PR.

@ck3d ck3d force-pushed the fix-bash-language-server branch from 84b0c72 to f327119 Compare August 10, 2024 21:05
@ck3d
Copy link
Contributor Author

ck3d commented Aug 10, 2024

Without this this PR, the package is built, but the executable fails to start. I incorporated your recommendations.

@doronbehar
Copy link
Contributor

Without this this PR, the package is built, but the executable fails to start. I incorporated your recommendations.

OK I see now what you are talking about. How did you manage to find out the pnpm compile server command? I wonder if the documentation for pnpm could be improved...

@doronbehar
Copy link
Contributor

I will merge when CI is green..

@wegank wegank added the 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people label Aug 10, 2024
@ofborg ofborg bot requested a review from doronbehar August 10, 2024 21:42
@ck3d
Copy link
Contributor Author

ck3d commented Aug 10, 2024

pnpm compile is a shorthand for pnpm run compile, see https://pnpm.io/8.x/cli/run
Script compile is the documented target, see https://github.com/bash-lsp/bash-language-server/blob/main/docs/development-guide.md#initial-setup

I additionally passed server as argument to compile to only compile server and not vscode-client. The resulting command is tsc -b server.
See also https://github.com/bash-lsp/bash-language-server/blob/main/package.json#L6

@doronbehar
Copy link
Contributor

pnpm compile is a shorthand for pnpm run compile, see pnpm.io/8.x/cli/run Script compile is the documented target, see bash-lsp/bash-language-server@main/docs/development-guide.md#initial-setup

I additionally passed server as argument to compile to only compile server and not vscode-client. The resulting command is tsc -b server. See also bash-lsp/bash-language-server@main/package.json#L6

Thanks for explaining. I added a note to the main comment of #317927 .

@doronbehar doronbehar merged commit 7ce2c1e into NixOS:master Aug 10, 2024
25 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants