-
Notifications
You must be signed in to change notification settings - Fork 271
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
Report errors that occur in the project file, in the IDE as well #4539
Report errors that occur in the project file, in the IDE as well #4539
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.
That sounds great to have. Can you please add a docs/dev/news entry if appropriate?
Co-authored-by: Mikaël Mayer <[email protected]>
Co-authored-by: Mikaël Mayer <[email protected]>
…mmer/dafny into reportProjectFileErrorsInIde
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 non-blocking comment. It's great that we can now debug the project file from the IDE. If I change the project file, I assumed it's picked up again as soon as I modify the file, correct?
} | ||
} | ||
|
||
var verificationDocumentItem = CreateTestDocument("class X {does not parse", $"AssertNoDiagnosticsAreComing{fileIndex++}.dfy"); |
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.
I love this non-parsing file :-)
}); | ||
var hideReport = await diagnosticsReceiver.AwaitNextNotificationAsync(cancellationToken.Value); | ||
AssertM.Equal(verificationDocumentItem.Uri, hideReport.Uri, | ||
"2) Unexpected diagnostics were received whereas none were expected:\n" + |
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.
Why is 2)
there?
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.
No idea. This line is copy+pasted.
That requires a change in the VSCode extension, because currently the extension only sends I plan to make that change but it is independent from this one. |
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 a lot!
@@ -78,7 +78,7 @@ ILogger<ITextDocumentLoader> logger | |||
var projectDirectory = Path.GetDirectoryName(projectPath)!; | |||
var filesMessage = string.Join("\n", compilation.RootUris.Select(uri => Path.GetRelativePath(projectDirectory, uri.LocalPath))); | |||
if (filesMessage.Any()) { | |||
program.Reporter.Info(MessageSource.Parser, compilation.Project.StartingToken, "Files referenced by project are:\n" + filesMessage); | |||
program.Reporter.Info(MessageSource.Parser, compilation.Project.StartingToken, "Files referenced by project are:" + Environment.NewLine + filesMessage); |
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.
Oh yeah thanks for making sure Windows tests don't break!
…iment-trsplitexpr * commit '86840e6b14386c1e88480854dd8ce64ad17cb2ff': Map eq range (#4567) Fix: Declarations with {:only} ensure that other declarations aren't displayed as verified in the gutter icons (#4433) Fix caching of export declarations (#4556) Do not return exceptions when doing hover in a program with parse errors (#4557) Proof dependency warnings (#4542) [Test Generation] Reduce memory footprint by reusing the same Boogie program for multiple test generation queries (#4530) Fix a variety of bugs in Rust backend based on ESDK testing (#4538) Checker for .Values and .Items on maps (#4551) feat: Allow more assumptions in library backend (#4545) feat: Attributes on reads clauses (#4554) Fix gutter icons fields (#4549) Report errors that occur in the project file, in the IDE as well (#4539) Switch to ubuntu-20.04 for the refman build (#4555)
### Changes Report errors that occur in the project file, in the IDE as well ### Testing Added a unit test <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
Testing
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.