Skip to content

bash-language-server: fix broken package - #333701

Merged
doronbehar merged 3 commits into
NixOS:masterfrom
ck3d:fix-bash-language-server
Aug 10, 2024
Merged

doronbehar merged 3 commits into
NixOS:masterfrom
ck3d:fix-bash-language-server

Conversation

@ck3d

@ck3d ck3d commented Aug 10, 2024

Copy link
Copy Markdown
Contributor

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.

@amarshall amarshall left a comment

Copy link
Copy Markdown
Member

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
@ofborg
ofborg Bot requested a review from doronbehar August 10, 2024 15:40
@ofborg ofborg Bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Aug 10, 2024

@doronbehar doronbehar left a comment

Copy link
Copy Markdown
Contributor

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.

Comment on lines 22 to 23

Copy link
Copy Markdown
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
Copy Markdown
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

ck3d commented Aug 10, 2024

Copy link
Copy Markdown
Contributor Author

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

@doronbehar

Copy link
Copy Markdown
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
Copy Markdown
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 persons. label Aug 10, 2024
@ofborg
ofborg Bot requested a review from doronbehar August 10, 2024 21:42
@ck3d

ck3d commented Aug 10, 2024

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants