input-output-hk / haskell.nix

Alternative Haskell Infrastructure for Nixpkgs
https://input-output-hk.github.io/haskell.nix
Apache License 2.0
558 stars 240 forks source link

`hackageNix` update results in missing hsc2hs tool dependency for `network` #2240

Open Benjamin-McRae-Tracsis opened 3 months ago

Benjamin-McRae-Tracsis commented 3 months ago

Describe the bug

When nix flake update hackageNix'ing, the build fails despite not changing our stackage snapshot.

The diff:

diff --git a/flake.lock b/flake.lock
index bd25aa5396..4ed0d77680 100644
--- a/flake.lock
+++ b/flake.lock
@@ -191,11 +191,11 @@
     "hackageNix": {
       "flake": false,
       "locked": {
-        "lastModified": 1721354475,
-        "narHash": "sha256-gotnwG5amEmV+hYUmnoeUVwppmVKAE9KcfHcLgD/w20=",
+        "lastModified": 1723422703,
+        "narHash": "sha256-JJvsQ+HZdz/0ov4dijgBSbirlM+ejkAyf2lC+ItwV/o=",
         "owner": "input-output-hk",
         "repo": "hackage.nix",
-        "rev": "f2c165c502d2a890f74deedcccc912c102e8571f",
+        "rev": "b3791d613cfa39c2bab05691b124f921d47c4071",
         "type": "github"
       },
       "original": {

This errors with:


       … while evaluating definitions from `<unknown-file>':

       … while evaluating the option `packages.network.components.library.build-tools':

       … while evaluating definitions from `/nix/store/qfymhkylsj11dk2xm0z85wrsfqqfw4xa-source/modules/plan.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: Neither the Haskell package set or the Nixpkgs package set contain the tool: hsc2hs:hsc2hs (build tool dependency).
       If this is a system dependency:
       You may need to augment the system package mapping in haskell.nix so that it can be found.
       If this is a Haskell dependency:
       If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
not creating gc roots

Steps To Reproduce

I can't quite work out how to get a minimal example from mutating one of the buildable tests.

As far as I can see, setting your hackageNix to the above revision/version and trying to build a project with network as a dependency results in failure.

Expected behavior

Updating the hackageNix without updating stackageNix has the same behaviour before and after.

I can build packages with network as a dependency.

Additional context

Happy to investigate a minimal reproducer if given some pointers.

Benjamin-McRae-Tracsis commented 3 months ago

After some investigation, it seems that commit a20e7da08ddfdd02f02e21368217100ef5daf7df is at fault, wherein a large tooling change happened.

Are we expected to use a newer haskellNix to use newer hackageNix's?