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

rm-old-base: remove ifdefs for pre-4.13 bases #10092

Merged
merged 12 commits into from
Jul 26, 2024

Conversation

NadiaYvette
Copy link
Contributor

@NadiaYvette NadiaYvette commented Jun 9, 2024

Template B: This PR does not modify behaviour or interface

4.13 and older have fallen out of the support window. Hence this commit removes code only conditionally included for base 4.13 and older. Some occasional transitive removals were implied and done in this same commit.

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@geekosaur
Copy link
Collaborator

You're supposed to pick a template based on whether your PR changes the user-visible or programming API. This one should not, so you would use template B.

@NadiaYvette NadiaYvette force-pushed the nadia.chambers/rm-old-base-001 branch 3 times, most recently from a09118a to 442c7bd Compare June 10, 2024 11:31
@NadiaYvette NadiaYvette marked this pull request as ready for review June 10, 2024 13:53
@NadiaYvette NadiaYvette force-pushed the nadia.chambers/rm-old-base-001 branch from 442c7bd to f175323 Compare June 11, 2024 02:48
Copy link
Collaborator

@andreabedini andreabedini left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you so much! <3

@andreabedini andreabedini added the squash+merge me Tell Mergify Bot to squash-merge label Jun 11, 2024
Cabal-syntax/src/Distribution/Fields/ParseResult.hs Outdated Show resolved Hide resolved
Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs Outdated Show resolved Hide resolved
Cabal-syntax/Cabal-syntax.cabal Outdated Show resolved Hide resolved
Cabal-tests/Cabal-tests.cabal Outdated Show resolved Hide resolved
Cabal/Cabal.cabal Outdated Show resolved Hide resolved
@andreabedini
Copy link
Collaborator

@fgaz Can you have another look when you have time?

@andreabedini andreabedini force-pushed the nadia.chambers/rm-old-base-001 branch 4 times, most recently from e14ce68 to 9ce4213 Compare June 25, 2024 07:26
@NadiaYvette NadiaYvette force-pushed the nadia.chambers/rm-old-base-001 branch from 9ce4213 to 5ce9664 Compare June 27, 2024 02:05
@andreabedini
Copy link
Collaborator

andreabedini commented Jun 27, 2024

@fgaz @ulysses4ever @Mikolaj @Kleidukos could you give a review?

@NadiaYvette NadiaYvette force-pushed the nadia.chambers/rm-old-base-001 branch from 5ce9664 to b8e89de Compare June 27, 2024 02:12
@NadiaYvette
Copy link
Contributor Author

@fgaz @ulysses4ever @Mikolaj @Kleidukos could you give a review?

Thank you so much Andrea! That's a lot of LOC you put into the fixups!

Copy link
Collaborator

@geekosaur geekosaur left a comment

Choose a reason for hiding this comment

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

It might be worth looking for more instances of FOURMOLU_DISABLE and see if CPP has been removed; in general, CPP causes fourmolu to choke.

Cabal/src/Distribution/Compat/Async.hs Outdated Show resolved Hide resolved
@NadiaYvette NadiaYvette force-pushed the nadia.chambers/rm-old-base-001 branch from b8e89de to 4ec4202 Compare June 27, 2024 03:08
@Kleidukos
Copy link
Member

Yes! Less CPP make happier tooling

@Mikolaj
Copy link
Member

Mikolaj commented Jun 27, 2024

I see "base >= 4.11" in Cabal/Cabal.cabal. Can we update it, too? Probably in a separate PR, because it would modify the interface. It would also need a little changelog file stating what it does.

@andreabedini
Copy link
Collaborator

andreabedini commented Jun 27, 2024

Maybe something went wrong with the rebase I had changed the bounds the cabal files in my commit acffcd4.

Edit: I pushed my last commit (9ce4213) to https://github.com/andreabedini/cabal/tree/rm-old-base-001

Copy link
Member

@fgaz fgaz left a comment

Choose a reason for hiding this comment

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

Some of my previous comments are still unresolved, I marked them as such.

templates/Paths_pkg.template.hs Outdated Show resolved Hide resolved
@Mikolaj
Copy link
Member

Mikolaj commented Jun 27, 2024

Maybe something went wrong with the rebase I had changed the bounds the cabal files in my commit acffcd4.

Edit: I pushed my last commit (9ce4213) to https://github.com/andreabedini/cabal/tree/rm-old-base-001

Right here it's as it should be. That's rather disturbing. Was this mergify's rebase or your manual one? Can you recover from this corruption?

@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Jun 29, 2024
@fgaz fgaz removed squash+merge me Tell Mergify Bot to squash-merge merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days labels Jul 5, 2024
@NadiaYvette NadiaYvette force-pushed the nadia.chambers/rm-old-base-001 branch from 1d2926a to 47c0067 Compare July 10, 2024 14:24
@andreabedini
Copy link
Collaborator

@fgaz @Mikolaj I restored the lower bounds on base.

4.13 and older have fallen out of the support window. Hence this commit
removes code only conditionally included for base 4.13 and older. Some
occasional transitive removals were implied and done in this same commit.
@andreabedini andreabedini force-pushed the nadia.chambers/rm-old-base-001 branch from 13de64b to e4208ca Compare July 23, 2024 13:34
andreabedini and others added 8 commits July 23, 2024 23:07
The change was likely an artifact of a rebase.
The #ifdefs being generated need to be kept here so that projects other
than cabal can be built using older ghc versions and current cabal
versions.
This needs to be included so running with older bases and ghcs can be
done even while building cabal itself demands recent ghcs.
@andreabedini andreabedini force-pushed the nadia.chambers/rm-old-base-001 branch from e4208ca to 356e6f7 Compare July 23, 2024 15:07
@ulysses4ever
Copy link
Collaborator

@fgaz you requested changes in this PR, and the issue, they claim, was fixed (I didn't check). Could you see if you could reevaluate it and maybe approve?

@geekosaur
Copy link
Collaborator

geekosaur commented Jul 23, 2024

FWIW everything except the import is marked Outdated, suggesting they've already been fixed. I'm validating locally with the import removed. (ETA: build fails without the import.)

@geekosaur
Copy link
Collaborator

geekosaur commented Jul 23, 2024

I stand corrected; I misunderstood what was being requested, and removed the wrong thing. Testing again now. (ETA: builds with 9.6.6; trying with 8.8.4 locally now.)

@fgaz
Copy link
Member

fgaz commented Jul 23, 2024

@fgaz you requested changes in this PR, and the issue, they claim, was fixed (I didn't check). Could you see if you could reevaluate it and maybe approve?

All opened conversations (3 at this time) are still unresolved

@geekosaur
Copy link
Collaborator

[27 of 51] Compiling Distribution.Solver.Types.ConstraintSource ( src/Distribution/Solver/Types/ConstraintSource.hs, /home/allbery/Sources/cabal/dist-newstyle/build/x86_64-linux/ghc-8.8.4/cabal-install-solver-3.13.0.0/build/Distribution/Solver/Types/ConstraintSource.o )

src/Distribution/Solver/Types/ConstraintSource.hs:48:3: error:
    parse error on input ‘-- | The source of the constraint is not specified.’
   |
48 |   -- | The source of the constraint is not specified.
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It's not needed with our currently supported ghcs.
@geekosaur
Copy link
Collaborator

@fgaz, I think we've dealt with the remaining issues, could you confirm?

@geekosaur geekosaur requested a review from fgaz July 24, 2024 03:20
@andreabedini
Copy link
Collaborator

@geekosaur @fgaz @ulysses4ever Thank you for the help. I am afraid some changes kept getting lost in the rebases :-/

Copy link
Member

@fgaz fgaz left a comment

Choose a reason for hiding this comment

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

Looks good!

@fgaz fgaz added squash+merge me Tell Mergify Bot to squash-merge and removed attention: needs-review labels Jul 24, 2024
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Jul 26, 2024
@mergify mergify bot merged commit 356c2f4 into haskell:master Jul 26, 2024
43 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days squash+merge me Tell Mergify Bot to squash-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants