Open lyokha opened 7 months ago
Both of these sound like good improvements, and I'd be happy to merge PRs that improve the docs and addCmdOpts
.
It's look that it's not simple to extract mode options (--make
etc.) as the corresponding parser parseModeFlags
is only available in the GHC Main.hs (see https://github.com/ghc/ghc/blob/5e4f4ba835fd24135759ee7a2d0d5c636a8a1505/ghc/Main.hs#L577), so the point 1 still survives while point 2 is fading. While it's still possible to catch all option-like arguments (i.e. those starting with a dash) and give it another message (other than not a module name or source file), it has less sense than using existing API.
Direct cradles accept only dynamic GHC flags, static flags are considered targets. Configuration
gives
It is not stated in documentation that only dynamic flags are accepted as flags, so I had to clone the project to find out what happens (in
addCmdOpts
).IMHO, it seems to make sense to
addCmdOpts
and warn about them not trying to consider them targets.