fix: lsp panics when processing paths containing %#223
fix: lsp panics when processing paths containing %#223codesuki wants to merge 6 commits intogolang:masterfrom
Conversation
Bazel uses % in its temporary paths which is not a valid URI. Therefore url.PathUnescape will panic. See golang/go#37984
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
This PR (HEAD: 81f0ca7) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/228640 to see it. Tip: You can toggle comments from me using the |
|
Message from Gobot Gobot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/228640. |
|
This PR (HEAD: e85b4cb) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/228640 to see it. Tip: You can toggle comments from me using the |
|
This PR (HEAD: 612ea11) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/228640 to see it. Tip: You can toggle comments from me using the |
|
This PR (HEAD: 1cc03be) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/228640 to see it. Tip: You can toggle comments from me using the |
|
This PR (HEAD: ebf74c5) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/228640 to see it. Tip: You can toggle comments from me using the |
|
This PR (HEAD: 4d34305) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/228640 to see it. Tip: You can toggle comments from me using the |
|
Message from Neri Marschik: Patch Set 6: Hi, more context below. Emacs lsp-mode uses the the function url-hexify-string to convert a path to an URI. The following PR would solve the issue I think, but it breaks with emacs < 26.x This PR to gopls then broke it. Questionable whether or not this should be fixed in gopls, but it makes gopls useless for emacs users. Please don’t reply on this GitHub thread. Visit golang.org/cl/228640. |
|
Message from Rebecca Stambler: Patch Set 6:
Thank you for the thorough explanation and contribution! However, it seems to me that it's the responsibility of Emacs to create a valid URI that gets sent to gopls. We have worked around VS Code in the past, but we want to avoid overfitting to specific clients. Also, VS Code over escapes, whereas here, it seems like Emacs is sending incorrectly escaped URIs. I'll let Heschi make the final decision here, but it seems to me like the PR that fixes the issue in Emacs is the right approach. It's unfortunate that it requires a later version of Emacs, but maybe that can still be handled. Please don’t reply on this GitHub thread. Visit golang.org/cl/228640. |
|
Message from Neri Marschik: Patch Set 6:
Please don’t reply on this GitHub thread. Visit golang.org/cl/228640. |
|
Message from Rebecca Stambler: Patch Set 6:
Wonderful - thank you so much for doing this work! Please don’t reply on this GitHub thread. Visit golang.org/cl/228640. |
|
This is merged in emacs lsp-mode now. emacs-lsp/lsp-mode#1593 |
Bazel uses % in its temporary paths which is not a valid URI.
Therefore url.PathUnescape will panic.
See golang/go#37984