-
Notifications
You must be signed in to change notification settings - Fork 37
[ghc-cabal branch] Run the 'configure' command first #170
Comments
After some further inspection, it looks like we need to completely drop the |
Yes, we will drop |
I got this far. Now I'm feeing stupid :-)
|
@angerman OK, I can take over for today -- my turn to feel stupid :-) |
Pushing my changes, right now. I think the issue lies with the fact that |
I'm getting a different error now, but most likely still relevant to this issue:
@angerman Agree, it looks like the issue is with directories. |
That error means someone called setCurrentDirectory somewhere. In a multithreaded build system that's a terrible idea. |
For info, if anything is changing directory then lint will only catch it some of the time and it will cause really weird failures of not. |
Looking at the
That won't work. It works fine if in a different process (where ghc-cabal previously lived), but fails miserably here - the current working directory is a global shared variable and is meaning everyone else has incorrect file paths. |
@ndmitchell Thanks! Note that |
The current goal is to figure out how to configure a package without changing directories and put the resulting artefacts in |
Good luck! While you are there, I wonder if the repeatedly keep running configure approach is necessary, or if a single global configure could be done which was just copied for every package which needed it. Might give a nice speed benefit, and (if changing directory is important for the configure) might also fix that. Taking a brief look at the code, it seems to be running things that are in the Cabal library, so I couldn't see any obvious way you could avoid changing directory without also avoiding parts of the Cabal library. Note that Stack etc just call |
Agreed, that would be preferable.
But isn't this exactly what we are trying to escape from -- calling |
@angerman No progress from me again. Was fighting various linker & GMP issues all day :( |
@ndmitchell yes the The other issue I ran into yesterday, #170 (comment) likely stems from running the default main in the libraries folder, and not providing an absolute path for the Trying to absorb ghc-cabal into shaking-up-cabal looks more and more like opening pandoras box. @ndmitchell, pointers towards |
We try to avoid using cabal the library a lot actually, and instead just On Fri, Jan 15, 2016, 4:49 AM Moritz Angermann [email protected]
|
Thanks @snoyberg; that sounds a bit depressing. |
What's the motivation for avoiding calling out and parsing the result? What's the payoff? Parsing the result shouldn't be too hard, but it seems that avoiding the call out is. |
@ndmitchell for me--though I'm not sure about @snowleopard--it's the fundamental question, why do I need to shell out to invoke something, which I should in principle be able to call directly. E.g. why do I need that extra glue that effectively does nothing. Shelling out is the pragmatic solution, while directly using cabal is the more idealistic approach, I guess. Then this started as issue #18 which was about getting rid of |
@ndmitchell @angerman @snoyberg Thanks all for your thoughts and suggestions. I have now clarified the rationale behind getting rid of |
Why not simply try to attack the problem at its root? Arguably Cabal shouldn't be relying on the global current directory and it sounds like others will benefit from this being fixed. |
@bgamari That would be my current preference. If this diverts us too much from reaching the |
@bgamari 👍 That would be the preferable approach! I'm willing to dive into cabal, and try to figure things out. But I'm afraid it would postpone this PR quite a bit. And maybe we should try to address those issues in an orchestrated approach? I would rather want to address the cabal (potential) cabal issues in a way that would help everyone and not just one project, but make it better for everyone. As the use of the in place |
@angerman that sounds reasonable to me. Indeed I'd want to hear from the Cabal folks to see whether ripping out this state is even feasible before beginning an attempt. |
This issue and #18 are now postponed until |
This is no longer relevant after #531. |
Some other fallout from #18
The text was updated successfully, but these errors were encountered: