-
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
Warn when a package uses TH but doesn't tell about it to Cabal #1562
Comments
Assigning to myself so I don't forget about this. |
Is there any chance There's already a lot of boilerplate in |
PS Thanks for opening this, I definitely think enforcement is better than nothing. |
@seagreen I am very sympathetic to your concern, but unfortunately having it be implicit would sort of miss the point, because the dependency solver wants to make decisions about what packages to choose without having to actually look at the Haskell files (it's got only the Cabal file, not the full tarball.) Maybe the moral of the story is that Cabal metadata should be divided into two parts: one that is hand-written, and one that is machine generated. When you upload, you upload both parts (so you have to be able to generate the machine bits.) |
Something like this sounds absolutely fantastic:) Should we make a new issue to consider it? I think the problem you describe in your first paragraph (that even though the info is machine derivable, it needs to go in the cabal file so the solver can see it) will keep coming up until we get a proper place to store machine derivable info (which is really just a cache) separate from human written info. |
Yes, a new issue seems like a good idea. |
Done! |
It seems like there are a lot of packages that use Template Haskell but don't tell Cabal about it via
extensions
orother-extensions
. With GHC 7.8 (and probably also older ones) this can lead to build failures (see e.g. #1553). It'd be nice if we could do a check akin to #1455 and warn the user if this is the case.This feature will likely require using GHC API, so perhaps we could combine it with #1455 - what we need is a
ghc --make
augmented to dump the dependency graph and the set of all enabled extensions before the actual compilation.Update: see also #3081. If we implement this feature for TH, it will be easy to generalise for all extensions.
The text was updated successfully, but these errors were encountered: