-
Notifications
You must be signed in to change notification settings - Fork 263
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
Go to Definition in IDE on standard library references produces error #4797
Comments
It's not just go to def that doesn't work properly, it's also diagnostics that link to .doo files that can't be opened. For example, if you do not satisfy a requires clause that's inside a .doo file, the diagnostics will give you a broken link to it. |
Seems like the VSCode extension should register a textDocumentContentProvider: https://code.visualstudio.com/api/references/vscode-api#TextDocumentContentProvider
|
@keyboardDrummer If I run dafny get-source, would I then be able to go to a definition and have proper diagnostics without broken links? If so, it is a +1 for me. |
You wouldn't need to run anything, I would mark the |
I'm not sure about this kind of thing since it really makes these URIs part of the API surface area, whereas up until now they have been internal detail (although they definitely leak occasionally, and more than I initially thought). Similarly if you use I honestly hadn't really intended to pull IDE support for the standard libraries into scope for 4.4. Would we be in a better state if we just reverted #4770 for now? |
As per offline conversation, my preference would be:
|
More work to do to actually support reading doo file source in the IDE, but the release blocker is addressed by dafny-lang/ide-vscode#454 |
Love that resolution/verification works after #4770! I got greedy and tried to Go to Definition on
DafnyStdLibs.Wrappers
and got "The editor could not be opened due to an unexpected error: Unable to resolve resource dllresource://dafnypipeline/DafnyStandardLibraries.doo"The simplest fix is probably just to block opening
.doo
files in general and fail cleanly for now. I'd love to be able to browse the source code from the libraries eventually, but.doo
files currently don't include any documentation/comments so we probably shouldn't enable it just yet.The text was updated successfully, but these errors were encountered: