-
Notifications
You must be signed in to change notification settings - Fork 206
Can not load test/Main.hs with a hie-bios cabal cradle #1727
Comments
Thank you for your awesomely detailed bug report! Workaround: provide a full mapping from path to component. |
My pleasure - hope I can maintain that level!
So, this bug is not in HIE, but in Cabal itself? But the builds and runs seem to work, somehow...?
Please pardon my ignorance - could you show what you mean/what the workaround should look like, and in what file(s)? UpdateAlso, if I don't want to wait an unpredictable amount of time before the 6623 ends up in a released version of Cabal: Update 2Please take a look at haskell/cabal#6659 - looks like I cannot build a decent |
That is unrelated. What essentially happens in hie-bios (quite literally), with your
Like what we do in haskell-ide-engine: https://github.com/haskell/haskell-ide-engine/blob/master/hie.yaml.cbl
It should be enough to just checkout the pr and install it, via |
@fendor unfortunately, it looks like I cannot build a working As I said, my setup is building shared libraries and dynamic executables. Is there a way to build Also, I'm confused with |
@fendor I give up. I don't know Haskell well enough to either succeed building Cabal from source, or even enjoy the process. Nor do I understand what should go into $ cabal repl test/Spec.hs
cabal: Unknown target 'test/Spec.hs'.
The package Str2Split has no file target 'test/Spec.hs'. Here's my latest experimental cradle:
cabal:
- path: "./"
component: "lib:Str2Split"
- path: "./test/Spec.hs"
component: "test-suite"
- path: "./app/Main.hs"
component: "executable" Could you do me a favor? My sample project https://github.com/mouse07410/Str2Split.git seems small and simple enough. Would you be so kind to post the correct Thanks in advance! |
You only provide an exact file match if there is an overlap in components. E.g. the main for the executable is defined in the library.
I made a PR |
@fendor Thank you! |
As your workaround works (thank you!) I'm closing this ticket. If it's possible to make Thanks again! |
No, it isnt |
Please open another issue and dont hijack the existing issue! |
MacOS Catalina 10.15.4, Xcode-11.4, current
ghcup
that installed GHC 8.8.3 and Cabal-3.2.0.0.Current HIE master, built with Cabal for target
hie-8.8.3
.Current VSCode with Haskell Language Server plugin 0.0.37 (and a few more plugins).
I'm trying to add HSpec framework to the tests.
Problem: the very first
import Test.Hspec
is highlighted as an error. See the screenshot:Here's the error message from the "Problems" tab:
You see the complete content of
test/Spec.hs
above. Here'sStr2Split.cabal
:Both Cabal and Stack seem to be able to build both executables
Str2Split-exe
andStr2Split-test
fine, despite the error messages. I can run both of them.If you'd like to see the complete project - please see https://github.com/mouse07410/Str2Split.git
I do not claim that it's a bug - likely a pilot error. But would appreciate any help, please.
The text was updated successfully, but these errors were encountered: