jonascarpay / calligraphy

haskell source code visualizer
BSD 3-Clause "New" or "Revised" License
97 stars 13 forks source link

No files matched your search criteria.. #14

Closed Heimdell closed 1 year ago

Heimdell commented 1 year ago

Calligraphy refuses to see my sources.

$ ls
app  brick.cabal  dist-newstyle  docs  examples  package.yaml  src  stack.yaml  stack.yaml.lock  tests
$ cabal install --ghc-options=-fwrite-ide-info --overwrite-policy=always
...
$ calligraphy --output-png out.png
No files matched your search criteria..

How do I fix it?

jonascarpay commented 1 year ago

Strange, what does find -name '*.hie' output? It should list some hie files, like this:

$ find -name '*.hie'
./dist-newstyle/build/x86_64-linux/ghc-9.0.2/foo-0/build/Lib.hie
./dist-newstyle/build/x86_64-linux/ghc-9.0.2/foo-0/t/dep-test/build/dep-test/dep-test-tmp/Main.hie
Heimdell commented 1 year ago

It does indeed list all my modules like this:

./.stack-work/dist/x86_64-linux/Cabal-3.6.3.0/build/NameCategory.hie
Heimdell commented 1 year ago

Running

$ cabal build --ghc-options=-fwrite-ide-info --overwrite-policy=always

fixed the issue.

Nisarg1112 commented 7 months ago

Hey, @Heimdell @jonascarpay I'm also facing the same issue, I'm using stack to generate hie files(see below command). stack build --ghc-options=-fwrite-ide-info

hie files are present in a module like this -

/.stack-work/dist/x86_64-osx/Cabal-3.2.1.0/build/project/App.hie

But if I do calligraphy -p out.png it says - No files matched your search criteria..

Can you please help me how to resolve this issue?