Skip to content

haskell.compiler.ghc961: init at 9.6.1#210973

Merged
sternenseemann merged 1 commit intoNixOS:haskell-updatesfrom
sternenseemann:ghc-9.6.1
Mar 12, 2023
Merged

haskell.compiler.ghc961: init at 9.6.1#210973
sternenseemann merged 1 commit intoNixOS:haskell-updatesfrom
sternenseemann:ghc-9.6.1

Conversation

@sternenseemann
Copy link
Member

xhtml seems to be built unconditionally now which is at least one thing improved by hadrian.

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Jan 15, 2023
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Jan 15, 2023
Comment on lines 1 to 4
Copy link
Member

Choose a reason for hiding this comment

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

This is quite beautiful.

@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 15, 2023
@guibou
Copy link
Contributor

guibou commented Feb 11, 2023

Thank you for this work.

I've tested it and the compilers works perfectly. However, ghcWithPackages is not working.

Initially, it fails because of:

ghc> rm: cannot remove '/nix/store/jfk7c17xgyfvxjbf9cg3mmcwc9rwh5sm-ghc-9.6.0.20230128-with-packages/lib/ghc-9.6.0.20230128/package.conf.d/package.cache.lock': No such file or directory

Looks like the package.cache.lock file does not exists anymore. I tried to "fix" in a backward compatibly way the rm call by adding -f:

diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix
index 77ccd301b43..9aa326a8b5b 100644
--- a/pkgs/development/haskell-modules/with-packages-wrapper.nix
+++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix
@@ -156,8 +156,8 @@ symlinkJoin {
      # to another nix derivation, so they are not writable.  Removing
      # them allow the correct behavior of ghc-pkg recache
      # See: https://github.com/NixOS/nixpkgs/issues/79441
-     rm ${packageCfgDir}/package.cache.lock
-     rm ${packageCfgDir}/package.cache
+     rm -f ${packageCfgDir}/package.cache.lock
+     rm -f ${packageCfgDir}/package.cache
 
      $out/bin/${ghcCommand}-pkg recache
      ''}

But now it fails with:

hc> WARNING: settings file doesn't exist "/nix/store/1mf5mh65drkwpp77l8l2a0h0rl8d3h1d-ghc-9.6.0.20230128-with-packages/lib/ghc-9.6.0.20230128/settings"
ghc> cannot know target platform so guessing target == host (native compiler).
ghc> WARNING: settings file doesn't exist "/nix/store/1mf5mh65drkwpp77l8l2a0h0rl8d3h1d-ghc-9.6.0.20230128-with-packages/lib/ghc-9.6.0.20230128/settings"
ghc> cannot know target platform so guessing target == host (native compiler).
ghc> There are problems in package hspec-2.9.7:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc> There are problems in package HUnit-1.6.2.0:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc>   dependency "deepseq-1.4.8.0" doesn't exist
ghc> There are problems in package temporary-1.3:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc>   dependency "directory-1.3.8.0" doesn't exist
ghc>   dependency "exceptions-0.10.7" doesn't exist
ghc>   dependency "filepath-1.4.100.0" doesn't exist
ghc>   dependency "transformers-0.6.0.4" doesn't exist
ghc>   dependency "unix-2.8.0.0" doesn't exist
ghc> There are problems in package hspec-core-2.9.7:
ghc>   dependency "array-0.5.4.0" doesn't exist
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc>   dependency "deepseq-1.4.8.0" doesn't exist
ghc>   dependency "directory-1.3.8.0" doesn't exist
ghc>   dependency "filepath-1.4.100.0" doesn't exist
ghc>   dependency "ghc-9.6.0.20230128" doesn't exist
ghc>   dependency "ghc-boot-th-9.6.0.20230128" doesn't exist
ghc>   dependency "stm-2.5.1.0" doesn't exist
ghc>   dependency "transformers-0.6.0.4" doesn't exist
ghc> There are problems in package hspec-discover-2.9.7:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc>   dependency "directory-1.3.8.0" doesn't exist
ghc>   dependency "filepath-1.4.100.0" doesn't exist
ghc> There are problems in package hspec-expectations-0.8.2:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc> There are problems in package QuickCheck-2.14.2:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc>   dependency "containers-0.6.6" doesn't exist
ghc>   dependency "deepseq-1.4.8.0" doesn't exist
ghc>   dependency "template-haskell-2.20.0.0" doesn't exist
ghc>   dependency "transformers-0.6.0.4" doesn't exist
ghc> There are problems in package call-stack-0.4.0:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc> There are problems in package random-1.2.1.1:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc>   dependency "bytestring-0.11.4.0" doesn't exist
ghc>   dependency "deepseq-1.4.8.0" doesn't exist
ghc>   dependency "mtl-2.3.1" doesn't exist
ghc> There are problems in package ansi-terminal-0.11.4:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc> There are problems in package clock-0.8.3:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc> There are problems in package quickcheck-io-0.2.0:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc> There are problems in package setenv-0.1.1.3:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc>   dependency "unix-2.8.0.0" doesn't exist
ghc> There are problems in package tf-random-0.5:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc>   dependency "time-1.12.2" doesn't exist
ghc> There are problems in package splitmix-0.1.0.4:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc>   dependency "deepseq-1.4.8.0" doesn't exist
ghc> There are problems in package colour-2.3.6:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc> There are problems in package primitive-0.7.4.0:
ghc>   dependency "base-4.18.0.0" doesn't exist
ghc>   dependency "deepseq-1.4.8.0" doesn't exist
ghc>   dependency "template-haskell-2.20.0.0" doesn't exist
ghc>   dependency "transformers-0.6.0.4" doesn't exist
ghc> The following packages are broken, either because they have a problem
ghc> listed above, or because they depend on a broken package.
ghc> hspec-2.9.7
ghc> HUnit-1.6.2.0
ghc> temporary-1.3
ghc> hspec-core-2.9.7
ghc> hspec-discover-2.9.7
ghc> hspec-expectations-0.8.2
ghc> QuickCheck-2.14.2
ghc> call-stack-0.4.0
ghc> random-1.2.1.1
ghc> ansi-terminal-0.11.4
ghc> clock-0.8.3
ghc> quickcheck-io-0.2.0
ghc> setenv-0.1.1.3
ghc> tf-random-0.5
ghc> splitmix-0.1.0.4
ghc> colour-2.3.6
ghc> primitive-0.7.4.0

(that's for one specific package db, the error may vary depending on the ghcWithPackages call).

I'll try to investigate later, I wanted to report this breakage, but this does not block the merge of the compiler from my point of view.

@sternenseemann
Copy link
Member Author

@guibou That is fixed in #212107, this branch is just not based on a new enough haskell-updates. When rebased, that issue should go away (you can probably try yourself easily).

Copy link
Member Author

Choose a reason for hiding this comment

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

need to check if this makes sense (also rts and hpc) – if they are not on hackage it's probably sensible to remove them here.

@guibou
Copy link
Contributor

guibou commented Feb 14, 2023

I've rebased and applied the following diff:

diff --git a/pkgs/development/compilers/ghc/9.6.1.nix b/pkgs/development/compilers/ghc/9.6.1.nix
index f9c9a4b1e6a..574ff88cf46 100644
--- a/pkgs/development/compilers/ghc/9.6.1.nix
+++ b/pkgs/development/compilers/ghc/9.6.1.nix
@@ -1,5 +1,5 @@
 import ./common-hadrian.nix rec {
-  version = "9.6.0.20230128";
-  url = "https://downloads.haskell.org/~ghc/9.6.1-alpha2/ghc-${version}-src.tar.xz";
-  sha256 = "531f58dc0e352987a637095c18252e5d6fef260969eb9cb3d8447888b0922da2";
+  version = "9.6.0.20230210";
+  url = "https://downloads.haskell.org/~ghc/9.6.1-alpha3/ghc-${version}-src.tar.xz";
+  sha256 = "sha256-3vSnSFFiJm6R70YA38yoQki+1kFHF91+66za2WogT0c=";
 }

For alpha 3 support. Unfortunately, I cannot push to your repo @sternenseemann so well, please accept this diff here ^^

@sternenseemann sternenseemann force-pushed the ghc-9.6.1 branch 2 times, most recently from 63d7e40 to b52426d Compare February 14, 2023 19:38
@sternenseemann
Copy link
Member Author

@guibou Thanks, did so on my branch as well. Also tested ghcWithPackages which seems to work after rebasing.

@9999years
Copy link
Contributor

This looks great! I've tried it out at Mercury and it works well. We can't quite get a full build working because a number of dependencies don't compile, I think mostly due to breaking changes in mtl and transformers, but the compiler itself seems good.

@sternenseemann sternenseemann changed the title haskell.compiler.ghc961: init at 9.6.0.20230111 haskell.compiler.ghc961: init at 9.6.1 Mar 12, 2023
@sternenseemann sternenseemann marked this pull request as ready for review March 12, 2023 11:29
xhtml seems to be built unconditionally now which is at least one thing
improved by hadrian.
@sternenseemann sternenseemann merged commit f07d4d0 into NixOS:haskell-updates Mar 12, 2023
@sternenseemann sternenseemann deleted the ghc-9.6.1 branch March 12, 2023 12:18
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Mar 12, 2023
@ofborg ofborg bot removed the 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. label Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants