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 parsing targets - Directory not found using internal (private) libraries and stack #2041

Closed
Cmdv opened this issue Jul 27, 2021 · 8 comments
Labels
build tool: stack status: needs info Not actionable, because there's missing information type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@Cmdv
Copy link

Cmdv commented Jul 27, 2021

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

haskell-language-server version: 1.2.0.0 (GHC: 8.8.4) (PATH: /home/cmdv/.ghcup/bin/haskell-language-server-8.8.4~1.2.0) (GIT hash: be2071e985cb417f984ab00a1aad76dee02d6d0b)
Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.7.3
ghc:		8.8.4

Which OS do you use: Fedora 33 - Linux

Which lsp-client do you use: Doom - emacs

Describe your project (alternative: link to the project):
./package.yml

description:         "UI data API"

ghc-options:
  -Werror
  -Wall
  -Wcompat
  -Wincomplete-uni-patterns
  -Widentities

dependencies:
- base >= 4.7 && < 5
- text
- bytestring

library:
  reexported-modules:
  - MyLibrary.UiData
  - MyLibrary.Visibility
  dependencies:
  - ui-data-api-internal

internal-libraries:
  ui-data-api-internal:
    source-dirs: mylibrary
    dependencies:
    - aeson
    - authm2 ^>= 0.2.0.0
    - beam-core
    - beam-postgres
    - containers
    - generics-sop
    - lib-db
    - mtl
    - postgresql-simple
    - resource-pool
    - rio
    - servant-server
    - time
    - uuid

executables:
  tsdef:
    main: tsdef.hs
    source-dirs: src
    ghc-options:
    - -threaded
    - -rtsopts
    - -with-rtsopts=-N
    dependencies:
    - ui-data-api-internal
    - generics-sop
    - rio
    - servant-server
    - time
    - uuid

./stack.yaml

resolver: ../build.common/snapshot.yaml

packages:
  - .

extra-deps:
  - ../authm2
  - ../ekg-datadog
  - ../common
  - ../lib-db
  - ../lib-jobqueue
  - ../lib-logging
  - ../lib-telemetry
  - ../upload-service
── hie.yaml
├── lib
│   ├── Data
│   │   └── Aeson
│   │       ├── TypeScript.hs
│   │       └── Via.hs
│   └── MyLibrary
│       ├── UiData
│       │   └── Internal
│       │       ├── ApiTypes.hs
│       │       ├── Common.hs
│       │       ├── Endpoints
│       │       │   ├── AgentProfile.hs
│       │       │   ├── Call.hs
│       │       │   ├── CallsBy.hs
│       │       │   ├── CallsFilterInfo.hs
│       │       │   ├── Calls.hs
│       │       │   └── CallTranscript.hs
│       │       └── Server.hs
│       ├── UiData.hs
│       └── Visibility.hs
├── package.yaml
├── README.md
├── src
│   └── tsdef.hs
├── stack.yaml
├── stack.yaml.lock
└── ui-data-api.cabal

Contents of hie.yaml:

cradle:
  stack:
    - path: "././"
      component: "ui-data-api:lib"

    - path: "./lib"
      component: "ui-data-api:myLibrary:ui-data-api-internal"

    - path: "./src/tsdef.hs"
      component: "ui-data-api:exe:tsdef"

    - path: "./src/Paths_ui_data_api.hs"
      component: "ui-data-api:exe:tsdef"

Steps to reproduce

  • build the project with stack build which all works
  • open a file in emacs, which starts the server, edit file and save.

Expected behaviour

Should load up and be all nice and dandy

Actual behaviour

Error outputed in lsp logs

Failed to parse result of calling stack
 Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
 Note that to specify options to be passed to GHCi, use the --ghci-options flag

The same error happens if running

> haskell-language-server-wrapper

or

> haskell-language-server-8.8.4

view Debug output for logs. 😃

Include debug information

Execute in the root of your project the command haskell-language-server --debug . and paste the logs here:

Debug output:
Found "/home/cmdv/src/myproject/ui-data-api/hie.yaml" for "/home/cmdv/src/myproject/ui-data-api/a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.2.0.0, Git revision be2071e985cb417f984ab00a1aad76dee02d6d0b (dirty) x86_64 ghc-8.10.4
Current directory: /home/cmdv/src/myproject/ui-data-api
Operating system: linux
Arguments: ["--debug"]
Cradle directory: /home/cmdv/src/myproject/ui-data-api
Cradle type: Stack

Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.7.3
ghc:		8.8.4


Consulting the cradle to get project GHC version...
Project GHC version: 8.8.4
haskell-language-server exe candidates: ["haskell-language-server-8.8.4","haskell-language-server"]
Launching haskell-language-server exe at:/home/cmdv/.ghcup/bin/haskell-language-server-8.8.4
haskell-language-server version: 1.2.0.0 (GHC: 8.8.4) (PATH: /home/cmdv/.ghcup/bin/haskell-language-server-8.8.4~1.2.0) (GIT hash: be2071e985cb417f984ab00a1aad76dee02d6d0b)
 ghcide setup tester in /home/cmdv/src/myproject/ui-data-api.
Report bugs at https://github.com/haskell/haskell-language-server/issues

Step 1/4: Finding files to test in /home/cmdv/src/myproject/ui-data-api
Found 14 files

Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
  (/home/cmdv/src/myproject/ui-data-api/hie.yaml)

Step 3/4: Initializing the IDE

Step 4/4: Type checking the files
2021-07-27 11:25:22.98777126 [ThreadId 38] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/src/tsdef.hs"
2021-07-27 11:25:22.988038142 [ThreadId 42] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData.hs"
2021-07-27 11:25:22.988092612 [ThreadId 43] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/CallsFilterInfo.hs"
2021-07-27 11:25:22.987741752 [ThreadId 35] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/Calls.hs"
2021-07-27 11:25:22.988110641 [ThreadId 45] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/AgentProfile.hs"
2021-07-27 11:25:22.988164606 [ThreadId 44] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/Visibility.hs"
2021-07-27 11:25:22.988616135 [ThreadId 37] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Server.hs"
2021-07-27 11:25:22.989071583 [ThreadId 39] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/CallsBy.hs"
2021-07-27 11:25:22.989233236 [ThreadId 40] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/Data/Aeson/Via.hs"
2021-07-27 11:25:22.989255963 [ThreadId 43] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/ApiTypes.hs"
2021-07-27 11:25:22.989633158 [ThreadId 35] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/Data/Aeson/TypeScript.hs"
2021-07-27 11:25:22.990077256 [ThreadId 45] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Common.hs"
2021-07-27 11:25:22.990039297 [ThreadId 52] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/CallsBy.hs"
2021-07-27 11:25:22.990490001 [ThreadId 37] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/Call.hs"
2021-07-27 11:25:22.990567076 [ThreadId 39] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/CallTranscript.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:23.871013208 [ThreadId 52] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:23.872199148 [ThreadId 72] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/ApiTypes.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
2021-07-27 11:25:23.873749982 [ThreadId 101] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/CallsBy.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:24.802487764 [ThreadId 72] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:24.803053968 [ThreadId 31] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/ApiTypes.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:24.803440729 [ThreadId 115] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/Call.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:25.721722102 [ThreadId 115] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:25.722254852 [ThreadId 36] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/Call.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:25.722732914 [ThreadId 134] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/AgentProfile.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:26.622482299 [ThreadId 134] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:26.623045898 [ThreadId 41] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/AgentProfile.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:26.623695317 [ThreadId 153] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/CallsFilterInfo.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:27.542327287 [ThreadId 153] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:27.5429949 [ThreadId 29] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/CallsFilterInfo.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:27.543232548 [ThreadId 172] INFO hls:	Consulting the cradle for "lib/Data/Aeson/TypeScript.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:28.47248382 [ThreadId 172] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:28.473021239 [ThreadId 33] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/Data/Aeson/TypeScript.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:28.473492438 [ThreadId 191] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/CallTranscript.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:29.40252644 [ThreadId 191] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:29.403073289 [ThreadId 38] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/CallTranscript.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:29.403337438 [ThreadId 210] INFO hls:	Consulting the cradle for "lib/Data/Aeson/Via.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:30.332507554 [ThreadId 210] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:30.333104247 [ThreadId 42] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/Data/Aeson/Via.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:30.333470323 [ThreadId 229] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Common.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:31.261808136 [ThreadId 229] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:31.262289861 [ThreadId 44] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Common.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:31.262692476 [ThreadId 248] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/Calls.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:32.151260487 [ThreadId 248] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:32.151915863 [ThreadId 43] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/Calls.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:32.152140402 [ThreadId 267] INFO hls:	Consulting the cradle for "lib/MyLibrary/Visibility.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:33.071631783 [ThreadId 267] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:33.072222149 [ThreadId 35] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/Visibility.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:33.072512767 [ThreadId 286] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:33.990842123 [ThreadId 286] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:33.991489809 [ThreadId 45] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:33.991863681 [ThreadId 305] INFO hls:	Consulting the cradle for "src/tsdef.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Using main module: 1. Package `ui-data-api' component ui-data-api:exe:tsdef with main-is file: /home/cmdv/src/myproject/ui-data-api/src/tsdef.hs
> ui-data-api> initial-build-steps (lib + internal-lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -Werror -threaded
> Configuring GHCi with the following packages: ui-data-api
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:37.019208244 [ThreadId 305] DEBUG hls:	Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/home/cmdv/src/myproject/ui-data-api/.stack-work/odir","-hidir=/home/cmdv/src/myproject/ui-data-api/.stack-work/odir","-hide-all-packages","-i/home/cmdv/src/myproject/ui-data-api/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build/tsdef","-i/home/cmdv/src/myproject/ui-data-api/src","-i/home/cmdv/src/myproject/ui-data-api/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build/tsdef/autogen","-i/home/cmdv/src/myproject/ui-data-api/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build/global-autogen","-i/home/cmdv/src/myproject/ui-data-api/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build/tsdef/tsdef-tmp","-stubdir=/home/cmdv/src/myproject/ui-data-api/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build","-package-id=ui-data-api-0.1.1.0-5jViS76IGAnATDB43jWjZe-ui-data-api-internal","-package-id=base-4.13.0.0","-package-id=bytestring-0.10.10.1","-package-id=generics-sop-0.5.1.0-H1th4oIoN2m5YM7psbMTlX","-package-id=rio-0.1.19.0-EfV6cMQ47iV7wrWULuSa7j","-package-id=servant-server-0.16.2-DtM513vIueO2ASAlHqJYN5","-package-id=text-1.2.4.0","-package-id=time-1.9.3","-package-id=uuid-1.3.13-7mh2uH4tbRnEH3KvrUZMoX","-Wall","-Wcompat","-Wincomplete-uni-patterns","-Widentities","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/cmdv/src/myproject/ui-data-api/.stack-work/ghci/a3ab87a6/cabal_macros.h","-ghci-script=/tmp/haskell-stack-ghci/340aff53/ghci-script","-package-db","/home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb","-package-db","/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb","-package-db","/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d"], componentRoot = "/home/cmdv/src/myproject/ui-data-api", componentDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"]},"/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4")
2021-07-27 11:25:37.133032083 [ThreadId 305] INFO hls:	Using interface files cache dir: /home/cmdv/.cache/ghcide/main-bcf66e48def235a36acd25821ed9a3a9624a1635
2021-07-27 11:25:37.133545894 [ThreadId 305] INFO hls:	Making new HscEnv[main]
2021-07-27 11:25:37.192361391 [ThreadId 305] DEBUG hls:	New Component Cache HscEnvEq: (([],Just HscEnvEq 5),fromList [("/home/cmdv/src/myproject/ui-data-api/hie.yaml",Just 2021-07-26 19:37:23.325264763 UTC),("package.yaml",Just 2021-07-26 19:11:01.607721762 UTC),("stack.yaml",Just 2021-07-05 09:52:23.374858118 UTC),("ui-data-api.cabal",Just 2021-07-26 19:33:01.271747795 UTC)])
2021-07-27 11:25:37.203253673 [ThreadId 305] DEBUG hls:	Known files updated: fromList [(TargetFile NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/src/tsdef.hs",fromList ["/home/cmdv/src/myproject/ui-data-api/src/tsdef.hs"]),(TargetModule Paths_ui_data_api,fromList ["/home/cmdv/src/myproject/ui-data-api/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build/tsdef/autogen/Paths_ui_data_api.hs"])]
2021-07-27 11:25:37.204016372 [ThreadId 25] DEBUG hls:	Finishing build session(exception: AsyncCancelled)
2021-07-27 11:25:37.204156762 [ThreadId 305] DEBUG hls:	Restarting build session for keys [GhcSessionIO; ] (aborting the previous one took 0.00s)
2021-07-27 11:25:37.208541431 [ThreadId 365] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/src/tsdef.hs"
2021-07-27 11:25:37.209541755 [ThreadId 368] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Server.hs"
2021-07-27 11:25:37.209531356 [ThreadId 380] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/CallsFilterInfo.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:38.168408591 [ThreadId 380] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:38.16914473 [ThreadId 393] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/CallsBy.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:39.078406541 [ThreadId 393] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:39.079300927 [ThreadId 431] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/CallTranscript.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:39.998233782 [ThreadId 431] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:39.999038194 [ThreadId 448] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/Calls.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:40.934735642 [ThreadId 448] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:40.935426054 [ThreadId 466] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/AgentProfile.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:41.864228539 [ThreadId 466] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:41.865040107 [ThreadId 484] INFO hls:	Consulting the cradle for "lib/Data/Aeson/TypeScript.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:42.794048039 [ThreadId 484] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:42.79475254 [ThreadId 502] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Endpoints/Call.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:43.713735774 [ThreadId 502] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:43.714484364 [ThreadId 520] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Common.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:44.643318124 [ThreadId 520] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:44.644041688 [ThreadId 538] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/ApiTypes.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:45.572459289 [ThreadId 538] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:45.573096149 [ThreadId 556] INFO hls:	Consulting the cradle for "lib/MyLibrary/Visibility.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:46.493120929 [ThreadId 556] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:46.4943686 [ThreadId 579] INFO hls:	Consulting the cradle for "lib/Data/Aeson/Via.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
2021-07-27 11:25:46.587432794 [ThreadId 623] DEBUG hls:	hlint:getIdeas:setExtensions:[Cpp,OverlappingInstances,UndecidableInstances,IncoherentInstances,UndecidableSuperClasses,MonomorphismRestriction,MonoPatBinds,MonoLocalBinds,RelaxedPolyRec,ExtendedDefaultRules,ForeignFunctionInterface,UnliftedFFITypes,InterruptibleFFI,CApiFFI,GHCForeignImportPrim,JavaScriptFFI,ParallelArrays,TemplateHaskell,TemplateHaskellQuotes,ImplicitParams,ImplicitPrelude,ScopedTypeVariables,AllowAmbiguousTypes,UnliftedNewtypes,BangPatterns,TypeFamilies,TypeFamilyDependencies,TypeInType,OverloadedStrings,OverloadedLists,NumDecimals,DisambiguateRecordFields,RecordWildCards,RecordPuns,ViewPatterns,GADTs,GADTSyntax,NPlusKPatterns,DoAndIfThenElse,BlockArguments,RebindableSyntax,ConstraintKinds,PolyKinds,DataKinds,InstanceSigs,ApplicativeDo,StandaloneDeriving,DeriveDataTypeable,AutoDeriveTypeable,DeriveFunctor,DeriveTraversable,DeriveFoldable,DeriveGeneric,DefaultSignatures,DeriveAnyClass,DeriveLift,DerivingStrategies,DerivingVia,TypeSynonymInstances,FlexibleContexts,FlexibleInstances,ConstrainedClassMethods,MultiParamTypeClasses,NullaryTypeClasses,FunctionalDependencies,UnicodeSyntax,ExistentialQuantification,MagicHash,EmptyDataDecls,KindSignatures,RoleAnnotations,ParallelListComp,MonadComprehensions,GeneralizedNewtypeDeriving,PostfixOperators,TupleSections,PatternGuards,MyLibraryeralTypeSynonyms,RankNTypes,ImpredicativeTypes,TypeOperators,ExplicitNamespaces,PackageImports,ExplicitForAll,AlternativeLayoutRuleTransitional,DatatypeContexts,NondecreasingIndentation,RelaxedLayout,TraditionalRecordSyntax,LambdaCase,MultiWayIf,BinaryLiterals,HexFloatLiterals,DuplicateRecordFields,OverloadedLabels,EmptyCase,PatternSynonyms,PartialTypeSignatures,NamedWildCards,TypeApplications,Strict,StrictData,MonadFailDesugaring,EmptyDataDeriving,NumericUnderscores,QuantifiedConstraints,ImportQualifiedPost,CUSKs,StandaloneKindSignatures,StarIsType]
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:47.403821672 [ThreadId 579] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:47.404943994 [ThreadId 631] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData/Internal/Server.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:48.306706272 [ThreadId 631] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:48.307545313 [ThreadId 369] INFO hls:	File:     /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Server.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Failed to parse result of calling stack
  Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
  Note that to specify options to be passed to GHCi, use the --ghci-options flag
2021-07-27 11:25:48.307830754 [ThreadId 654] INFO hls:	Consulting the cradle for "lib/MyLibrary/UiData.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/cmdv/src/myproject/ui-data-api", cradleOptsProg = CradleAction: Stack}
> Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /home/cmdv/src/myproject/ui-data-api/.stack-work/install/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/snapshots/x86_64-linux-tinfo6/6bd7878166798e59eb485b42bb6602dbb5b65c7a5e37379dd5ea71306078f025/8.8.4/pkgdb:/home/cmdv/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/lib/ghc-8.8.4/package.conf.d
2021-07-27 11:25:49.226606899 [ThreadId 654] DEBUG hls:	Session loading result: Left [CradleError {cradleErrorDependencies = ["ui-data-api.cabal","package.yaml","stack.yaml"], cradleErrorExitCode = ExitFailure 1, cradleErrorStderr = ["Failed to parse result of calling stack","Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal","Note that to specify options to be passed to GHCi, use the --ghci-options flag"]}]
2021-07-27 11:25:49.227512565 [ThreadId 683] INFO hls:	finish: User TypeCheck (took 12.02s)
2021-07-27 11:25:49.22951976 [ThreadId 686] INFO hls:	finish: GetHie (took 0.00s)
2021-07-27 11:25:49.231581921 [ThreadId 710] INFO hls:	finish: GenerateCore (took 0.00s)
Files that failed:
 * /home/cmdv/src/myproject/ui-data-api/lib/Data/Aeson/TypeScript.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/Data/Aeson/Via.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/Visibility.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/ApiTypes.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Common.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Server.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/AgentProfile.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/Call.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/CallTranscript.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/Calls.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/CallsBy.hs
 * /home/cmdv/src/myproject/ui-data-api/lib/MyLibrary/UiData/Internal/Endpoints/CallsFilterInfo.hs

Completed (1 file worked, 13 files failed)
haskell-language-server-wrapper: callProcess: /home/cmdv/.ghcup/bin/haskell-language-server-8.8.4 "--debug" (exit 13): failed

Paste the logs from the lsp-client, e.g. for VS Code

LSP logs:
Failed to parse result of calling stack
 Error parsing targets: Directory not found: ui-data-api:myLibrary:ui-data-api-internal
 Note that to specify options to be passed to GHCi, use the --ghci-options flag
@Cmdv
Copy link
Author

Cmdv commented Jul 27, 2021

under further investigation, I can get HLS to work on a brand new project generated with Stack. When doing an stack new ...

It very much points to the ./package.yml file and how that's setup being incorrect.

If anyone has any ideas that would be great othewise I'll keep digging through the Stack docs and report back as when searching for that error message I couldn't find anything online.

@jneira jneira added type: setup build tool: stack type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jul 27, 2021
@Cmdv
Copy link
Author

Cmdv commented Jul 27, 2021

Ok so the behaviour went away after I changed my package.yaml by deleting

internal-libraries:
  ui-data-api-internal:
package.yaml:
name:                ui-data-api
version:             0.1.1.0
license:             AllRightsReserved
maintainer:          
copyright:           

description:         "UI data API"

ghc-options:
  -Werror
  -Wall
  -Wcompat
  -Wincomplete-uni-patterns
  -Widentities

dependencies:
- base >= 4.7 && < 5
- text
- bytestring

library:
  source-dirs: lib
  dependencies:
  - aeson
  - authm2 ^>= 0.2.0.0
  - beam-core
  - beam-postgres
  - containers
  - generics-sop
  - lisa-db
  - mtl
  - postgresql-simple
  - resource-pool
  - rio
  - servant-server
  - time
  - uuid
  exposed-modules:
  - MyLibrary.UiData
  - MyLibrary.Visibility
  - MyLibrary.UiData.Internal.ApiTypes
  - Data.Aeson.TypeScript

executables:
  tsdef:
    main: tsdef.hs
    source-dirs: src
    ghc-options:
    - -threaded
    - -rtsopts
    - -with-rtsopts=-N
    dependencies:
    - ui-data-api
    - generics-sop
    - rio
    - servant-server
    - time
    - uuid

and moving it's content to library level and changing reexported-modules: -> exposed-modules:

my hie.yaml when regenerated became:

cradle:
  stack:
    - path: "./lib"
      component: "ui-data-api:lib"

    - path: "./src/tsdef.hs"
      component: "ui-data-api:exe:tsdef"

    - path: "./src/Paths_ui_data_api.hs"
      component: "ui-data-api:exe:tsdef"

I'm not sure if it's internal-libraries: that makes things not work but that would be my guess.
Also unsure if this is actually supported by HLS 😄

@jneira
Copy link
Member

jneira commented Jul 28, 2021

Thank so much for the detailed bug report and the further investigation 🙂
I am afraid that internal libraries (aka private libraries i guess) are not supported by hls and stack, as you suspected.
We have an old issue (#114) about which is blocked upstream, depending on a stack issue: commercialhaskell/stack#4564.
The reproduction with stack standalone would be try to load the internal library in a repl (hls uses stack repl underneath to load components) so it would be great, if you got the chance, confirm you can't load the private lib with stack clean && stack repl ui-data-api:myLibrary:ui-data-api-internal

@jneira jneira added the status: needs info Not actionable, because there's missing information label Jul 28, 2021
@jneira jneira changed the title Error parsing targets - Directory not found Error parsing targets - Directory not found using internal (private) libraries and stack Jul 28, 2021
@Cmdv
Copy link
Author

Cmdv commented Jul 28, 2021

@jneira ahhh I was reading that issue you linked last night and was going to report back asking if it might be related to this!

As requested I tried:

> stack repl ui-data-api:lib:ui-data-api-internal
Error parsing targets: Directory not found: ui-data-api:lib:ui-data-api-internal
Note that to specify options to be passed to GHCi, use the --ghci-options flag

it should be lib not myLibrary as I made a typo when trying to remove sensitive info 😅

Should be noted that it was happy with:

> stack repl ui-data-api:lib

Which all points to the support of internal libraies in stack 😞, tbh I've not really had to use them before but current projects I'm working on use them extensively

@jneira
Copy link
Member

jneira commented Jul 28, 2021

Should be noted that it was happy with:

stack repl ui-data-api:lib

mmm and does it work if you does a stack clean --full && stack repl ui-data-api:lib?
If stack repl works (even having to do a stack build before), hls should too

@jneira
Copy link
Member

jneira commented Jul 28, 2021

Oh i am just aware that ui-data-api:lib supposes it has been changed to a public lib so it works

@jneira
Copy link
Member

jneira commented Jul 28, 2021

@Cmdv so if you dont mind, i would close this one as duplicate of the mentioned #114, as you could track the eventual resolution there

@Cmdv
Copy link
Author

Cmdv commented Jul 28, 2021

yeah that works for me, no point in having dups 😄
Think it must have been a fluke with things working as:

> stack clean --full && stack repl ui-data-api:lib
...
<command line>: cannot satisfy -package z-ui-data-api-z-ui-data-api-internal

which I spotted was mentioned in another stack issue that I can't seem to find!

Thanks for the very prompt help, much appreciated 👍

@Cmdv Cmdv closed this as completed Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tool: stack status: needs info Not actionable, because there's missing information type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

2 participants