Currently, clang-tools tries to install from system-specific package managers if PyPI does not satisfy the version/platform requirements.
This yield unexpected results. For example,
will fail to find v11 of clang-tidy on PyPI. It then tries to install clang-tidy-11 via apt on Linux. If apt install clang-tidy-11 fails, then it adds the official LLVM PPA and tries to install from apt again.
This is especially undesirable on Windows because it will try to install from winget and chocolatey. But on Windows, these installers actually replace any pre-existing version already installed ⁉️
Proposal
- Only try to install from package managers if
CI env var is not present or not equal to true.
- If the user still wants to use package managers to install clang tools, then they'll have to opt-in with a new flag
--mod-sys (short for "modify system").
Currently, clang-tools tries to install from system-specific package managers if PyPI does not satisfy the version/platform requirements.
This yield unexpected results. For example,
will fail to find v11 of clang-tidy on PyPI. It then tries to install clang-tidy-11 via
apton Linux. Ifapt install clang-tidy-11fails, then it adds the official LLVM PPA and tries to install fromaptagain.This is especially undesirable on Windows because it will try to install from winget and chocolatey. But on Windows, these installers actually replace any pre-existing version already installed⁉️
Proposal
CIenv var is not present or not equal totrue.--mod-sys(short for "modify system").