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

LSP completion tests seem to be flaky #4152

Closed
cocreature opened this issue Jan 21, 2020 · 2 comments · Fixed by #4176
Closed

LSP completion tests seem to be flaky #4152

cocreature opened this issue Jan 21, 2020 · 2 comments · Fixed by #4176
Assignees
Labels
language/now Language team priority NOW

Comments

@cocreature
Copy link
Contributor

The LSP completion tests seem to fail occasionally with the following rather scary looking error:

    completion on stale file:                      FAIL (3.46s)
      external/ghcide_ghc_lib/test/src/Development/IDE/Test.hs:35:
      Could not find (DsError,(3,0),"Parse error") in List [Diagnostic {_range = Range {_start = Position {_line = 0, _character = 0}, _end = Position {_line = 100000, _character = 0}}, _severity = Just DsError, _code = Nothing, _source = Just "compile", _message = "Compilation Issue\nlookupGlobal\n\nCan't find interface-file declaration for variable mkInteger\n  Probable cause: bug in .hi-boot file, or inconsistent .hi file\n  Use -ddump-if-trace to get an idea of which file caused the error\nCall stack:\n    CallStack (from HasCallStack):\n      callStackDoc, called at compiler/utils/Outputable.hs:1164:37 in ghc-lib-parser-8.8.1.20200115:Outputable\n      pprPanic, called at compiler/typecheck/TcEnv.hs:133:32 in ghc-lib-8.8.1.20200115:TcEnv\nPlease report this bug to the compiler authors.\n", _relatedInformation = Nothing},Diagnostic {_range = Range {_start = Position {_line = 3, _character = 0}, _end = Position {_line = 3, _character = 14}}, _severity = Just DsWarning, _code = Nothing, _source = Just "typecheck", _message = "/tmp/extra-dir-15084968049022/Foo.daml:4:1: warning:\n    The import of \8216DA.List\8217 is redundant\n      except perhaps to import instances from \8216DA.List\8217\n    To import instances alone, use: import DA.List()", _relatedInformation = Nothing}]

I have absolutely no clue what is going wrong here. So far I have only seen this on CI and never locally.

cc @aherrmann-da (just want to make you aware of it)

@cocreature cocreature added the language/now Language team priority NOW label Jan 21, 2020
@cocreature
Copy link
Contributor Author

Judging from the error, it seems to be coming from compileModule (since that seems to be the only thing that uses "compile" as the stage). Given that completion only relies on the typechecked module but not the core, I don’t really understand why this seems to be the only test with this problem.

@cocreature
Copy link
Contributor Author

It looks like the code trying to lookup mkInteger probably comes from CorePrep (presumably due to RebindableSyntax) https://gitlab.haskell.org/ghc/ghc/blob/77f1d11a9ed42eda149a45786294253b4853fce7/compiler/coreSyn/CorePrep.hs#L1533 so that seems consistent with the problem being caused by core generation but I still have no idea why.

@cocreature cocreature self-assigned this Jan 23, 2020
cocreature added a commit to haskell/ghcide that referenced this issue Jan 23, 2020
This has caused a bunch of issues in DAML where GHC seems to randomly
segfault when completions are requested, see
digital-asset/daml#4152 for the error. I am
not entirely sure what is going wrong there but `getDocs` also goes
through the GHCi codepaths which are known to cause issues with
ghc-lib so for now, let’s disable it.
cocreature added a commit to haskell/ghcide that referenced this issue Jan 23, 2020
This has caused a bunch of issues in DAML where GHC seems to randomly
panics when completions are requested, see
digital-asset/daml#4152 for the error. I am
not entirely sure what is going wrong there but `getDocs` also goes
through the GHCi codepaths which are known to cause issues with
ghc-lib so for now, let’s disable it.
cocreature added a commit that referenced this issue Jan 23, 2020
fixes #4152

changelog_begin
changelog_end
cocreature added a commit that referenced this issue Jan 23, 2020
fixes #4152

changelog_begin
changelog_end
cocreature added a commit that referenced this issue Jan 23, 2020
fixes #4152

changelog_begin
changelog_end
cocreature added a commit to haskell/ghcide that referenced this issue Jan 23, 2020
This has caused a bunch of issues in DAML where GHC seems to randomly
panics when completions are requested, see
digital-asset/daml#4152 for the error. I am
not entirely sure what is going wrong there but `getDocs` also goes
through the GHCi codepaths which are known to cause issues with
ghc-lib so for now, let’s disable it.
cocreature added a commit that referenced this issue Jan 23, 2020
fixes #4152

changelog_begin
changelog_end
cocreature added a commit that referenced this issue Jan 23, 2020
fixes #4152

changelog_begin
changelog_end
cocreature added a commit that referenced this issue Jan 23, 2020
fixes #4152

changelog_begin
changelog_end
cocreature added a commit that referenced this issue Jan 23, 2020
fixes #4152

changelog_begin
changelog_end
cocreature added a commit that referenced this issue Jan 23, 2020
fixes #4152

changelog_begin
changelog_end
cocreature added a commit that referenced this issue Jan 24, 2020
fixes #4152

changelog_begin
changelog_end
cocreature added a commit that referenced this issue Jan 24, 2020
fixes #4152

changelog_begin
changelog_end
@mergify mergify bot closed this as completed in #4176 Jan 24, 2020
mergify bot pushed a commit that referenced this issue Jan 24, 2020
pepeiborra pushed a commit to pepeiborra/ghcide that referenced this issue Feb 1, 2020
This has caused a bunch of issues in DAML where GHC seems to randomly
panics when completions are requested, see
digital-asset/daml#4152 for the error. I am
not entirely sure what is going wrong there but `getDocs` also goes
through the GHCi codepaths which are known to cause issues with
ghc-lib so for now, let’s disable it.
pepeiborra pushed a commit to pepeiborra/ide that referenced this issue Dec 29, 2020
This has caused a bunch of issues in DAML where GHC seems to randomly
panics when completions are requested, see
digital-asset/daml#4152 for the error. I am
not entirely sure what is going wrong there but `getDocs` also goes
through the GHCi codepaths which are known to cause issues with
ghc-lib so for now, let’s disable it.
pepeiborra pushed a commit to pepeiborra/ide that referenced this issue Dec 29, 2020
This has caused a bunch of issues in DAML where GHC seems to randomly
panics when completions are requested, see
digital-asset/daml#4152 for the error. I am
not entirely sure what is going wrong there but `getDocs` also goes
through the GHCi codepaths which are known to cause issues with
ghc-lib so for now, let’s disable it.
pepeiborra pushed a commit to pepeiborra/ide that referenced this issue Dec 29, 2020
This has caused a bunch of issues in DAML where GHC seems to randomly
panics when completions are requested, see
digital-asset/daml#4152 for the error. I am
not entirely sure what is going wrong there but `getDocs` also goes
through the GHCi codepaths which are known to cause issues with
ghc-lib so for now, let’s disable it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/now Language team priority NOW
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant