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
Feature request: pre-build hooks #503
Comments
I'm +1 on this in principle. One thing to point out is that this will start moving us toward a world where some projects cannot be built with cabal at all, only stack. I'm OK with that, since this is clearly an opt-in case. Check out #472 as well for some related concepts. Can you describe in more details exactly what you'd like to see the functionality be here? There are some interesting questions about how the command is specified, when it's run (every time? detect that a file is dirty? etc). |
Isn't this something that falls into the realm of Setup.hs? I would lean On Friday, July 3, 2015, Michael Snoyman notifications@github.com wrote:
-- Dan Burton |
Also, should we think about windows compatibility before it's too late ? |
The reason for this feature request is that < rant > edit: The funny thing about this is that the problem is in the Haskell report itself, since it doesn't state what filename shall be given for the module. For What I want to achieve is to have the |
@snoyberg the simplest and most precise solution for my use-case would be to run command passed in (optional, project specific) However, I believe that stack could use the idea of hooks, like in git. Then, any reasonable action could get scripted in arbitrary way. Compatibility with Windows would not be a problem (responsibility on the hook developer). There could be two ways to do that:
I like the second more. On the downside, there are two problems.
As for the security, one solution is to allow running hooks only from I have no great idea for this right now. |
It sounds to be like what you really want is #259. I'd rather not try to push in a halfway solution to the problem. Can you look over that issue and let me know if something like that would address your concerns? |
Looks like we're going to not be pursuing this right now, and instead using Setup.hs files for now (as bad as they are) and eventually considering a replacement for .cabal files. |
The example use case: Protocol Buffers. The generate
*.hs
files. The latter shall not be in the repository itself, however they take part in theother-modules
section in*.cabal
files.It would be great if there was a way to execute
protoc
compiler before calling the actual building. Then, no wrappers around both tools (protoc
&stack
) would be required.The text was updated successfully, but these errors were encountered: