Support -hide-all-plugin-packages/-plugin-package-id.#11
Merged
christiaanb merged 1 commit intoclash-lang:masterfrom Jan 16, 2020
Merged
Support -hide-all-plugin-packages/-plugin-package-id.#11christiaanb merged 1 commit intoclash-lang:masterfrom
-hide-all-plugin-packages/-plugin-package-id.#11christiaanb merged 1 commit intoclash-lang:masterfrom
Conversation
Our Bazel-based build system sets those flags to distinguish between regular dependencies and plugins: https://downloads.haskell.org/ghc/latest/docs/html/users_guide/packages.html#ghc-flag--hide-all-packages When a package is exposed via `-plugin-package-id`, its modules must be found explicitly as plugins via `Finder.findPluginModule`. I saw that function available as far back as ghc-8.0, so I changed the relevant codepath and left `__GLASGOW_HASKELL__ < 711` alone. In the new implementation, `lookupModule`'s package name parameter is not used anymore. I left it alone for now for (a) backwards compatibility with older GHC, and (b) to avoid breaking users downstream. I also tested this change with Cabal (which *doesn't* set `-hide-all-plugin-packages`, and it worked with the tests for `ghc-typelits-extra` and `ghc-typelits-knownnat`.
Member
|
Thanks! |
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.
Our Bazel-based build system sets those flags to distinguish between regular
dependencies and plugins:
https://downloads.haskell.org/ghc/latest/docs/html/users_guide/packages.html#ghc-flag--hide-all-packages
When a package is exposed via
-plugin-package-id, its modules must be foundexplicitly as plugins via
Finder.findPluginModule. I saw that functionavailable as far back as ghc-8.0, so I changed the relevant codepath and left
__GLASGOW_HASKELL__ < 711alone.In the new implementation,
lookupModule's package name parameteris not used anymore. I left it alone for now for (a) backwards compatibility
with older GHC, and (b) to avoid breaking users downstream.
I also tested this change with Cabal (which doesn't set
-hide-all-plugin-packages,and it worked with the tests for
ghc-typelits-extraandghc-typelits-knownnat.