-
Notifications
You must be signed in to change notification settings - Fork 697
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
[RFC] Plugin dependencies #2965
Comments
+1, sounds sensible. /cc @dcoutts |
OK, one minor complication here: if a user put a plugin dependency in |
I think that's better than adding yet another obscure switch. We'll need a version check for |
I previously claimed that Instead, we need Arguably, this field would also be applicable to |
i presume this is a cabal > 1.24 feature? :) |
@cartazio Yes, it won't be in 1.24. |
I would like to note that this feature request would be very useful to me as a tooling author, see https://gitlab.com/tseenshe/hsinspect |
This can (and should) be guarded by |
It seems to me that rather than |
@michaelpj GHC has |
IMO GHC should also have a separate |
@michaelpj yes. I agree with that. And cross-compiler simply should, there is no other way to them even work. I have no idea how you can, or can you at all, use any plugins with cross compiler currently. And if template haskell step would ever be separated, then a separate package db & dependencies for that too. |
I think @angerman has made this work with some hackery, but conceptually plugins make sense as native library dependencies: they're compiled for the host, so can be linked against the (host) GHC. |
What is the |
Pursuant to https://ghc.haskell.org/trac/ghc/ticket/11244, it would be preferable for users to stop putting plugin dependencies in
build-depends
and a new field.I propose to introduce a new field,
plugin-depends
, which has the same format asbuild-depends
, but adds dependencies on plugins. Packages specified here:depends
in the installed package info (so they don't get linked in when you build an executable),-plugin-package-id
(with-hide-all-plugin-packages
), which forces GHC to only use them to determine scoping of plugin modules, e.g.-fplugin ModName
). Previous versions of GHC, they get passed in as normal-package-id
flags for backwards compatibilityThe text was updated successfully, but these errors were encountered: