-
Notifications
You must be signed in to change notification settings - Fork 696
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
Do not pass environment variables to happy
/alex
, or at least allow a way to filter
#10072
Comments
These variables are used by the
I'm not following the exact bootstrapping issue you are having. The solution here is probably to implement your own logic for finding data files rather than relying on |
Do note that the build succeeds when I omit I'm honestly having a hard time seeing how we could work around this issue in |
I've just faced a similar issue:
(This is with cabal HEAD 3.15 and with cabal 3.14.1) |
Describe the bug
happy
uses template files that need to be distributed with its executable, hence it uses thedata-files
field(?). This causes troubles during bootstrapping, which I will explain now. I have also attached a more minimal reproducer below, but the use case is important as well.In haskell/happy#262 and haskell/happy#274 we have trouble bootstrapping
happy-2
. That is because while buildinghappy-2
withcabal
, the$happy_datadir
environment variable is set to point to somewhere in the working directory (I have no idea why that is necessary). But the bootstrapping process (for packagehappy-tabular
) runs a preinstalledhappy-1.20
to compile happy's own grammar file. This run reads the$happy_datadir
variable and consequently looks for its template file in the wrong location, leading to abrupt error.To Reproduce
Steps to reproduce the behavior:
(Files as a zip instead of heredoc)
Expected behavior
Produce a
Parser.hs
file, try to build it, despite me setting an invalid environment variable forhappy
.System information
The text was updated successfully, but these errors were encountered: