Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Strip RTS flags, since we cant honor them #1736

Merged
merged 1 commit into from
Apr 14, 2020
Merged

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Apr 13, 2020

Closes #1725

Issue that caused it:
haskell#1725

the problem is that we cant honour the `+RTS` flags, since these need to
be known when GHC is started. However, HIE is the compiler and is
started before we load any component.
Therefore, these options for the different component are unusable and we
strip them here to avoid a bug.
This commit is inspired by
haskell/hie-bios#102
@jneira
Copy link
Member

jneira commented Apr 13, 2020

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
Copy link
Collaborator Author

fendor commented Apr 13, 2020

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.

@fendor fendor merged commit e61670f into haskell:master Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error "target \8216+RTS\8217 is not a module name or a source file" in Atom
2 participants