-
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
code-generators
fails to find executable defined in same package as test suite
#8421
Comments
I spent a couple of hours looking at this. To me it looks like the bug is in the cabal/Cabal/src/Distribution/Simple/Build.hs Lines 930 to 944 in 51da23d
That function is taking the name of a executable component ( You can see in the error above that cabal is looking for I tried few things but I cannot find a way to obtain the build directory of the tool exe component from But that function has not been touched for years ... 🤔 |
AH! That's correct, that function does not work with per-component builds. Run |
Should we try to fix |
That would be awesome. I am not very familiar with that part, but if you do a bit of a brain dump (just here perhaps?) I can take note and do a bit of an investigation. |
I don't have any more knowledge than you to brain-dump sadly. I'd add just that I think maybe But it may be that |
See haskell#8421 and maybe haskell#9854
I recently attempted to make use of the
code-generators
feature that debuted inCabal-3.8
. Unfortunately, I ran into an apparent limitation in which the code generator executable cannot be defined in the same package as the test suite that makes use of it.To Reproduce
Clone https://github.com/RyanGlScott/code-generators-issue, which contains a minimal reproducer for the issue.
By default, this repo makes use of a code generator defined in a separate package, which is named
codegen-different-package
. To observe that this works as expected, runcabal v2-test
:To observe the bug, patch
code-generators-issue.cabal
to make use of a code generator defined in the same package (codegen-same-package
):Starting from a clean slate:
This time, if you run
cabal v2-test
, it fails:Expected behavior
I would expect
cabal v2-test
to succeed regardless of which form of code generator is used.System information
The text was updated successfully, but these errors were encountered: