Skip to content

Build failure with GHC-8.2 #9952

Closed
Closed

Description

@phadej

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).

Activity

  1. phadej commented on Apr 29, 2024

    @phadej
    CollaboratorAuthor

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

  2. added
    regression on master
    and removed
    regression on master
    on Apr 29, 2024
  3. ffaf1 commented on Apr 29, 2024

    @ffaf1
    Collaborator

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

  4. Mikolaj commented on Apr 29, 2024

    @Mikolaj
    Member

    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.

  5. Mikolaj commented on Apr 29, 2024

    @Mikolaj
    Member

    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.

  6. phadej commented on Apr 29, 2024

    @phadej
    CollaboratorAuthor

    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.

  7. ffaf1 commented on Apr 29, 2024

    @ffaf1
    Collaborator

    Which revision would fix this?

  8. Mikolaj commented on Apr 29, 2024

    @Mikolaj
    Member

    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.

  9. Mikolaj commented on Apr 29, 2024

    @Mikolaj
    Member
  10. Mikolaj commented on Apr 29, 2024

    @Mikolaj
    Member

    @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.

  11. ffaf1 commented on Apr 29, 2024

    @ffaf1
    Collaborator

    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.

  12. ffaf1 commented on Apr 29, 2024

    @ffaf1
    Collaborator

    Revision has been published.

  13. phadej commented on Apr 29, 2024

    @phadej
    CollaboratorAuthor

    @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.

  14. phadej commented on Apr 29, 2024

    @phadej
    CollaboratorAuthor

    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.

  15. ffaf1 commented on Apr 29, 2024

    @ffaf1
    Collaborator

    Release notes are being updated in #9953.

  16. changed the title [-]Build failure[/-] [+]Build failure with GHC-8.2[/+] on Apr 29, 2024
  17. Mikolaj commented on May 1, 2024

    @Mikolaj
    Member

    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?

  18. Mikolaj commented on May 13, 2024

    @Mikolaj
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions