Giter VIP home page Giter VIP logo

Comments (7)

ocharles avatar ocharles commented on July 30, 2024

Ok, while I can get into a shell by removing that line, I also get...

/nix/store/fbykv4hlfs6hdxmrfsl1vj4fw47ryb7g-ghc-shell-for-packages-ghc-9.2.7-env/lib/ghc-9.2.7/package.conf.d
    array-0.5.4.0
    base-4.16.4.0
    deepseq-1.4.6.1
    ghc-bignum-1.2
    ghc-boot-th-9.2.7
    ghc-prim-0.8.0
    integer-gmp-1.1
    pretty-1.1.3.6
    rts-1.0.2
    template-haskell-2.18.0.0

so I wonder if propagatedBuildInputs is needed for this?

from haskell.nix.

ocharles avatar ocharles commented on July 30, 2024

Ok, this seems to have done the job:

diff --git a/builder/ghc-for-component-wrapper.nix b/builder/ghc-for-component-wrapper.nix
index 3ad518fa..dd72b4b8 100644
--- a/builder/ghc-for-component-wrapper.nix
+++ b/builder/ghc-for-component-wrapper.nix
@@ -19,6 +19,11 @@
 let
   ghc = if enableDWARF then defaults.ghc.dwarf else defaults.ghc;
 
+  uniqueWithName = list:
+    lib.concatMap lib.unique (
+      builtins.attrValues (
+        builtins.groupBy (x: if __typeOf x == "set" then x.name or "noname" else "notset") list));
+
   inherit (configFiles) targetPrefix ghcCommand ghcCommandCaps packageCfgDir;
   libDir         = "$wrappedGhc/${configFiles.libDir}";
   docDir         = "$wrappedGhc/share/doc/ghc/html";
@@ -154,7 +159,7 @@ let
     inherit script targetPrefix;
     inherit (ghc) version meta;
   };
-  propagatedBuildInputs = configFiles.libDeps;
+  propagatedBuildInputs = uniqueWithName configFiles.libDeps;
   nativeBuildInputs = [ghc];
 } (''
     mkdir -p $out/configFiles

from haskell.nix.

michaelpj avatar michaelpj commented on July 30, 2024

The change in that commit does seems suspicious to me. It looks like it's adding all of the library dependencies to propagatedBuildInputs, which means that we're adding basically the whole transitive dependency closure of libraries in?

from haskell.nix.

michaelpj avatar michaelpj commented on July 30, 2024

We've also recently started hitting this. Going to try a commit before this, great sleuthing Ollie!

from haskell.nix.

michaelpj avatar michaelpj commented on July 30, 2024

There are now lots of propagated inputs in three places:

  • The GHC env builder
  • The component builder
  • The haddock builder

I'm trying applying your patch in each place.

But it strikes me that we're just putting off the problem: propagated build inputs are going to get pulled from the whole dependency tree (right?) deduplicating the ones that we add to each node will help, but it's still potentially going to be a lot of stuff, and there might be duplicates introduced later as well.

from haskell.nix.

michaelpj avatar michaelpj commented on July 30, 2024

Okay, I applied it in all three places and it worked. Not sure what the best solution is here.

from haskell.nix.

angerman avatar angerman commented on July 30, 2024

@hamishmack please take a look tomorrow morning.

from haskell.nix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.