-
Notifications
You must be signed in to change notification settings - Fork 842
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
Touching preprocessor modules (alex, happy, c2hs) doesn't trigger a rebuild #479
Comments
Assigning to @chrisdone. I think this should just be a case of needing a few more built-in module extensions to match Cabal's behavior. |
We have this for C file types. |
And we have this for common Haskell preprocessors. |
Do note that Cabal supports preprocessing any extension via a custom setup. For example here's a project that uses embedded Ruby as a preprocessor for This has the same issue (changing |
We can't use the Cabal library directly inside stack to read the One possible hack is to, after running the |
Honestly, I think we may want to just have this as a documented limitation of stack for now. It can always be worked around by adding an explicit |
To clarify: I'm talking about custom preprocessors. Having support for the standard preprocessors out-of-the-box should hopefully be easy to do and cover the common use cases. |
Indeed, I think |
This should do the trick:
It only shows this warning when it finds a corresponding |
@mtolly Care to test it out? |
LGTM. @mtolly if you see problems with this, please reopen. |
Everything looks good, thanks much! |
I'm using UUAGC and added the following to my
However,
|
@gergoerdi Hi! Is there an easily downloadable reproduction of this issue? Feel free to open a new issue. I've taken a look at stack's code, but having something concrete to work with would be good. I don't straightforwardly see logic for taking into account extra-source-files for these warnings. Perhaps the semantics is that if it's listed in extra-source-files and the name matches the module, omit the warning? Seems iffy, but I suppose it'd work in many cases. |
@mgsloan I have just come across this issue; my cut-down reproduction is at adituv/protobuf@9f6987c |
@mgsloan I removed my implementation and added a dummy implementation in Setup.hs; there should be no compilation errors no matter the contents of that file. |
Steps to reproduce:
new-template.cabal
:stack.yaml
:A.hs
:B.chs
:C.x
:D.y
:Expected:
touch
ing any of the four modules triggers a rebuild.Actual:
The text was updated successfully, but these errors were encountered: