-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doctest
in multi-GHC setting
#396
doctest
in multi-GHC setting
#396
Comments
From what I understand,
I'm not aware of any better (or even remotely robust) way to get the correct flags for a Cabal project. AFAIK, e.g.
That's the relevant question. Educated guess:
(just an educated guess, somebody would need to confirm this by looking at the code) A more robust way for |
@andreasabel please try if |
(when invoked via `cabal repl --with-ghc=doctest`) This addresses sol/doctest#396.
@andreasabel haskell/cabal#8718 addresses this in |
I revived @sol's PR at haskell/cabal#10057. @sol does |
Great 👍
I'm not aware that they would do anything in that regard right now. |
In a multi-GHC setting, we have e.g.
ghc-9.4.4
andghc-9.2.5
installed. These "know" of their companion programs likeghc-pkg
. E.g. I can doeven if my current
ghc
isghc-9.4.4
.doctest
however gets confused in such settings.E.g. I installed
doctest
for 9.2.5:As one can see,
doctest
is well aware of the GHC version it is build for.However:
So this fails.
I can't shake the feeling that this
cabal repl -w doctest
is just a hack that in some benign cases works but in general fails.The reason might be that
cabal
isn't really prepared to work with anything else butghc
. Frankly, I don't know howcabal
determinesghc-pkg-x.y.z
fromghc-x.y.z
, but this might also just be implemented naively by some string manipulation (rather than involvingghc --numeric-version
).The text was updated successfully, but these errors were encountered: