-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
stack cradle does not discover .cabal files if they are deeper than 1 subdirectory #29
Comments
@complyue Try deleting |
Turns out it's the presence of $ echo 'packages:' > stack.yaml
$ gen-hie
cradle:
stack:
$ mkdir dist-newstyle
$ gen-hie
gen-hie: No .cabal files found under/fw/ttt
You may need to run stack build.
CallStack (from HasCallStack):
error, called at app/Main.hs:22:5 in main:Main
$ |
So is Every thing working now? |
I still got empty list in my case even with |
I don't have time to add logging right now. Also just run |
with gen-hie built from master: cymp:edh-universe cyue$ cat stack.yaml
# Please change the resolver and other Stack settings per your needs
resolver: lts-16.11
ghc-options:
elr: -O0
edh: -O0
## FOLLOWING CONTENTS GONNA BE OVERWRITTEN BY EPM ##
local-bin-path: /fw/m3cyue/edh-universe/bin
packages:
- /fw/m3cyue/edh-universe/e-wrks/edh/lossless-decimal
- /fw/m3cyue/edh-universe/e-wrks/edh/elr
- /fw/m3cyue/edh-universe/e-wrks/edh/host.hs
- /fw/m3cyue/edh-universe/e-wrks/nedh/host.hs
- /fw/m3cyue/edh-universe/e-wrks/sedh/host.hs
- /fw/m3cyue/edh-universe/e-wrks/hasdim/host.hs
- /fw/m3cyue/edh-universe/e-wrks/haskit/host.hs
- /fw/m3cyue/edh-universe/e-wrks/els/host.hs
cymp:edh-universe cyue$
cymp:edh-universe cyue$ find . -name \*.cabal
./e-wrks/edh/lossless-decimal/lossless-decimal.cabal
./e-wrks/edh/elr/elr.cabal
./e-wrks/edh/host.hs/edh.cabal
./e-wrks/nedh/host.hs/nedh.cabal
./e-wrks/sedh/host.hs/sedh.cabal
./e-wrks/hasdim/host.hs/hasdim.cabal
./e-wrks/haskit/host.hs/haskit.cabal
./e-wrks/els/host.hs/els.cabal
cymp:edh-universe cyue$
cymp:edh-universe cyue$ gen-hie
cradle:
stack:
cymp:edh-universe cyue$
cymp:edh-universe cyue$ gen-hie --cabal
gen-hie: Usedcabal
No .cabal files found under/fw/m3cyue/edh-universe
You may need to run stack build.
CallStack (from HasCallStack):
error, called at app/Main.hs:22:5 in main:Main
cymp:edh-universe cyue$ |
Oh, turns out it matters for the package path to be relative, now: cymp:edh-universe cyue$ cat stack.yaml
# Please change the resolver and other Stack settings per your needs
resolver: lts-16.11
ghc-options:
elr: -O0
edh: -O0
## FOLLOWING CONTENTS GONNA BE OVERWRITTEN BY EPM ##
local-bin-path: /fw/m3cyue/edh-universe/bin
packages:
- ./e-wrks/edh/lossless-decimal
- ./e-wrks/edh/elr
- ./e-wrks/edh/host.hs
- ./e-wrks/nedh/host.hs
- ./e-wrks/sedh/host.hs
- ./e-wrks/hasdim/host.hs
- ./e-wrks/haskit/host.hs
- ./e-wrks/els/host.hs
cymp:edh-universe cyue$
cymp:edh-universe cyue$ gen-hie
cradle:
stack:
- path: "./e-wrks/edh/elr/src"
component: "elr:lib"
- path: "./e-wrks/edh/host.hs/src"
component: "edh:lib"
- path: "./e-wrks/edh/host.hs/repl/Main.hs"
component: "edh:exe:edh"
- path: "./e-wrks/edh/host.hs/repl/Repl.hs"
component: "edh:exe:edh"
- path: "./e-wrks/edh/host.hs/runfile/Main.hs"
component: "edh:exe:runedh"
- path: "./e-wrks/edh/host.hs/runmodu/Main.hs"
component: "edh:exe:edhm"
- path: "./e-wrks/edh/lossless-decimal/src"
component: "lossless-decimal:lib"
- path: "./e-wrks/els/host.hs/src"
component: "els:lib"
- path: "./e-wrks/els/host.hs/server/Main.hs"
component: "els:exe:els"
- path: "./e-wrks/hasdim/host.hs/repl/Main.hs"
component: "hasdim:exe:hasdim"
- path: "./e-wrks/hasdim/host.hs/repl/Repl.hs"
component: "hasdim:exe:hasdim"
- path: "./e-wrks/hasdim/host.hs/runfile/Main.hs"
component: "hasdim:exe:rundim"
- path: "./e-wrks/hasdim/host.hs/runmodu/Main.hs"
component: "hasdim:exe:rundimm"
- path: "./e-wrks/hasdim/host.hs/src"
component: "hasdim:lib"
- path: "./e-wrks/haskit/host.hs/hski/Main.hs"
component: "haskit:exe:hski"
- path: "./e-wrks/haskit/host.hs/hski/Repl.hs"
component: "haskit:exe:hski"
- path: "./e-wrks/haskit/host.hs/src"
component: "haskit:lib"
- path: "./e-wrks/nedh/host.hs/src"
component: "nedh:lib"
- path: "./e-wrks/nedh/host.hs/runmodu/Main.hs"
component: "nedh:exe:nedh"
- path: "./e-wrks/nedh/host.hs/runmodu/Repl.hs"
component: "nedh:exe:nedh"
- path: "./e-wrks/nedh/host.hs/runfile/Main.hs"
component: "nedh:exe:runnedh"
- path: "./e-wrks/sedh/host.hs/gwd/Main.hs"
component: "sedh:exe:gwd"
- path: "./e-wrks/sedh/host.hs/gwd/default-language:.hs"
component: "sedh:exe:gwd"
- path: "./e-wrks/sedh/host.hs/gwd/Haskell2010.hs"
component: "sedh:exe:gwd"
- path: "./e-wrks/sedh/host.hs/forage/Main.hs"
component: "sedh:exe:forage"
- path: "./e-wrks/sedh/host.hs/forage/default-language:.hs"
component: "sedh:exe:forage"
- path: "./e-wrks/sedh/host.hs/forage/Haskell2010.hs"
component: "sedh:exe:forage"
- path: "./e-wrks/sedh/host.hs/src"
component: "sedh:lib"
cymp:edh-universe cyue$ I'll manage to have But then I think I discovered another bug, that when executable gwd
main-is: Main.hs
hs-source-dirs: gwd
other-modules:
default-language: Haskell2010
default-extensions:
NoImplicitPrelude
... generating: - path: "./e-wrks/sedh/host.hs/gwd/Main.hs"
component: "sedh:exe:gwd"
- path: "./e-wrks/sedh/host.hs/gwd/default-language:.hs"
component: "sedh:exe:gwd"
- path: "./e-wrks/sedh/host.hs/gwd/Haskell2010.hs"
component: "sedh:exe:gwd" |
I removed empty But hls still fails with |
Try the new version, empty lists should be fixed now. |
Still spitting unexpected entries:
Btw, how you triage the absolute package path situation? Is it worth and easy enough to support absolute paths? |
I fixed #30 so, please try the latest release from hackage or master. |
verified for master, the output are all expected now 👍 |
cymp:edh-universe cyue$ gen-hie gen-hie: No .cabal files found under/fw/m3cyue/edh-universe You may need to run stack build. CallStack (from HasCallStack): error, called at app/Main.hs:32:21 in main:Main cymp:edh-universe cyue$
The text was updated successfully, but these errors were encountered: