Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add unidiff to clang-tidy Dockerfile#43

Merged
driazati merged 1 commit into
masterfrom
unidd
Jun 18, 2021
Merged

Add unidiff to clang-tidy Dockerfile#43
driazati merged 1 commit into
masterfrom
unidd

Conversation

@driazati
Copy link
Copy Markdown
Contributor

@driazati driazati commented Jun 18, 2021

See pytorch/pytorch#60297

This one has to land and build on master before that PR can be tested + landed

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 18, 2021
@driazati driazati requested a review from a team June 18, 2021 21:50
Copy link
Copy Markdown
Contributor

@samestep samestep left a comment

Choose a reason for hiding this comment

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

lgtm but why can't we just add unidiff==0.6.0 to requirements.txt in pytorch/pytorch?

@driazati
Copy link
Copy Markdown
Contributor Author

driazati commented Jun 18, 2021

lgtm but why can't we just add unidiff==0.6.0 to requirements.txt in pytorch/pytorch?

everyone has to install requirements.txt to build PyTorch so we should make it a point to keep it minimal, adding something there needs more consideration. the usage here is pretty specific and ci-only for most people

@driazati driazati merged commit 7f0b461 into master Jun 18, 2021
driazati added a commit to pytorch/pytorch that referenced this pull request Jun 21, 2021
This switches clang-tidy to the fresh tag from https://github.com/pytorch/test-infra/runs/2860763986 which has a fix for the missing OMP headers we were seeing. Along with #60225 this should restore clang-tidy to normal functionality and we shouldn't see any spurious warnings.

The diff parsing was also broken on diffs that change an entire file (git uses -1 -> +1 as the line range in those diffs for some reason). Rather than deal with these intricacies myself I copied from https://stackoverflow.com/a/39909397 which uses the `unidiff` library, so we need to add that to the image first: pytorch/test-infra#43

Differential Revision: [D29239783](https://our.internmc.facebook.com/intern/diff/D29239783)

[ghstack-poisoned]
@malfet malfet deleted the unidd branch February 8, 2022 18:20
jeanschmidt pushed a commit that referenced this pull request Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants