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 9.4 #201

Merged
merged 5 commits into from
Sep 14, 2023
Merged

GHC 9.4 #201

merged 5 commits into from
Sep 14, 2023

Conversation

samhh
Copy link
Contributor

@samhh samhh commented Sep 13, 2023

Edit: As below this PR not only bumps GHC but also resolves HLS for Apple Silicon users, meaning all contributors can now source all dependencies straight from Nix! 🎉

Notes for reviewers (given divergent OS/arch):

  1. Ensure that none of the dependencies need to build. They should download and just work via the binary cache.
  2. Double check that HLS still doesn't work on macOS AArch64 *.
  3. Assuming HLS doesn't work, ensure that you can source GHC 9.4.6 and HLS from ghcup. From a quick look I think it should be available. HLS can now be sourced from Nix for all contributors! 🎉

* Try this patch and see if it yells at you (it'd fail on master, and GitHub has no ARM runners for us to nix flake check against):

diff --git a/flake.nix b/flake.nix
index 9f53c66..18d0f4d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -44,9 +44,7 @@
           ghcVer = "ghc946";
           haskPkgs = pkgs.haskell.packages."${ghcVer}";
 
-          hask = if system == flake-utils.lib.system.aarch64-darwin
-            then [ ]
-            else [
+          hask = [
               pkgs.haskell.compiler."${ghcVer}"
               haskPkgs.haskell-language-server
             ];
  • Note to self: Update README accordingly before merging.

This is assumed to exist. Like a network connection.
I get the feeling this is considered best practice.
@samhh samhh marked this pull request as ready for review September 13, 2023 16:01
@samhh samhh requested a review from a team as a code owner September 13, 2023 16:01
@astlouisf
Copy link
Contributor

astlouisf commented Sep 13, 2023

Is there a more systematic way of ensuring that nothing build than monitoring the output of nix develop? Unless I missed it, everything was fetching * from https://cache.nixos.org.

The patch doesn't have nix screaming at me and hls seems to have been fetched just fine:

% nix flake check
warning: Git tree '/Users/astlouisf/un/intlc' is dirty
astlouisf@lithium intlc % echo $?
0
% nix develop
warning: Git tree '/Users/astlouisf/un/intlc' is dirty
$ which haskell-language-server-9.4.6
/nix/store/zc2hsxns5jz3jha9j5v3lp69l07mraix-haskell-language-server-2.0.0.1/bin/haskell-language-server-9.4.6

ghcup has no knowledge of ghc-9.4.6

$ ghcup list -c installed 2>/dev/null
   Tool  Version  Tags               Notes
✔✔ ghc   9.2.5    base-4.16.4.0      hls-powered
✓  ghc   9.4.4    base-4.17.0.0      hls-powered
✓  cabal 3.6.2.0  recommended
✔✔ cabal 3.8.1.0
✓  hls   1.9.0.0
✔✔ hls   1.9.1.0
✓  stack 2.9.1
✔✔ stack 2.9.3    recommended
✔✔ ghcup 0.1.19.4 latest,recommended

and yet cabal build used ghc-9.4.6

...
Building library for intlc-0.8.1..
[ 1 of 18] Compiling Intlc.Error      ( lib/Intlc/Error.hs, /Users/astlouisf/un/intlc/dist-newstyle/build/aarch64-osx/ghc-9.4.6/intlc-0.8.1/build/Intlc/Error.o, /Users/astlouisf/un/intlc/dist-newstyle/build/aarch64-osx/ghc-9.4.6/intlc-0.8.1/build/Intlc/Error.dyn_o )
[ 2 of 18] Compiling Intlc.ICU        ( lib/Intlc/ICU.hs, /Users/astlouisf/un/intlc/dist-newstyle/build/aarch64-osx/ghc-9.4.6/intlc-0.8.1/build/Intlc/ICU.o, /Users/astlouisf/un/intlc/dist-newstyle/build/aarch64-osx/ghc-9.4.6/intlc-0.8.1/build/Intlc/ICU.dyn_o )
[
...

so I assume it used the nix provided compiler

I still need to confirm that hls is actually working. But it seems to be looking good so far 🤔

@astlouisf
Copy link
Contributor

I got hls working with VS Code by configuring the Haskell plugin "haskell.manageHLS": "PATH"

@samhh
Copy link
Contributor Author

samhh commented Sep 13, 2023

Is there a more systematic way of ensuring that nothing build than monitoring the output of nix develop? Unless I missed it, everything was fetching * from https://cache.nixos.org.

That's a good question, I've never checked. It was obvious for GHC/HLS though as it takes ages to build 😛

@samhh samhh merged commit 257e66a into master Sep 14, 2023
6 checks passed
@samhh samhh deleted the ghc94 branch September 14, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants