-
Notifications
You must be signed in to change notification settings - Fork 63
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
error "Multi Cradle: No prefixes matched" when trying to run haskell-language-server on reflex-platform #306
Comments
additional info
but I want haskell-language-server to use: IF dependency exists in
|
Hi, thank you for the bug report! Does it work if you replace
with
Maybe we trip over the nested multi cradle. |
hi @fendor , tnx for being the first person to help me in 3 days with hie.yaml### GENERATED WITH
#
# projectdir=$(pwd)
# rm -f $projectdir/hie.yaml
# touch $projectdir/hie.yaml
# echo "cradle:" > $projectdir/hie.yaml
# echo " multi:" >> $projectdir/hie.yaml
# dojob () {
# dir="$1"
# cd $projectdir/$dir
# output=$(/nix/store/ls47a7id24w5498cmv6djc65vbxf1ppm-implicit-hie-0.1.2.5/bin/gen-hie || true)
# echo " - path: \"./$dir\"" >> $projectdir/hie.yaml
# echo " config:" >> $projectdir/hie.yaml
# echo "$output" | sed 's@^@ @' >> $projectdir/hie.yaml
# }
# dojob haskell-overlays/reflex-packages/dep/cabal-macosx
# dojob haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans
# dojob haskell-overlays/reflex-packages/dep/gargoyle
# dojob haskell-overlays/reflex-packages/dep/ghcjs-dom
# dojob haskell-overlays/reflex-packages/dep/jsaddle
# dojob haskell-overlays/reflex-packages/dep/jsaddle-dom
# dojob haskell-overlays/reflex-packages/dep/reflex
# dojob haskell-overlays/reflex-packages/dep/reflex-aeson-orphans
# dojob haskell-overlays/reflex-packages/dep/reflex-dom
# dojob haskell-overlays/reflex-packages/dep/reflex-todomvc
# dojob haskell-overlays/reflex-packages/dep/universe
# cd $projectdir
cradle:
multi:
# - path: "./haskell-overlays/reflex-packages/dep/cabal-macosx"
# config:
# cradle:
# cabal:
# - path: "./"
# component: "lib:cabal-macosx"
# - path: "./macosx-app.hs"
# component: "cabal-macosx:exe:macosx-app"
# - path: "."
# component: "cabal-macosx:test:tests"
# - path: "tests"
# component: "cabal-macosx:test:tests"
- path: "./haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans"
config:
cradle:
cabal:
# - path: "src"
# component: "lib:dependent-sum-universe-orphans"
# - path: "./haskell-overlays/reflex-packages/dep/gargoyle"
# config:
# cradle:
# cabal:
# - path: "gargoyle/src"
# component: "lib:gargoyle"
# - path: "gargoyle-postgresql/src"
# component: "lib:gargoyle-postgresql"
# - path: "gargoyle-postgresql/src-bin/gargoyle-psql.hs"
# component: "gargoyle-postgresql:exe:gargoyle-psql"
# - path: "gargoyle-postgresql/src-bin/gargoyle-pg-run.hs"
# component: "gargoyle-postgresql:exe:gargoyle-pg-run"
# - path: "gargoyle-postgresql/src-bin/gargoyle-postgres-monitor.hs"
# component: "gargoyle-postgresql:exe:gargoyle-postgres-monitor"
# - path: "gargoyle-postgresql/tests"
# component: "gargoyle-postgresql:test:gargoyle-psql-test"
# - path: "gargoyle-postgresql-connect/src"
# component: "lib:gargoyle-postgresql-connect"
# - path: "gargoyle-postgresql-nix/src"
# component: "lib:gargoyle-postgresql-nix"
# - path: "gargoyle-postgresql-nix/src-bin/gargoyle-nix-psql.hs"
# component: "gargoyle-postgresql-nix:exe:gargoyle-nix-psql"
# - path: "gargoyle-postgresql-nix/src-bin/gargoyle-nix-pg-run.hs"
# component: "gargoyle-postgresql-nix:exe:gargoyle-nix-pg-run"
# - path: "gargoyle-postgresql-nix/src-bin/gargoyle-nix-postgres-monitor.hs"
# component: "gargoyle-postgresql-nix:exe:gargoyle-nix-postgres-monitor"
# - path: "./haskell-overlays/reflex-packages/dep/ghcjs-dom"
# config:
# - path: "./haskell-overlays/reflex-packages/dep/jsaddle"
# config:
# cradle:
# cabal:
# - path: "jsaddle/src-ghc"
# component: "lib:jsaddle"
# - path: "jsaddle/src"
# component: "lib:jsaddle"
# - path: "jsaddle-clib/src"
# component: "lib:jsaddle-clib"
# - path: "jsaddle-clib/src-ghcjs"
# component: "lib:jsaddle-clib"
# - path: "jsaddle-clib/src-ghc"
# component: "lib:jsaddle-clib"
# - path: "jsaddle-warp/src"
# component: "lib:jsaddle-warp"
# - path: "jsaddle-warp/tests"
# component: "jsaddle-warp:test:test-tool"
# - path: "jsaddle-webkit2gtk/src"
# component: "lib:jsaddle-webkit2gtk"
# - path: "jsaddle-wkwebview/src"
# component: "lib:jsaddle-wkwebview"
# - path: "jsaddle-wkwebview/src-ghcjs"
# component: "lib:jsaddle-wkwebview"
# - path: "jsaddle-wkwebview/src-ghc"
# component: "lib:jsaddle-wkwebview"
# - path: "./haskell-overlays/reflex-packages/dep/jsaddle-dom"
# config:
# cradle:
# cabal:
# - path: "./src"
# component: "lib:jsaddle-dom"
# - path: "./haskell-overlays/reflex-packages/dep/reflex"
# config:
# cradle:
# cabal:
# - path: "./src"
# component: "lib:reflex"
# - path: "./test"
# component: "reflex:test:semantics"
# - path: "./test"
# component: "reflex:test:CrossImpl"
# - path: "./test"
# component: "reflex:test:hlint"
# - path: "./test"
# component: "reflex:test:EventWriterT"
# - path: "./test"
# component: "reflex:test:DebugCycles"
# - path: "./test"
# component: "reflex:test:RequesterT"
# - path: "./test"
# component: "reflex:test:Headless"
# - path: "./test"
# component: "reflex:test:Adjustable"
# - path: "./test"
# component: "reflex:test:QueryT"
# - path: "./test"
# component: "reflex:test:GC-Semantics"
# - path: "./test"
# component: "reflex:test:rootCleanup"
# - path: "./bench/Main.hs"
# component: "reflex:bench:spider-bench"
# - path: "./test/Main.hs"
# component: "reflex:bench:spider-bench"
# - path: "./bench/Reflex/TestPlan.hs"
# component: "reflex:bench:spider-bench"
# - path: "./bench/Reflex/Plan/Reflex.hs"
# component: "reflex:bench:spider-bench"
# - path: "./bench/Reflex/Bench/Focused.hs"
# component: "reflex:bench:spider-bench"
# - path: "./test/Reflex/TestPlan.hs"
# component: "reflex:bench:spider-bench"
# - path: "./test/Reflex/Plan/Reflex.hs"
# component: "reflex:bench:spider-bench"
# - path: "./test/Reflex/Bench/Focused.hs"
# component: "reflex:bench:spider-bench"
# - path: "./bench/RunAll.hs"
# component: "reflex:bench:saulzar-bench"
# - path: "./test/RunAll.hs"
# component: "reflex:bench:saulzar-bench"
# - path: "./bench/Reflex/TestPlan.hs"
# component: "reflex:bench:saulzar-bench"
# - path: "./bench/Reflex/Plan/Reflex.hs"
# component: "reflex:bench:saulzar-bench"
# - path: "./bench/Reflex/Bench/Focused.hs"
# component: "reflex:bench:saulzar-bench"
# - path: "./test/Reflex/TestPlan.hs"
# component: "reflex:bench:saulzar-bench"
# - path: "./test/Reflex/Plan/Reflex.hs"
# component: "reflex:bench:saulzar-bench"
# - path: "./test/Reflex/Bench/Focused.hs"
# component: "reflex:bench:saulzar-bench"
# - path: "./haskell-overlays/reflex-packages/dep/reflex-aeson-orphans"
# config:
# cradle:
# cabal:
# - path: "src"
# component: "lib:reflex-aeson-orphans"
# - path: "./haskell-overlays/reflex-packages/dep/reflex-dom"
# config:
# cradle:
# cabal:
# - path: "chrome-test-utils/src"
# component: "lib:chrome-test-utils"
# - path: "reflex-dom/src"
# component: "lib:reflex-dom"
# - path: "reflex-dom/src-android"
# component: "lib:reflex-dom"
# - path: "reflex-dom/examples/sortableList.hs"
# component: "reflex-dom:exe:sortableList"
# - path: "reflex-dom/./benchmark.hs"
# component: "reflex-dom:exe:benchmark"
# - path: "reflex-dom/benchmarks/krausest.hs"
# component: "reflex-dom:exe:krausest"
# - path: "reflex-dom-core/src"
# component: "lib:reflex-dom-core"
# - path: "reflex-dom-core/src-ghc"
# component: "lib:reflex-dom-core"
# - path: "reflex-dom-core/src-ghcjs"
# component: "lib:reflex-dom-core"
# - path: "reflex-dom-core/src-ghc"
# component: "lib:reflex-dom-core"
# - path: "reflex-dom-core/test"
# component: "reflex-dom-core:test:hlint"
# - path: "reflex-dom-core/test"
# component: "reflex-dom-core:test:hydration"
# - path: "reflex-dom-core/test"
# component: "reflex-dom-core:test:gc"
# - path: "reflex-dom-test-selenium/src"
# component: "lib:reflex-dom-test-selenium"
# - path: "./haskell-overlays/reflex-packages/dep/reflex-todomvc"
# config:
# - path: "./haskell-overlays/reflex-packages/dep/universe"
# config:
# cradle:
# cabal:
# - path: "deprecated/universe-instances-base/src"
# component: "lib:universe-instances-base"
# - path: "deprecated/universe-instances-trans/src"
# component: "lib:universe-instances-trans"
# - path: "universe/src"
# component: "lib:universe"
# - path: "universe-base/src"
# component: "lib:universe-base"
# - path: "universe-base/tests"
# component: "universe-base:test:tests"
# - path: "universe-dependent-sum/src"
# component: "lib:universe-dependent-sum"
# - path: "universe-dependent-sum/test"
# component: "universe-dependent-sum:test:th-test"
# - path: "universe-instances-extended/src"
# component: "lib:universe-instances-extended"
# - path: "universe-reverse-instances/src"
# component: "lib:universe-reverse-instances" I get output
N.B. note the |
[nix-shell:~/projects/reflex-platform]$ ls -al /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans
total 28
drwxr-xr-x 4 srghma users 4096 Aug 21 14:54 .
drwxr-xr-x 15 srghma users 4096 Aug 21 14:56 ..
-rw-r--r-- 1 srghma users 738 Aug 21 14:54 dependent-sum-universe-orphans.cabal
drwxr-xr-x 8 srghma users 4096 Aug 21 14:54 .git
-rw-r--r-- 1 srghma users 1538 Aug 21 14:54 LICENSE
-rw-r--r-- 1 srghma users 46 Aug 21 14:54 Setup.hs
drwxr-xr-x 3 srghma users 4096 Aug 21 14:54 src
[nix-shell:~/projects/reflex-platform]$ cat /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/dependent-sum-universe-orphans.cabal
-- Initial dependent-sum-universe-orphans.cabal generated by cabal init.
-- For further documentation, see http://haskell.org/cabal/users-guide/
name: dependent-sum-universe-orphans
version: 0.1.0.0
license: BSD3
license-file: LICENSE
author: Obsidian Systems LLC
maintainer: [email protected]
copyright: 2018 Obsidian Systems LLC
build-type: Simple
extra-source-files: ChangeLog.md
cabal-version: >=1.10
library
exposed-modules:
Data.Some.Universe.Orphans
build-depends: base
, dependent-sum >= 0.4.1
, universe >= 1 && < 2
hs-source-dirs: src
default-language: Haskell2010
[nix-shell:~/projects/reflex-platform]$ cat /home/srghma/projects/reflex-platform/cabal.project
flags: -overloaded-methods -overloaded-signals -overloaded-properties
compiler: ghc
-- packages:
-- examples/WorkOnTest/WorkOnTest.cabal
-- haskell-overlays/reflex-packages/dep/universe/universe-dependent-sum/universe-dependent-sum.cabal
-- haskell-overlays/reflex-packages/dep/universe/universe/universe.cabal
-- haskell-overlays/reflex-packages/dep/universe/deprecated/universe-instances-trans/universe-instances-trans.cabal
-- haskell-overlays/reflex-packages/dep/universe/deprecated/universe-instances-base/universe-instances-base.cabal
-- haskell-overlays/reflex-packages/dep/universe/universe-instances-extended/universe-instances-extended.cabal
-- haskell-overlays/reflex-packages/dep/universe/universe-base/universe-base.cabal
-- haskell-overlays/reflex-packages/dep/universe/universe-reverse-instances/universe-reverse-instances.cabal
-- haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/dependent-sum-universe-orphans.cabal
-- haskell-overlays/reflex-packages/dep/reflex/reflex.cabal
-- haskell-overlays/reflex-packages/dep/cabal-macosx/examples/wxHello/wxHello.cabal
-- haskell-overlays/reflex-packages/dep/cabal-macosx/examples/wxHello-cpp/wxHello.cabal
-- haskell-overlays/reflex-packages/dep/cabal-macosx/examples/gtkHello/gtkHello.cabal
-- haskell-overlays/reflex-packages/dep/cabal-macosx/cabal-macosx.cabal
-- haskell-overlays/reflex-packages/dep/jsaddle-dom/jsaddle-dom.cabal
-- haskell-overlays/reflex-packages/dep/reflex-dom/reflex-dom/reflex-dom.cabal
-- haskell-overlays/reflex-packages/dep/reflex-dom/reflex-dom-core/reflex-dom-core.cabal
-- haskell-overlays/reflex-packages/dep/reflex-dom/chrome-test-utils/chrome-test-utils.cabal
-- haskell-overlays/reflex-packages/dep/ghcjs-dom/ghcjs-dom/ghcjs-dom.cabal
-- haskell-overlays/reflex-packages/dep/ghcjs-dom/ghcjs-dom-jsffi/ghcjs-dom-jsffi.cabal
-- haskell-overlays/reflex-packages/dep/ghcjs-dom/ghcjs-dom-jsaddle/ghcjs-dom-jsaddle.cabal
-- haskell-overlays/reflex-packages/dep/reflex-todomvc/reflex-todomvc.cabal
-- haskell-overlays/reflex-packages/dep/gargoyle/gargoyle-postgresql-connect/gargoyle-postgresql-connect.cabal
-- haskell-overlays/reflex-packages/dep/gargoyle/gargoyle-postgresql-nix/gargoyle-postgresql-nix.cabal
-- haskell-overlays/reflex-packages/dep/gargoyle/gargoyle/gargoyle.cabal
-- haskell-overlays/reflex-packages/dep/gargoyle/gargoyle-postgresql/gargoyle-postgresql.cabal
-- haskell-overlays/reflex-packages/dep/reflex-aeson-orphans/reflex-aeson-orphans.cabal
-- haskell-overlays/reflex-packages/dep/jsaddle/jsaddle-webkitgtk/jsaddle-webkitgtk.cabal
-- haskell-overlays/reflex-packages/dep/jsaddle/jsaddle-warp/jsaddle-warp.cabal
-- haskell-overlays/reflex-packages/dep/jsaddle/jsaddle-wkwebview/jsaddle-wkwebview.cabal
-- haskell-overlays/reflex-packages/dep/jsaddle/jsaddle-clib/jsaddle-clib.cabal
-- haskell-overlays/reflex-packages/dep/jsaddle/jsaddle-webkit2gtk/jsaddle-webkit2gtk.cabal
-- haskell-overlays/reflex-packages/dep/jsaddle/jsaddle/jsaddle.cabal
optional-packages: *
-- Needed for ios
-- package reflex
-- flags: -use-template-haskell
-- package reflex-dom-core
-- flags: -use-template-haskell
-- package wai-websockets
-- flags: -example
-- package semigroupoids
-- flags: -doctests
-- package text
-- flags: +integer-simple
-- package scientific
-- flags: +integer-simple
-- package hashable
-- flags: -integer-gmp
package gi-atk
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-cairo
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-gdk
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-gdkpixbuf
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-gio
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-glib
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-gobject
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-gtk
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-gtk-hs
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-gtkosxapplication
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-gtksource
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-javascriptcore
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-pango
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-pangocairo
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-soup
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-webkit
flags: -overloaded-methods -overloaded-signals -overloaded-properties
package gi-webkit2
flags: -overloaded-methods -overloaded-signals -overloaded-properties |
Hm, what happens if you move your With the contents cradle:
cabal: |
[nix-shell:~/projects/reflex-platform]$ ls
android CONTRIBUTING.md examples haskell-overlays nixpkgs packages.nix scripts try-reflex
benchmarking default.nix gc-roots hie.yaml nixpkgs-overlays project shell.nix try-reflex.log
cabal.project dist-newstyle ghcjs.externs.js ios nix-utils README.md STACK.md wasm-cross
ChangeLog.md docs HACKING.md LICENSE notes release.nix tests
[nix-shell:~/projects/reflex-platform]$ mv hie.yaml __hie.yaml
[nix-shell:~/projects/reflex-platform]$ ls
android CONTRIBUTING.md examples haskell-overlays nixpkgs packages.nix scripts try-reflex
benchmarking default.nix gc-roots __hie.yaml nixpkgs-overlays project shell.nix try-reflex.log
cabal.project dist-newstyle ghcjs.externs.js ios nix-utils README.md STACK.md wasm-cross
ChangeLog.md docs HACKING.md LICENSE notes release.nix tests
[nix-shell:~/projects/reflex-platform]$ nvim ./haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/hie.yaml
[nix-shell:~/projects/reflex-platform]$ cat ./haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/hie.yaml
cradle:
cabal:
[nix-shell:~/projects/reflex-platform]$ haskell-language-server-wrapper -d haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.3.0.0, Git revision e7c5e90b6df5dff2760d76169eddaea3bdd6a831 (dirty) x86_64 ghc-8.10.4
Current directory: /home/srghma/projects/reflex-platform
Operating system: linux
Arguments: ["-d","haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs"]
Cradle directory: /home/srghma/projects/reflex-platform
Cradle type: Default
Tool versions found on the $PATH
cabal: 3.0.0.0
stack: Not found
ghc: 8.6.5
Consulting the cradle to get project GHC version...
Project GHC version: 8.6.5
haskell-language-server exe candidates: ["haskell-language-server-8.6.5","haskell-language-server"]
Launching haskell-language-server exe at:/nix/store/jvdjp996s728fkdrrq4wg6lk58k8h6fd-haskell-language-server-1.3.0/bin/haskell-language-server-8.6.5
haskell-language-server version: 1.3.0.0 (GHC: 8.6.5) (PATH: /nix/store/4wkv3mi2hidvbgvmibvjgyzp5nbnqzw6-haskell-language-server-1.3.0-installer/bin/haskell-language-server-8.6.5) (GIT hash: e7c5e90b6df5dff2760d76169eddaea3bdd6a831)
ghcide setup tester in /home/srghma/projects/reflex-platform.
Report bugs at https://github.com/haskell/haskell-language-server/issues
Step 1/4: Finding files to test in /home/srghma/projects/reflex-platform
Found 1 files
Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
(/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/hie.yaml)
Step 3/4: Initializing the IDE
2021-08-23 16:34:30.95356766 [ThreadId 7] DEBUG hls: Initializing exports map from hiedb
Step 4/4: Type checking the files
2021-08-23 16:34:30.966323942 [ThreadId 36] INFO hls: Consulting the cradle for "haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans", cradleOptsProg = CradleAction: Cabal}
> cabal: There is no <pkgname>.cabal package file or cabal.project file. To
> build packages locally you need at minimum a <pkgname>.cabal file. You can use
> 'cabal init' to create one.
>
> For non-trivial projects you will also want a cabal.project file in the root
> directory of your project. This file lists the packages in your project and
> all other build configuration. See the Cabal user guide for full details.
>
2021-08-23 16:34:30.991458336 [ThreadId 36] DEBUG hls: Session loading result: Left [CradleError {cradleErrorDependencies = ["dependent-sum-universe-orphans.cabal","cabal.project","cabal.project.local"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling cabal","","cabal: There is no <pkgname>.cabal package file or cabal.project file. To\nbuild packages locally you need at minimum a <pkgname>.cabal file. You can use\n'cabal init' to create one.\n\nFor non-trivial projects you will also want a cabal.project file in the root\ndirectory of your project. This file lists the packages in your project and\nall other build configuration. See the Cabal user guide for full details.\n\n",""]}]
2021-08-23 16:34:30.992972964 [ThreadId 60] INFO hls: File:
/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
Hidden: no
Range: 1:1-2:1
Source: cradle
Severity: DsError
Message:
Failed to parse result of calling cabal
cabal: There is no <pkgname>.cabal package file or cabal.project file. To
build packages locally you need at minimum a <pkgname>.cabal file. You can use
'cabal init' to create one.
For non-trivial projects you will also want a cabal.project file in the root
directory of your project. This file lists the packages in your project and
all other build configuration. See the Cabal user guide for full details.
2021-08-23 16:34:30.993639549 [ThreadId 64] INFO hls: finish: User TypeCheck (took 0.03s)
2021-08-23 16:34:30.99399783 [ThreadId 68] INFO hls: finish: GetHie (took 0.00s)
Files that failed:
2021-08-23 16:34:30.994379402 [ThreadId 74] INFO hls: finish: GenerateCore (took 0.00s)
* /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
Completed (0 files worked, 1 file failed)
haskell-language-server-8.6.5: SQLite3 returned ErrorBusy while attempting to perform close: unable to close due to unfinalized statements or unfinished backups
haskell-language-server-wrapper: callProcess: /nix/store/jvdjp996s728fkdrrq4wg6lk58k8h6fd-haskell-language-server-1.3.0/bin/haskell-language-server-8.6.5 "-d" "haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs" (exit 1): failed
[nix-shell:~/projects/reflex-platform]$ cd /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans
[nix-shell:~/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans]$ haskell-language-server-wrapper -d src/Data/Some/Universe/Orphans.hs
Found "/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/hie.yaml" for "/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.3.0.0, Git revision e7c5e90b6df5dff2760d76169eddaea3bdd6a831 (dirty) x86_64 ghc-8.10.4
Current directory: /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans
Operating system: linux
Arguments: ["-d","src/Data/Some/Universe/Orphans.hs"]
Cradle directory: /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.0.0.0
stack: Not found
ghc: 8.6.5
Consulting the cradle to get project GHC version...
Project GHC version: 8.6.5
haskell-language-server exe candidates: ["haskell-language-server-8.6.5","haskell-language-server"]
Launching haskell-language-server exe at:/nix/store/jvdjp996s728fkdrrq4wg6lk58k8h6fd-haskell-language-server-1.3.0/bin/haskell-language-server-8.6.5
haskell-language-server version: 1.3.0.0 (GHC: 8.6.5) (PATH: /nix/store/4wkv3mi2hidvbgvmibvjgyzp5nbnqzw6-haskell-language-server-1.3.0-installer/bin/haskell-language-server-8.6.5) (GIT hash: e7c5e90b6df5dff2760d76169eddaea3bdd6a831)
ghcide setup tester in /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans.
Report bugs at https://github.com/haskell/haskell-language-server/issues
Step 1/4: Finding files to test in /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans
Found 1 files
Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
(/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/hie.yaml)
Step 3/4: Initializing the IDE
2021-08-23 16:34:53.501569936 [ThreadId 7] DEBUG hls: Initializing exports map from hiedb
2021-08-23 16:34:53.526671901 [ThreadId 7] DEBUG hls: Done initializing exports map from hiedb (0)
Step 4/4: Type checking the files
2021-08-23 16:34:53.529586268 [ThreadId 40] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs"
2021-08-23 16:34:53.530997705 [ThreadId 47] INFO hls: Consulting the cradle for "src/Data/Some/Universe/Orphans.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans", cradleOptsProg = CradleAction: Cabal}
> cabal: There is no <pkgname>.cabal package file or cabal.project file. To
> build packages locally you need at minimum a <pkgname>.cabal file. You can use
> 'cabal init' to create one.
>
> For non-trivial projects you will also want a cabal.project file in the root
> directory of your project. This file lists the packages in your project and
> all other build configuration. See the Cabal user guide for full details.
>
2021-08-23 16:34:53.547702392 [ThreadId 47] DEBUG hls: Session loading result: Left [CradleError {cradleErrorDependencies = ["dependent-sum-universe-orphans.cabal","cabal.project","cabal.project.local"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling cabal","","cabal: There is no <pkgname>.cabal package file or cabal.project file. To\nbuild packages locally you need at minimum a <pkgname>.cabal file. You can use\n'cabal init' to create one.\n\nFor non-trivial projects you will also want a cabal.project file in the root\ndirectory of your project. This file lists the packages in your project and\nall other build configuration. See the Cabal user guide for full details.\n\n",""]}]
2021-08-23 16:34:53.5489537 [ThreadId 71] INFO hls: File:
/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
Hidden: no
Range: 1:1-2:1
Source: cradle
Severity: DsError
Message:
Failed to parse result of calling cabal
cabal: There is no <pkgname>.cabal package file or cabal.project file. To
build packages locally you need at minimum a <pkgname>.cabal file. You can use
'cabal init' to create one.
For non-trivial projects you will also want a cabal.project file in the root
directory of your project. This file lists the packages in your project and
all other build configuration. See the Cabal user guide for full details.
2021-08-23 16:34:53.549673381 [ThreadId 77] INFO hls: finish: User TypeCheck (took 0.02s)
2021-08-23 16:34:53.550161652 [ThreadId 80] INFO hls: finish: GetHie (took 0.00s)
2021-08-23 16:34:53.550362658 [ThreadId 82] INFO hls: finish: GenerateCore (took 0.00s)
Files that failed:
* /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
Completed (0 files worked, 1 file failed)
haskell-language-server-wrapper: callProcess: /nix/store/jvdjp996s728fkdrrq4wg6lk58k8h6fd-haskell-language-server-1.3.0/bin/haskell-language-server-8.6.5 "-d" "src/Data/Some/Universe/Orphans.hs" (exit 1): failed Additional info [nix-shell:~/projects/reflex-platform]$ type ghc
ghc is /nix/store/yag4f6kjzr47qj79nfaz1883y1ivm7ip-ghc-8.6.5-with-packages/bin/ghc
[nix-shell:~/projects/reflex-platform]$ realpath $(whereis ghc)
/home/srghma/projects/reflex-platform/ghc:
/nix/store/yag4f6kjzr47qj79nfaz1883y1ivm7ip-ghc-8.6.5-with-packages/bin/ghc
/nix/store/6cx303qajiwmkvr0qhwj9zlzm412skv6-ghc-8.6.5/bin/ghc-8.6.5
[nix-shell:~/projects/reflex-platform]$ ls -al /nix/store/yag4f6kjzr47qj79nfaz1883y1ivm7ip-ghc-8.6.5-with-packages/bin/
total 132
dr-xr-xr-x 2 root root 4096 Jan 1 1970 .
dr-xr-xr-x 8 root root 4096 Jan 1 1970 ..
lrwxrwxrwx 2 root root 75 Jan 1 1970 cabal -> /nix/store/i58nilrg1l67vxdrcv2blimzndzbqfi6-cabal-install-3.0.0.0/bin/cabal
lrwxrwxrwx 2 root root 74 Jan 1 1970 cabal2nix -> /nix/store/lc0fqz4jv9wvydmam4179cf95pya9xfd-cabal2nix-2.14.4/bin/cabal2nix
lrwxrwxrwx 2 root root 66 Jan 1 1970 cpphs -> /nix/store/f494d0px77nl0nqzzrk0fjj80vs554cz-cpphs-1.20.8/bin/cpphs
lrwxrwxrwx 2 root root 74 Jan 1 1970 example -> /nix/store/jrljs1r6gnxpsf10zgk697ig838i52v5-reflex-vty-0.1.4.1/bin/example
-r-xr-xr-x 2 root root 601 Jan 1 1970 ghc
-r-xr-xr-x 2 root root 607 Jan 1 1970 ghc-8.6.5
-r-xr-xr-x 2 root root 602 Jan 1 1970 ghci
-r-xr-xr-x 2 root root 608 Jan 1 1970 ghci-8.6.5
-r-xr-xr-x 2 root root 292 Jan 1 1970 ghc-pkg
-r-xr-xr-x 2 root root 298 Jan 1 1970 ghc-pkg-8.6.5
-r-xr-xr-x 2 root root 301 Jan 1 1970 haddock
lrwxrwxrwx 3 root root 75 Jan 1 1970 haddock-ghc-8.6.5 -> /nix/store/6cx303qajiwmkvr0qhwj9zlzm412skv6-ghc-8.6.5/bin/haddock-ghc-8.6.5
lrwxrwxrwx 2 root root 72 Jan 1 1970 hasktags -> /nix/store/8bhrh3hxkr7zjk4zymjjx52fi5zxlf7j-hasktags-0.71.2/bin/hasktags
lrwxrwxrwx 2 root root 75 Jan 1 1970 hdevtools -> /nix/store/qk3gkwkmndhzb5rzsc66bxv150y4ydh4-hdevtools-0.1.8.0/bin/hdevtools
lrwxrwxrwx 2 root root 65 Jan 1 1970 hlint -> /nix/store/vib02fqg9535w593v23w08kp1vhi8pqp-hlint-2.2.2/bin/hlint
lrwxrwxrwx 3 root root 63 Jan 1 1970 hp2ps -> /nix/store/6cx303qajiwmkvr0qhwj9zlzm412skv6-ghc-8.6.5/bin/hp2ps
lrwxrwxrwx 3 root root 61 Jan 1 1970 hpc -> /nix/store/6cx303qajiwmkvr0qhwj9zlzm412skv6-ghc-8.6.5/bin/hpc
lrwxrwxrwx 3 root root 64 Jan 1 1970 hsc2hs -> /nix/store/6cx303qajiwmkvr0qhwj9zlzm412skv6-ghc-8.6.5/bin/hsc2hs
lrwxrwxrwx 2 root root 72 Jan 1 1970 HsColour -> /nix/store/vy9lxxmsdynvm20h11klbyjbfy3w1xi5-hscolour-1.24.4/bin/HsColour
lrwxrwxrwx 2 root root 79 Jan 1 1970 macosx-app -> /nix/store/3jkz964cc1y46gjfdidqgz13bj8fvgl8-cabal-macosx-0.2.4.1/bin/macosx-app
lrwxrwxrwx 3 root root 70 Jan 1 1970 ppsh -> /nix/store/173mqchs1lv6zbliwxhiiza0b4ilk53w-pretty-show-1.9.5/bin/ppsh
lrwxrwxrwx 2 root root 77 Jan 1 1970 readme -> /nix/store/4s0i33p48n04nv0xl4p81709cbhkvdv7-reflex-process-0.3.1.0/bin/readme
lrwxrwxrwx 2 root root 79 Jan 1 1970 reflex-ghci -> /nix/store/gb6vkl497ix1fskg1wc2bixkz4s54dpb-reflex-ghci-0.1.5.1/bin/reflex-ghci
-r-xr-xr-x 2 root root 663 Jan 1 1970 runghc
lrwxrwxrwx 3 root root 70 Jan 1 1970 runghc-8.6.5 -> /nix/store/6cx303qajiwmkvr0qhwj9zlzm412skv6-ghc-8.6.5/bin/runghc-8.6.5
-r-xr-xr-x 2 root root 667 Jan 1 1970 runhaskell
lrwxrwxrwx 2 root root 87 Jan 1 1970 stylish-haskell -> /nix/store/n5p8w2slvjlbs5ackcqqkrlxhwg1lhs4-stylish-haskell-0.9.2.2/bin/stylish-haskell
lrwxrwxrwx 2 root root 67 Jan 1 1970 vty-demo -> /nix/store/rkkss6mflncg82b6c30iqc8lr210yrgl-vty-5.25.1/bin/vty-demo
lrwxrwxrwx 2 root root 72 Jan 1 1970 vty-mode-demo -> /nix/store/rkkss6mflncg82b6c30iqc8lr210yrgl-vty-5.25.1/bin/vty-mode-demo
lrwxrwxrwx 3 root root 93 Jan 1 1970 wai-websockets-example -> /nix/store/8v8b99kvxsrmik8933amffjj23fj18qx-wai-websockets-3.0.1.2/bin/wai-websockets-example
lrwxrwxrwx 3 root root 75 Jan 1 1970 warp -> /nix/store/3xflfbh16r2cl5igy3d384r5i7490pfi-wai-app-static-3.1.6.3/bin/warp
[nix-shell:~/projects/reflex-platform]$ type haskell-language-server-wrapper
haskell-language-server-wrapper is /nix/store/jvdjp996s728fkdrrq4wg6lk58k8h6fd-haskell-language-server-1.3.0/bin/haskell-language-server-wrapper
[nix-shell:~/projects/reflex-platform]$ ls -al /nix/store/jvdjp996s728fkdrrq4wg6lk58k8h6fd-haskell-language-server-1.3.0/bin/
total 16
dr-xr-xr-x 2 root root 4096 Jan 1 1970 .
dr-xr-xr-x 4 root root 4096 Jan 1 1970 ..
lrwxrwxrwx 3 root root 125 Jan 1 1970 haskell-language-server-8.6.5 -> /nix/store/w9f6x308hx4h5fk6v4pzda41iw226xi5-haskell-language-server-1.3.0-frontend/bin/haskell-language-server-1.3.0-frontend
lrwxrwxrwx 3 root root 125 Jan 1 1970 haskell-language-server-wrapper -> /nix/store/w9f6x308hx4h5fk6v4pzda41iw226xi5-haskell-language-server-1.3.0-frontend/bin/haskell-language-server-1.3.0-frontend
|
|
Is there a
|
dont know why it's trying to download packages, it should use the ones that are in the nix store, it should not download new ones to @fendor we can make a call in google hangouts, my email is [email protected], available any time |
How are you expecting this to be built? If you want to use |
@fendor , tnx, I have installed $ cd ~/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans
$ cat cabal.project
-- Without `cabal.project` (the content of `hie.yaml` doesnt matter) the `haskell-language-server-wrapper -d src/Data/Some/Universe/Orphans.hs`
-- will throw
--
-- Failed to parse result of calling cabal
--
-- cabal: Internal error in target matching. It should always be possible to find
-- a syntax that's sufficiently qualified to give an unambiguous match. However
-- when matching 'lib:dependent-sum-universe-orphans' we found
-- lib:dependent-sum-universe-orphans (unknown-component) which does not have an
-- unambiguous syntax. The possible syntax and the targets they match are as
-- follows:
-- 'lib:dependent-sum-universe-orphans' which matches
-- lib:dependent-sum-universe-orphans (unknown-component),
-- :pkg:lib:lib:lib:file:dependent-sum-universe-orphans (unknown-file)
packages: ./
-- fixes error on cabal install
-- Configuring semigroupoids-5.3.4...
-- setup: Encountered missing dependencies:
-- doctest >=0.11.1 && <0.18
package semigroupoids
flags: -doctests
$ cat hie.yaml
cradle:
cabal:
- path: "./src"
component: "lib:dependent-sum-universe-orphans"
$ haskell-language-server-wrapper -d src/Data/Some/Universe/Orphans.hs
... everything ok but now I want to make the same file compile, but from top level $ cd ~/projects/reflex-platform
$ cat hie.yaml
cradle:
multi:
- path: "./haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans"
config:
cradle:
cabal:
- path: "./src"
component: "lib:dependent-sum-universe-orphans"
- path: "./haskell-overlays/reflex-packages/dep/universe"
config:
cradle:
cabal:
- path: "deprecated/universe-instances-base/src"
component: "lib:universe-instances-base"
- path: "deprecated/universe-instances-trans/src"
component: "lib:universe-instances-trans"
- path: "universe/src"
component: "lib:universe"
- path: "universe-base/src"
component: "lib:universe-base"
- path: "universe-base/tests"
component: "universe-base:test:tests"
- path: "universe-dependent-sum/src"
component: "lib:universe-dependent-sum"
- path: "universe-dependent-sum/test"
component: "universe-dependent-sum:test:th-test"
- path: "universe-instances-extended/src"
component: "lib:universe-instances-extended"
- path: "universe-reverse-instances/src"
component: "lib:universe-reverse-instances"
~/projects/reflex-platform develop ±✚ find . -name 'hie.yaml'
./hie.yaml
~/projects/reflex-platform develop ±✚ find . -name 'cabal.project'
./haskell-overlays/reflex-packages/dep/universe/cabal.project
./haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/cabal.project
./haskell-overlays/reflex-packages/dep/reflex/cabal.project
./haskell-overlays/reflex-packages/dep/jsaddle-dom/cabal.project
./haskell-overlays/reflex-packages/dep/reflex-dom/cabal.project
./haskell-overlays/reflex-packages/dep/gargoyle/gargoyle-postgresql-connect/cabal.project
./haskell-overlays/reflex-packages/dep/gargoyle/gargoyle-postgresql-nix/cabal.project
./haskell-overlays/reflex-packages/dep/gargoyle/cabal.project
./haskell-overlays/reflex-packages/dep/gargoyle/gargoyle/cabal.project
./haskell-overlays/reflex-packages/dep/gargoyle/gargoyle-postgresql/cabal.project
./haskell-overlays/reflex-packages/dep/jsaddle/cabal.project
./haskell-overlays/reflex-packages/dep/patch/cabal.project
./cabal.project
~/projects/reflex-platform develop ±✚ find . -name '*.cabal'
./examples/WorkOnTest/WorkOnTest.cabal
./haskell-overlays/reflex-packages/dep/universe/universe-dependent-sum/universe-dependent-sum.cabal
./haskell-overlays/reflex-packages/dep/universe/universe/universe.cabal
./haskell-overlays/reflex-packages/dep/universe/deprecated/universe-instances-trans/universe-instances-trans.cabal
./haskell-overlays/reflex-packages/dep/universe/deprecated/universe-instances-base/universe-instances-base.cabal
./haskell-overlays/reflex-packages/dep/universe/universe-instances-extended/universe-instances-extended.cabal
./haskell-overlays/reflex-packages/dep/universe/universe-base/universe-base.cabal
./haskell-overlays/reflex-packages/dep/universe/universe-reverse-instances/universe-reverse-instances.cabal
./haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/dependent-sum-universe-orphans.cabal
./haskell-overlays/reflex-packages/dep/reflex/reflex.cabal
./haskell-overlays/reflex-packages/dep/cabal-macosx/examples/wxHello/wxHello.cabal
./haskell-overlays/reflex-packages/dep/cabal-macosx/examples/wxHello-cpp/wxHello.cabal
./haskell-overlays/reflex-packages/dep/cabal-macosx/examples/gtkHello/gtkHello.cabal
./haskell-overlays/reflex-packages/dep/cabal-macosx/cabal-macosx.cabal
./haskell-overlays/reflex-packages/dep/jsaddle-dom/jsaddle-dom.cabal
./haskell-overlays/reflex-packages/dep/reflex-dom/reflex-dom/reflex-dom.cabal
./haskell-overlays/reflex-packages/dep/reflex-dom/reflex-dom-core/reflex-dom-core.cabal
./haskell-overlays/reflex-packages/dep/reflex-dom/chrome-test-utils/chrome-test-utils.cabal
./haskell-overlays/reflex-packages/dep/reflex-dom/reflex-dom-test-selenium/reflex-dom-test-selenium.cabal
./haskell-overlays/reflex-packages/dep/ghcjs-dom/ghcjs-dom/ghcjs-dom.cabal
./haskell-overlays/reflex-packages/dep/ghcjs-dom/ghcjs-dom-jsffi/ghcjs-dom-jsffi.cabal
./haskell-overlays/reflex-packages/dep/ghcjs-dom/ghcjs-dom-jsaddle/ghcjs-dom-jsaddle.cabal
./haskell-overlays/reflex-packages/dep/dependent-monoidal-map/dependent-monoidal-map.cabal
./haskell-overlays/reflex-packages/dep/reflex-todomvc/reflex-todomvc.cabal
./haskell-overlays/reflex-packages/dep/gargoyle/gargoyle-postgresql-connect/gargoyle-postgresql-connect.cabal
./haskell-overlays/reflex-packages/dep/gargoyle/gargoyle-postgresql-nix/gargoyle-postgresql-nix.cabal
./haskell-overlays/reflex-packages/dep/gargoyle/gargoyle/gargoyle.cabal
./haskell-overlays/reflex-packages/dep/gargoyle/gargoyle-postgresql/gargoyle-postgresql.cabal
./haskell-overlays/reflex-packages/dep/reflex-aeson-orphans/reflex-aeson-orphans.cabal
./haskell-overlays/reflex-packages/dep/jsaddle/jsaddle-webkitgtk/jsaddle-webkitgtk.cabal
./haskell-overlays/reflex-packages/dep/jsaddle/jsaddle-warp/jsaddle-warp.cabal
./haskell-overlays/reflex-packages/dep/jsaddle/jsaddle-wkwebview/jsaddle-wkwebview.cabal
./haskell-overlays/reflex-packages/dep/jsaddle/jsaddle-clib/jsaddle-clib.cabal
./haskell-overlays/reflex-packages/dep/jsaddle/jsaddle-webkit2gtk/jsaddle-webkit2gtk.cabal
./haskell-overlays/reflex-packages/dep/jsaddle/jsaddle/jsaddle.cabal
./haskell-overlays/reflex-packages/dep/patch/patch.cabal
## THESE two they work if I run them from their root directories, but don't work if I run from root project directory
[nix-shell:~/projects/reflex-platform]$ haskell-language-server-wrapper -d haskell-overlays/reflex-packages/dep/universe/universe-base/src/Data/Universe/Class.hs
Found "/home/srghma/projects/reflex-platform/hie.yaml" for "/home/srghma/projects/reflex-platform/a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.3.0.0, Git revision e7c5e90b6df5dff2760d76169eddaea3bdd6a831 (dirty) x86_64 ghc-8.10.4
Current directory: /home/srghma/projects/reflex-platform
Operating system: linux
Arguments: ["-d","haskell-overlays/reflex-packages/dep/universe/universe-base/src/Data/Universe/Class.hs"]
Cradle directory: /home/srghma/projects/reflex-platform
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.0.0.0
stack: Not found
ghc: 8.6.5
Consulting the cradle to get project GHC version...
Project GHC version: 8.6.5
haskell-language-server exe candidates: ["haskell-language-server-8.6.5","haskell-language-server"]
Launching haskell-language-server exe at:/nix/store/jvdjp996s728fkdrrq4wg6lk58k8h6fd-haskell-language-server-1.3.0/bin/haskell-language-server-8.6.5
haskell-language-server version: 1.3.0.0 (GHC: 8.6.5) (PATH: /nix/store/4wkv3mi2hidvbgvmibvjgyzp5nbnqzw6-haskell-language-server-1.3.0-installer/bin/haskell-language-server-8.6.5) (GIT hash: e7c5e90b6df5dff2760d76169eddaea3bdd6a831)
ghcide setup tester in /home/srghma/projects/reflex-platform.
Report bugs at https://github.com/haskell/haskell-language-server/issues
Step 1/4: Finding files to test in /home/srghma/projects/reflex-platform
Found 1 files
Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
(/home/srghma/projects/reflex-platform/hie.yaml)
Step 3/4: Initializing the IDE
2021-08-24 13:38:50.234637173 [ThreadId 7] DEBUG hls: Initializing exports map from hiedb
Step 4/4: Type checking the files
2021-08-24 13:38:50.254843989 [ThreadId 41] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/universe/universe-base/src/Data/Universe/Class.hs"
2021-08-24 13:38:50.25615878 [ThreadId 44] INFO hls: Consulting the cradle for "haskell-overlays/reflex-packages/dep/universe/universe-base/src/Data/Universe/Class.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/srghma/projects/reflex-platform", cradleOptsProg = CradleAction: Cabal}
2021-08-24 13:38:50.257373905 [ThreadId 44] DEBUG hls: Session loading result: Left [CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Multi Cradle: No prefixes matched","pwd: /home/srghma/projects/reflex-platform","filepath: /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/universe/universe-base/src/Data/Universe/Class.hs","prefixes:","(\"deprecated/universe-instances-base/src\",Cabal {component = Just \"lib:universe-instances-base\"})","(\"deprecated/universe-instances-trans/src\",Cabal {component = Just \"lib:universe-instances-trans\"})","(\"universe/src\",Cabal {component = Just \"lib:universe\"})","(\"universe-base/src\",Cabal {component = Just \"lib:universe-base\"})","(\"universe-base/tests\",Cabal {component = Just \"universe-base:test:tests\"})","(\"universe-dependent-sum/src\",Cabal {component = Just \"lib:universe-dependent-sum\"})","(\"universe-dependent-sum/test\",Cabal {component = Just \"universe-dependent-sum:test:th-test\"})","(\"universe-instances-extended/src\",Cabal {component = Just \"lib:universe-instances-extended\"})","(\"universe-reverse-instances/src\",Cabal {component = Just \"lib:universe-reverse-instances\"})"]}]
2021-08-24 13:38:50.258734686 [ThreadId 55] INFO hls: File:
/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/universe/universe-base/src/Data/Universe/Class.hs
Hidden: no
Range: 1:1-2:1
Source: cradle
Severity: DsError
Message:
Multi Cradle: No prefixes matched
pwd: /home/srghma/projects/reflex-platform
filepath:
/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/universe/universe-base/src/Data/Universe/Class.hs
prefixes:
("deprecated/universe-instances-base/src",Cabal {component = Just "lib:universe-instances-base"})
("deprecated/universe-instances-trans/src",Cabal {component = Just
"lib:universe-instances-trans"})
("universe/src",Cabal {component = Just "lib:universe"})
("universe-base/src",Cabal {component = Just "lib:universe-base"})
("universe-base/tests",Cabal {component = Just "universe-base:test:tests"})
("universe-dependent-sum/src",Cabal {component = Just "lib:universe-dependent-sum"})
("universe-dependent-sum/test",Cabal {component = Just "universe-dependent-sum:test:th-test"})
("universe-instances-extended/src",Cabal {component = Just "lib:universe-instances-extended"})
("universe-reverse-instances/src",Cabal {component = Just "lib:universe-reverse-instances"})
2021-08-24 13:38:50.259750018 [ThreadId 61] INFO hls: finish: User TypeCheck (took 0.01s)
Files that failed:
* /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/universe/universe-base/src/Data/Universe/Class.hs
Completed (0 files worked, 1 file failed)
haskell-language-server-8.6.5: SQLite3 returned ErrorBusy while attempting to perform close: unable to close due to unfinalized statements or unfinished backups
2021-08-24 13:38:50.259987862 [ThreadId 63] INFO hls: finish: GetHie (took 0.00s)
haskell-language-server-wrapper: callProcess: /nix/store/jvdjp996s728fkdrrq4wg6lk58k8h6fd-haskell-language-server-1.3.0/bin/haskell-language-server-8.6.5 "-d" "haskell-overlays/reflex-packages/dep/universe/universe-base/src/Data/Universe/Class.hs" (exit 1): failed
[nix-shell:~/projects/reflex-platform]$ haskell-language-server-wrapper -d haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
Found "/home/srghma/projects/reflex-platform/hie.yaml" for "/home/srghma/projects/reflex-platform/a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.3.0.0, Git revision e7c5e90b6df5dff2760d76169eddaea3bdd6a831 (dirty) x86_64 ghc-8.10.4
Current directory: /home/srghma/projects/reflex-platform
Operating system: linux
Arguments: ["-d","haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs"]
Cradle directory: /home/srghma/projects/reflex-platform
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.0.0.0
stack: Not found
ghc: 8.6.5
Consulting the cradle to get project GHC version...
Project GHC version: 8.6.5
haskell-language-server exe candidates: ["haskell-language-server-8.6.5","haskell-language-server"]
Launching haskell-language-server exe at:/nix/store/jvdjp996s728fkdrrq4wg6lk58k8h6fd-haskell-language-server-1.3.0/bin/haskell-language-server-8.6.5
haskell-language-server version: 1.3.0.0 (GHC: 8.6.5) (PATH: /nix/store/4wkv3mi2hidvbgvmibvjgyzp5nbnqzw6-haskell-language-server-1.3.0-installer/bin/haskell-language-server-8.6.5) (GIT hash: e7c5e90b6df5dff2760d76169eddaea3bdd6a831)
ghcide setup tester in /home/srghma/projects/reflex-platform.
Report bugs at https://github.com/haskell/haskell-language-server/issues
Step 1/4: Finding files to test in /home/srghma/projects/reflex-platform
Found 1 files
Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
(/home/srghma/projects/reflex-platform/hie.yaml)
Step 3/4: Initializing the IDE
2021-08-24 13:37:57.424360858 [ThreadId 7] DEBUG hls: Initializing exports map from hiedb
Step 4/4: Type checking the files
2021-08-24 13:37:57.427145395 [ThreadId 36] INFO hls: Consulting the cradle for "haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/srghma/projects/reflex-platform", cradleOptsProg = CradleAction: Cabal}
2021-08-24 13:37:57.428104958 [ThreadId 36] DEBUG hls: Session loading result: Left [CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Multi Cradle: No prefixes matched","pwd: /home/srghma/projects/reflex-platform","filepath: /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs","prefixes:","(\"./src\",Cabal {component = Just \"lib:dependent-sum-universe-orphans\"})"]}]
2021-08-24 13:37:57.428707414 [ThreadId 44] INFO hls: File:
/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
Hidden: no
Range: 1:1-2:1
Source: cradle
Severity: DsError
Message:
Multi Cradle: No prefixes matched
pwd: /home/srghma/projects/reflex-platform
filepath:
/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
prefixes:
("./src",Cabal {component = Just "lib:dependent-sum-universe-orphans"})
2021-08-24 13:37:57.429240951 [ThreadId 48] INFO hls: finish: User TypeCheck (took 0.00s)
2021-08-24 13:37:57.429528327 [ThreadId 52] INFO hls: finish: GetHie (took 0.00s)
Files that failed:
* /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
Completed (0 files worked, 1 file failed)
2021-08-24 13:37:57.430021287 [ThreadId 58] INFO hls: finish: GenerateCore (took 0.00s)
haskell-language-server-8.6.5: SQLite3 returned ErrorBusy while attempting to perform close: unable to close due to unfinalized statements or unfinished backups
haskell-language-server-wrapper: callProcess: /nix/store/jvdjp996s728fkdrrq4wg6lk58k8h6fd-haskell-language-server-1.3.0/bin/haskell-language-server-8.6.5 "-d" "haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs" (exit 1): failed |
@fendor so, I have added diff --git a/src/HIE/Bios/Cradle.hs b/src/HIE/Bios/Cradle.hs
index 5d9779b..2afbb60 100644
--- a/src/HIE/Bios/Cradle.hs
+++ b/src/HIE/Bios/Cradle.hs
@@ -61,6 +61,7 @@ import qualified Data.Text as T
import qualified Data.HashMap.Strict as Map
import Data.Maybe (fromMaybe, maybeToList)
import GHC.Fingerprint (fingerprintString)
+import Debug.Trace
hie_bios_output :: String
hie_bios_output = "HIE_BIOS_OUTPUT"
@@ -332,19 +333,39 @@ multiAction buildCustomCradle cur_dir cs l cur_fp =
-- also order the paths by most specific first. In the cradle selection
-- function we want to choose the most specific cradle possible.
canonicalizeCradles :: IO [(FilePath, CradleConfig b)]
- canonicalizeCradles =
- sortOn (Down . fst)
+ canonicalizeCradles = do
+ x <- sortOn (Down . fst)
<$> mapM (\(p, c) -> (,c) <$> (makeAbsolute (cur_dir </> p))) cs
+ traceM $ "canonicalizeCradles: " <> show x
+ return x
selectCradle [] =
return (CradleFail (CradleError [] ExitSuccess err_msg))
- selectCradle ((p, c): css) =
- if p `isPrefixOf` cur_fp
- then runCradle
- (cradleOptsProg (getCradle buildCustomCradle (c, cur_dir)))
- l
- cur_fp
- else selectCradle css
+ selectCradle x =
+ let
+ ((p, c): css) = trace ("in selectCradle: " <> show x) x
+ in if p `isPrefixOf` cur_fp
+ then do
+ traceM ("in true: " <>
+ "\n- (c, cur_dir) " <> show (c, cur_dir) <>
+ -- "\n- (getCradle buildCustomCradle (c, cur_dir))" <> show (getCradle buildCustomCradle (c, cur_dir)) <>
+ -- "\n- (cradleOptsProg (getCradle buildCustomCradle (c, cur_dir)))" <> show (cradleOptsProg (getCradle buildCustomCradle (c, cur_dir))) <>
+ -- "\n- l" <> show l <>
+ "\n- cur_fp " <> show cur_fp)
+ -- "\n- x" <> show x)
+
+ x <- runCradle
+ (cradleOptsProg (getCradle buildCustomCradle (c, cur_dir)))
+ l
+ cur_fp
+ traceM ("in true - x " <> show x)
+ return x
+
+ else do
+ traceM ("in false")
+ x <- selectCradle css
+ traceM ("in false - selectCradle css " <> show x)
+ return x
------------------------------------------------------------------------- and compiled and tried [nix-shell:~/projects/reflex-platform]$ /home/srghma/projects/hie-bios/dist-newstyle/build/x86_64-linux/ghc-8.10.6/hie-bios-0.8.0/x/hie-bios/build/hie-bios/hie-bios debug haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs canonicalizeCradles: [("/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/universe",CradleConfig {cradleDependencies = [], cradleType = CabalMulti {defaultCabal = Cabal {component = Nothing}, subCabalComponents = [("deprecated/universe-instances-base/src",Cabal {component = Just "lib:universe-instances-base"}),("deprecated/universe-instances-trans/src",Cabal {component = Just "lib:universe-instances-trans"}),("universe/src",Cabal {component = Just "lib:universe"}),("universe-base/src",Cabal {component = Just "lib:universe-base"}),("universe-base/tests",Cabal {component = Just "universe-base:test:tests"}),("universe-dependent-sum/src",Cabal {component = Just "lib:universe-dependent-sum"}),("universe-dependent-sum/test",Cabal {component = Just "universe-dependent-sum:test:th-test"}),("universe-instances-extended/src",Cabal {component = Just "lib:universe-instances-extended"}),("universe-reverse-instances/src",Cabal {component = Just "lib:universe-reverse-instances"})]}}),("/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans",CradleConfig {cradleDependencies = [], cradleType = CabalMulti {defaultCabal = Cabal {component = Nothing}, subCabalComponents = [("./src",Cabal {component = Just "lib:dependent-sum-universe-orphans"})]}})]
in selectCradle: [("/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/universe",CradleConfig {cradleDependencies = [], cradleType = CabalMulti {defaultCabal = Cabal {component = Nothing}, subCabalComponents = [("deprecated/universe-instances-base/src",Cabal {component = Just "lib:universe-instances-base"}),("deprecated/universe-instances-trans/src",Cabal {component = Just "lib:universe-instances-trans"}),("universe/src",Cabal {component = Just "lib:universe"}),("universe-base/src",Cabal {component = Just "lib:universe-base"}),("universe-base/tests",Cabal {component = Just "universe-base:test:tests"}),("universe-dependent-sum/src",Cabal {component = Just "lib:universe-dependent-sum"}),("universe-dependent-sum/test",Cabal {component = Just "universe-dependent-sum:test:th-test"}),("universe-instances-extended/src",Cabal {component = Just "lib:universe-instances-extended"}),("universe-reverse-instances/src",Cabal {component = Just "lib:universe-reverse-instances"})]}}),("/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans",CradleConfig {cradleDependencies = [], cradleType = CabalMulti {defaultCabal = Cabal {component = Nothing}, subCabalComponents = [("./src",Cabal {component = Just "lib:dependent-sum-universe-orphans"})]}})]
in false
in selectCradle: [("/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans",CradleConfig {cradleDependencies = [], cradleType = CabalMulti {defaultCabal = Cabal {component = Nothing}, subCabalComponents = [("./src",Cabal {component = Just "lib:dependent-sum-universe-orphans"})]}})]
in true:
- (c, cur_dir) (CradleConfig {cradleDependencies = [], cradleType = CabalMulti {defaultCabal = Cabal {component = Nothing}, subCabalComponents = [("./src",Cabal {component = Just "lib:dependent-sum-universe-orphans"})]}},"/home/srghma/projects/reflex-platform")
- cur_fp "/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs"
canonicalizeCradles: [("/home/srghma/projects/reflex-platform/src",CradleConfig {cradleDependencies = [], cradleType = Cabal {component = Just "lib:dependent-sum-universe-orphans"}})]
in selectCradle: [("/home/srghma/projects/reflex-platform/src",CradleConfig {cradleDependencies = [], cradleType = Cabal {component = Just "lib:dependent-sum-universe-orphans"}})]
in false
in false - selectCradle css CradleFail (CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Multi Cradle: No prefixes matched","pwd: /home/srghma/projects/reflex-platform","filepath: /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs","prefixes:","(\"./src\",Cabal {component = Just \"lib:dependent-sum-universe-orphans\"})"]})
in true - x CradleFail (CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Multi Cradle: No prefixes matched","pwd: /home/srghma/projects/reflex-platform","filepath: /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs","prefixes:","(\"./src\",Cabal {component = Just \"lib:dependent-sum-universe-orphans\"})"]})
in false - selectCradle css CradleFail (CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Multi Cradle: No prefixes matched","pwd: /home/srghma/projects/reflex-platform","filepath: /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs","prefixes:","(\"./src\",Cabal {component = Just \"lib:dependent-sum-universe-orphans\"})"]})
Cradle failed to load
Deps: []
Exit Code: ExitSuccess
Stderr: Multi Cradle: No prefixes matched
pwd: /home/srghma/projects/reflex-platform
filepath: /home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
prefixes:
("./src",Cabal {component = Just "lib:dependent-sum-universe-orphans"})
[nix-shell:~/projects/reflex-platform]$ pretty-simple
[("/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/universe",CradleConfig {cradleDependencies = [], cradleType = CabalMulti {defaultCabal = Cabal {component = Nothing}, subCabalComponents = [("deprecated/universe-instances-base/src",Cabal {component = Just "lib:universe-instances-base"}),("deprecated/universe-instances-trans/src",Cabal {component = Just "lib:universe-instances-trans"}),("universe/src",Cabal {component = Just "lib:universe"}),("universe-base/src",Cabal {component = Just "lib:universe-base"}),("universe-base/tests",Cabal {component = Just "universe-base:test:tests"}),("universe-dependent-sum/src",Cabal {component = Just "lib:universe-dependent-sum"}),("universe-dependent-sum/test",Cabal {component = Just "universe-dependent-sum:test:th-test"}),("universe-instances-extended/src",Cabal {component = Just "lib:universe-instances-extended"}),("universe-reverse-instances/src",Cabal {component = Just "lib:universe-reverse-instances"})]}}),("/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans",CradleConfig {cradleDependencies = [], cradleType = CabalMulti {defaultCabal = Cabal {component = Nothing}, subCabalComponents = [("./src",Cabal {component = Just "lib:dependent-sum-universe-orphans"})]}})]
[
( "/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/universe"
, CradleConfig
{ cradleDependencies = []
, cradleType = CabalMulti
{ defaultCabal = Cabal { component = Nothing }
, subCabalComponents =
[
( "deprecated/universe-instances-base/src"
, Cabal
{ component = Just "lib:universe-instances-base" }
)
,
( "deprecated/universe-instances-trans/src"
, Cabal
{ component = Just "lib:universe-instances-trans" }
)
,
( "universe/src"
, Cabal
{ component = Just "lib:universe" }
)
,
( "universe-base/src"
, Cabal
{ component = Just "lib:universe-base" }
)
,
( "universe-base/tests"
, Cabal
{ component = Just "universe-base:test:tests" }
)
,
( "universe-dependent-sum/src"
, Cabal
{ component = Just "lib:universe-dependent-sum" }
)
,
( "universe-dependent-sum/test"
, Cabal
{ component = Just "universe-dependent-sum:test:th-test" }
)
,
( "universe-instances-extended/src"
, Cabal
{ component = Just "lib:universe-instances-extended" }
)
,
( "universe-reverse-instances/src"
, Cabal
{ component = Just "lib:universe-reverse-instances" }
)
]
}
}
)
,
( "/home/srghma/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans"
, CradleConfig
{ cradleDependencies = []
, cradleType = CabalMulti
{ defaultCabal = Cabal { component = Nothing }
, subCabalComponents =
[
( "./src"
, Cabal
{ component = Just "lib:dependent-sum-universe-orphans" }
)
]
}
}
)
] so, I think the answer is why in line in selectCradle: [("/home/srghma/projects/reflex-platform/src",CradleConfig {cradleDependencies = [], cradleType = Cabal {component = Just "lib:dependent-sum-universe-orphans"}})] it contains |
And you think the line is wrong? What else should it be? We try to avoid relative paths, the right amount of canonicalization could help. |
copy of reflex-frp/reflex-platform#219 (comment)
Trying to setup haskell-language-server but getting
Multi Cradle: No prefixes matched
How to reproduce
hack-on
will remove the nix-thunk files in dir and clone project instead to that dirpatch
hie.yaml
hie.yaml
./try-reflex
haskell-language-server-wrapper -d haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
Could someone help
The text was updated successfully, but these errors were encountered: