Closed jneira closed 2 years ago
Afaics the package does not use ghc-paths
directly, you can remove it from build-depends and it still compiles (so it is needed to ensure some version bounds??).
I guess it could be used via ghc-exactprint
: https://github.com/alanz/ghc-exactprint/blob/81c2ef9cdcf284724df0d66ef1fe5616fdc8ae6c/src/Language/Haskell/GHC/ExactPrint/Parsers.hs#L289
Opened issue upstream: https://github.com/alanz/ghc-exactprint/issues/96
Afacs ghc-exactprint
only uses CHC.Paths
for the public funcion withDynFlags
.
I cant find any use of that function in the brittany code base so it is a misterious for me how the error is triggered within brittany , maybe another package upstream is using it? :thinking:
I'm not entirely sure what to do here. Requiring ghc-paths
is a consequence of using GHC for parsing. It would be nice if we could do something different, but I think it would require help from one of ghc-exactprint
, ghc-paths
, or GHC itself.
This issue seems related: https://gitlab.haskell.org/ghc/ghc/-/issues/10961
@tfausak thanks for care. It turns out that ghc-exactprint is using it in other points and yeah, it should be changed there (and hen maybe adapt downstream packages) The correlated issue in ghc-exactprint is the linked above: https://github.com/alanz/ghc-exactprint/issues/96
Hi, i've introduced a hackish workaround to provide the runtime ghc libdir to ghc-exactprint, using an evironment variable: https://github.com/alanz/ghc-exactprint/pull/98 and i've used it in hls with success However i would not use it in the library cause the code would not be thread safe, the original issue is still open: https://github.com/alanz/ghc-exactprint/issues/96
If there is a workaround on mainstream. This means that a new binary release needs to be uploaded, right?
@azimut oh, sure, i was focusing in the library component but the executable here could use the workaround
This should no longer be the case as of version 0.14.0.0. Please re-open if that’s not true.
The concrete path varies per os.