-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[cpp] Update clangd install snippet to clangd-10 in README.md #6271
[cpp] Update clangd install snippet to clangd-10 in README.md #6271
Conversation
clang 9 has just been released, which means it's the current stable. clang 10 is the new development branch, not the stable one. So I believe we should drive people towards clang 9. |
If you want to use the 9 branch, the repo should be llvm-toolchain-bionic-9 and not llvm-toolchain-bionic |
@sylvestre Good point. @simark According to https://apt.llvm.org/, We could install $ echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main" | sudo tee /etc/apt/sources.list.d/llvm.list
$ sudo apt-get update && sudo apt-get install -y clang-tools-8
$ sudo ln -s /usr/bin/clangd-8 /usr/bin/clangd Or $ echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main" | sudo tee /etc/apt/sources.list.d/llvm.list
$ sudo apt-get update && sudo apt-get install -y clang-tools-9
$ sudo ln -s /usr/bin/clangd-9 /usr/bin/clangd But these require version suffixes that will break after each LLVM release. Alternatively, we can also install $ echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" | sudo tee /etc/apt/sources.list.d/llvm.list
$ sudo apt-get update && sudo apt-get install -y clang-tools I believe that LLVM's development branch is considered "stable enough" by major actors and projects like Chromium and Firefox, so it's unlikely to break in catastrophic ways (or at least, it wouldn't remain broken for long). Plus we could avoid having to switch suffixes when they become deprecated every few months. In any case, I'm happy to update this PR according to your preference. |
Actually, 8 is old stable, 9 is stable quand 10 is dev. |
@jankeromnes @sylvestre @simark thanks for this PR and thoughtful comments. I notice that our Maybe a better approach would be to make this section more generic by removing the mention of a specific Alternatively or additionally this page, mentioned above, would work, with a mention to add a symlink named We can still make a recommendation about which version to use; 9.x is potentially more stable than 10.x and has the built-in WDYT? |
Thanks for your helpful thoughts @marcdumais-work!
That's true currently, but it's not the case with the latest suggestion: $ echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" | sudo tee /etc/apt/sources.list.d/llvm.list
$ sudo apt-get update && sudo apt-get install -y clangd This snippet will always pick the latest Also, as previously mentioned, using the latest Still, if you prefer recommending 9.x for now, we could indeed make the instructions more generic by pointing to https://clang.llvm.org/extra/clangd/Installation.html#installing-clangd and/or to https://apt.llvm.org/, and by explaining how to maintain the special symlink. |
Signed-off-by: Jan Keromnes <[email protected]>
872f7a8
to
70a069f
Compare
👍 Perfect then, thanks for the clarification
👍
No, I think it's ok, as long as this documentation is "low maintenance" and we pick-up a version that has support for our integrations, which latest does. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested by switching to the clangd
package on my Ubuntu 18.04 machine (I had clangd-9
from same PPA before)
@marcdumais-work please merge @jankeromnes is not a committer |
Because that's what's in the 'llvm-toolchain-bionic' repository now: https://apt.llvm.org/
Thanks to @sylvestre for catching the outdated snippet!
What it does
Fixes the
clangd
install snippet in the default C++ extension's README.md.How to test
Run the snippet in a fresh Ubuntu 18.04 Bionic install (e.g. using the
ubuntu:bionic
Docker image).Review checklist
Reminder for reviewers