Skip to content
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

Handle internal libraries in GHCi. #3982

Merged
merged 9 commits into from
May 17, 2018
Merged

Handle internal libraries in GHCi. #3982

merged 9 commits into from
May 17, 2018

Conversation

mihaimaruseac
Copy link
Contributor

@mihaimaruseac mihaimaruseac commented Apr 23, 2018

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:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

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-libraries code 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.

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.
@mihaimaruseac mihaimaruseac merged commit ce35dcb into commercialhaskell:master May 17, 2018
@mihaimaruseac mihaimaruseac deleted the mm-ghci-internal-libs branch May 17, 2018 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant