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

Support multiple versions of clang-format #10

Open
mattyclarkson opened this issue Jul 14, 2021 · 4 comments
Open

Support multiple versions of clang-format #10

mattyclarkson opened this issue Jul 14, 2021 · 4 comments

Comments

@mattyclarkson
Copy link
Contributor

Would the project be open to supporting specifying which version of clang-format to download?

The upstream S3 has multiple versions of clang-format.

Would there be interest in supporting a --clang-version type argument that determines which SHA to lookup.

Happy to look into a patch along these lines.

@jlebar
Copy link
Owner

jlebar commented Jul 14, 2021

Would the project be open to supporting specifying which version of clang-format to download?

Sure!

Would there be interest in supporting a --clang-version type argument that determines which SHA to lookup.

I guess it would have to be be multiple rules? clang-format-diff-deadbeef, like that? And then the default clang-format-diff is always the newest one?

@mattyclarkson
Copy link
Contributor Author

Haven't forgot about this. Just need to find IRL time to get on with it :)

I guess it would have to be be multiple rules? clang-format-diff-deadbeef, like that?

Yeah, something along those lines. We would likely need to change the Python entry point to accept the requested LLVM version. So clang-format.py 11.0 diff. There could be then individual hooks for each of those to help downstream users.

And then the default clang-format-diff is always the newest one?

Would make sense. LLVM tooling has subtle difference between each version so changing that hook would be a break for downstream users. It might make sense to lock that hook to LLVM 11 (which it is now) to not break downstream users and encourage downstream users to decide on a clang-format-diff-<version> hook where that explicitly choose the LLVM version to maintain stability.

@jlebar
Copy link
Owner

jlebar commented Aug 17, 2021

We would likely need to change the Python entry point to accept the requested LLVM version.

FWIW the place I'm downloading from -- Chrome's repository of tools -- doesn't track LLVM releases, but rather just has random hashes that are updated...whenever they feel like it.

You could try downloading from the LLVM website, I guess, and then maybe you could do based on LLVM releases.

@sanrut01
Copy link
Contributor

sanrut01 commented Sep 8, 2021

@jlebar I have submitted a MR to support multiple versions. Please review.

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