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

Build failure with GHC-8.2 #9952

Open
phadej opened this issue Apr 29, 2024 · 16 comments
Open

Build failure with GHC-8.2 #9952

phadej opened this issue Apr 29, 2024 · 16 comments

Comments

@phadej
Copy link
Collaborator

phadej commented Apr 29, 2024

Failed to build Cabal-syntax-3.12.0.0.

src/Distribution/Types/ForeignLib.hs:168:13: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Distribution.Compat.Prelude.<>’,
                             imported from ‘Distribution.Compat.Prelude’ at src/Distribution/Types/ForeignLib.hs:18:1-34
                             (and originally defined in ‘Data.Semigroup’)
                          or ‘Data.Monoid.<>’,
                             imported from ‘Data.Monoid’ at src/Distribution/Types/ForeignLib.hs:31:1-18

Have someone forgot adjusting lowerbounds? Has Cabal-syntax dropped support for GHC-8.0 and GHC-8.2 (I dont' see a mention in the changelog).

@phadej
Copy link
Collaborator Author

phadej commented Apr 29, 2024

The bad commit is 54183f2, old GHC support breakage seems unintentional.

@ffaf1 ffaf1 added type: regression regression on master Regression that is unreleased and needs to be fixed before release regression in 3.12 and removed type: regression regression on master Regression that is unreleased and needs to be fixed before release needs triage labels Apr 29, 2024
@ffaf1
Copy link
Collaborator

ffaf1 commented Apr 29, 2024

It passed old GHCs validate workflow, so I am puzzled.

@Mikolaj
Copy link
Member

Mikolaj commented Apr 29, 2024

But the problem is when building with GHC-8.2? It's out of the support window. Oldest tested for compilation is GHC 8.6.5.

I don't think we announce when GHCs drop out of our support window. Should we? It happens without any action. We could announce when we spot it and adjust CI. If so, that should be added to the criteria stating when a changelog is necessary.

@Mikolaj
Copy link
Member

Mikolaj commented Apr 29, 2024

Have someone forgot adjusting lowerbounds?

That is a problem, though. Whenever we drop a GHC from CI we should bump the bounds and I think usually we do, so it's not unclear, I think.

@phadej
Copy link
Collaborator Author

phadej commented Apr 29, 2024

First, please make a Hackage revision so the builds are not failing and then we can discuss further.

This is criticial issue, you should act ASAP.

@ffaf1
Copy link
Collaborator

ffaf1 commented Apr 29, 2024

Which revision would fix this?

@Mikolaj
Copy link
Member

Mikolaj commented Apr 29, 2024

I think Cabal-syntax bound on base. I think @phadej is right, especially that revisions can always be reverted once we do the same bump in a PR and reviewers point out how the revision could be improved.

@Mikolaj
Copy link
Member

Mikolaj commented Apr 29, 2024

Here's a list of which base fits which GHC: https://wiki.haskell.org/Base_package

@Mikolaj
Copy link
Member

Mikolaj commented Apr 29, 2024

@ffaf1: you have full authority to do just that revision, if you'd like to. I'd announce it on the channel, though, for transparency and in case we missed something.

@ffaf1
Copy link
Collaborator

ffaf1 commented Apr 29, 2024

I am going to download GHC 8.4.2 locally, make sure it compiles, make an announcemente on Matrix and then do a revision setting base lower bound to >= 4.11.1.0.

edit: with GHC 8.4.2 I got this error

[ 29 of 137] Compiling Distribution.CabalSpecVersion ( src/Distribution/CabalSpecVersion.hs, /home/f/media/vcs/cabal/dist-newstyle/build/x86_64-linux/ghc-8.4.2/Cabal-syntax-3.12.0.0/build/Distribution/CabalSpecVersion.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.4.2 for x86_64-unknown-linux):
        Prelude.!!: index too large

*8.4.4. works fine so it will still be >= 4.11.1.0.

@ffaf1
Copy link
Collaborator

ffaf1 commented Apr 29, 2024

Revision has been published.

@phadej
Copy link
Collaborator Author

phadej commented Apr 29, 2024

@ffaf1 Thanks


@Mikolaj

I don't think we announce when GHCs drop out of our support window. Should we?

You definitely should. Dropping support for old GHCs, base or any other dependency (and/or supporting newer versions) is something downstream users care about (recall, cabal-install is not the only user of Cabal-syntax). It also may affect build-type: Custom people.

Virtually all maintainers do so, e.g. https://hackage.haskell.org/package/containers-0.6.6/changelog; it's the first line in the changelog. Also previously such changes were announced in Cabal's changelog, though not very prominently

- Disallow GHC <8.0 for [#7531](https://github.com/haskell/cabal/issues/7531) [#8715](https://github.com/haskell/cabal/issues/8715) [#8794](https://github.com/haskell/cabal/pull/8794)


EDIT: FWIW, there's also some cleanup you could do, a simple git grep shows e.g.

src/Distribution/Compat/Graph.hs:#if MIN_VERSION_base(4,8,0)
src/Distribution/Compat/Newtype.hs:#if MIN_VERSION_base(4,7,0)
src/Distribution/Compat/Newtype.hs:#if MIN_VERSION_base(4,7,0)
src/Distribution/Compat/Newtype.hs:#if MIN_VERSION_base(4,7,0)
src/Distribution/Compat/NonEmptySet.hs:#if MIN_VERSION_base(4,8,0)
src/Distribution/Compat/Prelude.hs:#define MINVER_base_411 MIN_VERSION_base(4,11,0)
src/Distribution/Compat/Typeable.hs:#if MIN_VERSION_base(4,7,0)
src/Distribution/Compat/Typeable.hs:#if !MIN_VERSION_base(4,7,0)
src/Distribution/Fields/ParseResult.hs:#if MIN_VERSION_base(4,10,0)
src/Distribution/Fields/ParseResult.hs:#if MIN_VERSION_base(4,10,0)
src/Distribution/System.hs:#if !MIN_VERSION_base(4,10,0)

There's also MIN_VERSION_bytestring, MIN_VERSION_binary and MIN_VERSION_containers. I don't think it's any value supporting older versions than bundled with older GHC supported. ghc-pkg list is your friend.

@phadej
Copy link
Collaborator Author

phadej commented Apr 29, 2024

I forgot to mention an important point: having metadata updated and changelog entry means that there is a record in VCS when the change happened, leaving some trace. If the change is only in some CI configuration, it may looks like an accident. And so far it looks so to me. I don't know whether to expect Cabal-syntax-3.12.0.1 fixing the issue (i.e. restoring support for a bit older GHCs) or whether the support is dropped for good.

@ffaf1
Copy link
Collaborator

ffaf1 commented Apr 29, 2024

Release notes are being updated in #9953.

@Mikolaj
Copy link
Member

Mikolaj commented May 1, 2024

I think the only major remaining task in this issue is a PR that fixes the base bound on master and a backport to 3.12. Am I right? Volunteers?

@Mikolaj
Copy link
Member

Mikolaj commented May 13, 2024

It's been merged and backported. Is there anything else we could do? If not, shall we close this ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants