ValeLang/Vale

Prefer installation via a Ubuntu package

Witcher01 opened this issue · 2 comments

We should try to install Vale through a package manager instead of doing it manually with a build script as this will simplify building and management.

If possible, LLVM and Clang should be installed by the package manager instead of downloading manually.
The issue here is that, at the time of creating the issue, Vale relies on LLVM/Clang version 13 (and will later rely on version 14), which are not available in the repositories of Ubuntu 20.04 and older.

@Verdagon

As discussed on discord, we probably shouldn't rely on apt to get clang-14, as we want to keep supporting old versions of linux and not require them to upgrade to 22.04. We'll stick with curling for now.

Actually, LLVM has custom repositories for Debian/Ubuntu to download newer versions of LLVM, even on Ubuntu 20.04, so I'm still all for installing and managing them through the package manager.

https://apt.llvm.org/

We need to give users a heads-up then if they're installing on a version of Ubuntu that is below 22.04 so they need to add a separate repo for LLVM, but otherwise the package file will stay the same.

After testing adding the separate LLVM repo from https://apt.llvm.org/ for version 14, I noticed it installs this to /usr/bin/clang-14, without a symlink to /usr/bin/clang, which we're defaulting to with the compiler (with /usr/bin being in $PATH, naturally).
This needs to be changed, and will also further lock down the compiler on a specific LLVM version.

What I'm wondering is: are major clang versions backwards compatible so that we can require a minimal LLVM version, or are they not backwards compatible?
If they are backwards compatible and we want to communicate this to users, we can't require a specific clang version in the compiler like proposed above.