
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: ckoparkar Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: hsc2hs | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Windows | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Changes (by ckoparkar): * owner: (none) => ckoparkar Comment: Ben, I'd like to work on this. Mikhail (23Skidoo) outlined the solution [https://github.com/haskell/cabal/issues/3122#issuecomment-181585821 here]:
We're probably bumping into the same command-line length restriction we did with Haddock. If this is the case, the solution is to add support for response files to hsc2hs and use that in Cabal.
One way to implement this idea would be to have something similar to [https://github.com/haskell/haddock/blob/ghc-8.4/driver/ResponseFile.hs haddock's implementation] in `hsc2hs`. Or, we could also have just one implementation somewhere, and have `haddock` and `hsc2hs` use that. What's the proper place to house this in GHC ? `base` or `process` seem like the obvious candidates. Although `haddock` doesn't seem to depend on `process` right now. I haven't looked at the specifics of implementing this, but the overall roadmap I'd follow would be: (1) Copy [https://github.com/haskell/haddock/blob/ghc-8.4/driver/ResponseFile.hs haddock's implementation] to either `base` or `process` (or somewhere else ?) (2) Use that in `hsc2hs` and `haddock` (and remove the relevant bits from `haddock`) (3) Update `Cabal` appropriately Does this sound like a good idea ? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler