stratosphere icon indicating copy to clipboard operation
stratosphere copied to clipboard

Argument list too long on macosx / ideas?

Open mbj opened this issue 4 years ago • 4 comments

I know this is essentially more an issue with stack/cabal/ghc.

Still as this projects triggers it I'm asking here if anyone knows a workaround to get a rid of:

stratosphere                     > /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/stack-b1e84d94c2a2fde8/stratosphere-0.59.1/library/Stratosphere/Outputs.hs:34:1: warning: [-Wunused-imports]
stratosphere                     >     The import of ‘Data.Semigroup’ is redundant
stratosphere                     >       except perhaps to import instances from ‘Data.Semigroup’
stratosphere                     >     To import instances alone, use: import Data.Semigroup()
stratosphere                     >    |
stratosphere                     > 34 | import Data.Semigroup (Semigroup)
stratosphere                     >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
stratosphere                     > [2064 of 2066] Compiling Stratosphere.Template
stratosphere                     > [2065 of 2066] Compiling Stratosphere.Check
stratosphere                     > [2066 of 2066] Compiling Stratosphere
stratosphere                     > /Users/runner/.ghcup/ghc/8.10.2/bin/ghc: createProcess: runInteractiveProcess: exec: resource exhausted (Argument list too long)
Completed 138 action(s).

This is using stack-2.5.1 on Github actions.

As I'm posting this I'm rebuilding with verbosity to find the exact GHC command.

I hope its okay I ask for input here, as I assume others may have hit it already and have a workaround. If such a workaround is found: I'm happy to PR it to this projects README. As it'll allow others that will hit this issue to work with this great project efficiently.

mbj avatar Nov 20 '20 17:11 mbj

Oh wow that looks annoying. I'm assuming it is because there are so many modules?

jdreaver avatar Nov 20 '20 17:11 jdreaver

@jdjacobrli I assume it happens at the moment the various smaller modules get assembled into a bigger package, and each module is likely referenced with an absolute path, overflowing the character limit.

I'm sure there is a workaround, but blocked by private issues for the next 60min. Will post my progress on debugging this.

mbj avatar Nov 20 '20 17:11 mbj

This is a public build showing the issue, this is with stack --verbose. Not showing the full CLI.

I suspect its the github actions environment leading to longer paths. https://github.com/mbj/stack-deploy/runs/1445686795?check_suite_focus=true#step:6:11422

mbj avatar Nov 24 '20 03:11 mbj

For anyone watching here the issue is the number of modules running into OSX specific limits on the command line size.

The trick will be to split up this project into many, one per AWS service. Not only removing this issue class altogether, but also making compilation much faster as users will (just like with amazonka) only have to build the subprojects for the AWS features they actually use.

mbj avatar Jul 05 '22 02:07 mbj

This was addressed via #207 (unreleased yet).

mbj avatar Feb 25 '23 05:02 mbj