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

Allow tar-0.6, bump CI to GHC 9.4.8, delete old cabal flags #302

Closed
wants to merge 3 commits into from

Conversation

andreasabel
Copy link
Member

@andreasabel andreasabel commented Dec 14, 2023

  • Allow tar-0.6
  • Drop support for GHC < 7.8 in favor of PatternSynonyms
  • Drop flags base48, mtl21, old-directory and support for GHC 7.8, mtl < 2.2 and directory < 1.2

@andreasabel
Copy link
Member Author

Seems like some exports have changed in tar-0.6:

src/Hackage/Security/Client/Repository/Cache.hs:240:18: error: [GHC-76037]
    Not in scope: data constructor ‘Next’
    Suggested fixes:
      • Perhaps use ‘Tar.Next’ (imported from Codec.Archive.Tar)
      • Add ‘Next’ to the import list in the import of
        ‘Codec.Archive.Tar’
        (at src/Hackage/Security/Client/Repository/Cache.hs:23:1-38).
    |
240 |     go !builder (Next e es) = go (TarIndex.addNextEntry e builder) es
    |                  ^^^^

@Mikolaj
Copy link
Member

Mikolaj commented Dec 15, 2023

Ouch. I hope there is some backward compat layer so that we don't need CPP?

This requires importing constructors independent of their data
type (which changed from 0.5 to 0.6), via the `pattern` syntax.

Consequently, we drop GHC 7.6 which does not have `PatternSynonyms`.
@andreasabel
Copy link
Member Author

Ouch. I hope there is some backward compat layer so that we don't need CPP?

We can import the constructors via the pattern syntax, so we do not need CPP but PatternSynonyms (which I am anyway surprised it is not a default extension of GHC yet). This drops GHC 7.6.

While we are at it, shall we also drop GHC 7.8 (and the base48 cabal flag)?

@Mikolaj
Copy link
Member

Mikolaj commented Dec 15, 2023

Yes, absolutely. Cabal has dropped GHC <8 already.

@andreasabel andreasabel changed the title Allow tar-0.6, bump CI to GHC 9.4.8 Allow tar-0.6, bump CI to GHC 9.4.8, delete old cabal flags Dec 15, 2023
@andreasabel andreasabel requested a review from Mikolaj December 15, 2023 21:35
@andreasabel
Copy link
Member Author

Also dropped mtl21 and old-directory flags.

Copy link
Member

@Mikolaj Mikolaj left a comment

Choose a reason for hiding this comment

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

Well done!

Copy link
Contributor

@Bodigrim Bodigrim left a comment

Choose a reason for hiding this comment

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

We can import the constructors via the pattern syntax, so we do not need CPP but PatternSynonyms (which I am anyway surprised it is not a default extension of GHC yet). This drops GHC 7.6.

Another, a bit more invasive option would be to make everything qualified: Tar.Done, Tar.Fail, etc.

@andreasabel
Copy link
Member Author

@Bodigrim wrote:

Another, a bit more invasive option would be to make everything qualified: Tar.Done, Tar.Fail, etc.

Ah, indeed, thanks for pointing out this alternative!

I take this as a comment for future consideration, not as a change request, since you approved and there are formally no unresolved conversations; and because keeping GHC 7 isn't of practical value any more. (If folks turn up screaming "where is my GHC 7.8 support?" we can revise that decision.)

@andreasabel
Copy link
Member Author

@Mikolaj I don't have hackage upload rights for these packages.
You are welcome to add me on hackage, or finish this PR by releasing hackage-security.
I revised hackage-repo-tool on hackage.

@Bodigrim
Copy link
Contributor

I take this as a comment for future consideration, not as a change request

Correct. Let’s go!

@Mikolaj
Copy link
Member

Mikolaj commented Dec 20, 2023

@andreasabel: thank you very much, I've added you to maintainers. Please go ahead. :)

@andreasabel
Copy link
Member Author

@Mikolaj
Copy link
Member

Mikolaj commented Dec 20, 2023

Yay, even with haddocks. LGTM.

@andreasabel
Copy link
Member Author

I fused the first two commits and pushed this to master, see tag hackage-security/v0.6.2.4.

@andreasabel andreasabel deleted the tar-0.6 branch December 20, 2023 13:51
@andreasabel andreasabel added this to the 0.6.2.4 milestone Mar 19, 2024
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.

3 participants