-
Notifications
You must be signed in to change notification settings - Fork 208
Update cabal-helper to 1.1.0.0 #1758
Comments
I'm going to make an attempt at using implicit-hie as hie-bios implicit cradle |
Cabal-helper has roughly the same purpose as hie-bios but tries to achieve that at a lower level. While hie-bios uses a process abstraction and does not attempt to interact with any oddities of the tools, cabal-helper reads Cabal-Helper can deal with v2-style multi-projects. It also has full knowledge about the build-plan for each unit, etc... |
My plan is to attempt to have hie-bios generate a There are a number of cases where cabal-helper fails to generate a good config, if 1.1 fixes some of those great, but my guess is that it will continue to be very brittle due to it's approach. |
So to illustrate my point, I built the haskell/haskell-language-server#68 with 8.8.3 and cabal-helper 1.1 with stack. Then I tried using hls on hls without a hie.yaml. It froze at 50%, I then ran gen-hie and despite the hie.yaml file being incomplete/wrong it worked when I opened the same file. I'm going to repeat the test with cabal, to see if cabal-helper works better. Edit: same with cabal I'm fixing the discrepancy between the generated hie file and the correct ones before I look at ingratiation with hie-bios. |
@Avi-D-coder I had a quick look at your implicit-hie code and I don't understand why you think a homegrown cabal file parser would be more roboust than going through the proper channels (aka. lib:Cabal or Setup.hs) to the point that you're proposing to replace cabal-helper? That just seems like an endless source of churn as you're trying to catch up to what cabal is doing. Reminds me of the horrible hacks we were doing in ghc-mod eons ago actually, what is old is new again I guess. Admittedly the runtime compilation in cabal-helper is nasty but a necessary evil for the interface we wanted to have, which goes beyond what hie-bios' repl based approach can provide. Support for show-build-info in cabal-helper is absolutely on the TODO list since that seems to be your main complaint in other threads. I just haven't found the time yet, patches welcome and all that :) |
@DanielG It is indeed very hacky, and I believe Ultimately I'm okay with horrible hacks if they work. If the tiny parser gets to complicated then I can probably switch to a real one like cabal-fmt's. I'm curious about what cabal-helper can do that a manually created hie.yaml can't? |
I agree with @fendor, generate a working (even if you have to complete or correct it) hie.yaml automatically is great but i would like to be able to use the ide with no config file at all, especially in order to make things easier for beginners.
@Avi-D-coder If you dont mind, i would update the cabal-helper version anyway, even if we decide finally to replace it. i think the api has not changed significantly and the update will no take much effort |
Yeah it definitely makes sense to upgrade cabal-helper. |
Well cabal works fine simply changing bounds but stack doesnt:
Well, lets see what can we do with cabal freeze to fix stack resolvers 😄 |
It has several bug fixes
The text was updated successfully, but these errors were encountered: