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

gopls: compile version into the binary #201732

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

lithammer
Copy link
Contributor

@lithammer lithammer commented Dec 19, 2024

This will make gopls version print the correct thing.

Before:

$ gopls version
golang.org/x/tools/gopls (devel)

After:

$ gopls version
golang.org/x/tools/gopls v0.17.0

Another important thing is that this will also affect what the language sets as InitializeResult.serverInfo.version1 in the initialize response. Without this it was just spewing a bunch of debug build information instead of the actual version. See
neovim/neovim#31611 (comment).
The serverInfo.version stuff might not work after all and requires changes in gopls.

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

Footnotes

  1. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initializeResult

@github-actions github-actions bot added the go Go use is a significant feature of the PR or issue label Dec 19, 2024
Formula/g/gopls.rb Outdated Show resolved Hide resolved
This will make `gopls version` print the correct thing.

Before:

```console
$ gopls version
golang.org/x/tools/gopls (devel)
```

After:

```console
$ gopls version
golang.org/x/tools/gopls v0.17.0
```

Another important thing is that this will also affect what the language
sets as `InitializeResult.serverInfo.version`[^1] in the `initialize`
response. Without this it was just spewing a bunch of debug build
information instead of the actual version. See
neovim/neovim#31611 (comment).

[^1]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initializeResult
@carlocab carlocab added this pull request to the merge queue Dec 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 19, 2024
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Dec 19, 2024
@BrewTestBot BrewTestBot added this pull request to the merge queue Dec 19, 2024
Merged via the queue into Homebrew:master with commit e98b0c3 Dec 19, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. go Go use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants