Skip to content

Merge ormolu changes#106

Merged
brandonchinn178 merged 92 commits intofourmolu:masterfrom
brandonchinn178:merge-upstream
Sep 30, 2021
Merged

Merge ormolu changes#106
brandonchinn178 merged 92 commits intofourmolu:masterfrom
brandonchinn178:merge-upstream

Conversation

@brandonchinn178
Copy link
Copy Markdown
Collaborator

@brandonchinn178 brandonchinn178 commented Aug 10, 2021

This merges in ormolu master as of today. This gets GHC 9 support, in addition to many other changes (this merges in 4 ormolu releases!)

Also adds DEVELOPER.md as a starting document for various developer workflows. Currently it has docs for the release process (feel free to edit as needed; i'm not sure how fourmolu was released in the past) and merging upstream ormolu changes

After-merge checklist

mrkkrp and others added 30 commits August 15, 2020 11:51
This allows to build ormolu for another system as the machine's,
combined with Nix remote builders. It is also useful in a context of a
pure evaluation (like Flakes).
Currently, when running with `--mode=inplace`, Ormolu always overwrites the
files, even when nothing has changed, updating the modified timestamp of the
file. This encourages Stack to rebuild everything when only one file has
changed.

A quick check to see if the file needs rewriting solves this problem.

I would prefer the API allowed me to only read the file once, but as the
`--mode=check` logic also reads the file twice, I decided this wasn't the
biggest sin for now.
see e.g. https://stackoverflow.com/a/61066906 for why `published` is
used as the release trigger
Builds fine and all tests pass here.
In certain cases spaces in this position are unnecessary. Here we try to
make the algorithm smarter so that it doesn't always insert spaces.
Also improve the way the diffs are printed.
Also refactor the printing code and standardize how error messages are
output.
@georgefst
Copy link
Copy Markdown
Collaborator

Also, what do you think about making the CI jobs required for merges into master?

Seems like a good idea. But I don't care that much either if it isn't trivial to set up - it's easy enough to just avoid merging.

@georgefst
Copy link
Copy Markdown
Collaborator

Great stuff. Thanks for doing this. And apologies for forgetting to use GitHub's review feature to bundle up my comments with...

This is now blocked on: tweag/ormolu#474

I think we ought to just push ahead. Or we could be waiting a while. We can add a note in the changelog about the regression, and mention that it will be fixed again as soon as GHC 9.2 is out.

@brandonchinn178
Copy link
Copy Markdown
Collaborator Author

Seems like a good idea. But I don't care that much either if it isn't trivial to set up - it's easy enough to just avoid merging.

It's pretty trivial.

  1. Go to Settings > Branches > Branch protection rules > Add rule
  2. Branch name pattern = master
  3. Check "Require status checks to pass before merging"
  4. Check all of the circle ci jobs to block merges

This will force all commits merging into master to pass CI. It also prevents force pushes to master and effectively prevents committing to master (since a commit needs status checks to pass to go to master).

This is now blocked on: tweag/ormolu#474

I think we ought to just push ahead. Or we could be waiting a while. We can add a note in the changelog about the regression, and mention that it will be fixed again as soon as GHC 9.2 is out.

Yeah, you're right.

@georgefst
Copy link
Copy Markdown
Collaborator

georgefst commented Sep 28, 2021

I don't appear to have the permissions to access the repository settings:

image

@parsonsmatt?

@brandonchinn178
Copy link
Copy Markdown
Collaborator Author

@georgefst is this waiting on anything before merge?

@georgefst
Copy link
Copy Markdown
Collaborator

@georgefst is this waiting on anything before merge?

Nope, looks good!

@brandonchinn178 brandonchinn178 merged commit 4f40026 into fourmolu:master Sep 30, 2021
@brandonchinn178 brandonchinn178 deleted the merge-upstream branch September 30, 2021 01:18
@parsonsmatt
Copy link
Copy Markdown
Collaborator

I don't appear to have the permissions to access the repository settings:

image

@parsonsmatt?

I've made you an owner on the organization

@georgefst
Copy link
Copy Markdown
Collaborator

I don't appear to have the permissions to access the repository settings:
image
@parsonsmatt?

I've made you an owner on the organization

Thanks!

@georgefst
Copy link
Copy Markdown
Collaborator

It's pretty trivial.

1. Go to Settings > Branches > Branch protection rules > Add rule

2. Branch name pattern = `master`

3. Check "Require status checks to pass before merging"

4. Check all of the circle ci jobs to block merges

Done.

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.

The readme/documentation could mention how changes are pulled from ormolu GHC 9.0 Compatibility: TypeApplications and ticked promoted constructors