Comments (12)
verified for master, the output are all expected now 👍
from implicit-hie.
@complyue Try deleting fw/m3cyue
from your packages
paths.
If absolute paths are not the issue, please produce a minimal repo, that I can debug with.
from implicit-hie.
Turns out it's the presence of dist-newstyle
caused the err out:
$ 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
$
from implicit-hie.
So is Every thing working now?
I'll add a message to that case explaining which cradle was used and why.
from implicit-hie.
I still got empty list in my case even with .cabal
files listed in my stack.yaml
. I'm not hurry in pursuing, but if there's simple diagnostic actions, like verbose debug trace etc. I can tinker with it.
from implicit-hie.
I don't have time to add logging right now.
I added which tool is being used to the error.
Try with the master GitHub version and see if it's still using cabal.
Also just run gen-hie --cabal
and post the output.
from implicit-hie.
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$
from implicit-hie.
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 epm
to generate relative package path later to workaround it.
But then I think I discovered another bug, that when other-modules:
is empty, the next entry (i.e. default-language: Haskell2010
) is mistaken for its content. E.g. seeing https://github.com/complyue/sedh/blob/b290f7532d1ad230f38684919bf6d7de851e6fa3/host.hs/sedh.cabal#L27-L28
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"
from implicit-hie.
I removed empty other-modules:
to workaround it, so now gen-hie
can produce hie.yaml
as good as a manual crafted one.
But hls still fails with Exception: BadDependency "GhcSession"
on opening "./e-wrks/sedh/host.hs/gwd/Main.hs", though "./e-wrks/els/host.hs/server/Main.hs" works well, these 2 module and their respective .cabal
file are very similar in structure, it feels weird one works but not the other. Anyway majority of the library source files work rather smooth, so I would postpone the cracking on this issue later. At least after I make the initial release of these packages into e-wrks org, then reproducing these issues will be more practical.
from implicit-hie.
Try the new version, empty lists should be fixed now.
from implicit-hie.
Still spitting unexpected entries:
- 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"
Btw, how you triage the absolute package path situation? Is it worth and easy enough to support absolute paths?
from implicit-hie.
I fixed #30 so, please try the latest release from hackage or master.
from implicit-hie.
Related Issues (20)
- Empty `other-modules` leads to wrong output HOT 3
- Support import-dirs under Cabal flags
- Issues with cabal.project pointing to current directory
- Where does `gen-hie` come from HOT 1
- Confusing parsing behaviour when a list is the last thing in the .cabal file
- error: No prefixes matches for default hie in a simple project HOT 4
- Incorrect parsing of freeform fields HOT 1
- Implicit hie fails to generate the main lib component due to package description
- Modules are sometimes listed explicitly for some reason HOT 4
- Don't generate a Cradle based on .cabal file if cabal version >= 3.4
- Package name not picked up HOT 3
- implicit-hie doesn't recognize foreign-library sections in cabal HOT 1
- Support both --stack and --cabal at the same time HOT 4
- Handle local tarballs in `cabal.project`
- Operate on cabal project files not called cabal.project HOT 2
- 0.1.3.0 seems to generate empty `hie.yaml` files for cabal projects HOT 15
- `implicit-hie-cradle` mis-detecting cabal projects as stack projects HOT 1
- Create a subcommand to gen a `hie.yaml` multi cradle to ignore `Setup.hs` to avoid haskell-language-server#3348 HOT 1
- include `gen-hie` binaries with releases? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from implicit-hie.