Skip to content
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

Open
srghma opened this issue Aug 23, 2021 · 13 comments

Comments

@srghma
Copy link

srghma commented Aug 23, 2021

copy of reflex-frp/reflex-platform#219 (comment)

Trying to setup haskell-language-server but getting Multi Cradle: No prefixes matched

How to reproduce

  1. on current master
  2. hack-on will remove the nix-thunk files in dir and clone project instead to that dir
./scripts/hack-on haskell-overlays/reflex-packages/dep/universe
./scripts/hack-on haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans
./scripts/hack-on haskell-overlays/reflex-packages/dep/reflex
./scripts/hack-on haskell-overlays/reflex-packages/dep/cabal-macosx
./scripts/hack-on haskell-overlays/reflex-packages/dep/jsaddle-dom
./scripts/hack-on haskell-overlays/reflex-packages/dep/reflex-dom
./scripts/hack-on haskell-overlays/reflex-packages/dep/ghcjs-dom
./scripts/hack-on haskell-overlays/reflex-packages/dep/dependent-monoidal-map
./scripts/hack-on haskell-overlays/reflex-packages/dep/reflex-todomvc
./scripts/hack-on haskell-overlays/reflex-packages/dep/gargoyle
./scripts/hack-on haskell-overlays/reflex-packages/dep/reflex-aeson-orphans
./scripts/hack-on haskell-overlays/reflex-packages/dep/jsaddle
./scripts/hack-on haskell-overlays/reflex-packages/dep/patch
  1. apply patch
patch
diff --git a/default.nix b/default.nix
index 7855347..fe7af2b 100644
--- a/default.nix
+++ b/default.nix
@@ -14,7 +14,7 @@
 , haskellOverlaysPre ? []
 , haskellOverlaysPost ? haskellOverlays
 , hideDeprecated ? false # The moral equivalent of "-Wcompat -Werror" for using reflex-platform.
+, hlsSupport ? true
 }:
 let iosSupport = system == "x86_64-darwin";
     androidSupport = lib.elem system [ "x86_64-linux" ];
@@ -415,9 +415,25 @@ in let this = rec {
       closurecompiler
       ;
   } // lib.optionalAttrs hlsSupport {
+    haskell-language-server = (
+      let
+        inherit (nixpkgs) callPackage fetchFromGitHub mkShell;
+        easy-hls-src = fetchFromGitHub {
+          owner  = "jkachmar";
+          repo   = "easy-hls-nix";
+          rev    = "6cb50f04e3a61b1ec258c6849df84dae9dfd763f";
+          sha256 = "1rvi6067nw64dka8kksl7f34pwkq7wx7pnhnz3y261fw9z5j4ndp";
+        };
+        easy-hls = callPackage easy-hls-src {
+          ghcVersions = [ "8.6.5" ];
+        };
+      in
+        easy-hls
+    );
+
+    # haskell-language-server = nixpkgs.haskell.lib.justStaticExecutables (nativeHaskellPackages.override {
+    #   overrides = nixpkgs.haskell.overlays.haskell-language-server;
+    # }).haskell-language-server;
   };

   workOn = haskellPackages: package: (overrideCabal package (drv: {
  1. add hie.yaml
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: { none: } }
    # # - path: "./haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans"
    # #   config: { cradle: { none: } }
    # - path: "./haskell-overlays/reflex-packages/dep/gargoyle"
    #   config: { cradle: { none: } }
    # - path: "./haskell-overlays/reflex-packages/dep/ghcjs-dom"
    #   config: { cradle: { none: } }
    # - path: "./haskell-overlays/reflex-packages/dep/jsaddle"
    #   config: { cradle: { none: } }
    # - path: "./haskell-overlays/reflex-packages/dep/jsaddle-dom"
    #   config: { cradle: { none: } }
    # - path: "./haskell-overlays/reflex-packages/dep/reflex"
    #   config: { cradle: { none: } }
    # - path: "./haskell-overlays/reflex-packages/dep/reflex-aeson-orphans"
    #   config: { cradle: { none: } }
    # - path: "./haskell-overlays/reflex-packages/dep/reflex-dom"
    #   config: { cradle: { none: } }
    # - path: "./haskell-overlays/reflex-packages/dep/reflex-todomvc"
    #   config: { cradle: { none: } }
    # - path: "./haskell-overlays/reflex-packages/dep/universe"
    #   config: { cradle: { none: } }

    # - 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"
  1. ./try-reflex
  2. run this command and here are my logs and error
  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"})

haskell-language-server-wrapper -d haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/src/Data/Some/Universe/Orphans.hs
[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-22 19:35:16.250580398 [ThreadId 7] DEBUG hls:   Initializing exports map from hiedb

Step 4/4: Type checking the files
2021-08-22 19:35:16.263433672 [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-22 19:35:16.264087682 [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-22 19:35:16.264741176 [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-22 19:35:16.265245342 [ThreadId 48] INFO hls:   finish: User TypeCheck (took 0.00s)
2021-08-22 19:35:16.265474624 [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-22 19:35:16.265886125 [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

Could someone help

@srghma
Copy link
Author

srghma commented Aug 23, 2021

additional info

[nix-shell:~/projects/reflex-platform]$ ghc --print-libdir
/nix/store/yag4f6kjzr47qj79nfaz1883y1ivm7ip-ghc-8.6.5-with-packages/lib/ghc-8.6.5

[nix-shell:~/projects/reflex-platform]$ ghc -v
Glasgow Haskell Compiler, Version 8.6.5, stage 2 booted by GHC version 8.2.2
Using binary package database: /nix/store/yag4f6kjzr47qj79nfaz1883y1ivm7ip-ghc-8.6.5-with-packages/lib/ghc-8.6.5/package.conf.d/package.cache
package flags []
loading package database /nix/store/yag4f6kjzr47qj79nfaz1883y1ivm7ip-ghc-8.6.5-with-packages/lib/ghc-8.6.5/package.conf.d
wired-in package ghc-prim mapped to ghc-prim-0.5.3
wired-in package integer-gmp mapped to integer-gmp-1.0.2.0
wired-in package base mapped to base-4.12.0.0
wired-in package rts mapped to rts
wired-in package template-haskell mapped to template-haskell-2.14.0.0
wired-in package ghc mapped to ghc-8.6.5
*** Deleting temp files:
Deleting:
*** Deleting temp dirs:
Deleting:
ghc: no input files
Usage: For basic information, try the `--help' option.
 ~/projects/reflex-platform   develop ✚  ls -al /nix/store/yag4f6kjzr47qj79nfaz1883y1ivm7ip-ghc-8.6.5-with-packages/lib/ghc-8.6.5/package.conf.d/ | grep ref
lex
lrwxrwxrwx  3 root root     130 Jan  1  1970 reflex-0.8.1.0-1yrtzZvbQTr68uZDEKgV01.conf -> /nix/store/5v7bi7ajbsy247dhdq6y2pprrhjiz2kj-reflex-0.8.1.0/lib/ghc-8.6.5/package.conf.d/reflex-0.8.1.0-1yrtzZvbQTr68uZDEKgV01.conf
lrwxrwxrwx  2 root root     138 Jan  1  1970 reflex-dom-0.6.1.0-7Jr2Lc8FPMgIwB2ohy868l.conf -> /nix/store/nnnvcdrlq7xdq8vr81rlxjpdm4i2cq75-reflex-dom-0.6.1.0/lib/ghc-8.6.5/package.conf.d/reflex-dom-0.6.1.0-7Jr2Lc8FPMgIwB2ohy868l.conf
lrwxrwxrwx  2 root root     148 Jan  1  1970 reflex-dom-core-0.6.2.0-LcJIOP0jnI95MrNWAkuuSF.conf -> /nix/store/d09rs3xg9rqrc1zbfqdz0dj3q6xzzlc2-reflex-dom-core-0.6.2.0/lib/ghc-8.6.5/package.conf.d/reflex-dom-core-0.6.2.0-LcJIOP0jnI95MrNWAkuuSF.conf
lrwxrwxrwx  2 root root     148 Jan  1  1970 reflex-fsnotify-0.2.1.2-1at5mlrVDLlLVX8EByINPz.conf -> /nix/store/ha2yxlnrv6j7zpqkrn73k4a6hfkzz7ak-reflex-fsnotify-0.2.1.2/lib/ghc-8.6.5/package.conf.d/reflex-fsnotify-0.2.1.2-1at5mlrVDLlLVX8EByINPz.conf
lrwxrwxrwx  2 root root     140 Jan  1  1970 reflex-ghci-0.1.5.1-EmTt6V7G9KtKI8KVjJ0TtU.conf -> /nix/store/gb6vkl497ix1fskg1wc2bixkz4s54dpb-reflex-ghci-0.1.5.1/lib/ghc-8.6.5/package.conf.d/reflex-ghci-0.1.5.1-EmTt6V7G9KtKI8KVjJ0TtU.conf
lrwxrwxrwx  2 root root     146 Jan  1  1970 reflex-process-0.3.1.0-Lj5eUFL13mnIDQbOkChJ4y.conf -> /nix/store/4s0i33p48n04nv0xl4p81709cbhkvdv7-reflex-process-0.3.1.0/lib/ghc-8.6.5/package.conf.d/reflex-process-0.3.1.0-Lj5eUFL13mnIDQbOkChJ4y.conf
lrwxrwxrwx  2 root root     138 Jan  1  1970 reflex-vty-0.1.4.1-DwqVqRmENy6CvQIqEnAZst.conf -> /nix/store/jrljs1r6gnxpsf10zgk697ig838i52v5-reflex-vty-0.1.4.1/lib/ghc-8.6.5/package.conf.d/reflex-vty-0.1.4.1-DwqVqRmENy6CvQIqEnAZst.conf

 ✘  ~/projects/reflex-platform   develop ✚  cat /nix/store/yag4f6kjzr47qj79nfaz1883y1ivm7ip-ghc-8.6.5-with-packages/lib/ghc-8.6.5/package.conf.d/reflex-dom-core-0.6.2.0-LcJIOP0jnI95MrNWAkuuSF.conf
name: reflex-dom-core
version: 0.6.2.0
id: reflex-dom-core-0.6.2.0-LcJIOP0jnI95MrNWAkuuSF
key: reflex-dom-core-0.6.2.0-LcJIOP0jnI95MrNWAkuuSF
license: BSD-3-Clause
maintainer: [email protected]
author: Ryan Trinkle
stability: Experimental
synopsis: Functional Reactive Web Apps with Reflex
description:
    Web applications without callbacks or side-effects.
    Reflex-DOM brings the power of functional reactive programming (FRP) to the web.
    Build HTML and other Document Object Model (DOM) data with a pure functional interface.
    .
    Reflex-DOM is a Functional Reactive web framework based on the Reflex FRP engine: <https://reflex-frp.org/>.
    .
    The @reflex-dom@ package is a small wrapper around the @reflex-dom-core@ package. It pulls in the
    correct set of dependencies for each target platform (GHCJS, WebKitGTK, WASM, mobile, etc.).
    Libraries should depend on @reflex-dom-core@ and executables will usually depend on @reflex-dom@.
    All of @reflex-dom-core@'s modules are re-exported by @reflex-dom@.
category: FRP, Web, GUI, HTML, Javascript, Reactive, Reactivity, User Interfaces, User-interface
abi: 94f36eb40288363f7512029a27df778e
exposed: True
exposed-modules:
    Foreign.JavaScript.Orphans Foreign.JavaScript.TH
    Foreign.JavaScript.Utils Reflex.Dom.Builder.Class
    Reflex.Dom.Builder.Class.Events Reflex.Dom.Builder.Hydratable
    Reflex.Dom.Builder.Immediate Reflex.Dom.Builder.InputDisabled
    Reflex.Dom.Builder.Static Reflex.Dom.Class Reflex.Dom.Core
    Reflex.Dom.Location Reflex.Dom.Main Reflex.Dom.Modals.Class
    Reflex.Dom.Old Reflex.Dom.Prerender Reflex.Dom.Time
    Reflex.Dom.WebSocket Reflex.Dom.WebSocket.Query Reflex.Dom.Widget
    Reflex.Dom.Widget.Basic Reflex.Dom.Widget.Input
    Reflex.Dom.Widget.Lazy Reflex.Dom.Widget.Resize Reflex.Dom.Xhr
    Reflex.Dom.Xhr.FormData
hidden-modules: Foreign.JavaScript.Internal.Utils
                Reflex.Dom.WebSocket.Foreign Reflex.Dom.Xhr.Foreign
                Reflex.Dom.Xhr.ResponseType Reflex.Dom.Xhr.Exception
                Reflex.Dom.Builder.Class.TH
import-dirs: /nix/store/d09rs3xg9rqrc1zbfqdz0dj3q6xzzlc2-reflex-dom-core-0.6.2.0/lib/ghc-8.6.5/x86_64-linux-ghc-8.6.5/reflex-dom-core-0.6.2.0-LcJIOP0jnI95MrNWAkuuSF
library-dirs: /nix/store/d09rs3xg9rqrc1zbfqdz0dj3q6xzzlc2-reflex-dom-core-0.6.2.0/lib/ghc-8.6.5/x86_64-linux-ghc-8.6.5/reflex-dom-core-0.6.2.0-LcJIOP0jnI95MrNWAkuuSF
              /nix/store/zp8v7wkbplvmzyds87icn1rk070hizdc-ncurses-6.1-20190112/lib
              /nix/store/mhjrx55n5i06m3rhpdr2p1kz24zrsapz-libffi-3.3/lib
              /nix/store/av3zmkb577zk4ds4xhzixdhvdvh726r7-gmp-6.1.2/lib
              /nix/store/y33kvm7k68fz7ny67d9srpp0wk0pl0wq-iproute2-5.2.0/lib
dynamic-library-dirs: /nix/store/d09rs3xg9rqrc1zbfqdz0dj3q6xzzlc2-reflex-dom-core-0.6.2.0/lib/ghc-8.6.5/x86_64-linux-ghc-8.6.5
                      /nix/store/zp8v7wkbplvmzyds87icn1rk070hizdc-ncurses-6.1-20190112/lib
                      /nix/store/mhjrx55n5i06m3rhpdr2p1kz24zrsapz-libffi-3.3/lib
                      /nix/store/av3zmkb577zk4ds4xhzixdhvdvh726r7-gmp-6.1.2/lib
                      /nix/store/y33kvm7k68fz7ny67d9srpp0wk0pl0wq-iproute2-5.2.0/lib
data-dir: /nix/store/d09rs3xg9rqrc1zbfqdz0dj3q6xzzlc2-reflex-dom-core-0.6.2.0/share/x86_64-linux-ghc-8.6.5/reflex-dom-core-0.6.2.0
hs-libraries: HSreflex-dom-core-0.6.2.0-LcJIOP0jnI95MrNWAkuuSF
include-dirs: /nix/store/yvmvh3vhv0la79f71izb23wx459j0kdd-iproute2-5.2.0-dev/include
depends:
    aeson-1.4.4.0-6fXoZ2qaEUVDCYBpShqWhf base-4.12.0.0
    bifunctors-5.5.5-Fj71rpqr8HI2JbTZMk1slE
    bimap-0.3.3-LW7jeWEzu7r6VDJ6DG2AZE
    blaze-builder-0.4.1.0-U4wG4l89TTCemrNDClQyp bytestring-0.10.8.2
    case-insensitive-1.2.0.11-HXT6IfJ18aVAUul5CioKG4
    constraints-0.10.1-7C0OhcwtaPeGTKK8MwqDp0 containers-0.6.0.1
    contravariant-1.5.2-4tubmgOpLIj5IwIaRQgygE
    data-default-0.7.1.1-COovZVyOTYqEavTGLlfqy8
    dependent-map-0.4.0.0-JITB2MCCI2BJ8n3sIkcjRq
    dependent-sum-0.7.1.0-Fz1nR6MjmO24RKKh0u7OSA
    dependent-sum-template-0.1.0.3-CEcTWEbRz61Fbz5tdW8Lv2
    directory-1.3.3.0
    exception-transformers-0.4.0.7-4gfo8VIt5rEAlskMNAD0rV
    ghcjs-dom-0.9.4.0-KjSJWw4WMo8IeraXEnaHy3
    jsaddle-0.9.7.1-F4jTewLJ7CR76sZtqhnW2c
    keycode-0.2.2-9BF4qHFngj8Gq2cl4dZseT
    lens-4.17.1-H6wZkUUks109osGIy1GNSc
    monad-control-1.0.2.3-EStYa3xF4a7JPLLERBQkm7 mtl-2.2.2
    network-uri-2.6.1.0-I4o09kEQdaBLFxpgymuYS5
    primitive-0.6.4.0-ILgywxtLpvnAOlEISPpP5b
    random-1.1-3ypV4EIycgb35PKjTYYr5q
    ref-tf-0.4.0.1-6otS07lPtcm2p5TIx8ks0R
    reflex-0.8.1.0-1yrtzZvbQTr68uZDEKgV01
    semialign-1.1-C6mHe2SEEp67LK3odSTrnX
    semigroups-0.18.5-6T2lH5F6zyQIdwR3JYKMO3 stm-2.5.0.0
    template-haskell-2.14.0.0 text-1.2.3.1
    these-1.0.1-5Z8xMDSNB5ALQsJuC261oW transformers-0.5.6.2
    unix-2.7.2.2 zenc-0.1.1-B34kyYr0chx3e7ITeBPC1P
haddock-interfaces: /nix/store/4n6dnr8xb8qrdzbbk72vx19dnl9k43zw-reflex-dom-core-0.6.2.0-doc/share/doc/reflex-dom-core-0.6.2.0/html/reflex-dom-core.haddock
haddock-html: /nix/store/4n6dnr8xb8qrdzbbk72vx19dnl9k43zw-reflex-dom-core-0.6.2.0-doc/share/doc/reflex-dom-core-0.6.2.0/html

but I want haskell-language-server to use: IF dependency exists in haskell-overlays/reflex-packages/dep/ THEN use it, compile it from source ELSE for all other dependencies - use from ghc --print-libdir

 ~/projects/reflex-platform   develop ✚  ls -al haskell-overlays/reflex-packages/dep/
total 60
drwxr-xr-x 15 srghma users 4096 Aug 21 14:56 .
drwxr-xr-x  3 srghma users 4096 Aug 21 14:54 ..
drwxr-xr-x  6 srghma users 4096 Aug 21 14:55 cabal-macosx
drwxr-xr-x  5 srghma users 4096 Aug 21 14:56 dependent-monoidal-map
drwxr-xr-x  4 srghma users 4096 Aug 21 14:54 dependent-sum-universe-orphans
drwxr-xr-x  9 srghma users 4096 Aug 21 14:56 gargoyle
drwxr-xr-x  8 srghma users 4096 Aug 21 14:56 ghcjs-dom
drwxr-xr-x 11 srghma users 4096 Aug 21 14:56 jsaddle
drwxr-xr-x  7 srghma users 4096 Aug 21 14:55 jsaddle-dom
drwxr-xr-x  8 srghma users 4096 Aug 21 14:56 patch
drwxr-xr-x  9 srghma users 4096 Aug 21 14:55 reflex
drwxr-xr-x  4 srghma users 4096 Aug 21 14:56 reflex-aeson-orphans
drwxr-xr-x 10 srghma users 4096 Aug 21 14:55 reflex-dom
drwxr-xr-x  9 srghma users 4096 Aug 21 14:56 reflex-todomvc
drwxr-xr-x  9 srghma users 4096 Aug 21 14:54 universe
 ~/projects/reflex-platform   develop ✚  ls -al haskell-overlays/reflex-packages/dep/reflex/
bench/            cabal.haskell-ci  ChangeLog.md      dep/              Quickref.md       reflex.cabal      Setup.hs          stylize*
bench-cbits/      cabal.project     CONTRIBUTING.md   LICENSE           README.md         release.nix       src/              test/

@fendor
Copy link
Collaborator

fendor commented Aug 23, 2021

Hi, thank you for the bug report!

Does it work if you replace

    - path: "./haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans"
      config:
        cradle:
          cabal:
            - path: "./src"
              component: "lib:dependent-sum-universe-orphans"

with

    - path: "./haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans"
      config:
        cradle:
          cabal:

Maybe we trip over the nested multi cradle.

@srghma
Copy link
Author

srghma commented Aug 23, 2021

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
[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-23 16:17:42.943508895 [ThreadId 7] DEBUG hls:   Initializing exports map from hiedb

Step 4/4: Type checking the files
2021-08-23 16:17:42.957000575 [ThreadId 43] 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:17:42.957927723 [ThreadId 44] 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}
> 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:17:42.984388877 [ThreadId 44] DEBUG hls:  Session loading result: Left [CradleError {cradleErrorDependencies = ["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:17:42.985588595 [ThreadId 69] 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:17:42.986286527 [ThreadId 75] INFO hls:   finish: User TypeCheck (took 0.03s)
2021-08-23 16:17:42.986575845 [ThreadId 78] 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-23 16:17:42.986720401 [ThreadId 80] 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

N.B. note the Found "/home/srghma/projects/reflex-platform/hie.yaml" for "/home/srghma/projects/reflex-platform/a". Why a? I dont have the a folder or file

@srghma
Copy link
Author

srghma commented Aug 23, 2021

[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

@fendor
Copy link
Collaborator

fendor commented Aug 23, 2021

Hm, what happens if you move your hie.yaml to ./haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans?

With the contents

cradle:
  cabal:

@srghma
Copy link
Author

srghma commented Aug 23, 2021

[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

@srghma
Copy link
Author

srghma commented Aug 23, 2021

[nix-shell:~/projects/reflex-platform]$ cd haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/

[nix-shell:~/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans]$ rm -f hie.yaml

[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
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/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
  ()

Step 3/4: Initializing the IDE
2021-08-23 16:44:13.606378519 [ThreadId 7] DEBUG hls:   Initializing exports map from hiedb
2021-08-23 16:44:13.622561568 [ThreadId 7] DEBUG hls:   Done initializing exports map from hiedb (0)

Step 4/4: Type checking the files
2021-08-23 16:44:13.62523453 [ThreadId 42] 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:44:13.626882136 [ThreadId 44] INFO hls:   Consulting the cradle for "src/Data/Some/Universe/Orphans.hs"
2021-08-23 16:44:13.627125904 [ThreadId 44] WARNING hls:        No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for src/Data/Some/Universe/Orphans.hs.
 Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie).
You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error.
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: 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)
>
2021-08-23 16:44:13.708636917 [ThreadId 44] 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: Internal error in target matching. It should always be possible to find\na syntax that's sufficiently qualified to give an unambiguous match. However\nwhen matching 'lib:dependent-sum-universe-orphans' we found\nlib:dependent-sum-universe-orphans (unknown-component) which does not have an\nunambiguous syntax. The possible syntax and the targets they match are as\nfollows:\n'lib:dependent-sum-universe-orphans' which matches\nlib:dependent-sum-universe-orphans (unknown-component),\n:pkg:lib:lib:lib:file:dependent-sum-universe-orphans (unknown-file)\n\n",""]}]
2021-08-23 16:44:13.709553083 [ThreadId 64] 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: 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)



2021-08-23 16:44:13.710104094 [ThreadId 70] INFO hls:   finish: User TypeCheck (took 0.09s)
2021-08-23 16:44:13.710333827 [ThreadId 73] INFO hls:   finish: GetHie (took 0.00s)
2021-08-23 16:44:13.710463246 [ThreadId 75] 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


@fendor
Copy link
Collaborator

fendor commented Aug 23, 2021

Is there a cabal.project somewhere up in the build tree? Just to be sure, you can add cabal.project to reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/ with

packages: ./

@srghma
Copy link
Author

srghma commented Aug 23, 2021

Is there a cabal.project somewhere up in the build tree?

[nix-shell:~/projects/reflex-platform]$ find . -name 'cabal.project'
./haskell-overlays/reflex-packages/dep/universe/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

[nix-shell:~/projects/reflex-platform]$ cat ./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

Just to be sure, you can add cabal.project to reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/

[nix-shell:~/projects/reflex-platform]$ echo "packages: ./" > haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans/cabal.project

[nix-shell:~/projects/reflex-platform]$ cat hie.yaml
cat: hie.yaml: No such file or directory

[nix-shell:~/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans]$ cat hie.yaml
cradle:
  cabal:


[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 18:12:40.849717174 [ThreadId 7] DEBUG hls:   Initializing exports map from hiedb

St2021-08-23 18:12:40.860926329 [ThreadId 7] DEBUG hls: Done initializing exports map from hiedb (0)
ep 4/4: Type checking the files
2021-08-23 18:12:40.86194303 [ThreadId 42] 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 18:12:40.862748901 [ThreadId 44] 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}
> Build profile: -w ghc-8.6.5 -O1
> In order, the following will be built (use -v for more details):
>  - cabal-doctest-1.0.8 (lib) (requires build)
>  - dependent-sum-0.6.2.0 (lib:dependent-sum) (requires download & build)
>  - indexed-traversable-0.1.1 (lib) (requires build)
>  - some-1.0.3 (lib) (requires download & build)
>  - tagged-0.8.6.1 (lib) (requires build)
>  - th-abstraction-0.4.2.0 (lib) (requires build)
>  - universe-base-1.1.2 (lib) (requires download & build)
>  - distributive-0.6.2.1 (lib) (requires build)
>  - universe-some-1.2.1 (lib) (requires download & build)
>  - universe-reverse-instances-1.1.1 (lib) (requires download & build)
>  - comonad-5.0.8 (lib) (requires build)
>  - bifunctors-5.5.8 (lib) (requires download & build)
>  - semigroupoids-5.3.4 (lib:semigroupoids) (requires download & build)
>  - profunctors-5.6 (lib) (requires download & build)
>  - free-5.1.5 (lib) (requires download & build)
>  - adjunctions-4.4 (lib) (requires build)
>  - universe-instances-extended-1.1.2 (lib) (requires download & build)
>  - universe-1.2.1 (lib) (requires download & build)
>  - dependent-sum-universe-orphans-0.1.0.0 (lib) (first run)
> Downloading  some-1.0.3
> Starting     cabal-doctest-1.0.8 (lib)
> Starting     tagged-0.8.6.1 (lib)
> Starting     indexed-traversable-0.1.1 (lib)
> Starting     th-abstraction-0.4.2.0 (lib)
> Downloaded   some-1.0.3
> Downloading  universe-base-1.1.2
> Starting     some-1.0.3 (lib)
> Downloaded   universe-base-1.1.2
> Downloading  universe-reverse-instances-1.1.1
> Building     tagged-0.8.6.1 (lib)
> Building     cabal-doctest-1.0.8 (lib)
> Building     indexed-traversable-0.1.1 (lib)
> Building     th-abstraction-0.4.2.0 (lib)
> Downloaded   universe-reverse-instances-1.1.1
> Downloading  universe-some-1.2.1
> Building     some-1.0.3 (lib)
> Downloaded   universe-some-1.2.1
> Downloading  bifunctors-5.5.8
> Downloaded   bifunctors-5.5.8
> Downloading  dependent-sum-0.6.2.0
> Downloaded   dependent-sum-0.6.2.0
> Downloading  profunctors-5.6
> Starting     dependent-sum-0.6.2.0 (all, legacy fallback)
> Downloaded   profunctors-5.6
> Downloading  semigroupoids-5.3.4
> Downloaded   semigroupoids-5.3.4
> Downloading  free-5.1.5
> Building     dependent-sum-0.6.2.0 (all, legacy fallback)
> Downloaded   free-5.1.5
> Downloading  universe-instances-extended-1.1.2
> Downloading  universe-1.2.1
> Downloaded   universe-1.2.1
>
> Failed to build cabal-doctest-1.0.8.
> Build log (
> /home/srghma/.cabal/logs/ghc-8.6.5/cabal-doctest-1.0.8-80836ab5246a80e098e585b8e58c1e04555923cb36c1d5fc056171f96f5d37d9.log
> ):
> Configuring library for cabal-doctest-1.0.8..
> Preprocessing library for cabal-doctest-1.0.8..
> Building library for cabal-doctest-1.0.8..
> [1 of 1] Compiling Distribution.Extra.Doctest ( src/Distribution/Extra/Doctest.hs, dist/build/Distribution/Extra/Doctest.o )
> cabal: The program 'ar' is required but it could not be found.
>
>
> Failed to build dependent-sum-0.6.2.0.
> Build log (
> /home/srghma/.cabal/logs/ghc-8.6.5/dependent-sum-0.6.2.0-121a215f95a1abacb4e0a8a814bee04c7ab823392169ebd7ba48ea02bac3f7ff.log
> ):
> Configuring dependent-sum-0.6.2.0...
> Preprocessing library for dependent-sum-0.6.2.0..
> Building library for dependent-sum-0.6.2.0..
> [1 of 4] Compiling Data.GADT.Show   ( src/Data/GADT/Show.hs, dist/build/Data/GADT/Show.o )
> [2 of 4] Compiling Data.GADT.Compare ( src/Data/GADT/Compare.hs, dist/build/Data/GADT/Compare.o )
> [3 of 4] Compiling Data.Dependent.Sum ( src/Data/Dependent/Sum.hs, dist/build/Data/Dependent/Sum.o )
> [4 of 4] Compiling Data.Some        ( src/Data/Some.hs, dist/build/Data/Some.o )
> cabal: The program 'ar' is required but it could not be found.
>
>
> Failed to build indexed-traversable-0.1.1.
> Build log (
> /home/srghma/.cabal/logs/ghc-8.6.5/indexed-traversable-0.1.1-258a71f779bf0dd4f5d24b2250c5ccb7418982dc558ffce73eed8f32467e072d.log
> ):
> Configuring library for indexed-traversable-0.1.1..
> Preprocessing library for indexed-traversable-0.1.1..
> Building library for indexed-traversable-0.1.1..
> [1 of 5] Compiling GhcExts          ( src/GhcExts.hs, dist/build/GhcExts.o )
> [2 of 5] Compiling WithIndex        ( src/WithIndex.hs, dist/build/WithIndex.o )
> [3 of 5] Compiling Data.Traversable.WithIndex ( src/Data/Traversable/WithIndex.hs, dist/build/Data/Traversable/WithIndex.o )
> [4 of 5] Compiling Data.Functor.WithIndex ( src/Data/Functor/WithIndex.hs, dist/build/Data/Functor/WithIndex.o )
> [5 of 5] Compiling Data.Foldable.WithIndex ( src/Data/Foldable/WithIndex.hs, dist/build/Data/Foldable/WithIndex.o )
> cabal: The program 'ar' is required but it could not be found.
>
>
> Failed to build some-1.0.3.
> Build log (
> /home/srghma/.cabal/logs/ghc-8.6.5/some-1.0.3-b80319ab541c87d147e125519bddeafb533353b6d38ff7307f5ac2ccde53bf4e.log
> ):
> Configuring library for some-1.0.3..
> Preprocessing library for some-1.0.3..
> Building library for some-1.0.3..
> [1 of 8] Compiling Data.GADT.DeepSeq ( src/Data/GADT/DeepSeq.hs, dist/build/Data/GADT/DeepSeq.o )
> [2 of 8] Compiling Data.GADT.Internal ( src/Data/GADT/Internal.hs, dist/build/Data/GADT/Internal.o )
> [3 of 8] Compiling Data.GADT.Compare ( src/Data/GADT/Compare.hs, dist/build/Data/GADT/Compare.o )
> [4 of 8] Compiling Data.GADT.Show   ( src/Data/GADT/Show.hs, dist/build/Data/GADT/Show.o )
> [5 of 8] Compiling Data.Some.Church ( src/Data/Some/Church.hs, dist/build/Data/Some/Church.o )
> [6 of 8] Compiling Data.Some.GADT   ( src/Data/Some/GADT.hs, dist/build/Data/Some/GADT.o )
> [7 of 8] Compiling Data.Some.Newtype ( src/Data/Some/Newtype.hs, dist/build/Data/Some/Newtype.o )
> [8 of 8] Compiling Data.Some        ( src/Data/Some.hs, dist/build/Data/Some.o )
> cabal: The program 'ar' is required but it could not be found.
>
>
> Failed to build tagged-0.8.6.1.
> Build log (
> /home/srghma/.cabal/logs/ghc-8.6.5/tagged-0.8.6.1-0ced6d6059516f6b25a51060e13d12b465ba91b26d9ed3d23a8e612b7f447b87.log
> ):
> Configuring library for tagged-0.8.6.1..
> Preprocessing library for tagged-0.8.6.1..
> Building library for tagged-0.8.6.1..
> [1 of 2] Compiling Data.Proxy.TH    ( src/Data/Proxy/TH.hs, dist/build/Data/Proxy/TH.o )
> [2 of 2] Compiling Data.Tagged      ( src/Data/Tagged.hs, dist/build/Data/Tagged.o )
> cabal: The program 'ar' is required but it could not be found.
>
>
> Failed to build th-abstraction-0.4.2.0.
> Build log (
> /home/srghma/.cabal/logs/ghc-8.6.5/th-abstraction-0.4.2.0-f36e5df2d8683a05bd2c4538d4fd2a47d5b7b81e7f64fd1b8e224cd6db2a7bed.log
> ):
> Configuring library for th-abstraction-0.4.2.0..
> Preprocessing library for th-abstraction-0.4.2.0..
> Building library for th-abstraction-0.4.2.0..
> [1 of 3] Compiling Language.Haskell.TH.Datatype.Internal ( src/Language/Haskell/TH/Datatype/Internal.hs, dist/build/Language/Haskell/TH/Datatype/Internal.o )
> cabal: Failed to build cabal-doctest-1.0.8 (which is required by
> [2 of 3] Compiling Language.Haskell.TH.Datatype.TyVarBndr ( src/Language/Haskell/TH/Datatype/TyVarBndr.hs, dist/build/Language/Haskell/TH/Datatype/TyVarBndr.o )
> dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.
> [3 of 3] Compiling Language.Haskell.TH.Datatype ( src/Language/Haskell/TH/Datatype.hs, dist/build/Language/Haskell/TH/Datatype.o )
> Failed to build dependent-sum-0.6.2.0 (which is required by
> cabal: The program 'ar' is required but it could not be found.
>
> dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.
> Failed to build indexed-traversable-0.1.1 (which is required by
> dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.
> Failed to build some-1.0.3 (which is required by
> dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.
> Failed to build tagged-0.8.6.1 (which is required by
> dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.
> Failed to build th-abstraction-0.4.2.0 (which is required by
> dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.
>
2021-08-23 18:12:50.850068333 [ThreadId 44] 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","Build profile: -w ghc-8.6.5 -O1\nIn order, the following will be built (use -v for more details):\n - cabal-doctest-1.0.8 (lib) (requires build)\n - dependent-sum-0.6.2.0 (lib:dependent-sum) (requires download & build)\n - indexed-traversable-0.1.1 (lib) (requires build)\n - some-1.0.3 (lib) (requires download & build)\n - tagged-0.8.6.1 (lib) (requires build)\n - th-abstraction-0.4.2.0 (lib) (requires build)\n - universe-base-1.1.2 (lib) (requires download & build)\n - distributive-0.6.2.1 (lib) (requires build)\n - universe-some-1.2.1 (lib) (requires download & build)\n - universe-reverse-instances-1.1.1 (lib) (requires download & build)\n - comonad-5.0.8 (lib) (requires build)\n - bifunctors-5.5.8 (lib) (requires download & build)\n - semigroupoids-5.3.4 (lib:semigroupoids) (requires download & build)\n - profunctors-5.6 (lib) (requires download & build)\n - free-5.1.5 (lib) (requires download & build)\n - adjunctions-4.4 (lib) (requires build)\n - universe-instances-extended-1.1.2 (lib) (requires download & build)\n - universe-1.2.1 (lib) (requires download & build)\n - dependent-sum-universe-orphans-0.1.0.0 (lib) (first run)\nDownloading  some-1.0.3\nStarting     cabal-doctest-1.0.8 (lib)\nStarting     tagged-0.8.6.1 (lib)\nStarting     indexed-traversable-0.1.1 (lib)\nStarting     th-abstraction-0.4.2.0 (lib)\nDownloaded   some-1.0.3\nDownloading  universe-base-1.1.2\nStarting     some-1.0.3 (lib)\nDownloaded   universe-base-1.1.2\nDownloading  universe-reverse-instances-1.1.1\nBuilding     tagged-0.8.6.1 (lib)\nBuilding     cabal-doctest-1.0.8 (lib)\nBuilding     indexed-traversable-0.1.1 (lib)\nBuilding     th-abstraction-0.4.2.0 (lib)\nDownloaded   universe-reverse-instances-1.1.1\nDownloading  universe-some-1.2.1\nBuilding     some-1.0.3 (lib)\nDownloaded   universe-some-1.2.1\nDownloading  bifunctors-5.5.8\nDownloaded   bifunctors-5.5.8\nDownloading  dependent-sum-0.6.2.0\nDownloaded   dependent-sum-0.6.2.0\nDownloading  profunctors-5.6\nStarting     dependent-sum-0.6.2.0 (all, legacy fallback)\nDownloaded   profunctors-5.6\nDownloading  semigroupoids-5.3.4\nDownloaded   semigroupoids-5.3.4\nDownloading  free-5.1.5\nBuilding     dependent-sum-0.6.2.0 (all, legacy fallback)\nDownloaded   free-5.1.5\nDownloading  universe-instances-extended-1.1.2\nDownloading  universe-1.2.1\nDownloaded   universe-1.2.1\n\nFailed to build cabal-doctest-1.0.8.\nBuild log (\n/home/srghma/.cabal/logs/ghc-8.6.5/cabal-doctest-1.0.8-80836ab5246a80e098e585b8e58c1e04555923cb36c1d5fc056171f96f5d37d9.log\n):\nConfiguring library for cabal-doctest-1.0.8..\nPreprocessing library for cabal-doctest-1.0.8..\nBuilding library for cabal-doctest-1.0.8..\n[1 of 1] Compiling Distribution.Extra.Doctest ( src/Distribution/Extra/Doctest.hs, dist/build/Distribution/Extra/Doctest.o )\ncabal: The program 'ar' is required but it could not be found.\n\n\nFailed to build dependent-sum-0.6.2.0.\nBuild log (\n/home/srghma/.cabal/logs/ghc-8.6.5/dependent-sum-0.6.2.0-121a215f95a1abacb4e0a8a814bee04c7ab823392169ebd7ba48ea02bac3f7ff.log\n):\nConfiguring dependent-sum-0.6.2.0...\nPreprocessing library for dependent-sum-0.6.2.0..\nBuilding library for dependent-sum-0.6.2.0..\n[1 of 4] Compiling Data.GADT.Show   ( src/Data/GADT/Show.hs, dist/build/Data/GADT/Show.o )\n[2 of 4] Compiling Data.GADT.Compare ( src/Data/GADT/Compare.hs, dist/build/Data/GADT/Compare.o )\n[3 of 4] Compiling Data.Dependent.Sum ( src/Data/Dependent/Sum.hs, dist/build/Data/Dependent/Sum.o )\n[4 of 4] Compiling Data.Some        ( src/Data/Some.hs, dist/build/Data/Some.o )\ncabal: The program 'ar' is required but it could not be found.\n\n\nFailed to build indexed-traversable-0.1.1.\nBuild log (\n/home/srghma/.cabal/logs/ghc-8.6.5/indexed-traversable-0.1.1-258a71f779bf0dd4f5d24b2250c5ccb7418982dc558ffce73eed8f32467e072d.log\n):\nConfiguring library for indexed-traversable-0.1.1..\nPreprocessing library for indexed-traversable-0.1.1..\nBuilding library for indexed-traversable-0.1.1..\n[1 of 5] Compiling GhcExts          ( src/GhcExts.hs, dist/build/GhcExts.o )\n[2 of 5] Compiling WithIndex        ( src/WithIndex.hs, dist/build/WithIndex.o )\n[3 of 5] Compiling Data.Traversable.WithIndex ( src/Data/Traversable/WithIndex.hs, dist/build/Data/Traversable/WithIndex.o )\n[4 of 5] Compiling Data.Functor.WithIndex ( src/Data/Functor/WithIndex.hs, dist/build/Data/Functor/WithIndex.o )\n[5 of 5] Compiling Data.Foldable.WithIndex ( src/Data/Foldable/WithIndex.hs, dist/build/Data/Foldable/WithIndex.o )\ncabal: The program 'ar' is required but it could not be found.\n\n\nFailed to build some-1.0.3.\nBuild log (\n/home/srghma/.cabal/logs/ghc-8.6.5/some-1.0.3-b80319ab541c87d147e125519bddeafb533353b6d38ff7307f5ac2ccde53bf4e.log\n):\nConfiguring library for some-1.0.3..\nPreprocessing library for some-1.0.3..\nBuilding library for some-1.0.3..\n[1 of 8] Compiling Data.GADT.DeepSeq ( src/Data/GADT/DeepSeq.hs, dist/build/Data/GADT/DeepSeq.o )\n[2 of 8] Compiling Data.GADT.Internal ( src/Data/GADT/Internal.hs, dist/build/Data/GADT/Internal.o )\n[3 of 8] Compiling Data.GADT.Compare ( src/Data/GADT/Compare.hs, dist/build/Data/GADT/Compare.o )\n[4 of 8] Compiling Data.GADT.Show   ( src/Data/GADT/Show.hs, dist/build/Data/GADT/Show.o )\n[5 of 8] Compiling Data.Some.Church ( src/Data/Some/Church.hs, dist/build/Data/Some/Church.o )\n[6 of 8] Compiling Data.Some.GADT   ( src/Data/Some/GADT.hs, dist/build/Data/Some/GADT.o )\n[7 of 8] Compiling Data.Some.Newtype ( src/Data/Some/Newtype.hs, dist/build/Data/Some/Newtype.o )\n[8 of 8] Compiling Data.Some        ( src/Data/Some.hs, dist/build/Data/Some.o )\ncabal: The program 'ar' is required but it could not be found.\n\n\nFailed to build tagged-0.8.6.1.\nBuild log (\n/home/srghma/.cabal/logs/ghc-8.6.5/tagged-0.8.6.1-0ced6d6059516f6b25a51060e13d12b465ba91b26d9ed3d23a8e612b7f447b87.log\n):\nConfiguring library for tagged-0.8.6.1..\nPreprocessing library for tagged-0.8.6.1..\nBuilding library for tagged-0.8.6.1..\n[1 of 2] Compiling Data.Proxy.TH    ( src/Data/Proxy/TH.hs, dist/build/Data/Proxy/TH.o )\n[2 of 2] Compiling Data.Tagged      ( src/Data/Tagged.hs, dist/build/Data/Tagged.o )\ncabal: The program 'ar' is required but it could not be found.\n\n\nFailed to build th-abstraction-0.4.2.0.\nBuild log (\n/home/srghma/.cabal/logs/ghc-8.6.5/th-abstraction-0.4.2.0-f36e5df2d8683a05bd2c4538d4fd2a47d5b7b81e7f64fd1b8e224cd6db2a7bed.log\n):\nConfiguring library for th-abstraction-0.4.2.0..\nPreprocessing library for th-abstraction-0.4.2.0..\nBuilding library for th-abstraction-0.4.2.0..\n[1 of 3] Compiling Language.Haskell.TH.Datatype.Internal ( src/Language/Haskell/TH/Datatype/Internal.hs, dist/build/Language/Haskell/TH/Datatype/Internal.o )\n[2 of 3] Compiling Language.Haskell.TH.Datatype.TyVarBndr ( src/Language/Haskell/TH/Datatype/TyVarBndr.hs, dist/build/Language/Haskell/TH/Datatype/TyVarBndr.o )\n[3 of 3] Compiling Language.Haskell.TH.Datatype ( src/Language/Haskell/TH/Datatype.hs, dist/build/Language/Haskell/TH/Datatype.o )\ncabal: The program 'ar' is required but it could not be found.\n\n","cabal: Failed to build cabal-doctest-1.0.8 (which is required by\ndependent-sum-universe-orphans-0.1.0.0). See the build log above for details.\nFailed to build dependent-sum-0.6.2.0 (which is required by\ndependent-sum-universe-orphans-0.1.0.0). See the build log above for details.\nFailed to build indexed-traversable-0.1.1 (which is required by\ndependent-sum-universe-orphans-0.1.0.0). See the build log above for details.\nFailed to build some-1.0.3 (which is required by\ndependent-sum-universe-orphans-0.1.0.0). See the build log above for details.\nFailed to build tagged-0.8.6.1 (which is required by\ndependent-sum-universe-orphans-0.1.0.0). See the build log above for details.\nFailed to build th-abstraction-0.4.2.0 (which is required by\ndependent-sum-universe-orphans-0.1.0.0). See the build log above for details.\n\n",""]}]
2021-08-23 18:12:50.853593845 [ThreadId 77] 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
  Build profile: -w ghc-8.6.5 -O1
  In order, the following will be built (use -v for more details):
  - cabal-doctest-1.0.8 (lib) (requires build)
  - dependent-sum-0.6.2.0 (lib:dependent-sum) (requires download & build)
  - indexed-traversable-0.1.1 (lib) (requires build)
  - some-1.0.3 (lib) (requires download & build)
  - tagged-0.8.6.1 (lib) (requires build)
  - th-abstraction-0.4.2.0 (lib) (requires build)
  - universe-base-1.1.2 (lib) (requires download & build)
  - distributive-0.6.2.1 (lib) (requires build)
  - universe-some-1.2.1 (lib) (requires download & build)
  - universe-reverse-instances-1.1.1 (lib) (requires download & build)
  - comonad-5.0.8 (lib) (requires build)
  - bifunctors-5.5.8 (lib) (requires download & build)
  - semigroupoids-5.3.4 (lib:semigroupoids) (requires download & build)
  - profunctors-5.6 (lib) (requires download & build)
  - free-5.1.5 (lib) (requires download & build)
  - adjunctions-4.4 (lib) (requires build)
  - universe-instances-extended-1.1.2 (lib) (requires download & build)
  - universe-1.2.1 (lib) (requires download & build)
  - dependent-sum-universe-orphans-0.1.0.0 (lib) (first run)
  Downloading some-1.0.3
  Starting cabal-doctest-1.0.8 (lib)
  Starting tagged-0.8.6.1 (lib)
  Starting indexed-traversable-0.1.1 (lib)
  Starting th-abstraction-0.4.2.0 (lib)
  Downloaded some-1.0.3
  Downloading universe-base-1.1.2
  Starting some-1.0.3 (lib)
  Downloaded universe-base-1.1.2
  Downloading universe-reverse-instances-1.1.1
  Building tagged-0.8.6.1 (lib)
  Building cabal-doctest-1.0.8 (lib)
  Building indexed-traversable-0.1.1 (lib)
  Building th-abstraction-0.4.2.0 (lib)
  Downloaded universe-reverse-instances-1.1.1
  Downloading universe-some-1.2.1
  Building some-1.0.3 (lib)
  Downloaded universe-some-1.2.1
  Downloading bifunctors-5.5.8
  Downloaded bifunctors-5.5.8
  Downloading dependent-sum-0.6.2.0
  Downloaded dependent-sum-0.6.2.0
  Downloading profunctors-5.6
  Starting dependent-sum-0.6.2.0 (all, legacy fallback)
  Downloaded profunctors-5.6
  Downloading semigroupoids-5.3.4
  Downloaded semigroupoids-5.3.4
  Downloading free-5.1.5
  Building dependent-sum-0.6.2.0 (all, legacy fallback)
  Downloaded free-5.1.5
  Downloading universe-instances-extended-1.1.2
  Downloading universe-1.2.1
  Downloaded universe-1.2.1

  Failed to build cabal-doctest-1.0.8.
  Build log (
  /home/srghma/.cabal/logs/ghc-8.6.5/cabal-doctest-1.0.8-80836ab5246a80e098e585b8e58c1e04555923cb36c1d5fc056171f96f5d37d9.log
  ):
  Configuring library for cabal-doctest-1.0.8..
  Preprocessing library for cabal-doctest-1.0.8..
  Building library for cabal-doctest-1.0.8..
  [1 of 1] Compiling Distribution.Extra.Doctest ( src/Distribution/Extra/Doctest.hs,
  dist/build/Distribution/Extra/Doctest.o )
  cabal: The program 'ar' is required but it could not be found.


  Failed to build dependent-sum-0.6.2.0.
  Build log (
  /home/srghma/.cabal/logs/ghc-8.6.5/dependent-sum-0.6.2.0-121a215f95a1abacb4e0a8a814bee04c7ab823392169ebd7ba48ea02bac3f7ff.log
  ):
  Configuring dependent-sum-0.6.2.0...
  Preprocessing library for dependent-sum-0.6.2.0..
  Building library for dependent-sum-0.6.2.0..
  [1 of 4] Compiling Data.GADT.Show ( src/Data/GADT/Show.hs, dist/build/Data/GADT/Show.o )
  [2 of 4] Compiling Data.GADT.Compare ( src/Data/GADT/Compare.hs, dist/build/Data/GADT/Compare.o )
  [3 of 4] Compiling Data.Dependent.Sum ( src/Data/Dependent/Sum.hs, dist/build/Data/Dependent/Sum.o
  )
  [4 of 4] Compiling Data.Some ( src/Data/Some.hs, dist/build/Data/Some.o )
  cabal: The program 'ar' is required but it could not be found.


  Failed to build indexed-traversable-0.1.1.
  Build log (
  /home/srghma/.cabal/logs/ghc-8.6.5/indexed-traversable-0.1.1-258a71f779bf0dd4f5d24b2250c5ccb7418982dc558ffce73eed8f32467e072d.log
  ):
  Configuring library for indexed-traversable-0.1.1..
  Preprocessing library for indexed-traversable-0.1.1..
  Building library for indexed-traversable-0.1.1..
  [1 of 5] Compiling GhcExts ( src/GhcExts.hs, dist/build/GhcExts.o )
  [2 of 5] Compiling WithIndex ( src/WithIndex.hs, dist/build/WithIndex.o )
  [3 of 5] Compiling Data.Traversable.WithIndex ( src/Data/Traversable/WithIndex.hs,
  dist/build/Data/Traversable/WithIndex.o )
  [4 of 5] Compiling Data.Functor.WithIndex ( src/Data/Functor/WithIndex.hs,
  dist/build/Data/Functor/WithIndex.o )
  [5 of 5] Compiling Data.Foldable.WithIndex ( src/Data/Foldable/WithIndex.hs,
  dist/build/Data/Foldable/WithIndex.o )
  cabal: The program 'ar' is required but it could not be found.


  Failed to build some-1.0.3.
  Build log (
  /home/srghma/.cabal/logs/ghc-8.6.5/some-1.0.3-b80319ab541c87d147e125519bddeafb533353b6d38ff7307f5ac2ccde53bf4e.log
  ):
  Configuring library for some-1.0.3..
  Preprocessing library for some-1.0.3..
  Building library for some-1.0.3..
  [1 of 8] Compiling Data.GADT.DeepSeq ( src/Data/GADT/DeepSeq.hs, dist/build/Data/GADT/DeepSeq.o )
  [2 of 8] Compiling Data.GADT.Internal ( src/Data/GADT/Internal.hs, dist/build/Data/GADT/Internal.o
  )
  [3 of 8] Compiling Data.GADT.Compare ( src/Data/GADT/Compare.hs, dist/build/Data/GADT/Compare.o )
  [4 of 8] Compiling Data.GADT.Show ( src/Data/GADT/Show.hs, dist/build/Data/GADT/Show.o )
  [5 of 8] Compiling Data.Some.Church ( src/Data/Some/Church.hs, dist/build/Data/Some/Church.o )
  [6 of 8] Compiling Data.Some.GADT ( src/Data/Some/GADT.hs, dist/build/Data/Some/GADT.o )
  [7 of 8] Compiling Data.Some.Newtype ( src/Data/Some/Newtype.hs, dist/build/Data/Some/Newtype.o )
  [8 of 8] Compiling Data.Some ( src/Data/Some.hs, dist/build/Data/Some.o )
  cabal: The program 'ar' is required but it could not be found.


  Failed to build tagged-0.8.6.1.
  Build log (
  /home/srghma/.cabal/logs/ghc-8.6.5/tagged-0.8.6.1-0ced6d6059516f6b25a51060e13d12b465ba91b26d9ed3d23a8e612b7f447b87.log
  ):
  Configuring library for tagged-0.8.6.1..
  Preprocessing library for tagged-0.8.6.1..
  Building library for tagged-0.8.6.1..
  [1 of 2] Compiling Data.Proxy.TH ( src/Data/Proxy/TH.hs, dist/build/Data/Proxy/TH.o )
  [2 of 2] Compiling Data.Tagged ( src/Data/Tagged.hs, dist/build/Data/Tagged.o )
  cabal: The program 'ar' is required but it could not be found.


  Failed to build th-abstraction-0.4.2.0.
  Build log (
  /home/srghma/.cabal/logs/ghc-8.6.5/th-abstraction-0.4.2.0-f36e5df2d8683a05bd2c4538d4fd2a47d5b7b81e7f64fd1b8e224cd6db2a7bed.log
  ):
  Configuring library for th-abstraction-0.4.2.0..
  Preprocessing library for th-abstraction-0.4.2.0..
  Building library for th-abstraction-0.4.2.0..
  [1 of 3] Compiling Language.Haskell.TH.Datatype.Internal (
  src/Language/Haskell/TH/Datatype/Internal.hs, dist/build/Language/Haskell/TH/Datatype/Internal.o )
  [2 of 3] Compiling Language.Haskell.TH.Datatype.TyVarBndr (
  src/Language/Haskell/TH/Datatype/TyVarBndr.hs, dist/build/Language/Haskell/TH/Datatype/TyVarBndr.o
  )
  [3 of 3] Compiling Language.Haskell.TH.Datatype ( src/Language/Haskell/TH/Datatype.hs,
  dist/build/Language/Haskell/TH/Datatype.o )
  cabal: The program 'ar' is required but it could not be found.


  cabal: Failed to build cabal-doctest-1.0.8 (which is required by
  dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.
  Failed to build dependent-sum-0.6.2.0 (which is required by
  dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.
  Failed to build indexed-traversable-0.1.1 (which is required by
  dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.
  Failed to build some-1.0.3 (which is required by
  dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.
  Failed to build tagged-0.8.6.1 (which is required by
  dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.
  Failed to build th-abstraction-0.4.2.0 (which is required by
  dependent-sum-universe-orphans-0.1.0.0). See the build log above for details.



2021-08-23 18:12:50.856708819 [ThreadId 85] INFO hls:   finish: User TypeCheck (took 10.00s)
2021-08-23 18:12:50.857008941 [ThreadId 87] 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-23 18:12:50.857251999 [ThreadId 90] INFO hls:   finish: GenerateCore (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" "src/Data/Some/Universe/Orphans.hs" (exit 1): failed

[nix-shell:~/projects/reflex-platform/haskell-overlays/reflex-packages/dep/dependent-sum-universe-orphans]$ cat /home/srghma/.cabal/logs/ghc-8.6.5/cabal-doctest-1.0.8-80836ab5246a80e098e585b8e58c1e04555923cb36c1d5fc056171f96f5d37d9.log
Configuring library for cabal-doctest-1.0.8..
Preprocessing library for cabal-doctest-1.0.8..
Building library for cabal-doctest-1.0.8..
[1 of 1] Compiling Distribution.Extra.Doctest ( src/Distribution/Extra/Doctest.hs, dist/build/Distribution/Extra/Doctest.o )
cabal: The program 'ar' is required but it could not be found.

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 /home/srghma/.cabal

@fendor we can make a call in google hangouts, my email is [email protected], available any time

@fendor
Copy link
Collaborator

fendor commented Aug 23, 2021

How are you expecting this to be built?
HLS/hie-bios has no built-in support for nix, if you specify to use cabal, HLS will use cabal to build the project, which is the cabal version installed by nix-shell. Thus, the output looks quite alright to me. (E.g. you are missig binutils's ar program)

If you want to use nix-build or something like that in combination with HLS, it will be a lot more difficult and probably require proper support by reflex-platform.

@srghma
Copy link
Author

srghma commented Aug 24, 2021

@fendor , tnx, I have installed ar program (added binutils to default.nix) and now dependent-sum-universe-orphans works

$ 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

@srghma
Copy link
Author

srghma commented Aug 27, 2021

@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 /home/srghma/projects/reflex-platform/src

@fendor
Copy link
Collaborator

fendor commented Aug 29, 2021

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.

srghma added a commit to srghma/hie-bios that referenced this issue Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants