Skip to content
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 packages with build-tool-depends #187

Open
maksbotan opened this issue May 20, 2020 · 5 comments
Open

hie-bios can't load packages with build-tool-depends #187

maksbotan opened this issue May 20, 2020 · 5 comments

Comments

@maksbotan
Copy link

Hi,

I try to use haskell-ide-engine with this project: https://gitlab.com/morley-framework/morley

My hie.yaml:

cradle:
    cabal:
        - path: "code/morley"
          component: "lib:morley"
        - path: "code/morley/test"
          component: "morley:morley-test"

When I try to load tests in hie:

$ hie code/morley/test/Test/Michelson/Runtime.hs 
...
Dumping diagnostics:


/home/maks/Projects/SRK/morley/code/morley/test/Test/Michelson/Runtime.hs: FAILED
	"could not execute: tasty-discover"

This is probably related to the fact that tasty-discover is used as build-tool-depends in the cabal file:

test-suite morley-test
  build-tool-depends:
      tasty-discover:tasty-discover

For some reason hie does not see it, while cabal new-build morley --enable-test passes.

Env:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.3
$ hie --version
Version 1.4 x86_64 ghc-8.8.3
$ cabal --version
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library 

HIE commit haskell/haskell-ide-engine@51b9739, built with hie-bios-0.5.0:

            "id": "hie-bios-0.5.0-6bd5e18e4c0ad98baf912355907c1f817c9dc3d30f0b5a44dde99fc8fd608f07",
            "pkg-name": "hie-bios",
            "pkg-version": "0.5.0",
            "flags": {},
            "style": "global",
            "pkg-src": {
                "type": "repo-tar",
                "repo": {
                    "type": "secure-repo",
                    "uri": "http://hackage.haskell.org/"
                }
            },
@ndmitchell
Copy link
Contributor

I think this might be related to #125

@maksbotan
Copy link
Author

Maybe it is, however I'm using pure Cabal cradle. Maybe they share some code in this regard...

@jneira
Copy link
Member

jneira commented May 21, 2020

Just in case, a temporary workaround could be install tasty-discover globally.

@maksbotan
Copy link
Author

Sure, that's what I did :)

@georgefst
Copy link

FWIW, the title here isn't quite true in general since I'm happily using HLS on a project involving c2hs. I suspect the difference there is that the build tool is only ever run on .chs files, which hie-bios ignores completely.

(This does mean that I need to manually kick c2hs, via cabal, when I change a .chs file, in order for the changes to show up in my editor, but I'd expect nothing less right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants