Subject: Re: [PATCH WIP] gnu: add stack.

From: John Soo <[email-masked]>
Date: Thu, 13 Feb 2020 13:52:22 +0000

Hi Tim,

> This seems to be due to <https://github.com/haskell/hsc2hs/issues/22>.
>
> Briefly, the “hsc2hs” program bundled with GHC 8.6.5 accepts response
> files, but then goes ahead and passes arguments directly to GCC.  Newer
> versions of “hsc2hs” use response files for GCC, which solves the
> “Argument list too long” problem.
>
> My first suggestion would be to make a separate package for “hsc2hs”
> using the version listed on Stackage (which is 0.68.6).  Then, add it as
> a native input to the “stack” package and get it to shadow the version
> shipped with GHC.

I added [email-masked] as a native input to stack but I'm not sure how
to make it shadow the ghc package.
Used as a native input hsc2hs does not fix the issue.
I suppose another option would be to use the #:haskell key to use a
locally-patched version.
I am not familiar with ghc internals aside from having built from
source a few times so I can look into that option.

> Failing that, we could consider patching our GHC package.  It would be
> best to avoid that, though!  :)

Agree! I think we should try shadowing hsc2hs first. I might even
suggest bumping lts/ghc versions before we patch our version.

> (Also, there’s a duplicate “ghc-hspec-discover” in the patch set.  That
> is, we already have an “hspec-discover” package.)

Oops! Sorry!
It's definitely the importer. I know I'm not the first to have the problem.
Maybe we should open an issue to fix that?

Thanks!

John