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

Use released clang-format instead of the one from dev branch #9646

Closed
wants to merge 3 commits into from

Conversation

jay-zhuang
Copy link
Contributor

@jay-zhuang jay-zhuang commented Mar 1, 2022

We should use the released clang-format version instead of the one from
dev branch. Otherwise the format report could be inconsistent with local
development env and CI. e.g.: #9644

Test Plan: CI

@jay-zhuang jay-zhuang changed the title [Test No Review] update buckifier for new json format and updated macros Use released clang-format instead of the one from dev branch Mar 1, 2022
@jay-zhuang jay-zhuang marked this pull request as ready for review March 1, 2022 17:16
@facebook-github-bot
Copy link
Contributor

@jay-zhuang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

with:
args: https://raw.githubusercontent.com/llvm/llvm-project/main/clang/tools/clang-format/clang-format-diff.py
- name: Install clang-format
run: sudo apt-get install clang-format
Copy link
Contributor

Choose a reason for hiding this comment

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

The clang-format downloaded here can still be a different version and generate different result, depending on the instance provided by Github.
How about stable google style?

https://raw.githubusercontent.com/llvm-mirror/clang/google/stable/tools/clang-format/clang-format-diff.py

Copy link
Contributor Author

@jay-zhuang jay-zhuang Mar 1, 2022

Choose a reason for hiding this comment

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

The repo is marked archived: https://github.com/llvm-mirror/clang/tree/google/stable and it's version will be too old (eventually).
How about we ping it to a certain version like:

apt-get install clang-format-11

(currently ubuntu default is clang-format-10)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or we can provide a clang-format-diff.py from our s3, which is likely clang-format-11 release (the latest version).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then I think it better just use the tool from a release branch instead of main. Updated.

Better use the released clang-format version instead of the one from dev
branch. Otherwise the format report could be inconsistent with local
development env and CI. e.g.: facebook#9644

Test Plan: CI
This reverts commit 01a8cdc9579fe752dcfa02e9ca6bab30c9192c72.
@facebook-github-bot
Copy link
Contributor

@jay-zhuang has updated the pull request. You must reimport the pull request before landing.

Copy link
Contributor

@riversand963 riversand963 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @jay-zhuang for the improvement!

@facebook-github-bot
Copy link
Contributor

@jay-zhuang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

tabokie pushed a commit to tabokie/rocksdb that referenced this pull request Mar 8, 2023
…k#9646)

Summary:
We should use the released clang-format version instead of the one from
dev branch. Otherwise the format report could be inconsistent with local
development env and CI. e.g.: facebook#9644

Pull Request resolved: facebook#9646

Test Plan: CI

Reviewed By: riversand963

Differential Revision: D34554065

Pulled By: jay-zhuang

fbshipit-source-id: b841bc400becb4272be18c803eb03a7a1172da6f
tabokie pushed a commit to tabokie/rocksdb that referenced this pull request Mar 8, 2023
…k#9646)

Summary:
We should use the released clang-format version instead of the one from
dev branch. Otherwise the format report could be inconsistent with local
development env and CI. e.g.: facebook#9644

Pull Request resolved: facebook#9646

Test Plan: CI

Reviewed By: riversand963

Differential Revision: D34554065

Pulled By: jay-zhuang

fbshipit-source-id: b841bc400becb4272be18c803eb03a7a1172da6f
Signed-off-by: tabokie <xy.tao@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants