[GHC] #13896: Use response file to invoke hsc2hs
#13896: Use response file to invoke hsc2hs ----------------------------------------+--------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: hsc2hs | Version: 8.0.1 Keywords: | Operating System: Windows Architecture: Unknown/Multiple | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: ----------------------------------------+--------------------------------- We already use response files when invoking Haddock due to Windows command line length limitations. It [[https://github.com/haskell/cabal/issues/3122#issuecomment-311489312|seems]] that we also need to do the same with `hsc2hs`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | 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 bgamari): * keywords: => newcomer * milestone: 8.4.1 => 8.6.1 Comment: Won't happen for 8.4. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) 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 bgamari): * priority: high => normal Comment: Demoting in priority although retaining the milestone as we really ought to just fix this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#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
#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: |
---------------------------------+----------------------------------------
Comment (by ckoparkar):
While looking through some old GitHub PR's, I found this
[https://github.com/haskell/cabal/issues/1681#issuecomment-101175802
thread] where 23Skidoo proposed this exact same idea before:
>> Fuuzetsu: Right. I actually realised that we could have just one
generic implementation in Cabal and Haddock could import that and feed
args through it before doing Haddock-y stuff. It'd ensure consistent
implementation which I believe is what we're after.
> 23Skidoo: process or base are probably more appropriate places for this
- I bet that getArgsWithResponseFiles could be generally useful.
--
Ticket URL:
GHC
The Glasgow Haskell Compiler
#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: | ---------------------------------+---------------------------------------- Comment (by ckoparkar): Ben, did you get a chance to take a look at this ? Does this seem like the right thing to do ? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#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: | ---------------------------------+---------------------------------------- Comment (by bgamari): ckoparkar, thanks for the ping. Indeed I missed your comments. I suppose we could move this to `base` (e.g. `GHC.ResponseFile`). It's a bit unfortunately that `Cabal` will then depend upon a GHC-specific interface, but it doesn't make sense to introduce a new library just for this functionality. You could ask Michael whether he would accept it in `process`, although I'm not sure how many users it would have. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#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: | ---------------------------------+---------------------------------------- Comment (by ckoparkar): I made a stupid assumption that `getArgs` resides in `process`. But that's actually exported by `System.Environment`. Moving this to `base` (`GHC.ResponseFile`), and then perhaps adding a `getArgsWithResponseFile` function to `System.Environment` sounds like a good idea. I'll start working on the patch today. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#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: | ---------------------------------+---------------------------------------- Comment (by bgamari): Great, looking forward to seeing it! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: ckoparkar Type: bug | Status: patch 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): Phab:D4612 Wiki Page: | ---------------------------------+---------------------------------------- Changes (by ckoparkar): * status: new => patch * differential: => Phab:D4612 Comment: Submitted a patch for (1). (The OSX appears to be stuck. It's running for "5 h, 57 m". I might restart it if it doesn't finish in the next couple hours. ) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs
---------------------------------+----------------------------------------
Reporter: bgamari | Owner: ckoparkar
Type: bug | Status: patch
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): Phab:D4612
Wiki Page: |
---------------------------------+----------------------------------------
Comment (by Ben Gamari
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: ckoparkar Type: bug | Status: patch 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): Phab:D4612 Wiki Page: | ---------------------------------+---------------------------------------- Comment (by ckoparkar): Step 2.1: https://github.com/haskell/hsc2hs/pull/9 (I have a patch ready that removes the relevant bits from `haddock`, but I haven't been able to build the haddock `ghc-head` or `wip/ghc-head` branches with GHC-HEAD yet. I noticed that the Travis builds are failing with similar errors. I'm trying to fix that first.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: ckoparkar Type: bug | Status: patch 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): Phab:D4612 Wiki Page: | ---------------------------------+---------------------------------------- Comment (by ckoparkar): Step 2.2: https://github.com/haskell/haddock/pull/821 Ryan Scott helped me fix the issue I was having while trying to build `haddock/ghc-head` on my local machine. I needed to pass `--allow-newer` to Cabal. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) 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): Phab:D4612 Wiki Page: | ---------------------------------+---------------------------------------- Changes (by bgamari): * owner: ckoparkar => (none) * status: patch => new Comment: It looks like all of the relevant PRs were merged. I think we still need to do the final step of using all of this new response file support in our invocation logic. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) 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): Phab:D4612 Wiki Page: | ---------------------------------+---------------------------------------- Comment (by ckoparkar): Yes! I'll do that in the next couple days. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.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): Phab:D4612 Wiki Page: | ---------------------------------+---------------------------------------- Comment (by ckoparkar): Ben, I'm sorry for not getting this done in time for 8.6. Working on this today. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.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): Phab:D4612 Wiki Page: | ---------------------------------+---------------------------------------- Comment (by ckoparkar): The Cabal PR: https://github.com/haskell/cabal/pull/5553 which @hvr has approved. It should land in Cabal-2.4. bgamari: Once that is merged, we can mark this ticket as "fixed" right ? Are there any other "hsc2hs" invocation sites that we should handle ? I couldn't grep for any obvious ones. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.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): Phab:D4612 Wiki Page: | ---------------------------------+---------------------------------------- Comment (by ckoparkar): bgamari: ping :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.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): Phab:D4612 Wiki Page: | ---------------------------------+---------------------------------------- Comment (by ckoparkar): bgamari: ping :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:19 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.2 Component: hsc2hs | Version: 8.0.1 Resolution: fixed | Keywords: newcomer Operating System: Windows | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4612 Wiki Page: | ---------------------------------+---------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: 8.8.1 => 8.6.2 Comment: Sounds like this is resolved in cabal-2.4, which shipped with GHC 8.6.1. Thanks for the pings, ckoparkar! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
#13896: Use response file to invoke hsc2hs ---------------------------------+---------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: hsc2hs | Version: 8.0.1 Resolution: fixed | Keywords: newcomer Operating System: Windows | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4612 Wiki Page: | ---------------------------------+---------------------------------------- Changes (by bgamari): * milestone: 8.6.2 => 8.6.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13896#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC