-
Notifications
You must be signed in to change notification settings - Fork 691
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
Ability to warn on reexported-modules
#10384
Labels
Comments
See also ghc-proposals/ghc-proposals#489 https://gitlab.haskell.org/ghc/ghc/-/issues/22489 this really need to happen (I thought it did already?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature request
When declaring
reexported-modules
in a cabal file, it would be useful to communicate deprecation and relocation notices when that module is imported and only provided by that package.Additional context
The idea was surfaced by @adamgundry in this comment about relocating the
GHC.RTS.Flags
module. We want to move the module frombase
to another package. If we only move the module, then users that depend onbase
but notghc-rts-flags
will face an unhelpful error message: "ModuleGHC.RTS.Flags
not found." If we re-export the module, then it's still part of the public API ofbase
. This means we can't offer a nice deprecation cycle with messaging on how to fix the resulting issue.Let's imagine that we do this:
If someone imports
MovedModule
and it comes fromold-package
as a re-exported module, then we emit a warning at the import site. If they importMovedModule
and they depend onnew-package
as well, then we don't need to issue the warning.The text was updated successfully, but these errors were encountered: