-
Notifications
You must be signed in to change notification settings - Fork 12
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
multiple components with cabal-install 3.12.1.0 #316
Comments
playing around with it a bit, even if i manually filter test/Main.hs, it still chokes on my test module, which makes sense given that the test source folder isn't in the search_paths at that point. |
(if i'm totally off-base here and there's a good workaround for having ghciwatch reload both tests and code that doesn't require multi-components, please let me know!) |
ah, so the current hack in https://github.com/MercuryTechnologies/ghciwatch/tree/main/tests/data/simple is to just have a single component that pulls in everything? ok, that makes sense. |
This shouldn't crash, I'd like to support multiple components. |
Seems like the problem here is that Dunno if there is another way of finding the component paths to hack around this? |
@eddiemundo Would you paste some example output? It'll help when I have time to look into this. |
So seems like when using |
I'd love to see this! I'm finding multi-component support in GHCID to be broken, with file changes often not picked up. And I'd rather just switch to this project than debug that one. |
@georgefst Unless we can find a way to query GHCi for all the search paths, I'm not sure this is fixable. This might need a patch to GHC or Cabal (not sure which one) before it's usable with either ghcid or ghciwatch. |
@georgefst Ahh, good point, I wasn't thinking carefully. I suspect that the reason it works with |
What happened?
carrying on from #308 - cabal-install 3.12.1.0 is out now, and the multiple component repl seems to work. unfortunately, ghciwatch crashes:
running
cabal repl --enable-multi-repl mylib mylib:mylib-test
and running:show targets
, it shows my library modules and my test modules, but also 'test/Main.hs' in the list, so perhaps not surprising ghciwatch crashes if it's expecting a module name.What did you expect to happen?
expected ghciwatch to load and run my tests.
Steps to reproduce the issue
i think you can replicate this with any library with a test component.
The version of ghciwatch with the bug
ghciwatch 1.0.1
The text was updated successfully, but these errors were encountered: