Skip to content

Text file, newlines at end of files (backport #9804) - #10007

Merged
mergify[bot] merged 13 commits into
3.12from
mergify/bp/3.12/pr-9804
May 13, 2024
Merged

mergify[bot] merged 13 commits into
3.12from
mergify/bp/3.12/pr-9804

Conversation

@mergify

@mergify mergify Bot commented May 13, 2024

Copy link
Copy Markdown
Contributor

Fixes #9802 for *.hs and *.project files and adds a script taking a file glob pattern for doing this, adding newlines at the ends of files where needed. Adds back the whitespace github workflow and uses fix-whitespace to fix non-conformance. Add a short note about this in the contributing readme.


This is an automatic backport of pull request #9804 done by [Mergify](https://mergify.com).

philderbeast and others added 12 commits May 13, 2024 15:20
(cherry picked from commit 265f149)
(cherry picked from commit c31ca12)

# Conflicts:
#	.github/workflows/validate.yml
(cherry picked from commit 2ea012e)
(cherry picked from commit e420bf2)
- Fix whitespace in cabal-testsuite + other tests

(cherry picked from commit e386a13)
Needed for POSIX compliance for text files

(cherry picked from commit ed4c36a)
(cherry picked from commit 38eb1e8)
Co-authored-by: brandon s allbery kf8nh <[email protected]>
(cherry picked from commit 834e1ed)
(cherry picked from commit eb87ffd)
@mergify mergify Bot added the conflicts label May 13, 2024
@mergify

mergify Bot commented May 13, 2024

Copy link
Copy Markdown
Contributor Author

Cherry-pick of c31ca12 has failed:

On branch mergify/bp/3.12/pr-9804
Your branch is ahead of 'origin/3.12' by 2 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit c31ca12e9.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   .github/workflows/bootstrap.skip.yml
	modified:   .github/workflows/validate.skip.yml

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   .github/workflows/validate.yml

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify Bot mentioned this pull request May 13, 2024
1 task done
@mergify mergify Bot added the backport label May 13, 2024
@ulysses4ever
ulysses4ever requested a review from Kleidukos May 13, 2024 15:21
@Kleidukos Kleidukos added the squash+merge me Tell Mergify Bot to squash-merge label May 13, 2024
@Kleidukos

Copy link
Copy Markdown
Member

bullshit failure from fix-whitespace:

[ Violation detected ] license-list-data/exceptions-3.23.json
[ Violation detected ] license-list-data/licenses-3.23.json

@mergify
mergify Bot merged commit ea05e10 into 3.12 May 13, 2024
@mergify
mergify Bot deleted the mergify/bp/3.12/pr-9804 branch May 13, 2024 15:36
@ulysses4ever

Copy link
Copy Markdown
Collaborator

@philderbeast we tried to backport you #9804 to the 3.12 branch but it failed on the whitespace action, as mentioned above:

[ Violation detected ] license-list-data/exceptions-3.23.json
[ Violation detected ] license-list-data/licenses-3.23.json

Here's the failing workflow: https://github.com/haskell/cabal/actions/runs/9065601825/job/24906767545

Do you have any idea why it's fine on master but fails here, on 3.12? I compared these JSON files and the fix-whitespace config to the master versions but didn't find any differences.

@philderbeast

Copy link
Copy Markdown
Collaborator

@ulysses4ever do you know how I can checkout this branch locally? I tried;

$ gh pr checkout 10007
fatal: couldn't find remote ref refs/heads/mergify/bp/3.12/pr-9804
failed to run git: exit status 128

@ulysses4ever
ulysses4ever restored the mergify/bp/3.12/pr-9804 branch May 13, 2024 19:15
@philderbeast

Copy link
Copy Markdown
Collaborator

Thanks for restoring the branch @ulysses4ever.

@philderbeast

philderbeast commented May 13, 2024 •

Copy link
Copy Markdown
Collaborator

There are two choices, either exclude those two files with violations (in fix-whitespace.yaml) or accept the fixes. I prefer the later. Copying the two violating files from this PR's branch to master, I see a difference;

$ git diff
diff --git a/license-list-data/exceptions-3.23.json b/license-list-data/exceptions-3.23.json
index 774f2632e..e2ad72824 100644
--- a/license-list-data/exceptions-3.23.json
+++ b/license-list-data/exceptions-3.23.json
@@ -769,4 +769,4 @@
     }
   ],
   "releaseDate": "2024-02-08"
-}
+}
\ No newline at end of file
diff --git a/license-list-data/licenses-3.23.json b/license-list-data/licenses-3.23.json
index ab676e4ef..884a5e62d 100644
--- a/license-list-data/licenses-3.23.json
+++ b/license-list-data/licenses-3.23.json
@@ -7994,4 +7994,4 @@
     }
   ],
   "releaseDate": "2024-02-08"
-}
+}
\ No newline at end of file

@ulysses4ever

Copy link
Copy Markdown
Collaborator

Yes, thank you, I am accepting these in #10008. I wined a little about it here: #9818 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport squash+merge me Tell Mergify Bot to squash-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants