Skip to content

Conversation

@SplitInfinity
Copy link

@SplitInfinity SplitInfinity commented Apr 5, 2021

Stack from ghstack:

Summary
The clang-format reference hashes committed in #54737 have newlines at
the end but the locally computed ones do not. This commit removes these
newlines so that the clang-format binary verification step doesn't
fail.

Test Plan
./tools/clang_format_all.py, ran successfully.

Fixes
This commit fixes #54790.

Differential Revision: D27577398

**Summary**
The `clang-format` reference hashes committed in #54737 have newlines at
the end but the locally computed ones do not. This commit removes these
newlines so that the `clang-format` binary verification step doesn't
fail.

**Test Plan**
`./tools/clang_format_all.py`, ran successfully.

**Fixes**
This commit fixes ##54790.

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Apr 5, 2021

💊 CI failures summary and remediations

As of commit 4e28b4c (more details on the Dr. CI page):


  • 2/2 failures introduced in this PR

2 failures not recognized by patterns:

Job Step Action
CircleCI pytorch_windows_vs2019_py36_cuda10.1_test1 Test 🔁 rerun
CircleCI pytorch_linux_xenial_cuda10_2_cudnn7_py3_gcc7_test2 Run tests 🔁 rerun

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

@SplitInfinity SplitInfinity requested review from ezyang and samestep April 5, 2021 21:23
@samestep
Copy link
Contributor

samestep commented Apr 5, 2021

Patch to fix the trailing-newlines lint:

diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index e20814cec7..52ecfb874e 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -43,7 +43,7 @@ jobs:
           .jenkins/run-shellcheck.sh
       - name: Ensure correct trailing newlines
         run: |
-          (! git grep -Il '' -- . ':(exclude)**/contrib/**' ':(exclude)third_party' ':(exclude)**.expect' | tools/trailing_newlines.py || (echo "The above files do not have correct trailing newlines; please normalize them"; false))
+          (! git grep -Il '' -- . ':(exclude)**/contrib/**' ':(exclude)third_party' ':(exclude)**.expect' ':(exclude)tools/clang_format_hash' | tools/trailing_newlines.py || (echo "The above files do not have correct trailing newlines; please normalize them"; false))
       - name: Ensure no trailing spaces
         run: |
           (! git grep -I -no ' $' -- . ':(exclude)**/contrib/**' ':(exclude)third_party' || (echo "The above files have trailing spaces; please remove them"; false))

**Summary**
The `clang-format` reference hashes committed in #54737 have newlines at
the end but the locally computed ones do not. This commit removes these
newlines so that the `clang-format` binary verification step doesn't
fail.

**Test Plan**
`./tools/clang_format_all.py`, ran successfully.

**Fixes**
This commit fixes ##54790.

[ghstack-poisoned]
SplitInfinity pushed a commit that referenced this pull request Apr 5, 2021
**Summary**
The `clang-format` reference hashes committed in #54737 have newlines at
the end but the locally computed ones do not. This commit removes these
newlines so that the `clang-format` binary verification step doesn't
fail.

**Test Plan**
`./tools/clang_format_all.py`, ran successfully.

**Fixes**
This commit fixes ##54790.

ghstack-source-id: f856a00
Pull Request resolved: #55328
@ezyang
Copy link
Contributor

ezyang commented Apr 5, 2021

Why not just strip newlines from the hash files.

@samestep
Copy link
Contributor

samestep commented Apr 5, 2021

Why not just strip newlines from the hash files.

I like that solution too. Either way is fine with me.

@SplitInfinity
Copy link
Author

Why not just strip newlines from the hash files.

You mean in code with strip() instead of removing them from the files?

**Summary**
The `clang-format` reference hashes committed in #54737 have newlines at
the end but the locally computed ones do not. This commit removes these
newlines so that the `clang-format` binary verification step doesn't
fail.

**Test Plan**
`./tools/clang_format_all.py`, ran successfully.

**Fixes**
This commit fixes #54790.

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

[ghstack-poisoned]
SplitInfinity pushed a commit that referenced this pull request Apr 6, 2021
Pull Request resolved: #55328


**Summary**
The `clang-format` reference hashes committed in #54737 have newlines at
the end but the locally computed ones do not. This commit removes these
newlines so that the `clang-format` binary verification step doesn't
fail.

**Test Plan**
`./tools/clang_format_all.py`, ran successfully.

**Fixes**
This commit fixes #54790.

Differential Revision: [D27577398](https://our.internmc.facebook.com/intern/diff/D27577398/)
ghstack-source-id: 125877245
@facebook-github-bot
Copy link
Contributor

@SplitInfinity merged this pull request in 34a7b4a.

@facebook-github-bot facebook-github-bot deleted the gh/splitinfinity/119/head branch April 10, 2021 14:17
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.

5 participants