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

Investigate how to support specifying clang-format minor and patch versions #199

Open
jidicula opened this issue May 22, 2024 · 2 comments
Assignees

Comments

@jidicula
Copy link
Owner

We found in #198 and llvm/llvm-project#93034 that LLVM occasionally introduces breaking changes in clang-format in patch (and presumably minor) version releases. Because this action just uses the latest version of clang-format under a major version, this action's output can be non-deterministic as minor and patch versions are accepted into Ubuntu and those changes are pulled into this repo's container image builds.

To reduce the effects of this thrashing, there are a couple of possible solutions:

  1. Provide a way to specify minor and patch versions as args to the action. If these versions are added to the container images, this could be tricky as it expands the build matrix by a lot.
  2. Check if the desired clang-format version is already in the PATH in the runner, and if it is, use that instead of the Docker image. This shifts the responsibility onto users of this action to get the appropriate LLVM tools into their Actions runners, which they're probably already doing for other CI workflows.
@DeveloperPaul123
Copy link

Option 2 IMO is probably going to be the most flexible. LLVM provides a script that can be downloaded via wget that's pretty easy to set up in a CI and then you can install whatever version of clang you want (almost). This is probably going to be the least maintenance work as well as updating for each minor patch release will probably be a pain.

@hannojg
Copy link

hannojg commented Oct 31, 2024

I just ran into that problem as well and agree that (2) would be a good option here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants