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-8.4 related mega-issue #781

Closed
27 tasks done
phadej opened this issue Jan 8, 2018 · 17 comments
Closed
27 tasks done

GHC-8.4 related mega-issue #781

phadej opened this issue Jan 8, 2018 · 17 comments

Comments

@phadej
Copy link
Collaborator

phadej commented Jan 8, 2018

Because @RyanGlScott asked me to make one. I'll list my findings here

Semigroup-Monoid (needs releases)

Intra-dependencies (may need releases)

Lower-bounds (doesn't need releases)

build-tool-depends (doesn't need releases, but I'll do them anyway)

new-build shenanigans (doesn't need releases)

@phadej
Copy link
Collaborator Author

phadej commented Jan 10, 2018

@RyanGlScott I get segmentation fault (locally, Ubuntu LTS-16.04) when trying to run doctests for approximate, bits, compensated built with

% ghc-8.4.1 --version                 
The Glorious Glasgow Haskell Compilation System, version 8.4.0.20171222
% ghc-8.4.1 --print-project-git-commit-id
c6cf13ca63f3a11a8da7c7e3bd69e673a8df5440

but e.g. lens doctests run fine. Could you check if you can reproduce?

@RyanGlScott
Copy link
Collaborator

I can take a look during my downtime this week.

Also, since I don't have to do this at the moment: which of the issues in the original comment will require releasing new versions of packages to Hackage? Some of them, like ekmett/distributive#43, don't seem to fall into this category, and it's not clear to me from a quick glance which ones do.

@RyanGlScott
Copy link
Collaborator

Hm... the bits doctests appear to be working for me on 8.4.1, as this Travis run demonstrates.

@RyanGlScott
Copy link
Collaborator

The approximate and compensated doctests also appear to be in working order.

@phadej
Copy link
Collaborator Author

phadej commented Jan 11, 2018

@RyanGlScott

  • I tagged sections for which will need releases (i.e. code changes required), else might be done with revisions only.
  • Ok, so problem is probably in my machine, I'll try to run those tests on other box to verify test-pass.

EDIT it's nice that there aren't that much issues after all.

@RyanGlScott
Copy link
Collaborator

Some updates.

I've updated every. single. Kmett. package. to use head.hackage (well, at least those to which I have push access), so now we have some assurance that the Kmettiverse builds on GHC 8.4. The one package I wasn't able to convert was gl, as noted in ekmett/gl#17.

Now that everything builds, I've unchecked all of the entries in the SemigroupMonoid category, and I'll check them off once they've had proper Hackage releases.

One challenge I'll need to overcome at some point: I don't have push access to keys or reflection.

Lastly, I was able to reproduce the segfault on the bits doctests using Ubuntu 17.04! (All my previous attempts were on Ubuntu 14.04.) This is both fascinating and terrifying. I'll have to investigate further.

@RyanGlScott
Copy link
Collaborator

RyanGlScott commented Jan 16, 2018

I've managed to reduce the segfault down to:

module Bug where

{-# ANN module "I'm an annotation" #-}
$ ./doctest Bug.hs
Segmentation fault (core dumped)
$ ./doctest --version
doctest version 0.13.0
using version 8.4.0.20171222 of the GHC API
using /opt/ghc/8.4.1/bin/ghc-8.4.0.20171222
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 17.04
Release:        17.04
Codename:       zesty
$ ./doctest Bug.hs
Examples: 0  Tried: 0  Errors: 0  Failures: 0
$ ./doctest --version
doctest version 0.13.0
using version 8.4.0.20171222 of the GHC API
using /opt/ghc/8.4.1/bin/ghc-8.4.0.20171222
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty

@RyanGlScott
Copy link
Collaborator

And now I can reproduce the issue without doctest. See GHC Trac #14675.

@RyanGlScott
Copy link
Collaborator

New releases for all of the packages in the Semigroup-Monoid column have been uploaded to Hackage—except for free-5 and lens-4.16, since those will require lots of upper version bounds bumping in the ecosystem.

@ekmett @glguy: Can you think of any other changes we should put into lens-4.16 before a release?

@RyanGlScott
Copy link
Collaborator

Everything that needs a Hackage release to support GHC 8.4 has now been released. That leaves only two things from the checklist:

But neither of these are required to support GHC 8.4. I'll opt to close this issue and shift over to the respective remaining issues.

@phadej
Copy link
Collaborator Author

phadej commented Jan 30, 2018

@RyanGlScott lens-4.16 has template-haskell <2.13. Is it intentional?

RyanGlScott added a commit that referenced this issue Jan 30, 2018
@RyanGlScott
Copy link
Collaborator

Nope, that certainly wasn't intentional. (I've just made a commit and a revision to compensate.)

But perhaps we should have a discussion about this. The reason why I didn't notice this in the first place is because our testing infrastructure for GHC 8.4.1 specifies allow-newer carte blanche for template-haskell (as well as base, Cabal, and ghc), so it's incredibly easy to let upper bounds issues for 8.4.1 slip by unnoticed. What would be ideal is if we could require that these libraries be up-to-date for lens itself, but relax them for downstream dependencies (as they haven't all caught up yet, so we can't simply drop allow-newer altogether).

(Relatedly, I've often found myself wishing that new-build would yell at you more if you are doing illicit things like this—see haskell/cabal#4627, for instance.)

@phadej
Copy link
Collaborator Author

phadej commented Jan 30, 2018

@RyanGlScott We don't have a syntax for allow-newer to "relax base for everything except these packages". Either we have to explicitly list what needs to be relaxed, or than have somewhat blunt too. (it's still more precise than "--allow-newer" everything).

And relaxing for this package is exactly what we want for HEAD, because we don't want to have (in general) to relax upper bound on base or template-haskell so we don't accidentally release such version (when GHC release is far in the future).

So: bikeshed on the constraint syntax (in a new Cabal issue), maybe we can convince @hvr it has its uses. Maybe --allow-newer=~lens:template-haskell. The problem is that --allow-newer is disjunctive, so --allow-newer=~this:base,~that:base will do wrong thing...

@phadej
Copy link
Collaborator Author

phadej commented Feb 7, 2018

% cabal --project-file=cabal-8.4.1.project new-build intern -j1
Build profile: -w ghc-8.4.0.20180204 -O1
In order, the following will be built (use -v for more details):
 - intern-0.9.1.4 (lib:intern) (first run)
Preprocessing library for intern-0.9.1.4..
Building library for intern-0.9.1.4..
[2 of 9] Compiling Data.Interned.IntSet ( Data/Interned/IntSet.hs, /home/ogre/Documents/acme-kmett/dist-newstyle/build/x86_64-linux/ghc-8.4.0.20180204/intern-0.9.1.4/build/Data/Interned/IntSet.o )

Data/Interned/IntSet.hs:221:10: error:
    • No instance for (Semigroup IntSet)
        arising from the superclasses of an instance declaration
    • In the instance declaration for ‘Monoid IntSet’
    |
221 | instance Monoid IntSet where

ping @RyanGlScott intern is broken too

@phadej
Copy link
Collaborator Author

phadej commented Feb 7, 2018

src/Data/Graph/Algorithm.hs:68:10: error:
    • Could not deduce (Semigroup (GraphSearch g m))
        arising from the superclasses of an instance declaration
      from the context: (Graph g, Monoid m)
        bound by the instance declaration
        at src/Data/Graph/Algorithm.hs:68:10-56
    • In the instance declaration for ‘Monoid (GraphSearch g m)’
   |
68 | instance (Graph g, Monoid m) => Monoid (GraphSearch g m) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build graphs-0.7.

@RyanGlScott RyanGlScott reopened this Feb 7, 2018
@phadej
Copy link
Collaborator Author

phadej commented Feb 7, 2018

And other packages currently acme-kmett compile fine with GHC-8.4.1, I didn't build or run test-suites though.

@RyanGlScott
Copy link
Collaborator

I've uploaded intern-0.9.2 and graphs-0.7.1 to Hackage, so now I believe everything is 8.4-ready.

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

2 participants