-
Notifications
You must be signed in to change notification settings - Fork 229
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
[BUG] Bundled version of clang-format
broken on ARM Apple devices
#4195
Comments
A temporary fix that can be used is copying the new version over the old version, this way commits can still be made. cp $(where clang-format) ./.dependencies/clang-format-16-83817c2f/clang-format |
Hello @ysmilda most of us don't have Apple devices. I talked to the one developer who does and he basically used the same workaround as you. That being said, we will gladly accept PR which will fix this situation. We are quite dissatisfied with current state of affairs, when we are using some old binaries downloaded from our AWS bucket and would prefer more up-to-date binaries from official sources (like github) |
I wouldn't mind having a look at replacing these self hosted dependencies. I wasn't sure if there was a specific reason behind staying at those versions. |
No specific reason. From what I gathered, at that time it was easier to host these as there were no official options and since then there was no reason to replace them. |
I see why it was easier to host them and keep them stable. For clang/llvm I couldn't find a proper source of the separate binaries except for the archives in the LLVM releases. I build a simple repository that acts as a mirror for the extracted binaries. Still some problems with using the |
Describe the bug
When committing
pre-commit
hangs at theclang-format
stage indefinitely. When running the command./.dependencies/clang-format-16-83817c2f/clang-format
(as defined in the.pre-commit-config.yaml
) we get the following output:clang-format@16
expects thelibzstd.1.dylib
to be at a different location than whereclang-format@18
expects it (there where brew installs it). Creating a symlink as suggested in this thread proved no solution as the bundledclang-format
expects ax86
version, and not the now defaultarm64
version.Changing the
.pre-commit-config.yaml
hooks entry with idclang-format
to the settings below allows the pre-commit hook to run. This makes it use the version installed viabrew install clang-format
.The solution would be to update the
clang-format
dependency to a later version.How to reproduce
Clone the repo on an Apple device with an ARM processor. Make a commit and run the pre-commit command.
The text was updated successfully, but these errors were encountered: