-
Notifications
You must be signed in to change notification settings - Fork 61
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
hie-bios can't load tests and executables in subdirs #200
Comments
This option: |
Cabal generates flags for executable and test components passing main-is module as a relative path, therefore cradles with packages in subdirs will fail to load those components. So it has to be made absolute. Fixes haskell#200.
Cabal generates flags for executable and test components passing main-is module as a relative path, therefore cradles with packages in subdirs will fail to load those components. So it has to be made absolute. Fixes haskell#200.
Cabal generates flags for executable and test components passing main-is module as a relative path, therefore cradles with packages in subdirs will fail to load those components. So it has to be made absolute. Fixes haskell#200.
I did some more investigation. |
You can clearly see this in the command line:
I.e., cabal for some reason adds BTW, Have you seen my PR #202? I can confirm that with this patch (rebased on top of 0.5.0) |
And my |
Ah, haskell/cabal#6622 has not yet made it to any release, maybe it's the reason I'm getting this error. So, in other words, we have to wait for Cabal release? |
Yes, but the flags are post-processed later on. Unfortunately, they do represent the exact flags that are used by the ghc session anymore.
I think the fix is going to be shipped with the next minor version
No, it should work. Actually I think I got it wrong again. It should be unrelated to the cabal bug.
That is normal for the main module. |
By the way, this succeeds: $ cabal new-repl servant-server/test/Servant/ServerSpec.hs
Indeed, but it's broken for packages in subdirs :) That's why I added preprocessing for this specific case in #202. |
Yeah, the error is thrown by the GHC API. The fix looks good in general, I am playing around with different ways. |
Okay! I'm not saying I think my fix is great, I just want to attract your attention to the root of the problem :) |
I think I have understood it now :) Adding a test and pushing my version of the fix for a review soon. |
Nice to hear! |
* Add failing test-case for #200 * Make targets' filepath absolute
This should be fixed now! However, someone has to patch it in HIE as well |
Hi,
I've noticed this strange behavior on projects with top-level
cabal.project
and*.cabal
files in subdirs, like https://github.com/haskell-servant/servant.First of all, versions. I use
hie
andhie-bios
used by it is:Relevant parts of
hie.yaml
(generated with implicit-hie, but that should not matter):Now, what happens if I try to load some file from the test suite:
So, for some reason something drops
servant-test/
prefix from the path, although it's present inhie.yaml
.From
hie
logs:hie-bios debug
:This is annoying, since once I open some of test's files in my editor,
hie
just starts to consume CPU by restarting in a loop and failing with the same error.The text was updated successfully, but these errors were encountered: