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

Autoformat more directories #10491

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Autoformat more directories #10491

wants to merge 9 commits into from

Conversation

9999years
Copy link
Collaborator

@9999years 9999years commented Oct 30, 2024

sickos yes

@ulysses4ever
Copy link
Collaborator

bold! People seem to want to scrap auto-formatting as it creates a noticeable tension with new/rare contributors.

One thing to consider is the release cycle. We're about to release cabal-install-3.14.1.0, and there will be many backports, which reformatting may complicate. A better point for it may be a little while after a release.

@geekosaur
Copy link
Collaborator

That's likely to feel like 3.10 after the initial fourmolu pass, though.

@9999years
Copy link
Collaborator Author

auto-formatting [...] creates a noticeable tension with new/rare contributors

FWIW I was very surprised to hear this -- I find an autoformatter that clearly fails in CI so much easier to work with as an infrequent contributor than a (usually vague) style guide that's variably enforced by individual reviewers...

@philderbeast
Copy link
Collaborator

I'd really like to see this go in. I don't want have to bother formatting code by hand.

@philderbeast
Copy link
Collaborator

@9999years, I can help with the CPP drudgery if that would speed things up.

@ulysses4ever
Copy link
Collaborator

bold! People seem to want to scrap auto-formatting as it creates a noticeable tension with new/rare contributors.

Since we turned 180 on scrapping the autoformatter (again!) and seem to be sticking with it, I'd be fine with this patch (once it's turned out of the draft state), in principle.

Is it intentional that it doesn't touch the CI? CI currently does its own thing with the action, and has its own list of directories, sadly. I'd be happier if CI exercised the make-targets. But I also foresee some contributors screaming at CI if it starts checking tests, for instance...

@9999years
Copy link
Collaborator Author

@ulysses4ever Definitely not intentional, good catch!

@9999years 9999years force-pushed the format-more branch 3 times, most recently from 5f18808 to f7a7a15 Compare December 21, 2024 00:10
@9999years 9999years marked this pull request as ready for review December 21, 2024 00:13
@Kleidukos Kleidukos self-requested a review January 2, 2025 18:40
Comment on lines 30 to 28
Cabal-testsuite/src/**/*.hs
Cabal-testsuite/main/**/*.hs
Cabal-testsuite/static/**/*.hs
Copy link
Collaborator

Choose a reason for hiding this comment

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

Case seems off here (and maybe somewhere else)? I mean Cabal-testsuite not cabal-testsuite, and the latter is the correct one.

It's also strange that CI missed this issue.

@9999years
Copy link
Collaborator Author

@alt-romes @mpickering Do you have any PRs which would conflict with this? Happy to split this PR up.

@9999years
Copy link
Collaborator Author

From today's meeting: We might want to pay attention to: #9743

@ulysses4ever
Copy link
Collaborator

To expand on @9999years's comment above, we're particularly worried about #9743 But as discussed at the meeting, the PR branch could be reformatted accordingly, and then it should hopefully not require any other effort.

@philderbeast
Copy link
Collaborator

philderbeast commented Jan 2, 2025

If we're worried about conflicts, we could merge #10683 early that deals with the parsing errors fourmolu encounters, then merge other major pull requests that we don't want to reformat and then merge this pull request.

@mpickering
Copy link
Collaborator

I don't think that a autoformatter should be used at all, so splitting up the PR or anything else won't help so much. I thought the consensus was to remove the formatter and it seems that a single PR has changed the course again?

There will always be long-lived branches for large open-source projects which become hard to rebase, it's not a temporary problem.

@9999years
Copy link
Collaborator Author

  • Fixed the directory name case issues
  • Incorporated the comment changes in Add make style-todo and fourmolu on off comments #10683 (which will disappear from this PR once that is merged)
  • Split this into multiple commits -- one to add the directories to the Makefile and GitHub Actions and one to actually run the formatter

@9999years
Copy link
Collaborator Author

There will always be long-lived branches for large open-source projects which become hard to rebase, it's not a temporary problem.

@mpickering The current plan is to autoformat the LTS branches to match this PR, once this PR is merged, so that backports will remain easy. Does that help ameliorate your concerns?

@mpickering
Copy link
Collaborator

@9999years No, that does not address the concern at all. The concern is that there are long-lived contributor branches for complicated features which may exists for years outside the tree before being merged.

@ulysses4ever
Copy link
Collaborator

@mpickering you can reformat the long-lived branch any time, if the "base" branch you want to merge into was reformatted over time. And the result would be the diff we are interested in, nothing about formatting. I still don't see any problem. What am I missing?

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.

6 participants