Skip to content

cabal-3.18.1.0 with older lib:Cabal custom setup package crashes HLS #12186

Description

@fendor

This is intended as a catch-all bug report so I can send users here if the situation arises

In short, the cause of this issue is #11099 but for exe:cabal 3.18.1.0.

We hope, that by now enough users managed to upgrade to lib:Cabal-3.16.1.0, rendering this issue as low-priority (if even).

Describe the bug

I attach an example project that exhibits the troublesome behaviour.

example.tar.gz

In short, if lib:Cabal <3.16 is imposed on the build plan of the current project, then the --with-repl (#9115) flag doesn't work, and neither does --keep-temp-files.

However, cabal-3.18.1.0 (and lib:Cabal) passes all GHC arguments using a response file.
If we can't use --with-repl, then hie-bios breaks due to #10915, as it expects --interactive as the first argument to actually interject the interactive

To summarise, what this means is that HLS and hie-bios will not work in projects with older lib:Cabal (<3.16.0.0) versions.
In hie-bios, I decided in haskell/hie-bios#519 to essentially ignore this situation for now.
There could be workarounds, but how often does this situation actually arise that you use cabal-3.18 but lib:Cabal-3.14?

So, I am opening this issue, if people feel strongly, we can try to come together to fix it in some hacky way, but as I think that Custom build-types are destined for retirement any way, I am reluctant to spend more time on it, since the workarounds:

Seem somewhat workable to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    can-workaroundThere is a (maybe partial) workaround for the issue or missing featuretype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions