Skip to content

Provide meaningful error message for multi-cradle hie.yaml #952

Closed
@alanz

Description

@alanz

Us immigrants from hie are accustomed to having multi-cradle just work, so tend to have hie.yaml config files set up for multi-component use.

Running a bare ghcide on one of these does not give an obvious error message. e.g.

$ ghcide
ghcide version: 0.1.0 (GHC: 8.6.5) (PATH: /home/alanz/.cabal/store/ghc-8.6.5/ghcide-0.1.0-ee324fcd43ac182a56f9ab18d8ff0a02e26330a448eb057350d92e6d7b3141f5/bin/ghcide)
Ghcide setup tester in /home/alanz/tmp/hie-t2.
Report bugs at https://github.com/digital-asset/ghcide/issues

Step 1/6: Finding files to test in /home/alanz/tmp/hie-t2
Found 3 files

Step 2/6: Looking for hie.yaml files that control setup
Found 1 cradle

Step 3/6, Cradle 1/1: Loading /home/alanz/tmp/hie-t2/hie.yaml

Step 4/6, Cradle 1/1: Loading GHC Session
ghcide: CradleError ExitSuccess ["Multi Cradle: No prefixes matched","pwd: /home/alanz/tmp/hie-t2","filepath: /home/alanz/tmp/hie-t2","prefixes:","(\"src/B.hs\",Cabal {component = Just \"lib:cabalnewbuild-test\"})","(\"src/Format\",Cabal {component = Just \"lib:cabalnewbuild-test\"})","(\"A.hs\",Cabal {component = Just \"cabalnewbuild-test:exe:test\"})"]

It says ExitSuccess, and then that no prefixes matched for the Multi Cradle. This does not imply that Mult Cradle is not supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions