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

haskellPackages.ghc: 8.10.7 -> 9.0.2 #160733

Merged
merged 308 commits into from
Mar 30, 2022
Merged

haskellPackages.ghc: 8.10.7 -> 9.0.2 #160733

merged 308 commits into from
Mar 30, 2022

Conversation

sternenseemann
Copy link
Member

@sternenseemann sternenseemann commented Feb 18, 2022

This Merge

This is not your usual haskell-updates rotation! We're bumping the default GHC by one major release.

This branch is being continually built and tested by hydra at https://hydra.nixos.org/jobset/nixpkgs/haskell-updates. You may be able to find an up-to-date Hydra build report at cdepillabout/nix-haskell-updates-status.

Since this is quite a big change, cleaning up regressions and merging may take longer than usual.

haskellPackages Workflow Summary

Our workflow is currently described in pkgs/development/haskell-modules/HACKING.md.

The short version is this:

  • We regularly update the Stackage and Hackage pins on haskell-updates (normally at the beginning of a merge window).
  • The community fixes builds of Haskell packages on that branch.
  • We aim at at least one merge of haskell-updates into master every two weeks.
  • We only do the merge if the mergeable job is succeeding on hydra.
  • If a maintained package is still broken at the time of merge, we will only merge if the maintainer has been pinged 7 days in advance. (If you care about a Haskell package, become a maintainer!)

This is the follow-up to #160015. Come to #haskell:nixos.org if you have any questions.

Rough order of business:

  • Update GHC
  • Switch to Stackage Nightly, update hackage2nix config
  • Fix evaluation of package sets
    • 8.8.4
    • 8.10.7
    • 9.0.2
    • 9.2.1
  • Try to get all packages that are new dependencies and marked as broken to work (see eval errors tab)
  • Check for and fix Regressions
  • Figure out regressions in 8.10.7 set and what to try and keep working (Suggestions on the how very welcome!)
    • Enable all available plugins in HLS for GHC < 9.0.2
  • Empty broken.yaml and see what has fixed itself

Closes #163329

@ofborg ofborg bot requested a review from DamienCassou February 22, 2022 00:23
@DamienCassou DamienCassou removed their request for review February 22, 2022 06:55
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/call-for-contributions-we-are-updating-to-ghc-9-0-2/17844/1

@sternenseemann
Copy link
Member Author

sternenseemann commented Feb 22, 2022

We are updating to Stackage Nightly again! The main changes are GHC 9.0.2 and aeson 2.0. Naturally, this has been quite a big disruption and we'd appreciate help from package maintainers getting the most important packages to work again.


haskell-updates build report from hydra

evaluation 1745231 of nixpkgs commit eb29acf as of 2022-02-22 06:18 UTC

🔴 Branch not mergeable

  • mergeable jobset failed.
  • maintained jobset failed.

Build summary

Platform Failed ❌ DependencyFailed ❗ TimedOut ⌛🚫 Success ✔️
aarch64-linux 📱 722 929 4 5590
x86_64-darwin 🍎 626 1410 2 5142
x86_64-linux 🐧 708 927 1 5641

Maintained packages with build failure

Maintained packages with failed dependency

Full build report.

@turboMaCk
Copy link
Member

I don't think we could be able to update elmPackages.elm to build with 9.x.x We will need to explicitly set ghc 8.10.7 there.

@sternenseemann
Copy link
Member Author

I don't think we could be able to update elmPackages.elm to build with 9.x.x We will need to explicitly set ghc 8.10.7 there.

That's a good hint, thanks! Also has the benefit that it'll enforce some base packages to work in the 8.10.7 set, so it'll stay usable longer hopefully. Do you know if there's any plans to migrate to 9.0 at some point on upstream's side?

This commit has been generated by maintainers/scripts/haskell/update-hackage.sh
This commit has been generated by maintainers/scripts/haskell/update-stackage.sh
This commit has been generated by maintainers/scripts/haskell/regenerate-hackage-packages.sh
@turboMaCk
Copy link
Member

turboMaCk commented Feb 22, 2022

@sternenseemann unfortunately compiler work is rather opaque. The last version of compiler was released in 2019 https://github.com/elm/compiler/releases/tag/0.19.1 and the most recent information from the end of last year is that new version won't be ready soon even though it's being worked on https://discourse.elm-lang.org/t/status-update-3-nov-2021/7870

I think pinning the ghc 8 for elm will be more reasonable than trying to patch around it. I can try to look into this in separate PR if you want me to since fixing ghc just for elm can be done and merged separately.

edit: also we build elm as static binary so I think there is no significant disadvantage to decoupling it from default Haskell package set.

@sternenseemann
Copy link
Member Author

@turboMaCk That'd be appreciated! I tried the following patch locally just now and it seems some dependencies of elm will need looking at still (e.g. currently it's failing of something claiming to not support attoparsec 0.14):

diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix
index 149d8115054..e302ef51809 100644
--- a/pkgs/development/compilers/elm/default.nix
+++ b/pkgs/development/compilers/elm/default.nix
@@ -7,7 +7,7 @@ let
 
   fetchElmDeps = pkgs.callPackage ./fetchElmDeps.nix { };
 
-  hsPkgs = self: pkgs.haskellPackages.override {
+  hsPkgs = self: pkgs.haskell.packages.ghc8107.override {
     overrides = self: super: with pkgs.haskell.lib.compose; with lib;
     let elmPkgs = rec {
       elm = overrideCabal (drv: {

@turboMaCk
Copy link
Member

@sternenseemann no worries I can tackle that independently of the rest of the work. It will be more sane way to proceed with this anyway. You can skip elm for now I'll report the status back in here once I know more.

@Profpatsch
Copy link
Member

I just released yarn2nix 0.10.1 https://hackage.haskell.org/package/yarn2nix which has support for aeson-2.0 (it’s been rebased onto this branch).

sternenseemann and others added 5 commits March 28, 2022 19:40
Cheese in a package update while keeping the old expression in
hackage-packages.nix, so we can avoid any regressions updating our
hackage snapshot might introduce.
pkgs.taffybar stays working because taffybar is marked unbroken in
configuration-ghc810x.nix
@sternenseemann
Copy link
Member Author

@rnhmjoj Seems like the pkgsStatic fix didn't last long: https://hydra.nixos.org/build/170015577. Not sure what broke it exactly. Only 8.10.7 seems to be affected, so it's maybe not the biggest deal.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Mar 29, 2022

@sternenseemann I tested native-bignum.ghc{902,922} but never integer-simple.ghc8107: in fact it has been broken since the beginning (a503a02). This is strange: the -fexternal-dynamic-refs trick seems to work for GHC ≥ 9 only, but in the tweag blog post they were most certainly using GHC 8.10.

Anyway, if the test failing is a problem you can replace 8.10 with 9.0.2 or remove the case altogether.

@sternenseemann
Copy link
Member Author

@rnhmjoj A if it's not a regression, we can probably just drop the case. If I recall correctly, you didn't alter the 8.10 expression which would explain it?

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Mar 30, 2022

If I recall correctly, you didn't alter the 8.10 expression which would explain it?

Oh, you're right. I would change the test case to use GHC 9.0.2, then.

We should only make use of asserts to assert a property about the
*current* attribute in order to make it possible for downstream users to
change versions of packages: When a downstream user changes the package
an attribute points to, the assert is removed as the attribute is
swapped out, so asserting something about itself is okay. However, when
it asserts a property about another package, changing that other package
may break the package unexpectedly, with no better workaround then
passing in an empty `configurationCommon` overlay.

See also: #166425
@maralorn maralorn merged commit 3bfa15f into master Mar 30, 2022
@maralorn
Copy link
Member

Thank you, to everyone who contributed! This was much more work than we had expected.
Special thanks go to @sternenseemann who definitely did the largest number of commits on this one!

Enjoy your GHC 9.0 with all the updates!

@NorfairKing
Copy link
Contributor

NorfairKing commented Apr 4, 2022

Great job @maralorn and @sternenseemann !!

@jvanbruegge
Copy link
Contributor

Hi, I just stumbled across this. I maintain the naproche package which is a Haskell executable that broke with this update. But I was not notified and only saw it when trying to update my nixpkgs and seeing that isabelle does not build any more (because of its dependency on naproche).
Is there somewhere I need to register naproche so it will get caught here in the next round of updates? I fixed the issue now in upstream and created a PR to update the version in nixpkgs: #169400
Next time this could be done earlier

@Artturin
Copy link
Member

Artturin commented May 3, 2022

renaming the streamly_0_8_1_1 attribute to streamly broke some nix-env command because it was still used in configuration-darwin.nix
https://github.com/Mic92/nix-index-database/runs/6244309208?check_suite_focus=true

fix in #171438

Artturin added a commit to Artturin/nixpkgs that referenced this pull request May 4, 2022
fixes
```
error: querying available packages failed
caused by: nix-env failed with error: nix-env failed with exit code 1:
error: attribute 'streamly_0_8_1_1' missing

       at /nix/store/lw6gp8rrhd7lpi81dk9wr1l09a7za523-source/pkgs/development/haskell-modules/configuration-darwin.nix:259:6:

          258|     ] ++ (drv.libraryFrameworkDepends or []);
          259|   }) super.streamly_0_8_1_1;
             |      ^
          260|
```

PR NixOS#160733 didn't catch this it seems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pandoc update to 2.17 haskellPackages.http2 not building on aarch64-darwin