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

HLS fails for unpublished dependency version #3657

Closed
marcosh opened this issue Jun 12, 2023 · 6 comments
Closed

HLS fails for unpublished dependency version #3657

marcosh opened this issue Jun 12, 2023 · 6 comments
Labels
build tool: stack type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@marcosh
Copy link

marcosh commented Jun 12, 2023

My project depends on a fork of a library which has a version number which is not published on Hackage. While this is not a problem for Stack, it appears to be a problem for HLS when used inside VScode

Your environment

Which OS do you use?
Manjaro Linux

Which version of GHC do you use and how did you install it?
GHC 9.2.7 installed with ghcup

How is your project built (alternative: link to the project)?
https://github.com/marcosh/wrong-dependency-version-test

Which LSP client (editor/plugin) do you use?
VSCode

Which version of HLS do you use and how did you install it?
2.0.0 from ghcup

Have you configured HLS in any way (especially: a hie.yaml file)?
I have the following hie.yaml

cradle:
  stack:

What's wrong?

Building the project with stack build works fine.
Inspecting the project with haskell-language-server-wrapper works fine.
Opening the src/Foo.hs file with Visual Studio Code produces the following error:

<command line>: cannot satisfy -package yesod-job-queue-0.4.0.0
    (use -v for more information) compiler

Debug information

The Output section of VSCode produces the following output

2023-06-12 15:10:35.4520000 [client] DEBUG Environment variables:
2023-06-12 15:10:35.4520000 [client] DEBUG   PATH: /home/marcosh/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
2023-06-12 15:10:35.4520000 [client] INFO Finding haskell-language-server
2023-06-12 15:10:35.4530000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:35.4530000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:35.4530000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:35.4640000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose upgrade' in cwd '/home/marcosh'
2023-06-12 15:10:35.6840000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose upgrade' terminated with code 0
2023-06-12 15:10:35.6850000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:35.6850000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:35.6850000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:35.6920000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose list -t hls -c installed -r' in cwd '/home/marcosh'
2023-06-12 15:10:35.7390000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose list -t hls -c installed -r' terminated with code 0
2023-06-12 15:10:35.7390000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:35.7390000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:35.7390000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:35.7480000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose list -t cabal -c installed -r' in cwd '/home/marcosh'
2023-06-12 15:10:35.7960000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose list -t cabal -c installed -r' terminated with code 0
2023-06-12 15:10:35.7970000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:35.7970000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:35.7970000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:35.8040000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose list -t stack -c installed -r' in cwd '/home/marcosh'
2023-06-12 15:10:35.8500000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose list -t stack -c installed -r' terminated with code 0
2023-06-12 15:10:35.8570000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:35.8570000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:35.8570000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:35.8640000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose list -t ghc -c available -r' in cwd '/home/marcosh'
2023-06-12 15:10:35.9220000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose list -t ghc -c available -r' terminated with code 0
2023-06-12 15:10:35.9230000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:35.9230000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:35.9230000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:35.9310000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis hls 2.0.0.0' in cwd '/home/marcosh'
2023-06-12 15:10:35.9480000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis hls 2.0.0.0' terminated with code 0
2023-06-12 15:10:35.9480000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:35.9480000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:35.9480000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:35.9560000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis cabal 3.8.1.0' in cwd '/home/marcosh'
2023-06-12 15:10:35.9730000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis cabal 3.8.1.0' terminated with code 0
2023-06-12 15:10:35.9730000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:35.9730000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:35.9730000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:35.9800000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis stack 2.9.3' in cwd '/home/marcosh'
2023-06-12 15:10:35.9980000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis stack 2.9.3' terminated with code 0
2023-06-12 15:10:36.0070000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:36.0070000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:36.0070000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:36.0140000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis ghc 9.2.8' in cwd '/home/marcosh'
2023-06-12 15:10:36.0320000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis ghc 9.2.8' terminated with code 0
2023-06-12 15:10:36.0320000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:36.0320000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:36.0320000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:36.0400000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose run --hls 2.0.0.0 --cabal 3.8.1.0 --stack 2.9.3 --ghc 9.2.8 --install' in cwd '/home/marcosh'
2023-06-12 15:10:36.0970000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose run --hls 2.0.0.0 --cabal 3.8.1.0 --stack 2.9.3 --ghc 9.2.8 --install' terminated with code 0
2023-06-12 15:10:36.0980000 [client] INFO Working out the project GHC version. This might take a while...
2023-06-12 15:10:36.0980000 [client] INFO Executing 'haskell-language-server-wrapper --project-ghc-version' in cwd '/home/marcosh/projects/haskell/wrong-dependecy-version-test'
2023-06-12 15:10:36.8580000 [client] DEBUG Execution of 'haskell-language-server-wrapper --project-ghc-version' terminated with code 0
2023-06-12 15:10:36.8590000 [client] INFO The GHC version for the project or file: 9.2.7
2023-06-12 15:10:37.0670000 [client] INFO Platform constants: Linux_UnknownLinux, A_64
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.1.0 compatible with GHC Versions: 8.10.2,8.10.3,8.10.4,8.6.4,8.6.5,8.8.2,8.8.3,8.8.4
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.2.0 compatible with GHC Versions: 8.10.2,8.10.3,8.10.4,8.10.5,8.6.4,8.6.5,8.8.2,8.8.3,8.8.4
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.3.0 compatible with GHC Versions: 8.10.2,8.10.3,8.10.4,8.10.5,8.6.4,8.6.5,8.8.3,8.8.4,9.0.1
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.4.0 compatible with GHC Versions: 8.10.2,8.10.3,8.10.4,8.10.5,8.10.6,8.10.7,8.6.4,8.6.5,8.8.3,8.8.4,9.0.1
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.5.0 compatible with GHC Versions: 8.10.5,8.10.6,8.10.7,8.6.5,8.8.3,8.8.4,9.0.1
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.5.1 compatible with GHC Versions: 8.10.5,8.10.6,8.10.7,8.6.5,8.8.3,8.8.4,9.0.1
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.6.0.0 compatible with GHC Versions: 8.10.6,8.10.7,8.6.5,8.8.4,9.0.1,9.0.2,9.2.1
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.6.1.0 compatible with GHC Versions: 8.10.6,8.10.7,8.6.5,8.8.4,9.0.1,9.0.2,9.2.1
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.7.0.0 compatible with GHC Versions: 8.6.5,8.8.4,8.10.7,9.0.2,9.2.1,9.2.2
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.8.0.0 compatible with GHC Versions: 8.6.5,8.8.4,8.10.7,9.0.2,9.2.3,9.2.4,9.4.1,9.4.2
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.9.0.0 compatible with GHC Versions: 8.10.7,9.0.2,9.2.5,9.4.3,9.4.4
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.9.1.0 compatible with GHC Versions: 8.10.7,9.0.2,9.2.5,9.2.6,9.4.4
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 1.10.0.0 compatible with GHC Versions: 8.10.7,9.0.2,9.2.7,9.4.4,9.6.1
2023-06-12 15:10:37.0670000 [client] DEBUG HLS 2.0.0.0 compatible with GHC Versions: 8.10.7,9.0.2,9.2.7,9.4.5,9.6.1
2023-06-12 15:10:37.0690000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:37.0690000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:37.0690000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:37.0820000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose list -t hls -c installed -r' in cwd '/home/marcosh'
2023-06-12 15:10:37.1420000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose list -t hls -c installed -r' terminated with code 0
2023-06-12 15:10:37.1430000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:37.1430000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:37.1430000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:37.1500000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis bindir' in cwd '/home/marcosh'
2023-06-12 15:10:37.1660000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis bindir' terminated with code 0
2023-06-12 15:10:37.1680000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:37.1680000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:37.1680000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:37.1740000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis hls 2.0.0.0' in cwd '/home/marcosh'
2023-06-12 15:10:37.1940000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis hls 2.0.0.0' terminated with code 0
2023-06-12 15:10:37.1950000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:37.1950000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:37.1950000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:37.2020000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis ghc 9.2.7' in cwd '/home/marcosh'
2023-06-12 15:10:37.2190000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose whereis ghc 9.2.7' terminated with code 0
2023-06-12 15:10:37.2190000 [client] INFO Checking for ghcup installation
2023-06-12 15:10:37.2190000 [client] INFO Trying to find the ghcup executable in: ~/.ghcup/bin/ghcup
2023-06-12 15:10:37.2190000 [client] DEBUG Location after path variables substitution: /home/marcosh/.ghcup/bin/ghcup
2023-06-12 15:10:37.2260000 [client] INFO Executing '/home/marcosh/.ghcup/bin/ghcup --no-verbose run --hls 2.0.0.0 --cabal 3.8.1.0 --stack 2.9.3 --ghc 9.2.7 --install' in cwd '/home/marcosh'
2023-06-12 15:10:37.2830000 [client] DEBUG Execution of '/home/marcosh/.ghcup/bin/ghcup --no-verbose run --hls 2.0.0.0 --cabal 3.8.1.0 --stack 2.9.3 --ghc 9.2.7 --install' terminated with code 0
2023-06-12 15:10:37.2840000 [client] INFO Activating the language server in working dir: /home/marcosh/projects/haskell/wrong-dependecy-version-test (the workspace folder)
2023-06-12 15:10:37.2840000 [client] INFO run command: /home/marcosh/.ghcup/tmp/ghcup-ghc-9.2.7_cabal-3.8.1.0_hls-2.0.0.0_stack-2.9.3/haskell-language-server-wrapper --lsp
2023-06-12 15:10:37.2840000 [client] INFO debug command: /home/marcosh/.ghcup/tmp/ghcup-ghc-9.2.7_cabal-3.8.1.0_hls-2.0.0.0_stack-2.9.3/haskell-language-server-wrapper --lsp
2023-06-12 15:10:37.2840000 [client] INFO server environment variables:
2023-06-12 15:10:37.2840000 [client] INFO   PATH=/home/marcosh/.ghcup/tmp/ghcup-ghc-9.2.7_cabal-3.8.1.0_hls-2.0.0.0_stack-2.9.3:/home/marcosh/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
2023-06-12 15:10:37.2840000 [client] DEBUG document selector patten: /home/marcosh/projects/haskell/wrong-dependecy-version-test/**/*
2023-06-12 15:10:37.2900000 [client] INFO Starting language server
[Trace - 17:10:37] Sending request 'initialize - (0)'.
Params: {
    "processId": 177586,
    "clientInfo": {
        "name": "Visual Studio Code",
        "version": "1.78.2"
    },
    "locale": "en-us",
    "rootPath": "/home/marcosh/projects/haskell/wrong-dependecy-version-test",
    "rootUri": "file:///home/marcosh/projects/haskell/wrong-dependecy-version-test",
    "capabilities": {
        "workspace": {
            "applyEdit": true,
            "workspaceEdit": {
                "documentChanges": true,
                "resourceOperations": [
                    "create",
                    "rename",
                    "delete"
                ],
                "failureHandling": "textOnlyTransactional",
                "normalizesLineEndings": true,
                "changeAnnotationSupport": {
                    "groupsOnLabel": true
                }
            },
            "didChangeConfiguration": {
                "dynamicRegistration": true
            },
            "didChangeWatchedFiles": {
                "dynamicRegistration": true
            },
            "symbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                }
            },
            "codeLens": {
                "refreshSupport": true
            },
            "executeCommand": {
                "dynamicRegistration": true
            },
            "configuration": true,
            "workspaceFolders": true,
            "semanticTokens": {
                "refreshSupport": true
            },
            "fileOperations": {
                "dynamicRegistration": true,
                "didCreate": true,
                "didRename": true,
                "didDelete": true,
                "willCreate": true,
                "willRename": true,
                "willDelete": true
            }
        },
        "textDocument": {
            "publishDiagnostics": {
                "relatedInformation": true,
                "versionSupport": false,
                "tagSupport": {
                    "valueSet": [
                        1,
                        2
                    ]
                },
                "codeDescriptionSupport": true,
                "dataSupport": true
            },
            "synchronization": {
                "dynamicRegistration": true,
                "willSave": true,
                "willSaveWaitUntil": true,
                "didSave": true
            },
            "completion": {
                "dynamicRegistration": true,
                "contextSupport": true,
                "completionItem": {
                    "snippetSupport": true,
                    "commitCharactersSupport": true,
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "deprecatedSupport": true,
                    "preselectSupport": true,
                    "tagSupport": {
                        "valueSet": [
                            1
                        ]
                    },
                    "insertReplaceSupport": true,
                    "resolveSupport": {
                        "properties": [
                            "documentation",
                            "detail",
                            "additionalTextEdits"
                        ]
                    },
                    "insertTextModeSupport": {
                        "valueSet": [
                            1,
                            2
                        ]
                    }
                },
                "completionItemKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25
                    ]
                }
            },
            "hover": {
                "dynamicRegistration": true,
                "contentFormat": [
                    "markdown",
                    "plaintext"
                ]
            },
            "signatureHelp": {
                "dynamicRegistration": true,
                "signatureInformation": {
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "parameterInformation": {
                        "labelOffsetSupport": true
                    },
                    "activeParameterSupport": true
                },
                "contextSupport": true
            },
            "definition": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "references": {
                "dynamicRegistration": true
            },
            "documentHighlight": {
                "dynamicRegistration": true
            },
            "documentSymbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "hierarchicalDocumentSymbolSupport": true,
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                },
                "labelSupport": true
            },
            "codeAction": {
                "dynamicRegistration": true,
                "isPreferredSupport": true,
                "disabledSupport": true,
                "dataSupport": true,
                "resolveSupport": {
                    "properties": [
                        "edit"
                    ]
                },
                "codeActionLiteralSupport": {
                    "codeActionKind": {
                        "valueSet": [
                            "",
                            "quickfix",
                            "refactor",
                            "refactor.extract",
                            "refactor.inline",
                            "refactor.rewrite",
                            "source",
                            "source.organizeImports"
                        ]
                    }
                },
                "honorsChangeAnnotations": false
            },
            "codeLens": {
                "dynamicRegistration": true
            },
            "formatting": {
                "dynamicRegistration": true
            },
            "rangeFormatting": {
                "dynamicRegistration": true
            },
            "onTypeFormatting": {
                "dynamicRegistration": true
            },
            "rename": {
                "dynamicRegistration": true,
                "prepareSupport": true,
                "prepareSupportDefaultBehavior": 1,
                "honorsChangeAnnotations": true
            },
            "documentLink": {
                "dynamicRegistration": true,
                "tooltipSupport": true
            },
            "typeDefinition": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "implementation": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "colorProvider": {
                "dynamicRegistration": true
            },
            "foldingRange": {
                "dynamicRegistration": true,
                "rangeLimit": 5000,
                "lineFoldingOnly": true
            },
            "declaration": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "selectionRange": {
                "dynamicRegistration": true
            },
            "callHierarchy": {
                "dynamicRegistration": true
            },
            "semanticTokens": {
                "dynamicRegistration": true,
                "tokenTypes": [
                    "namespace",
                    "type",
                    "class",
                    "enum",
                    "interface",
                    "struct",
                    "typeParameter",
                    "parameter",
                    "variable",
                    "property",
                    "enumMember",
                    "event",
                    "function",
                    "method",
                    "macro",
                    "keyword",
                    "modifier",
                    "comment",
                    "string",
                    "number",
                    "regexp",
                    "operator"
                ],
                "tokenModifiers": [
                    "declaration",
                    "definition",
                    "readonly",
                    "static",
                    "deprecated",
                    "abstract",
                    "async",
                    "modification",
                    "documentation",
                    "defaultLibrary"
                ],
                "formats": [
                    "relative"
                ],
                "requests": {
                    "range": true,
                    "full": {
                        "delta": true
                    }
                },
                "multilineTokenSupport": false,
                "overlappingTokenSupport": false
            },
            "linkedEditingRange": {
                "dynamicRegistration": true
            }
        },
        "window": {
            "showMessage": {
                "messageActionItem": {
                    "additionalPropertiesSupport": true
                }
            },
            "showDocument": {
                "support": true
            },
            "workDoneProgress": true
        },
        "general": {
            "regularExpressions": {
                "engine": "ECMAScript",
                "version": "ES2020"
            },
            "markdown": {
                "parser": "marked",
                "version": "1.1.0"
            }
        }
    },
    "trace": "verbose",
    "workspaceFolders": [
        {
            "uri": "file:///home/marcosh/projects/haskell/wrong-dependecy-version-test",
            "name": "wrong-dependecy-version-test"
        }
    ]
}


Found "/home/marcosh/projects/haskell/wrong-dependecy-version-test/hie.yaml" for "/home/marcosh/projects/haskell/wrong-dependecy-version-test/a"
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 2.0.0.0 x86_64 ghc-8.10.7
Current directory: /home/marcosh/projects/haskell/wrong-dependecy-version-test
Operating system: linux
Arguments: ["--lsp"]
Cradle directory: /home/marcosh/projects/haskell/wrong-dependecy-version-test
Cradle type: Stack

Tool versions found on the $PATH
cabal:          3.8.1.0
stack:          2.9.3
ghc:            9.2.7


Consulting the cradle to get project GHC version...
2023-06-12T15:10:37.356899Z | Debug | executing command: stack setup --silent
2023-06-12T15:10:37.880883Z | Debug | executing command: stack exec ghc -- --numeric-version
Project GHC version: 9.2.7
haskell-language-server exe candidates: ["haskell-language-server-9.2.7","haskell-language-server"]
Launching haskell-language-server exe at:/home/marcosh/.ghcup/tmp/ghcup-ghc-9.2.7_cabal-3.8.1.0_hls-2.0.0.0_stack-2.9.3/haskell-language-server-9.2.7
2023-06-12T15:10:38.098795Z | Debug | executing command: stack setup --silent
2023-06-12T15:10:38.592128Z | Debug | executing command: stack exec ghc -- -v0 -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
2023-06-12T15:10:38.845297Z | Debug | executing command: stack setup --silent
2023-06-12T15:10:39.328529Z | Debug | executing command: stack exec ghc -- --print-libdir
2023-06-12T15:10:40.270057Z | Info | No log file specified; using stderr.
2023-06-12T15:10:40.270475Z | Info | haskell-language-server version: 2.0.0.0 (GHC: 9.2.7) (PATH: /home/marcosh/.ghcup/hls/2.0.0.0/lib/haskell-language-server-2.0.0.0/bin/haskell-language-server-9.2.7)
2023-06-12T15:10:40.271179Z | Info | Directory: /home/marcosh/projects/haskell/wrong-dependecy-version-test
2023-06-12T15:10:40.271383Z | Info | Starting (haskell-language-server) LSP server...
  GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  PluginIds: [ pragmas
             , LSPRecorderCallback
             , rename
             , ghcide-completions
             , class
             , refineImports
             , splice
             , cabal
             , changeTypeSignature
             , qualifyImportedNames
             , alternateNumberFormat
             , hlint
             , cabalfmt
             , explicit-fields
             , ghcide-code-actions-fill-holes
             , floskell
             , ghcide-extend-import-action
             , codeRange
             , importLens
             , retrie
             , ghcide-type-lenses
             , ghcide-code-actions-imports-exports
             , ghcide-hover-and-symbols
             , eval
             , gadt
             , fourmolu
             , callHierarchy
             , stylish-haskell
             , ghcide-code-actions-type-signatures
             , ghcide-code-actions-bindings
             , moduleName
             , ormolu
             , ghcide-core
             , explicit-fixity ]
2023-06-12T15:10:40.274003Z | Info | Logging heap statistics every 60.00s
 2023-06-12T15:10:40.278821Z | Info | Starting LSP server...
  If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
  PluginIds: [ pragmas
             , LSPRecorderCallback
             , rename
             , ghcide-completions
             , class
             , refineImports
             , splice
             , cabal
             , changeTypeSignature
             , qualifyImportedNames
             , alternateNumberFormat
             , hlint
             , cabalfmt
             , explicit-fields
             , ghcide-code-actions-fill-holes
             , floskell
             , ghcide-extend-import-action
             , codeRange
             , importLens
             , retrie
             , ghcide-type-lenses
             , ghcide-code-actions-imports-exports
             , ghcide-hover-and-symbols
             , eval
             , gadt
             , fourmolu
             , callHierarchy
             , stylish-haskell
             , ghcide-code-actions-type-signatures
             , ghcide-code-actions-bindings
             , moduleName
             , ormolu
             , ghcide-core
             , explicit-fixity ]
2023-06-12T15:10:40.279187Z | Info | Starting server
2023-06-12T15:10:40.280459Z | Info | Started LSP server in 0.00s
2023-06-12T15:10:41.011056Z | Info | Registering IDE configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri (-5733421283881105183) "file:///home/marcosh/projects/haskell/wrong-dependecy-version-test"], clientSettings = hashed Nothing}
[Trace - 17:10:41] Received response 'initialize - (0)' in 3712ms.
Result: {
    "capabilities": {
        "callHierarchyProvider": true,
        "codeActionProvider": true,
        "codeLensProvider": {
            "resolveProvider": false,
            "workDoneProgress": false
        },
        "colorProvider": false,
        "completionProvider": {
            "resolveProvider": true,
            "triggerCharacters": [
                "."
            ]
        },
        "declarationProvider": false,
        "definitionProvider": true,
        "documentFormattingProvider": true,
        "documentHighlightProvider": true,
        "documentRangeFormattingProvider": true,
        "documentSymbolProvider": true,
        "executeCommandProvider": {
            "commands": [
                "177973:class:classplugin.codeaction",
                "177973:class:classplugin.typelens",
                "177973:refineImports:RefineImportLensCommand",
                "177973:splice:expandTHSpliceInplace",
                "177973:hlint:applyOne",
                "177973:hlint:applyAll",
                "177973:ghcide-extend-import-action:extendImport",
                "177973:importLens:ImportLensCommand",
                "177973:retrie:retrieCommand",
                "177973:retrie:retrieInlineThisCommand",
                "177973:ghcide-type-lenses:typesignature.add",
                "177973:eval:evalCommand",
                "177973:gadt:GADT.toGADT",
                "177973:moduleName:updateModuleName"
            ]
        },
        "foldingRangeProvider": true,
        "hoverProvider": true,
        "implementationProvider": false,
        "referencesProvider": true,
        "renameProvider": true,
        "selectionRangeProvider": true,
        "semanticTokensProvider": {
            "legend": {
                "tokenModifiers": [
                    "declaration",
                    "definition",
                    "readonly",
                    "static",
                    "deprecated",
                    "abstract",
                    "async",
                    "modification",
                    "documentation",
                    "defaultLibrary"
                ],
                "tokenTypes": [
                    "namespace",
                    "type",
                    "class",
                    "enum",
                    "interface",
                    "struct",
                    "typeParameter",
                    "parameter",
                    "variable",
                    "property",
                    "enumMember",
                    "event",
                    "function",
                    "method",
                    "macro",
                    "keyword",
                    "modifier",
                    "comment",
                    "string",
                    "number",
                    "regexp",
                    "operator"
                ]
            }
        },
        "textDocumentSync": {
            "change": 2,
            "openClose": true,
            "save": {}
        },
        "typeDefinitionProvider": true,
        "workspace": {
            "workspaceFolders": {
                "changeNotifications": true,
                "supported": true
            }
        },
        "workspaceSymbolProvider": true
    }
}


[Trace - 17:10:41] Sending notification 'initialized'.
Params: {}


[Trace - 17:10:41] Sending notification 'workspace/didChangeConfiguration'.
Params: {
    "settings": {
        "haskell": {
            "formattingProvider": "ormolu",
            "openDocumentationInHackage": true,
            "openSourceInHackage": true,
            "trace": {
                "server": "verbose",
                "client": "debug"
            },
            "logFile": "",
            "releasesURL": "",
            "metadataURL": "",
            "releasesDownloadStoragePath": "",
            "serverExecutablePath": "",
            "serverExtraArgs": "",
            "ghcupExecutablePath": "~/.ghcup/bin/ghcup",
            "serverEnvironment": {},
            "promptBeforeDownloads": "true",
            "manageHLS": "GHCup",
            "toolchain": {},
            "upgradeGHCup": true,
            "checkProject": true,
            "maxCompletions": 40,
            "plugin": {
                "alternateNumberFormat": {
                    "globalOn": true
                },
                "cabal": {
                    "globalOn": true
                },
                "callHierarchy": {
                    "globalOn": true
                },
                "changeTypeSignature": {
                    "globalOn": true
                },
                "class": {
                    "codeActionsOn": true,
                    "codeLensOn": true
                },
                "eval": {
                    "config": {
                        "diff": true,
                        "exception": false
                    },
                    "globalOn": true
                },
                "explicit-fields": {
                    "globalOn": true
                },
                "explicit-fixity": {
                    "globalOn": true
                },
                "fourmolu": {
                    "config": {
                        "external": false
                    }
                },
                "gadt": {
                    "globalOn": true
                },
                "ghcide-code-actions-bindings": {
                    "globalOn": true
                },
                "ghcide-code-actions-fill-holes": {
                    "globalOn": true
                },
                "ghcide-code-actions-imports-exports": {
                    "globalOn": true
                },
                "ghcide-code-actions-type-signatures": {
                    "globalOn": true
                },
                "ghcide-completions": {
                    "config": {
                        "autoExtendOn": true,
                        "snippetsOn": true
                    },
                    "globalOn": true
                },
                "ghcide-hover-and-symbols": {
                    "hoverOn": true,
                    "symbolsOn": true
                },
                "ghcide-type-lenses": {
                    "config": {
                        "mode": "always"
                    },
                    "globalOn": true
                },
                "haddockComments": {
                    "globalOn": true
                },
                "hlint": {
                    "codeActionsOn": true,
                    "config": {
                        "flags": []
                    },
                    "diagnosticsOn": true
                },
                "importLens": {
                    "codeActionsOn": true,
                    "codeLensOn": true
                },
                "moduleName": {
                    "globalOn": true
                },
                "pragmas": {
                    "codeActionsOn": true,
                    "completionOn": true
                },
                "qualifyImportedNames": {
                    "globalOn": true
                },
                "refineImports": {
                    "codeActionsOn": true,
                    "codeLensOn": true
                },
                "rename": {
                    "config": {
                        "crossModule": false
                    },
                    "globalOn": true
                },
                "retrie": {
                    "globalOn": true
                },
                "splice": {
                    "globalOn": true
                },
                "tactics": {
                    "codeActionsOn": true,
                    "codeLensOn": true,
                    "config": {
                        "auto_gas": 4,
                        "hole_severity": null,
                        "max_use_ctor_actions": 5,
                        "proofstate_styling": true,
                        "timeout_duration": 2
                    },
                    "hoverOn": true
                }
            },
            "indentationRules": {
                "enabled": true
            }
        }
    }
}


[Trace - 17:10:41] Sending notification 'textDocument/didOpen'.
Params: {
    "textDocument": {
        "uri": "file:///home/marcosh/projects/haskell/wrong-dependecy-version-test/src/Foo.hs",
        "languageId": "haskell",
        "version": 1,
        "text": "module Foo where\n\nfoo :: String\nfoo = \"foo\"\n"
    }
}


[Trace - 17:10:41] Received notification 'window/logMessage'.
Params: {
    "message": "haskell-language-server version: 2.0.0.0 (GHC: 9.2.7) (PATH: /home/marcosh/.ghcup/hls/2.0.0.0/lib/haskell-language-server-2.0.0.0/bin/haskell-language-server-9.2.7)",
    "type": 3
}


[Info  - 17:10:41] haskell-language-server version: 2.0.0.0 (GHC: 9.2.7) (PATH: /home/marcosh/.ghcup/hls/2.0.0.0/lib/haskell-language-server-2.0.0.0/bin/haskell-language-server-9.2.7)
[Trace - 17:10:41] Received notification 'window/logMessage'.
Params: {
    "message": "Directory: /home/marcosh/projects/haskell/wrong-dependecy-version-test",
    "type": 3
}


[Info  - 17:10:41] Directory: /home/marcosh/projects/haskell/wrong-dependecy-version-test
[Trace - 17:10:41] Received notification 'window/logMessage'.
Params: {
    "message": "Starting (haskell-language-server) LSP server...\n  GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}\n  PluginIds: [ pragmas\n             , LSPRecorderCallback\n             , rename\n             , ghcide-completions\n             , class\n             , refineImports\n             , splice\n             , cabal\n             , changeTypeSignature\n             , qualifyImportedNames\n             , alternateNumberFormat\n             , hlint\n             , cabalfmt\n             , explicit-fields\n             , ghcide-code-actions-fill-holes\n             , floskell\n             , ghcide-extend-import-action\n             , codeRange\n             , importLens\n             , retrie\n             , ghcide-type-lenses\n             , ghcide-code-actions-imports-exports\n             , ghcide-hover-and-symbols\n             , eval\n             , gadt\n             , fourmolu\n             , callHierarchy\n             , stylish-haskell\n             , ghcide-code-actions-type-signatures\n             , ghcide-code-actions-bindings\n             , moduleName\n             , ormolu\n             , ghcide-core\n             , explicit-fixity ]",
    "type": 3
}


[Info  - 17:10:41] Starting (haskell-language-server) LSP server...
  GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  PluginIds: [ pragmas
             , LSPRecorderCallback
             , rename
             , ghcide-completions
             , class
             , refineImports
             , splice
             , cabal
             , changeTypeSignature
             , qualifyImportedNames
             , alternateNumberFormat
             , hlint
             , cabalfmt
             , explicit-fields
             , ghcide-code-actions-fill-holes
             , floskell
             , ghcide-extend-import-action
             , codeRange
             , importLens
             , retrie
             , ghcide-type-lenses
             , ghcide-code-actions-imports-exports
             , ghcide-hover-and-symbols
             , eval
             , gadt
             , fourmolu
             , callHierarchy
             , stylish-haskell
             , ghcide-code-actions-type-signatures
             , ghcide-code-actions-bindings
             , moduleName
             , ormolu
             , ghcide-core
             , explicit-fixity ]
[Trace - 17:10:41] Received notification 'window/logMessage'.
Params: {
    "message": "Logging heap statistics every 60.00s",
    "type": 3
}


[Info  - 17:10:41] Logging heap statistics every 60.00s
[Trace - 17:10:41] Received notification 'window/logMessage'.
Params: {
    "message": "Starting LSP server...\n  If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!\n  PluginIds: [ pragmas\n             , LSPRecorderCallback\n             , rename\n             , ghcide-completions\n             , class\n             , refineImports\n             , splice\n             , cabal\n             , changeTypeSignature\n             , qualifyImportedNames\n             , alternateNumberFormat\n             , hlint\n             , cabalfmt\n             , explicit-fields\n             , ghcide-code-actions-fill-holes\n             , floskell\n             , ghcide-extend-import-action\n             , codeRange\n             , importLens\n             , retrie\n             , ghcide-type-lenses\n             , ghcide-code-actions-imports-exports\n             , ghcide-hover-and-symbols\n             , eval\n             , gadt\n             , fourmolu\n             , callHierarchy\n             , stylish-haskell\n             , ghcide-code-actions-type-signatures\n             , ghcide-code-actions-bindings\n             , moduleName\n             , ormolu\n             , ghcide-core\n             , explicit-fixity ]",
    "type": 3
}


[Info  - 17:10:41] Starting LSP server...
  If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
  PluginIds: [ pragmas
             , LSPRecorderCallback
             , rename
             , ghcide-completions
             , class
             , refineImports
             , splice
             , cabal
             , changeTypeSignature
             , qualifyImportedNames
             , alternateNumberFormat
             , hlint
             , cabalfmt
             , explicit-fields
             , ghcide-code-actions-fill-holes
             , floskell
             , ghcide-extend-import-action
             , codeRange
             , importLens
             , retrie
             , ghcide-type-lenses
             , ghcide-code-actions-imports-exports
             , ghcide-hover-and-symbols
             , eval
             , gadt
             , fourmolu
             , callHierarchy
             , stylish-haskell
             , ghcide-code-actions-type-signatures
             , ghcide-code-actions-bindings
             , moduleName
             , ormolu
             , ghcide-core
             , explicit-fixity ]
[Trace - 17:10:41] Received notification 'window/logMessage'.
Params: {
    "message": "Starting server",
    "type": 3
}


[Info  - 17:10:41] Starting server
[Trace - 17:10:41] Received notification 'window/logMessage'.
Params: {
    "message": "Started LSP server in 0.00s",
    "type": 3
}


[Info  - 17:10:41] Started LSP server in 0.00s
[Trace - 17:10:41] Received notification 'window/logMessage'.
Params: {
    "message": "Registering IDE configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri (-5733421283881105183) \"file:///home/marcosh/projects/haskell/wrong-dependecy-version-test\"], clientSettings = hashed Nothing}",
    "type": 3
}


[Info  - 17:10:41] Registering IDE configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri (-5733421283881105183) "file:///home/marcosh/projects/haskell/wrong-dependecy-version-test"], clientSettings = hashed Nothing}
[Trace - 17:10:41] Received request 'client/registerCapability - (0)'.
Params: {
    "registrations": [
        {
            "id": "globalFileWatches",
            "method": "workspace/didChangeWatchedFiles",
            "registerOptions": {
                "watchers": [
                    {
                        "globPattern": "**/*.hs",
                        "kind": 7
                    },
                    {
                        "globPattern": "**/*.hs-boot",
                        "kind": 7
                    },
                    {
                        "globPattern": "**/*.lhs",
                        "kind": 7
                    },
                    {
                        "globPattern": "**/*.lhs-boot",
                        "kind": 7
                    }
                ]
            }
        }
    ]
}


[Trace - 17:10:41] Sending response 'client/registerCapability - (0)'. Processing request took 0ms
No result returned.


[Trace - 17:10:41] Sending request 'textDocument/documentSymbol - (1)'.
Params: {
    "textDocument": {
        "uri": "file:///home/marcosh/projects/haskell/wrong-dependecy-version-test/src/Foo.hs"
    }
}


[Trace - 17:10:41] Sending request 'textDocument/codeAction - (2)'.
Params: {
    "textDocument": {
        "uri": "file:///home/marcosh/projects/haskell/wrong-dependecy-version-test/src/Foo.hs"
    },
    "range": {
        "start": {
            "line": 0,
            "character": 0
        },
        "end": {
            "line": 0,
            "character": 0
        }
    },
    "context": {
        "diagnostics": []
    }
}


2023-06-12T15:10:41.048501Z | Info | Cradle path: src/Foo.hs
2023-06-12T15:10:41.048902Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache)
[Trace - 17:10:41] Received notification 'window/logMessage'.
Params: {
    "message": "Cradle path: src/Foo.hs",
    "type": 3
}


[Info  - 17:10:41] Cradle path: src/Foo.hs
[Trace - 17:10:41] Received request 'window/workDoneProgress/create - (1)'.
Params: {
    "token": 0
}


[Trace - 17:10:41] Sending response 'window/workDoneProgress/create - (1)'. Processing request took 0ms
No result returned.


[Trace - 17:10:41] Received notification '$/progress'.
Params: {
    "token": 0,
    "value": {
        "cancellable": false,
        "kind": "begin",
        "title": "Setting up wrong-dependecy-version-test (for src/Foo.hs)"
    }
}


[Trace - 17:10:41] Received notification 'window/logMessage'.
Params: {
    "message": "invoking build tool to determine build flags (this may take some time depending on the cache)",
    "type": 3
}


[Info  - 17:10:41] invoking build tool to determine build flags (this may take some time depending on the cache)
[Trace - 17:10:41] Received request 'window/workDoneProgress/create - (2)'.
Params: {
    "token": "19"
}


[Trace - 17:10:41] Sending response 'window/workDoneProgress/create - (2)'. Processing request took 0ms
No result returned.


[Trace - 17:10:41] Received notification '$/progress'.
Params: {
    "token": "19",
    "value": {
        "kind": "begin",
        "title": "Processing"
    }
}


[Trace - 17:10:41] Sending request 'textDocument/foldingRange - (3)'.
Params: {
    "textDocument": {
        "uri": "file:///home/marcosh/projects/haskell/wrong-dependecy-version-test/src/Foo.hs"
    }
}


[Trace - 17:10:41] Sending request 'textDocument/codeLens - (4)'.
Params: {
    "textDocument": {
        "uri": "file:///home/marcosh/projects/haskell/wrong-dependecy-version-test/src/Foo.hs"
    }
}


[Trace - 17:10:41] Received notification '$/progress'.
Params: {
    "token": "19",
    "value": {
        "kind": "report",
        "message": "1/2"
    }
}


[Trace - 17:10:49] Received notification '$/progress'.
Params: {
    "token": 0,
    "value": {
        "kind": "end"
    }
}


2023-06-12T15:10:50.013491Z | Info | Interface files cache directory: /home/marcosh/.cache/ghcide/main-596ecbcc74a3cc95bee868590ac16562ed4ee32f
2023-06-12T15:10:50.013867Z | Info | Making new HscEnv. In-place unit ids: [main]
[Trace - 17:10:50] Received notification 'window/logMessage'.
Params: {
    "message": "Interface files cache directory: /home/marcosh/.cache/ghcide/main-596ecbcc74a3cc95bee868590ac16562ed4ee32f",
    "type": 3
}


[Info  - 17:10:50] Interface files cache directory: /home/marcosh/.cache/ghcide/main-596ecbcc74a3cc95bee868590ac16562ed4ee32f
[Trace - 17:10:50] Received notification 'window/logMessage'.
Params: {
    "message": "Making new HscEnv. In-place unit ids: [main]",
    "type": 3
}


[Info  - 17:10:50] Making new HscEnv. In-place unit ids: [main]
[Trace - 17:10:50] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "diagnostics": [
        {
            "message": "<command line>: cannot satisfy -package yesod-job-queue-0.4.0.0\n    (use -v for more information)",
            "range": {
                "end": {
                    "character": 0,
                    "line": 1
                },
                "start": {
                    "character": 0,
                    "line": 0
                }
            },
            "severity": 1,
            "source": "compiler"
        }
    ],
    "uri": "file:///home/marcosh/projects/haskell/wrong-dependecy-version-test/src/Foo.hs",
    "version": 1
}


2023-06-12T15:10:50.020229Z | Warning | changeTypeSignature: InternalError: Could not get Parsed Module
2023-06-12T15:10:50.020397Z | Warning | codeRange: bad dependency: GetCodeRange
2023-06-12T15:10:50.020463Z | Warning | alternateNumberFormat: InternalError: Could not Collect Literals
2023-06-12T15:10:50.020591Z | Warning | class: InternalError: Unable to typecheck
2023-06-12T15:10:50.020610Z | Warning | explicit-fields: InternalError: Could not get NextPragmaInfo
2023-06-12T15:10:50.020727Z | Warning | ghcide-type-lenses: InternalError: Unable to get GhcSession
2023-06-12T15:10:50.020777Z | Warning | retrie: InternalError: typecheck
2023-06-12T15:10:50.020806Z | Warning | eval: InternalError: Exception in plugin PluginId "eval" while processing STextDocumentCodeLens: BadDependency "GetEvalComments"
2023-06-12T15:10:50.020845Z | Warning | gadt: InternalError: Unable to get ParsedModuleWithComments
2023-06-12T15:10:50.020907Z | Warning | moduleName: InternalError: Exception in plugin PluginId "moduleName" while processing STextDocumentCodeLens: BadDependency "GhcSession"
[Trace - 17:10:50] Received response 'textDocument/documentSymbol - (1)' in 8975ms.
Result: []
@marcosh marcosh added status: needs triage type: support User support tickets, questions, help with setup etc. labels Jun 12, 2023
@fendor
Copy link
Collaborator

fendor commented Jun 12, 2023

Hi, thank you for your bug report!

Can you include the logs of the invocation haskell-language-server-wrapper --debug src/Foo.hs here?
At a first glance, I can't quite believe that HLS has a problem with unpublished dependency versions, since we have no idea about Hackage.

I presume, stack repl succeeds?

@marcosh
Copy link
Author

marcosh commented Jun 12, 2023

The logs of the haskell-language-server-wrapper --debug src/Foo.hs invocation are

Found "/home/marcosh/projects/haskell/wrong-dependecy-version-test/hie.yaml" for "/home/marcosh/projects/haskell/wrong-dependecy-version-test/a"                                                                                            
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 2.0.0.0 x86_64 ghc-8.10.7                                                                                                                          
Current directory: /home/marcosh/projects/haskell/wrong-dependecy-version-test                                                                                                                                                              
Operating system: linux                                                                                                                                                                                                                     
Arguments: ["--debug","src/Foo.hs"]                                                                                                                                                                                                         
Cradle directory: /home/marcosh/projects/haskell/wrong-dependecy-version-test                                                                                                                                                               
Cradle type: Stack                                                                                                                                                                                                                          
                                                                                                                                                                                                                                            
Tool versions found on the $PATH                                                                                                                                                                                                            
cabal:          3.8.1.0                                                                                                                                                                                                                     
stack:          2.9.3                                                                                                                                                                                                                       
ghc:            9.2.7                                                                                                                                                                                                                       
                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                            
Consulting the cradle to get project GHC version...                                                                                                                                                                                         
2023-06-12T21:50:34.933100Z | Debug | executing command: stack setup --silent                                                                                                                                                               
2023-06-12T21:50:35.667646Z | Debug | executing command: stack exec ghc -- --numeric-version                                                                                                                                                
Project GHC version: 9.2.7                                                                                                                                                                                                                  
haskell-language-server exe candidates: ["haskell-language-server-9.2.7","haskell-language-server"]                                                                                                                                         
Launching haskell-language-server exe at:/home/marcosh/.ghcup/bin/haskell-language-server-9.2.7                                                                                                                                             
2023-06-12T21:50:35.885073Z | Debug | executing command: stack setup --silent                                                                                                                                                               
2023-06-12T21:50:36.358262Z | Debug | executing command: stack exec ghc -- -v0 -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)                             
2023-06-12T21:50:36.637883Z | Debug | executing command: stack setup --silent                                                                                                                                                               
2023-06-12T21:50:37.111036Z | Debug | executing command: stack exec ghc -- --print-libdir                                                                                                                                                   
2023-06-12T21:50:38.413142Z | Info | No log file specified; using stderr.                                                                                                                                                                   
2023-06-12T21:50:38.414220Z | Info | haskell-language-server version: 2.0.0.0 (GHC: 9.2.7) (PATH: /home/marcosh/.ghcup/hls/2.0.0.0/lib/haskell-language-server-2.0.0.0/bin/haskell-language-server-9.2.7)                                   
2023-06-12T21:50:38.414803Z | Info | Directory: /home/marcosh/projects/haskell/wrong-dependecy-version-test                                                                                                                                 
2023-06-12T21:50:38.415002Z | Info | Logging heap statistics every 60.00s                                                                                                                                                                   
 ghcide setup tester in /home/marcosh/projects/haskell/wrong-dependecy-version-test.                                                                                                                                                        
Report bugs at https://github.com/haskell/haskell-language-server/issues                                                                                                                                                                    
                                                                                                                                                                                                                                            
Step 1/4: Finding files to test in /home/marcosh/projects/haskell/wrong-dependecy-version-test                                                                                                                                              
Found 1 files                                                                                                                                                                                                                               
                                                                                                                                                                                                                                            
Step 2/4: Looking for hie.yaml files that control setup                                                                                                                                                                                     
Found 1 cradle                                                                                                                                                                                                                              
  (/home/marcosh/projects/haskell/wrong-dependecy-version-test/hie.yaml)                                                                                                                                                                    
                                                                                                                                                                                                                                            
Step 3/4: Initializing the IDE                                                                                                                                                                                                              
2023-06-12T21:50:38.423061Z | Debug | Initializing exports map from hiedb                                                                                                                                                                   
2023-06-12T21:50:38.425911Z | Debug | Done initializing exports map from hiedb. Size: 0                                                                                                                                                     
2023-06-12T21:50:38.425998Z | Debug | Shake session initialized                                                                                                                                                                             
                                                                                                                                                                                                                                            
Step 4/4: Type checking the files                                                                                                                                                                                                           
2023-06-12T21:50:38.427545Z | Info | Cradle path: src/Foo.hs                                                                                                                                                                                
2023-06-12T21:50:38.431411Z | Debug | Cradle: Cradle {cradleRootDir = "/home/marcosh/projects/haskell/wrong-dependecy-version-test", cradleOptsProg = CradleAction: Stack}                                                                  
2023-06-12T21:50:38.431692Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache)                                                                                                          
2023-06-12T21:50:38.431916Z | Debug | executing command: stack repl --no-nix-pure --with-ghc /home/marcosh/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36                                                                         
2023-06-12T21:50:38.984804Z | Debug | Configuring GHCi with the following packages: wrong-dependency-version-test                                                                                                                           
2023-06-12T21:50:39.029517Z | Debug | executing command: stack path --ghc-package-path                                                                                                                                                      
2023-06-12T21:50:39.375999Z | Debug | /home/marcosh/projects/haskell/wrong-dependecy-version-test/.stack-work/install/x86_64-linux/6f969bfe14a3c82fef1cfd70abc147a8a31ae3c0e7362243320e31c5c32cd78f/9.2.7/pkgdb:/home/marcosh/.stack/snapsho
ts/x86_64-linux/6f969bfe14a3c82fef1cfd70abc147a8a31ae3c0e7362243320e31c5c32cd78f/9.2.7/pkgdb:/home/marcosh/.ghcup/ghc/9.2.7/lib/ghc-9.2.7/package.conf.d                                                                                    
2023-06-12T21:50:39.382346Z | Debug | executing command: stack setup --silent                                                                                                                                                               
2023-06-12T21:50:39.865408Z | Debug | executing command: stack exec ghc -- --print-libdir
2023-06-12T21:50:40.074974Z | Debug | Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/home/marcosh/projects/haskell/wrong-dependecy-version-test/.stack-work/odir","-hidir=/home/marcosh/projects/haskell/
wrong-dependecy-version-test/.stack-work/odir","-hide-all-packages","-i/home/marcosh/projects/haskell/wrong-dependecy-version-test/.stack-work/dist/x86_64-linux/Cabal-3.6.3.0/build","-i/home/marcosh/projects/haskell/wrong-dependecy-vers
ion-test/src","-i/home/marcosh/projects/haskell/wrong-dependecy-version-test/.stack-work/dist/x86_64-linux/Cabal-3.6.3.0/build/autogen","-i/home/marcosh/projects/haskell/wrong-dependecy-version-test/.stack-work/dist/x86_64-linux/Cabal-3
.6.3.0/build/global-autogen","-stubdir=/home/marcosh/projects/haskell/wrong-dependecy-version-test/.stack-work/dist/x86_64-linux/Cabal-3.6.3.0/build","-package-id=base-4.16.4.0","-package-id=yesod-job-queue-0.4.0.0-HoBN6TNLIxrByPkqMuCnf
k","-optP-include","-optP/home/marcosh/projects/haskell/wrong-dependecy-version-test/.stack-work/ghci/a3a93230/cabal_macros.h","-ghci-script=/tmp/haskell-stack-ghci/e9066ff3/ghci-script","-package-db","/home/marcosh/projects/haskell/wro
ng-dependecy-version-test/.stack-work/install/x86_64-linux/6f969bfe14a3c82fef1cfd70abc147a8a31ae3c0e7362243320e31c5c32cd78f/9.2.7/pkgdb","-package-db","/home/marcosh/.stack/snapshots/x86_64-linux/6f969bfe14a3c82fef1cfd70abc147a8a31ae3c0
e7362243320e31c5c32cd78f/9.2.7/pkgdb","-package-db","/home/marcosh/.ghcup/ghc/9.2.7/lib/ghc-9.2.7/package.conf.d"], componentRoot = "/home/marcosh/projects/haskell/wrong-dependecy-version-test", componentDependencies = ["wrong-dependenc
y-version-test.cabal","package.yaml","stack.yaml"]},"/home/marcosh/.ghcup/ghc/9.2.7/lib/ghc-9.2.7")
2023-06-12T21:50:40.103777Z | Info | Interface files cache directory: /home/marcosh/.cache/ghcide/main-bc7676010e9099c0ab6c72da99eff2bb88e03919
2023-06-12T21:50:40.105765Z | Info | Making new HscEnv. In-place unit ids: [main]
2023-06-12T21:50:40.128531Z | Debug | New component cache HscEnvEq: (([],Just HscEnvEq 4),fromList [("/home/marcosh/projects/haskell/wrong-dependecy-version-test/hie.yaml",Just 2023-06-12 14:44:40.743465783 UTC),("package.yaml",Just 202
3-06-12 14:56:56.740148088 UTC),("stack.yaml",Just 2023-06-12 14:43:51.810131413 UTC),("wrong-dependency-version-test.cabal",Just 2023-06-12 14:57:04.480148255 UTC)])
2023-06-12T21:50:40.130717Z | Debug | Known files updated:
  fromList [(TargetModule (ModuleName "Paths_wrong_dependency_version_test"),fromList ["/home/marcosh/projects/haskell/wrong-dependecy-version-test/.stack-work/dist/x86_64-linux/Cabal-3.6.3.0/build/autogen/Paths_wrong_dependency_version
_test.hs"]),(TargetFile NormalizedFilePath "/home/marcosh/projects/haskell/wrong-dependecy-version-test/src/Foo.hs",fromList ["/home/marcosh/projects/haskell/wrong-dependecy-version-test/src/Foo.hs"]),(TargetModule (ModuleName "Foo"),fr
omList ["/home/marcosh/projects/haskell/wrong-dependecy-version-test/src/Foo.hs"])]
2023-06-12T21:50:40.131240Z | Debug | Finished build session
AsyncCancelled
2023-06-12T21:50:40.131288Z | Debug | Restarting build session due to new component
Action Queue: [User TypeCheck]
Keys: [GhcSessionIO; , GetKnownTargets; ]
Aborting previous build session took 0.00s 
2023-06-12T21:50:40.131683Z | Debug | hlint: Getting hlint ideas for  NormalizedFilePath "/home/marcosh/projects/haskell/wrong-dependecy-version-test/src/Foo.hs"
2023-06-12T21:50:40.445045Z | Debug | hlint: Using extensions for  NormalizedFilePath "/home/marcosh/projects/haskell/wrong-dependecy-version-test/src/Foo.hs": [ MonomorphismRestriction
                                                                                                                          , RelaxedPolyRec
                                                                                                                          , ForeignFunctionInterface
                                                                                                                          , ImplicitPrelude
                                                                                                                          , ScopedTypeVariables
                                                                                                                          , BangPatterns
                                                                                                                          , NamedFieldPuns
                                                                                                                          , GADTSyntax
                                                                                                                          , DoAndIfThenElse
                                                                                                                          , ConstraintKinds
                                                                                                                          , PolyKinds
                                                                                                                          , InstanceSigs
                                                                                                                          , StandaloneDeriving
                                                                                                                          , DeriveDataTypeable
                                                                                                                          , DeriveFunctor
                                                                                                                          , DeriveTraversable
                                                                                                                          , DeriveFoldable
                                                                                                                          , DeriveGeneric
                                                                                                                          , DeriveLift
                                                                                                                          , TypeSynonymInstances
                                                                                                                          , FlexibleContexts
                                                                                                                          , FlexibleInstances
                                                                                                                          , ConstrainedClassMethods
                                                                                                                          , MultiParamTypeClasses
                                                                                                                          , ExistentialQuantification
                                                                                                                          , EmptyDataDecls
                                                                                                                          , KindSignatures
                                                                                                                          , GeneralizedNewtypeDeriving
                                                                                                                          , PostfixOperators
                                                                                                                          , TupleSections
                                                                                                                          , PatternGuards
                                                                                                                          , RankNTypes
                                                                                                                          , TypeOperators
                                                                                                                          , ExplicitForAll
                                                                                                                          , TraditionalRecordSyntax
                                                                                                                          , BinaryLiterals
                                                                                                                          , HexFloatLiterals
                                                                                                                          , EmptyCase
                                                                                                                          , NamedWildCards
                                                                                                                          , TypeApplications
                                                                                                                          , EmptyDataDeriving
                                                                                                                          , NumericUnderscores
                                                                                                                          , StarIsType
                                                                                                                          , ImportQualifiedPost
                                                                                                                          , StandaloneKindSignatures
                                                                                                                          , FieldSelectors ]
2023-06-12T21:50:40.486341Z | Debug | Finished: User TypeCheck Took: 0.35s
2023-06-12T21:50:40.488071Z | Debug | Finished: GetHie Took: 0.00s
2023-06-12T21:50:40.488506Z | Debug | Finished: GenerateCore Took: 0.00s

Completed (1 file worked, 0 files failed)

I confirm that stack repl works fine.

If you want, you can reproduce the issue with the repository I linked in the issue (https://github.com/marcosh/wrong-dependency-version-test)

@fendor
Copy link
Collaborator

fendor commented Jun 14, 2023

The logs you linked do not demonstrate an error. Locally, I can reproduce, but stack build itself fails for me.
I think, you probably have to make sure in your project stack build and stack repl succeeds. If it does, HLS works.
As it looks like, this is a stack bug.

Linking this issue to commercialhaskell/stack#6154, to make this kind of issue seen in the new mega ticket.

@fendor fendor added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. build tool: stack and removed type: support User support tickets, questions, help with setup etc. status: needs triage labels Jun 14, 2023
@marcosh
Copy link
Author

marcosh commented Jun 14, 2023

@fendor as I mentioned in the issue, the error appears only when I use HLS through vscode.

I guess stack build is failing on your machine because the dependency requires having node 16 installed (this is quite unfortunate...). I assure you that stack build and stack repl are working correctly on my end.

@fendor
Copy link
Collaborator

fendor commented Jun 14, 2023

I got it to compile with the nix expression NIXPKGS_ALLOW_INSECURE=1 nix-shell -p nodejs-16_x gmp zlib

After that, it just worked.

Proof:

image

Stack version:

> stack --version
Version 2.9.3, Git revision 6cf638947a863f49857f9cfbf72a38a48b183e7e x86_64 hpack-0.35.1

The only other thing I can imagine are poisoned caches. Make sure to delete the cache in ~/.cache/ghcide and maybe even ~/.cache/hie-bios.

@marcosh
Copy link
Author

marcosh commented Jun 14, 2023

@fendor probably it was really a cache issue. I cleared ~/.cache/ghide, ~/.cache/hie-bios and also ~/.stack and now everything is working properly.

Thanks a lot for your help

@marcosh marcosh closed this as completed Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tool: stack 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