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

GHC 9.10 support #136

Merged
merged 76 commits into from
May 16, 2024
Merged

GHC 9.10 support #136

merged 76 commits into from
May 16, 2024

Conversation

alanz
Copy link
Owner

@alanz alanz commented May 16, 2024

No description provided.

alanz added 30 commits March 17, 2024 22:16
Over 1000 test failures. But at least they run.
Adds the ones fully enclosed in LocatedA spans, initial scaffolding in
place for preceding comments at the top level.
Time to deal with the vestigial comments, into the HsModule anns
Current state of testing

Counts {cases = 1116, tried = 1116, errors = 3, failures = 17}
Now
Counts {cases = 1115, tried = 1115, errors = 2, failures = 15}
We synthesise the location, so must do the comment location comparison
by row,col only the RealSrcLoc Ord instance compares filenames too.

Counts {cases = 1115, tried = 1115, errors = 2, failures = 13}
As they will be discarded when we exact print
Now zero failure, running all bar the makeDelta tests
Down to 473 failures
Needs a GHC patch, MR coming

161 failures
With appropriate change in GHC, MR coming
24 failing makeDeltaAst tests
We cannot sort comments when they have an EpaDelta location.
But in the first pass (normal printing) we convert them to comments,
which can have EpaDelta and are captured in the right place.
So only sort if they do not have EpaDelta, and it works for both
passes.

Failures:
 roundtrip: 3
 makeDeltaAst: 18
alanz added 29 commits April 11, 2024 19:49
So it properly preserves the header comments distinct from the first decl

But makeDeltaAst is failing, not sure why. If I disable
insertCppComments it still fails
It causes too many warnings
So all tests pass bar the makeDeltaAst ones
For after we have reworked the top level comments to only attach
immediately-preceding ones to a decl
When https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12556
and https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12557
land, and all are backported, GHC 9.10.1 should be good to go.

Last few failures (in ghc910 test dir) are internal to ghc-exactprint
itself, which needs minor tweaks.
Last few should be sortable in ghc-exactprint, all relate to comments
which do appear in the AST we get.
We now have pre-ghc910, and ghc-910.
We had a Bool parameter that was always provided as True
@alanz alanz merged commit 2893d08 into master May 16, 2024
2 checks passed
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.

1 participant