haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.72k stars 368 forks source link

Flickering code lenses on typing #3541

Closed Esgariot closed 1 year ago

Esgariot commented 2 years ago

https://user-images.githubusercontent.com/6072243/163984639-37625683-8efa-440d-9570-bb175aae8a70.mov

I've tried taking a look at ghcide, haskell-language-server and lsp repos and codebases to see which one might be responsible for dropping code lenses so quickly after typing, but didn't manage to find any clues.

Notice how "imports" lenses stay there, while signature suggestion ones are immediately dropped on typing. Maybe leaving "stale" lenses until new ones arrive would be a way to do it?

I suspect this is a known and old problem and everyone just disables that particular plugin and goes on. I've decided to create issue here, even though there's no code responsible for code lenses in this repo, because the issue is specific to vscode (and their "lenses above declarations" stand). If someone could describe some of the code parts or modules responsible for general code lens sending/updating or provide a guideline on "what" "where" and "why" I'd be happy to try to investigate.

Your environment

Which OS do you use: MacOS

Steps to reproduce

  1. Have "insert signature" lens enabled
  2. Write a snippet that would use that lens
  3. Wait for lens to appear
  4. Modify document

Expected behaviour

Vertical spacing allocated by code lenses stays there, enabling typing without redrawing file.

Actual behaviour

Editor lines are moved up and down after typing anything, as presented in attached screencast.

Debug info

Debug output: ``` No 'hie.yaml' found. Try to discover the project type! Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.6.1.0, Git revision f4022c5bb8530cd306c53b941878244bf27a5d41 (dirty) (51 commits) aarch64 ghc-8.10.7 Current directory: /Users/esgariot/Development/adventofcode2021/1 Operating system: darwin Arguments: ["--debug","."] Cradle directory: /Users/esgariot/Development/adventofcode2021/1 Cradle type: Default Tool versions found on the $PATH cabal: 3.6.2.0 stack: Not found ghc: 8.10.7 Consulting the cradle to get project GHC version... Project GHC version: 8.10.7 haskell-language-server exe candidates: ["haskell-language-server-8.10.7","haskell-language-server"] Launching haskell-language-server exe at:/Users/esgariot/.local/bin/haskell-language-server-8.10.7 haskell-language-server version: 1.6.1.0 (GHC: 8.10.7) (PATH: /Users/esgariot/.local/bin/haskell-language-server-8.10.7~1.6.1.0) (GIT hash: f4022c5bb8530cd306c53b941878244bf27a5d41) 2022-04-19 12:33:12.497248 [ThreadId 4] INFO hls: Logging heap statistics every 60.00s ghcide setup tester in /Users/esgariot/Development/adventofcode2021/1. Report bugs at https://github.com/haskell/haskell-language-server/issues Step 1/4: Finding files to test in /Users/esgariot/Development/adventofcode2021/1 Found 1 files Step 2/4: Looking for hie.yaml files that control setup Found 1 cradle () Step 3/4: Initializing the IDE 2022-04-19 12:33:12.500256 [ThreadId 8] DEBUG hls: Initializing exports map from hiedb 2022-04-19 12:33:12.500554 [ThreadId 8] DEBUG hls: Done initializing exports map from hiedb (6) 2022-04-19 12:33:12.500623 [ThreadId 4] DEBUG hls: Shake session initialized Step 4/4: Type checking the files 2022-04-19 12:33:12.50102 [ThreadId 26] INFO hls: Consulting the cradle for "count.hs" 2022-04-19 12:33:12.501071 [ThreadId 26] WARNING hls: No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for count.hs. Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie). You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error. 2022-04-19 12:33:12.502616 [ThreadId 26] DEBUG hls: Output from setting up the cradle Cradle {cradleRootDir = "/Users/esgariot/Development/adventofcode2021/1", cradleOptsProg = CradleAction: Default} 2022-04-19 12:33:12.551714 [ThreadId 26] DEBUG hls: Session loading result: Right (ComponentOptions {componentOptions = [], componentRoot = "/Users/esgariot/Development/adventofcode2021/1", componentDependencies = []},"/Users/esgariot/.local/share/ghcup/ghc/8.10.7/lib/ghc-8.10.7") 2022-04-19 12:33:12.589135 [ThreadId 26] INFO hls: Using interface files cache dir: /Users/esgariot/.cache/ghcide/main-da39a3ee5e6b4b0d3255bfef95601890afd80709 2022-04-19 12:33:12.589259 [ThreadId 26] INFO hls: Making new HscEnv[main] 2022-04-19 12:33:12.592417 [ThreadId 26] DEBUG hls: New Component Cache HscEnvEq: (([],Just HscEnvEq 5),fromList []) 2022-04-19 12:33:12.592524 [ThreadId 26] DEBUG hls: Known files updated: fromList [(TargetFile NormalizedFilePath "/Users/esgariot/Development/adventofcode2021/1/count.hs",fromList ["/Users/esgariot/Development/adventofcode2021/1/count.hs"])] 2022-04-19 12:33:12.592623 [ThreadId 11] DEBUG hls: Finishing build session(exception: AsyncCancelled) 2022-04-19 12:33:12.592655 [ThreadId 26] DEBUG hls: Restarting build session due to new component with queue ["User TypeCheck"] for keys [GhcSessionIO; ,GetKnownTargets; ] (aborting the previous one took 0.00s) 2022-04-19 12:33:12.592798 [ThreadId 41] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/Users/esgariot/Development/adventofcode2021/1/count.hs" 2022-04-19 12:33:12.699207 [ThreadId 48] INFO hls: finish: User TypeCheck (took 0.11s) 2022-04-19 12:33:12.702689 [ThreadId 99] INFO hls: finish: GetHie (took 0.00s) 2022-04-19 12:33:12.706783 [ThreadId 108] INFO hls: finish: GenerateCore (took 0.00s) Completed (1 file worked, 0 files failed) ```

Paste the contents of extension specific log, you can check instructions about how to find it here

Extension log: ``` 2022-04-19 12:23:16.297923 [ThreadId 19] DEBUG hls: Set files of interest to: fromList [(NormalizedFilePath "/Users/esgariot/Development/adventofcode2021/1/count.hs",Modified {firstOpen = False})] 2022-04-19 12:23:16.29862 [ThreadId 135] DEBUG hls: Finishing build session(exception: AsyncCancelled) 2022-04-19 12:23:16.298604 [ThreadId 19] DEBUG hls: Restarting build session due to /Users/esgariot/Development/adventofcode2021/1/count.hs (modified) with queue [] for keys [IsFileOfInterest; /Users/esgariot/Development/adventofcode2021/1/count.hs,GetModificationTime; /Users/esgariot/Development/adventofcode2021/1/count.hs] (aborting the previous one took 0.00s) 2022-04-19 12:23:16.299301 [ThreadId 19] DEBUG hls: Modified text document: file:///Users/esgariot/Development/adventofcode2021/1/count.hs 2022-04-19 12:23:16.302952 [ThreadId 435] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/Users/esgariot/Development/adventofcode2021/1/count.hs" 2022-04-19 12:23:16.305673 [ThreadId 472] DEBUG hls: LOOKUP UP PERSISTENT FOR: LocalCompletions 2022-04-19 12:23:16.305816 [ThreadId 476] DEBUG hls: finish: C:NonLocalCompletions:/Users/esgariot/Development/adventofcode2021/1/count.hs (took 0.00s) 2022-04-19 12:23:16.305778 [ThreadId 473] DEBUG hls: finish: C:LocalCompletions:/Users/esgariot/Development/adventofcode2021/1/count.hs (took 0.00s) 2022-04-19 12:23:16.305877 [ThreadId 477] DEBUG hls: finish: C:GetParsedModule:/Users/esgariot/Development/adventofcode2021/1/count.hs (took 0.00s) 2022-04-19 12:23:16.305963 [ThreadId 479] INFO hls: finish: Completion (took 0.00s) 2022-04-19 12:23:16.306056 [ThreadId 478] DEBUG hls: finish: C:GetBindings:/Users/esgariot/Development/adventofcode2021/1/count.hs (took 0.00s) 2022-04-19 12:23:16.306097 [ThreadId 483] DEBUG hls: finish: C:GhcSession:/Users/esgariot/Development/adventofcode2021/1/count.hs (took 0.00s) 2022-04-19 12:23:16.539857 [ThreadId 489] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:119:15 "fp" "/Users/esgariot/Development/adventofcode2021/1/count.hs" 2022-04-19 12:23:16.54 [ThreadId 494] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.540059 [ThreadId 495] INFO hls: finish: ModuleName.GetParsedModule (took 0.00s) 2022-04-19 12:23:16.540146 [ThreadId 497] INFO hls: finish: eval.GetParsedModuleWithComments (took 0.00s) 2022-04-19 12:23:16.540211 [ThreadId 498] INFO hls: finish: (took 0.00s) 2022-04-19 12:23:16.540178 [ThreadId 496] INFO hls: finish: codeLens.GhcSession (took 0.00s) 2022-04-19 12:23:16.54029 [ThreadId 505] INFO hls: finish: codeLens.TypeCheck (took 0.00s) 2022-04-19 12:23:16.540339 [ThreadId 506] INFO hls: finish: codeLens.GetBindings (took 0.00s) 2022-04-19 12:23:16.540386 [ThreadId 489] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:119:15 "comments" "Comments {lineComments = fromList [], blockComments = fromList []}" 2022-04-19 12:23:16.54043 [ThreadId 489] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:119:15 "Tests" "0 tests in 0 sections 0 setups 0 lenses." 2022-04-19 12:23:16.540455 [ThreadId 502] INFO hls: finish: RefineImports (took 0.00s) 2022-04-19 12:23:16.540501 [ThreadId 489] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:119:15 "tests" "0.00s" 2022-04-19 12:23:16.540528 [ThreadId 489] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:119:15 "codeLens" "0.00s" 2022-04-19 12:23:16.540562 [ThreadId 508] INFO hls: finish: codeLens.GetGlobalBindingTypeSigs (took 0.00s) 2022-04-19 12:23:16.540565 [ThreadId 507] INFO hls: finish: Wingman.codeLensProvider.GetAnnotatedParsedSource (took 0.00s) 2022-04-19 12:23:16.540606 [ThreadId 514] INFO hls: finish: Wingman.codeLensProvider.GetBindings (took 0.00s) 2022-04-19 12:23:16.540625 [ThreadId 515] INFO hls: finish: Wingman.emptyCaseScrutinees.TypeCheck (took 0.00s) 2022-04-19 12:23:16.540668 [ThreadId 516] INFO hls: finish: Wingman.emptyCaseScrutinees.False (took 0.00s) 2022-04-19 12:23:16.566307 [ThreadId 529] INFO hls: finish: retrie (took 0.00s) 2022-04-19 12:23:16.567359 [ThreadId 531] INFO hls: finish: Pragmas.GhcSession (took 0.00s) 2022-04-19 12:23:16.567589 [ThreadId 530] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.567905 [ThreadId 532] INFO hls: finish: HaddockComments.GetAnnotatedParsedSource (took 0.00s) 2022-04-19 12:23:16.568094 [ThreadId 541] INFO hls: finish: importLens (took 0.00s) 2022-04-19 12:23:16.568108 [ThreadId 540] INFO hls: finish: Pragmas.GetFileContents (took 0.00s) 2022-04-19 12:23:16.568186 [ThreadId 542] INFO hls: finish: Pragmas.GetParsedModule (took 0.00s) 2022-04-19 12:23:16.568333 [ThreadId 543] INFO hls: finish: QualifyImportedNames.TypeCheck (took 0.00s) 2022-04-19 12:23:16.570552 [ThreadId 544] INFO hls: finish: RefineImports (took 0.00s) 2022-04-19 12:23:16.57091 [ThreadId 545] INFO hls: finish: Hlint.GetFileContents (took 0.00s) 2022-04-19 12:23:16.570951 [ThreadId 546] INFO hls: finish: splice.codeAction.GitHieAst (took 0.00s) 2022-04-19 12:23:16.571192 [ThreadId 549] INFO hls: finish: GhcideCodeActions.GhcSession (took 0.00s) 2022-04-19 12:23:16.571238 [ThreadId 552] INFO hls: finish: GhcideCodeActions.GetGlobalBindingTypeSigs (took 0.00s) 2022-04-19 12:23:16.57133 [ThreadId 551] INFO hls: finish: GhcideCodeActions.GetFileContents (took 0.00s) 2022-04-19 12:23:16.571444 [ThreadId 553] INFO hls: finish: Hlint.GetModSummary (took 0.00s) 2022-04-19 12:23:16.571527 [ThreadId 555] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.571508 [ThreadId 554] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.571611 [ThreadId 556] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.571659 [ThreadId 557] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.571703 [ThreadId 547] INFO hls: finish: AlternateNumberFormat.CollectLiterals (took 0.00s) 2022-04-19 12:23:16.571859 [ThreadId 548] INFO hls: finish: GhcideCodeActions.GhcSession (took 0.00s) 2022-04-19 12:23:16.57185 [ThreadId 561] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.57189 [ThreadId 560] INFO hls: finish: GhcideCodeActions.GetAnnotatedParsedSource (took 0.00s) 2022-04-19 12:23:16.571932 [ThreadId 559] INFO hls: finish: GhcideCodeActions.TypeCheck (took 0.00s) 2022-04-19 12:23:16.571886 [ThreadId 535] DEBUG hls: "Literals: [IntLiteral SrcSpanOneLine \"/Users/esgariot/Development/adventofcode2021/1/count.hs\" 7 15 16 \"1\" 1,IntLiteral SrcSpanOneLine \"/Users/esgariot/Development/adventofcode2021/1/count.hs\" 9 11 12 \"0\" 0]" 2022-04-19 12:23:16.572075 [ThreadId 562] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.572108 [ThreadId 563] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.572144 [ThreadId 564] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.572167 [ThreadId 567] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.572168 [ThreadId 566] INFO hls: finish: GhcideCodeActions.GetBindings (took 0.00s) 2022-04-19 12:23:16.572159 [ThreadId 565] INFO hls: finish: GhcideCodeActions.getIdeOptions (took 0.00s) 2022-04-19 12:23:16.572281 [ThreadId 568] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.572385 [ThreadId 571] INFO hls: finish: GhcideCodeActions.GetParsedModule (took 0.00s) 2022-04-19 12:23:16.5724 [ThreadId 569] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.572421 [ThreadId 570] INFO hls: finish: GhcideCodeActions.GetParsedModule (took 0.00s) 2022-04-19 12:23:16.572749 [ThreadId 572] INFO hls: finish: GhcideCodeActions.GetAnnotatedParsedSource (took 0.00s) 2022-04-19 12:23:16.572754 [ThreadId 573] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.572801 [ThreadId 575] INFO hls: finish: GhcideCodeActions.GetFileContents (took 0.00s) 2022-04-19 12:23:16.572887 [ThreadId 574] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.572964 [ThreadId 576] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.573053 [ThreadId 577] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.573149 [ThreadId 578] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.5732 [ThreadId 580] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.573183 [ThreadId 579] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.573297 [ThreadId 581] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.573505 [ThreadId 582] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.573661 [ThreadId 583] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.573673 [ThreadId 584] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.573734 [ThreadId 586] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.573716 [ThreadId 585] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.573883 [ThreadId 587] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.574012 [ThreadId 588] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.574065 [ThreadId 589] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.574093 [ThreadId 591] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.574068 [ThreadId 590] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.574255 [ThreadId 592] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.574418 [ThreadId 593] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.574478 [ThreadId 594] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.574514 [ThreadId 595] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.574546 [ThreadId 596] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.574644 [ThreadId 597] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.574742 [ThreadId 598] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.574781 [ThreadId 599] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.574813 [ThreadId 600] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.57484 [ThreadId 601] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.574943 [ThreadId 602] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.575062 [ThreadId 603] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.575079 [ThreadId 604] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.575102 [ThreadId 605] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.575128 [ThreadId 606] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.575236 [ThreadId 607] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.575436 [ThreadId 608] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.57546 [ThreadId 609] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.57548 [ThreadId 610] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.575508 [ThreadId 611] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.575573 [ThreadId 612] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.575625 [ThreadId 613] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.575648 [ThreadId 614] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.575675 [ThreadId 615] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.575712 [ThreadId 616] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.57584 [ThreadId 617] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.575951 [ThreadId 618] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.57812 [ThreadId 619] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.578157 [ThreadId 620] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.578184 [ThreadId 621] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.578366 [ThreadId 622] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:16.578504 [ThreadId 623] INFO hls: finish: Wingman.judgementForHole.GetHieAst (took 0.00s) 2022-04-19 12:23:16.578544 [ThreadId 624] INFO hls: finish: Wingman.judgementForHole.GetBindings (took 0.00s) 2022-04-19 12:23:16.578582 [ThreadId 625] INFO hls: finish: Wingman.judgementForHole.TypeCheck (took 0.00s) 2022-04-19 12:23:16.578608 [ThreadId 626] INFO hls: finish: Wingman.judgementForHole.False (took 0.00s) 2022-04-19 12:23:16.638883 [ThreadId 631] INFO hls: finish: Outline (took 0.00s) 2022-04-19 12:23:17.021548 [ThreadId 634] INFO hls: finish: GhcideCodeActions.GetAnnotatedParsedSource (took 0.00s) 2022-04-19 12:23:17.022101 [ThreadId 636] INFO hls: finish: GhcideCodeActions.GetParsedModule (took 0.00s) 2022-04-19 12:23:17.022115 [ThreadId 639] INFO hls: finish: GhcideCodeActions.GetFileContents (took 0.00s) 2022-04-19 12:23:17.022898 [ThreadId 640] INFO hls: finish: GhcideCodeActions.TypeCheck (took 0.00s) 2022-04-19 12:23:17.022908 [ThreadId 641] INFO hls: finish: GhcideCodeActions.GetHieAst (took 0.00s) 2022-04-19 12:23:17.023766 [ThreadId 642] INFO hls: finish: GhcideCodeActions.getParsedModule (took 0.00s) 2022-04-19 12:23:20.714482 [ThreadId 19] DEBUG hls: Set files of interest to: fromList [(NormalizedFilePath "/Users/esgariot/Development/adventofcode2021/1/count.hs",Modified {firstOpen = False})] 2022-04-19 12:23:20.714755 [ThreadId 425] DEBUG hls: Finishing build session(exception: AsyncCancelled) 2022-04-19 12:23:20.714768 [ThreadId 19] DEBUG hls: Restarting build session due to /Users/esgariot/Development/adventofcode2021/1/count.hs (modified) with queue [] for keys [GetModificationTime; /Users/esgariot/Development/adventofcode2021/1/count.hs] (aborting the previous one took 0.00s) 2022-04-19 12:23:20.714909 [ThreadId 19] DEBUG hls: Modified text document: file:///Users/esgariot/Development/adventofcode2021/1/count.hs 2022-04-19 12:23:20.716324 [ThreadId 668] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/Users/esgariot/Development/adventofcode2021/1/count.hs" 2022-04-19 12:23:20.955051 [ThreadId 710] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:119:15 "fp" "/Users/esgariot/Development/adventofcode2021/1/count.hs" 2022-04-19 12:23:20.955184 [ThreadId 715] INFO hls: finish: codeLens.GhcSession (took 0.00s) 2022-04-19 12:23:20.955454 [ThreadId 716] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2022-04-19 12:23:20.955467 [ThreadId 718] INFO hls: finish: ModuleName.GetParsedModule (took 0.00s) 2022-04-19 12:23:20.955519 [ThreadId 720] INFO hls: finish: codeLens.TypeCheck (took 0.00s) 2022-04-19 12:23:20.955562 [ThreadId 724] INFO hls: finish: eval.GetParsedModuleWithComments (took 0.00s) 2022-04-19 12:23:20.955577 [ThreadId 710] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:119:15 "comments" "Comments {lineComments = fromList [], blockComments = fromList []}" 2022-04-19 12:23:20.955921 [ThreadId 723] INFO hls: finish: Wingman.codeLensProvider.GetAnnotatedParsedSource (took 0.00s) 2022-04-19 12:23:20.956021 [ThreadId 717] INFO hls: finish: RefineImports (took 0.00s) 2022-04-19 12:23:20.956104 [ThreadId 719] INFO hls: finish: (took 0.00s) 2022-04-19 12:23:20.95613 [ThreadId 733] INFO hls: finish: codeLens.GetBindings (took 0.00s) 2022-04-19 12:23:20.956136 [ThreadId 737] INFO hls: finish: Wingman.codeLensProvider.GetBindings (took 0.00s) 2022-04-19 12:23:20.95619 [ThreadId 740] INFO hls: finish: Wingman.emptyCaseScrutinees.TypeCheck (took 0.00s) 2022-04-19 12:23:20.956238 [ThreadId 742] INFO hls: finish: codeLens.GetGlobalBindingTypeSigs (took 0.00s) 2022-04-19 12:23:20.956222 [ThreadId 741] INFO hls: finish: Wingman.emptyCaseScrutinees.False (took 0.00s) 2022-04-19 12:23:20.956235 [ThreadId 710] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:119:15 "Tests" "0 tests in 0 sections 0 setups 0 lenses." 2022-04-19 12:23:20.956289 [ThreadId 710] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:119:15 "tests" "0.00s" 2022-04-19 12:23:20.95632 [ThreadId 710] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:119:15 "codeLens" "0.00s" 2022-04-19 12:23:21.054731 [ThreadId 751] INFO hls: finish: Outline (took 0.00s) ```
fendor commented 1 year ago

Hi, thank you for the bug report! Sorry, I missed this issue! However, this is a HLS bug and not the responsibility of vscode-haskell. Thus, I am moving this issue to the main rep.

July541 commented 1 year ago

Technology speaking, doing some adaption after replacing use with useWithStale may be a solution.