haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 213 forks source link

Strip RTS flags, since we cant honor them #1736

Closed fendor closed 4 years ago

fendor commented 4 years ago

Closes #1725

jneira commented 4 years ago

The ghc user guide says:

No -RTS option is required if the runtime-system options extend to the end of the command line, as in this example:

% hls -ltr /usr/etc +RTS -A5m

If you absolutely positively want all the rest of the options in a command line to go to the program (and not the RTS), use a --RTS.

would the code have to handle those cases?

fendor commented 4 years ago

Nope, this only for loading a specific component. With cabal-helper, we obtain the ghc-options flags and we need to filter them, since we cant use them in an existing GHC session.