Handle internal libraries in GHCi.#3982
Merged
mihaimaruseac merged 9 commits intocommercialhaskell:masterfrom May 17, 2018
mihaimaruseac:mm-ghci-internal-libs
Merged
Handle internal libraries in GHCi.#3982mihaimaruseac merged 9 commits intocommercialhaskell:masterfrom mihaimaruseac:mm-ghci-internal-libs
mihaimaruseac merged 9 commits intocommercialhaskell:masterfrom
mihaimaruseac:mm-ghci-internal-libs
Conversation
2 tasks
These should have been part of #3955 to be honest but were not needed at the time. Now they are needed, so I'm adding them as a separate commit, to be easy to cherry-pick them if the rest of the PR is not getting merged.
In #3955, as support for compiling with sublibraries was added, a stale comment was left out in the code. Removed here as a separate commit to be easy to cherry-pick if needed.
When GHCi starts it looks for a package in the format given by Cabal but stack used to pass the package name as the name of the sublibrary. So we remove the sublibrary from the list of packages GHCi should search for and add the munged name to the same list by using the `omitPkgs` and `addPkgs` lists.
We need to make a distinction between internal libraries and foreign libraries since we want GHCi to reload when an internal library file changes but we don't want it to confuse an internal library with a foreign one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.
Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!
Solves #3926 in a slightly different way than #3981 as it uses information from a different code path in Stack.
Tested by using the
internal-librariescode mentioned in #3899 (comment) which is then transformed into an integration test. The test ensures that GHCi is able to reload after the files of either the main or the internal have changed.