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

tools: update clang-format to v18 #55201

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RedYetiDev
Copy link
Member

The previous attempt to update clang-format used a WASM compiled library, which unfortunately had it's issues, and was reverted.

This attempt uses the direct binaries instead of the WASM compiled library, so it can be ensured that they are identical to what is expected.

The source code for the updated clang-format library is https://github.com/RedYetiDev/node-core-clang-format. The binaries are from https://github.com/muttleyxd/clang-tools-static-binaries.

@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Sep 30, 2024
@RedYetiDev
Copy link
Member Author

The issue with the WASM was that it wasn't writing the files correctly. I've confirmed that is not this case with this setup.

CC @nodejs/cpp-reviewers

@RedYetiDev RedYetiDev added the c++ Issues and PRs that require attention from people who are familiar with C++. label Sep 30, 2024
Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

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

There is no way to validate the correctness, capability and security of a binary. If we are going to do this, it should be maintained by the Node.js organization, or it should be a package thats well known to the ecosystem.

@targos
Copy link
Member

targos commented Oct 1, 2024

FWIW I still have an experimental repo that builds clang-format on GitHub actions in my computer (I deleted it from GitHub when the wasm-based tool landed), if you want to start from something.

@RedYetiDev
Copy link
Member Author

FWIW I still have an experimental repo that builds clang-format on GitHub actions in my computer (I deleted it from GitHub when the wasm-based tool landed), if you want to start from something.

Interesting. I was using @muttleyxd's built binaries, but I'd be happy to take a look at your builds.

@targos
Copy link
Member

targos commented Oct 1, 2024

https://github.com/targos/clang-format
With test build: https://github.com/targos/clang-format/actions/runs/11124135962

@RedYetiDev
Copy link
Member Author

Thanks! I'll incorporate that workflow

@RedYetiDev RedYetiDev marked this pull request as draft October 1, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants