Skip to content

PHPC-1118: Add detection of the correct clang-format binary #766

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

Merged
merged 2 commits into from
Feb 23, 2018

Conversation

derickr
Copy link
Contributor

@derickr derickr commented Feb 22, 2018

No description provided.

@derickr derickr requested review from jmikola and kvwalker February 22, 2018 16:52
Copy link
Contributor

@kvwalker kvwalker left a comment

Choose a reason for hiding this comment

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

Works for me!

fi

if [ x"$CLANG_FORMAT" = "x" ]; then
echo "Couldn't find the right clang-format (needs version 6.0)"
Copy link
Member

Choose a reason for hiding this comment

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

Due to unrelated issues with the https://apt.llvm.org/ returning a "hash sum mismatch" error for the 6.0 packages only (unfortunate coincidence, I know), I'm only able to install clang-format-7 on my Ubuntu 16.04 machine.

If I modify this script to avoid the error and accept version "7.0", I can successfully run make format just fine. Given that, can we tweak this to require >= 6.0 or perhaps major versions 6 and 7 if you're concerned about things breaking in a forthcoming 8.0 release?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Supporting 6.0 and 7 works for me. But 8 can break things again...

Copy link
Member

Choose a reason for hiding this comment

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

I suggest we just deal with that when the time comes. Any error will be hard to ignore when running make format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you want to make a PR against my branch for the "7.0" check?

Copy link
Member

Choose a reason for hiding this comment

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

@derickr derickr force-pushed the PHPC-1118-find-clang-binary branch from 9b36054 to a71b440 Compare February 23, 2018 10:32
@derickr derickr merged commit a71b440 into mongodb:master Feb 23, 2018
derickr added a commit that referenced this pull request Feb 23, 2018
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