-
Notifications
You must be signed in to change notification settings - Fork 722
Open
Description
UPDATE: the change was reverted but let's leave the ticket open until we have a regression test.
Describe the bug
#8966 removes cabal-install's support for sub-module targets.
But this (mis-)feature is used by HLS via hie-bios to determine the flags for a component.
In particular it makes a call to cabal v2-repl <path to a .hs in the component>
To Reproduce
Steps to reproduce the behavior:
Have a prerelease of cabal-install on your PATH
$ cabal repl <path to a .hs file>
Warning: this is a debug build of cabal-install with assertions enabled.
Error: [Cabal-7121]
Failed extracting script block: `{- cabal:` start marker not found
or
$ haskell-language-server <path to .hs file or a component target>
...
Loading the module 'so-and-so.hs' failed.
It may not be listed in your .cabal file!
Perhaps you need to add `so-and-so` to other-modules or exposed-modules.
Expected behavior
HLS should at least work.
Perhaps some work needs to be done to migrate HLS/hie-bios off this feature.
Alternatively the MR could be reverted.
System information
tested using cabal-head
fendor