Skip to content

fix: replace clang-format with clang-format-node for arm64 support - #844

Merged
exploIF merged 3 commits into
mainfrom
@exploif/fix-clang
Oct 28, 2026
Merged

exploIF merged 3 commits into
mainfrom
@exploif/fix-clang

Conversation

@exploIF

@exploIF exploIF commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

The clang-format npm package only ships an x86_64 macOS binary, so it fails on Apple Silicon without Rosetta (spawn error -86). clang-format-node ships native binaries for darwin/linux arm64 and x64 and exposes the same clang-format bin, so scripts and lefthook stay unchanged.

Test Plan

Run clang locally on MacOS 27, it should work fine.
CI is green

The clang-format npm package only ships an x86_64 macOS binary, so it
fails on Apple Silicon without Rosetta (spawn error -86). clang-format-node
ships native binaries for darwin/linux arm64 and x64 and exposes the same
`clang-format` bin, so scripts and lefthook stay unchanged.

Reformatted the files affected by the newer clang-format (LLVM 23).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 15:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The dependency and lockfile agree, the formatter command is preserved, and the small native changes introduce no identified blocking issues.

No open issues 🎉

What changed in this PR

Replaces the formatter dependency to support native ARM64 binaries while preserving the existing clang-format command used by scripts and lefthook.

Changes:

  • Switches to clang-format-node and updates the lockfile.
  • Corrects the UIKit import capitalization.
  • Applies minor formatting changes to native code without changing behavior.
File Description
yarn.lock Locks the replacement formatter and removes the unused dependency entry.
package.json Replaces clang-format with clang-format-node.
ios/​interfaces/​AlignmentEntry.h Fixes UIKit header capitalization.
ios/​EnrichedTextInputView.mm Reformats the style-state macro.
android/​src/​main/​new_arch/​react/​renderer/​components/​ReactNativeEnrichedSpec/​EnrichedTextInputState.h Adjusts constructor spacing.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the switch to clang-format-node and accompanying native-code formatting changes.

No open issues 🎉

Review effort: Balanced

@exploIF
exploIF merged commit 25aaafd into main Oct 28, 2026
8 checks passed
@exploIF
exploIF deleted the @exploif/fix-clang branch October 28, 2026 14:49
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

Successfully merging this pull request may close these issues.

3 participants