-
Notifications
You must be signed in to change notification settings - Fork 696
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
Feature request: Add --with-repl
option
#9115
Comments
Would |
Hm, I think it would make our custom logic to figure out which ghc eactly |
I find the idea of with-repl quite clever but if the goal is to find what arguments to invoke ghc with... cannot we just do that instead? (I admit I am up to date with the discussion around this topic) |
Note that for test stanzas, the code-generators field (https://cabal.readthedocs.io/en/stable/file-format-changelog.html#cabal-version-3-8) will produce all options that would be sent to ghc for a build, and allow invoking a custom executable (via |
Thanks @gbaz for your reply. I gave my perspective on We can agree to disagree here, but I want things composable, Unix-style. I imagine that Finally, even if I would change my stance on |
That would mean a subcommand (e.g. I think that could be neat, provided that:
|
From the perspective of |
Another issue with the |
Proposal
We already have:
--ghc-options
specifies options that are used for compilation.--with-ghc
specifies the executable that is used for compilation.--repl-options
specifies options that are used when opening a REPL.In addition to those, I would love to see:
--with-repl
specifies the executable that is used when opening a REPL.Motivation
This can be useful for running arbitrary tools that require the same command line options as
ghci
.Personally, I want to use this with
doctest
?As of now, the way I recommend to run
doctest
withcabal
is:For this to this work,
doctest
has to proxy all invocations toghc
, unless it sees--interactive
, at which point it takes over.This mostly works, but has the following issues:
doctest
to proxy invocations toghc
complicatesdoctest
. Whiledoctest
could technically be agnostic to command line options, it currently has to look at them to decide whether to proxy the invocation, or whether to start an API session andghci
to do its thing .ghc-paths
) will be broken when they are built withdoctest
proxying toghc
. For that reason, a user needs to take great care to ensure that any such packages have already been built before they invokedoctest
in such a manner.--with-repl
will address those issues.The text was updated successfully, but these errors were encountered: