-
Notifications
You must be signed in to change notification settings - Fork 257
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
Diagnostic related fixes #4513
Diagnostic related fixes #4513
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to see the IDE getting more robust.
// var parseDiagnostics = await diagnosticsReceiver.AwaitNextDiagnosticsAsync(CancellationToken); | ||
// Assert.Single(parseDiagnostics); | ||
// Assert.Contains(parseDiagnostics, d => d.Message.Contains("cycle of includes")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relates to the skipped test. I was hoping that with the comment it would be OK to keep. Might help reduce confusion if we ever change the behavior and then this test breaks, but gets fixed with the commented code.
@@ -21,6 +21,70 @@ namespace Microsoft.Dafny.LanguageServer.IntegrationTest.Synchronization { | |||
public class DiagnosticsTest : ClientBasedLanguageServerTest { | |||
private readonly string testFilesDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Synchronization/TestFiles"); | |||
|
|||
[Fact(Skip = "Not implemented. Requires separating diagnostics from different sources")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a test you intend to fix later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allowing this test to pass would be an improvement, but I don't think it's something we need to do soon. Do you want me to remove it? To me it's a bit like a GH issue but then in the code, a reminder of something we can improve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last request.
@@ -10,6 +10,7 @@ namespace XUnitExtensions.Lit { | |||
/// because 'diff' does not exist on Windows. | |||
/// </summary> | |||
public class DiffCommand : ILitCommand { | |||
private static readonly bool UpdateExpectFile = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please document how to use this in the README of the tests? I'm interested but will soon forget where I had to change something.
…ummer/dafny into migratedResolutionDiagnostics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the elements in doc/dev/news !
### Changes - Let rewriters that operate within the module caching context, use the correct `ErrorReporter`, so any diagnostics recorded by them are saved in the cache. - Use previous resolution diagnostics when processed parsed document and no parsing diagnostics were found, to prevent diagnostic flickering and reduce bandwidth used by diagnostics. ### Testing - Added two units tests for the above two issues <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
### Changes - Let rewriters that operate within the module caching context, use the correct `ErrorReporter`, so any diagnostics recorded by them are saved in the cache. - Use previous resolution diagnostics when processed parsed document and no parsing diagnostics were found, to prevent diagnostic flickering and reduce bandwidth used by diagnostics. ### Testing - Added two units tests for the above two issues <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
### Changes - Let rewriters that operate within the module caching context, use the correct `ErrorReporter`, so any diagnostics recorded by them are saved in the cache. - Use previous resolution diagnostics when processed parsed document and no parsing diagnostics were found, to prevent diagnostic flickering and reduce bandwidth used by diagnostics. ### Testing - Added two units tests for the above two issues <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
- Let rewriters that operate within the module caching context, use the correct `ErrorReporter`, so any diagnostics recorded by them are saved in the cache. - Use previous resolution diagnostics when processed parsed document and no parsing diagnostics were found, to prevent diagnostic flickering and reduce bandwidth used by diagnostics. - Added two units tests for the above two issues <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
Changes
ErrorReporter
, so any diagnostics recorded by them are saved in the cache.Testing
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.