-
Notifications
You must be signed in to change notification settings - Fork 261
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
Standard lib support in dafny server
#4770
Standard lib support in dafny server
#4770
Conversation
…into standardLibServer
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.
Looks good. I'm looking forward having these libraries in VSCode.
Source/DafnyLanguageServer.Test/Various/CompilationStatusNotificationTest.cs
Outdated
Show resolved
Hide resolved
RootFiles = DetermineRootFiles(); | ||
var diagnosticsCopy = staticDiagnostics.ToImmutableDictionary(k => k.Key, | ||
kv => kv.Value.Select(d => d.ToLspDiagnostic()).ToImmutableList()); | ||
updates.OnNext(new FoundFiles(Project, RootFiles!, diagnosticsCopy)); |
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 explain me in a few sentences why these lines? Or add a comment?
@@ -4,7 +4,9 @@ Dafny program verifier finished with 1 verified, 0 errors | |||
Dafny program verifier finished with 1 verified, 0 errors | |||
StandardLibraries_Errors.dfy(20,29): Error: module DafnyStdLibs does not exist (position 0 in path DafnyStdLibs.Wrappers) | |||
1 resolution/type errors detected in StandardLibraries_Errors.dfy | |||
*** Error: Cannot load DafnyStandardLibraries-notarget.doo: --unicode-char is set locally to False, but the library was built with True | |||
CLI: Error: cannot load DafnyStandardLibraries-notarget.doo: --unicode-char is set locally to False, but the library was built with True |
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.
Any way to remove the ":" between "CLI" and "Error" to avoid colon repetition?
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.
There's an existing method:
public string ErrorToString(ErrorLevel header, IToken tok, string msg) {
return $"{tok.TokenToString(Options)}: {header.ToString()}: {msg}";
}
that creates the double colon. We could remove the first one.
Description
dafny server
library = [..]
indfyconfig.toml
todafny server
dafny server
and other commands.dafny server
only publishes notifications for Uris owned by a particular project. A project owns a Uri if it is the closest project to that Uri and it includes it.new Dafny
toDafnyFile.CreateAndValidate
, so it's more clear that it contains logic.DafnyFile
so it reports errors using anErrorReporter
instead of stdio, which makes it reusable for the language server.IllegalDafnyFile
to handle common scenarios.Lazy<IdeState>
inProjectManager
withIdeState
How has this been tested?
dafny server
dafny server
dafny server
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.