Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Issues with multi component support in GHC 9.2 #2693

Closed
pepeiborra opened this issue Feb 5, 2022 · 4 comments
Closed

Issues with multi component support in GHC 9.2 #2693

pepeiborra opened this issue Feb 5, 2022 · 4 comments
Assignees
Labels
status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@pepeiborra
Copy link
Collaborator

Packages of previously loaded components seem to be forgotten when loading a new component. #2687 extends the test suite to show the problem:

"jsonrpc": "2.0",
[3796](https://github.com/haskell/haskell-language-server/runs/5078787433?check_suite_focus=true#step:7:3796)
    "method": "textDocument/publishDiagnostics",
[3797](https://github.com/haskell/haskell-language-server/runs/5078787433?check_suite_focus=true#step:7:3797)
    "params": {
[3798](https://github.com/haskell/haskell-language-server/runs/5078787433?check_suite_focus=true#step:7:3798)
        "diagnostics": [
[3799](https://github.com/haskell/haskell-language-server/runs/5078787433?check_suite_focus=true#step:7:3799)
            {
[3800](https://github.com/haskell/haskell-language-server/runs/5078787433?check_suite_focus=true#step:7:3800)
                "message": "Could not load module �Control.Concurrent.Async�\nIt is a member of the hidden package �async-2.2.4�.\nPerhaps you need to add �async� to the build-depends in your .cabal file.\nIt is a member of the hidden package �async-2.2.4�.\nPerhaps you need to add �async� to the build-depends in your .cabal file.\nit is a hidden module in the package �tasty-1.4.2.1�\nit is a hidden module in the package �hspec-core-2.7.10�",
@pepeiborra pepeiborra added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. status: needs triage labels Feb 5, 2022
@pepeiborra pepeiborra assigned pepeiborra and wz1000 and unassigned pepeiborra Feb 5, 2022
@pepeiborra
Copy link
Collaborator Author

@wz1000 You mentioned 9.2 introduced new notions of package identity. Could you summarise here? Cc @mpickering

@July541
Copy link
Collaborator

July541 commented Feb 22, 2022

It makes development on 9.2 much thorny, I have to reload HLS when I back to an opened file.

@Abastro
Copy link

Abastro commented Mar 2, 2022

Is this causing the error "cannot load module.."? Sad, I am suffering from this

wz1000 added a commit that referenced this issue Mar 14, 2022
We need to update the package database state in the `HscEnv` after we update
its `DynFlags`. `setSessionDynFlags` handles this for us.
wz1000 added a commit that referenced this issue Mar 14, 2022
We need to update the package database state in the `HscEnv` after we update
its `DynFlags`. `setSessionDynFlags` handles this for us.
@mergify mergify bot closed this as completed in f146ef0 Mar 14, 2022
July541 pushed a commit to July541/haskell-language-server that referenced this issue Mar 30, 2022
We need to update the package database state in the `HscEnv` after we update
its `DynFlags`. `setSessionDynFlags` handles this for us.
@July541
Copy link
Collaborator

July541 commented May 26, 2023

I can see a regression on ghc-9.4.5.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
status: needs triage 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

4 participants