dafny
dafny copied to clipboard
Flaky LSP test: DocumentAddedToExistingProjectDoesNotCrash
Seen here: https://github.com/dafny-lang/dafny/actions/runs/9070337566/job/24922923041?pr=5433
Microsoft.Dafny.LanguageServer.IntegrationTest.Synchronization.CachingTest.DocumentAddedToExistingProjectDoesNotCrash [FAIL]
[xUnit.net 00:00:18.30] diagnostics[1,1,0,0]: Diagnostic { Range = [start: (3, 12), end: (3, 14)], Severity = Error, Code = OmniSharp.Extensions.LanguageServer.Protocol.Models.DiagnosticCode, CodeDescription = CodeDescription { Href = https://dafny.org/dafny/HowToFAQ/Errors#none }, Source = Resolver, Message = RHS (of type bool) not assignable to LHS (of type int), Tags = , RelatedInformation = OmniSharp.Extensions.LanguageServer.Protocol.Models.Container`1[OmniSharp.Extensions.LanguageServer.Protocol.Models.DiagnosticRelatedInformation], Data = }
[xUnit.net 00:00:18.30] Stack Trace:
[xUnit.net 00:00:18.30] at XunitAssertMessages.AssertM.WithMessage(String message, Action action)
[xUnit.net 00:00:18.30] at XunitAssertMessages.AssertM.Equal[T](T expected, T actual, String userMessage)
[xUnit.net 00:00:18.30] D:\a\dafny\dafny\dafny\Source\DafnyLanguageServer.Test\Synchronization\CachingTest.cs(380,0): at Microsoft.Dafny.LanguageServer.IntegrationTest.Synchronization.CachingTest.DocumentAddedToExistingProjectDoesNotCrash()
Perhaps @keyboardDrummer ?
Hit that one again today https://github.com/dafny-lang/dafny/actions/runs/9098687342/job/25011441051?pr=5441
Got it again here: https://github.com/dafny-lang/dafny/actions/runs/9114303510/job/25059195114?pr=5441
Hit this issue again here https://github.com/dafny-lang/dafny/actions/runs/9114307966/job/25059377435?pr=5440
And here as well
https://github.com/dafny-lang/dafny/actions/runs/9116216246/job/25064347648?pr=5442 https://github.com/dafny-lang/dafny/actions/runs/9116216246/job/25064347423?pr=5442
Not fixed: https://github.com/dafny-lang/dafny/actions/runs/9115852973/job/25063146075?pr=5447
Somehow in the final compilation, one of the sources is not considered owned by the project, so its errors are reported as "out of project" diagnostics on the project file. Caching on determining the project file of a file is turned off, and determinedRootFiles.Roots must contain the not owned file because diagnostics coming from the file are reported by the project.
Adding extra logging in https://github.com/dafny-lang/dafny/pull/5447