-
-
Notifications
You must be signed in to change notification settings - Fork 412
Description
Your environment
Which OS do you use?
MacOS
Which version of GHC do you use and how did you install it?
9.2.8 from nixpkgs (23.05)
How is your project built?
cabal (dependencies provided by nix). my flake.nix
Which LSP client (editor/plugin) do you use?
Neovim+LanguageClient-neovim (builtin client)
Which version of HLS do you use and how did you install it?
1.10.0.0 from nixpkgs (23.05)
Have you configured HLS in any way (especially: a hie.yaml file)?
No (unless passing the logfile flag counts)
Steps to reproduce
- Configure cabal project with multiple test suites. Here's my exact cabal file.
- Configure test suite with dependencies:
-- lumea.cabal
...
test-suite meta-test
type: exitcode-stdio-1.0
main-is: MetaTest.hs
build-depends:
base ^>=4.16.4.0,
HUnit,
pandoc, pandoc-types,
Lumea,
filepath, directory
hs-source-dirs: test
default-language: Haskell2010
...- Import dependencies in configured test file:
-- test/MetaTest.hs
module Main where
import qualified Meta
import Test.HUnit
import Text.Pandoc
...- Observe that running test suite resolves the imported dependencies and runs fine (running
cabal test meta-test) - Edit test file, observe dependency can not be resolved:
Expected behaviour
I'd expect hls to be able to resolve the pandoc dependencies when editing my test file if they can be compiled and run.
Debug information
Curiously, if I add pandoc as a dependency to another test suite. A test suite with the same hs-source-dirs, then when I'm editing test/MetaTest.hs the dependency is resolved and I don't get a warning.
test-suite site-test
type: exitcode-stdio-1.0
main-is: SiteTest.hs
build-depends:
base ^>=4.16.4.0,
HUnit,
pandoc, pandoc-types,
Lumea,
filepath, directory
hs-source-dirs: test
default-language: Haskell2010
test-suite meta-test
type: exitcode-stdio-1.0
main-is: MetaTest.hs
build-depends:
base ^>=4.16.4.0,
HUnit,
pandoc, pandoc-types,
Lumea,
filepath, directory
hs-source-dirs: test
default-language: Haskell2010Nothing looks out of the ordinary in the logs. I can provide them if requested.