-
Notifications
You must be signed in to change notification settings - Fork 58
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
Bump to ghc 9.6.6 from Nix latest #1137
Conversation
Hey @morucci , we shouldn't need hspkgs anymore, ghc-9.6 is now well established in nixpkgs. Let's remove that dependency and import the few overrides that are still needed. I think it should mostly work, though we need to fix the paths for the tools like weeder/hlint/fourmolu, which were provided as |
I remember doing that, but then a go package failed to build because the infrastructure change a bit. So let's replace the hspkgs import with In particular, we need to change: Line 66 in 2246940
Into hsPkgs = latestNixpkgs.haskellPackages.extend haskellExtend; And then pull the overrides (e.g. gerrit) in Lines 21 to 22 in 2246940
|
Hey @TristanCacqueray thanks for the guidance. I'll try to address that path in followup commits inside that PR. I understand that we'll have a bit of delay using nix to benefit latest Haskell tool chains. So yes if 9.6 and its dependencies are now well integrated in nixpkgs then let's try to use it directly. |
It's not really because of nix, it's actually stackage which govern the set of "stable" versions. I think the default (9.6) should be fine, but you can try a more recent version by replacing Checkout how it was done to pull ghc9.6 when the default was 8.10: https://github.com/podenv/hspkgs/blob/7a46854f28ab9b99c51353c81d5967f1f6fd9a9b/flake.nix#L148 |
ff4f04e
to
d150353
Compare
It's odd that the formatting changed, are you using? (use-package nix-mode
:config
;; auto format with nixfmt by default
(reformatter-define nixfmt-format
:program "nixfmt")
(add-hook 'nix-mode-hook 'nixfmt-format-on-save-mode)) With |
Looks like the effectful requirement in cabal is not compatible anymore because of effectful being 2.3.1 in the Nix set. |
Should be fine to use according to https://github.com/haskell-effectful/effectful/blob/master/effectful-core/CHANGELOG.md#effectful-core-2310-2024-06-07 and https://github.com/haskell-effectful/effectful/blob/master/effectful/CHANGELOG.md#effectful-2310-2024-06-07 . Let's bump the bound in |
No, I was using the default |
This seems to cause issue with |
Almost there, try to add |
nix/default.nix
Outdated
@@ -231,8 +245,8 @@ in rec { | |||
apiVersion: 1 | |||
datasources: | |||
- name: Prometheus | |||
type: prometheus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That reformat seems wrong, you'll have to manually discard all these chunks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just did a drop of both formating commits. Then re-run the nixfmt (this is the last commit here). That looks fine I guess.
One last error!
|
``` src/Json/Extras.hs:8:3-18: error: [GHC-69158] Conflicting exports for ‘toText’: ‘TextShort.toText’ exports ‘TextShort.toText’ imported qualified from ‘Data.Text.Short’ at src/Json/Extras.hs:21:1-45 (and originally defined in ‘text-short-0.1.6:Data.Text.Short.Internal’) ‘module Json’ exports ‘Json.toText’ imported from ‘Json’ at src/Json/Extras.hs:26:1-25 | 8 | TextShort.toText, | ^^^^^^^^^^^^^^^^ ```
517b640
to
d565d9a
Compare
It looks like the hash function changed, you'll have to update the expected value in the test. |
For fourmolu, here is some elisp for you: (use-package haskell-mode
:config
;; ensure run-haskell uses the simplest ghci subprocess
(setq-default haskell-process-type 'auto)
(add-hook 'haskell-mode-hook 'haskell-auto-insert-module-template)
;; auto format with fourmolu by default
(reformatter-define fourmolu-format
:program "fourmolu"
:args `("--stdin-input-file" ,buffer-file-name))
(add-hook 'haskell-mode-hook 'fourmolu-format-on-save-mode)) Thanks calling |
well done! Glad to see hspkgs is out of the equation 🥳 |
First tentative to move our Haskell stack to a higher and stable version of the stack. We rely on podenv/hspkgs to provide a nix derivation for a Haskell package set.
Here we attempt a bump to hspkgs for ghc 9.6.4.