-
Notifications
You must be signed in to change notification settings - Fork 262
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 originating from included files when verifying including file #16
Comments
I'm fine with the solution, as you might expect :) And I like your phrasing. |
This sounds good. As a clarification, am I correct in my understanding that if boogie-org/boogie-friends#5 were fixed, then that would also fix this issue? |
It seems so. But probably not vice-versa, because as per my current implementation plan, we don't report the actual errors, just their presence, to avoid duplication and spamming the user with error messages. Ideally, flycheck/flycheck#972 would fix all these issues in one fell swoop, but from the dialog on that issue page, it does not seem likely that this will easy to get merged. |
I don't think so, but I could be wrong.
Well, it needs to be implemented first :) |
I'm detecting a couple of problems with the fix checked in on 12 Jan 2017. One problem is that there was a manual change to
The other problem with the 12 Jan 2017 change is that Thanks, |
When fix issue #16, there are changed made to Parser.cs, which is auto-generated from Dafny.atg. Therefore, the change should be moved to Dafny.atg instead.
As reported in boogie-org/boogie-friends#8, the Emacs mode for Dafny does not report errors when they appear in an included file, which leads to the appearance of correct verification for all type-correct files which import type-incorrect files.
One solution to this is to enable the Dafny compiler to report errors in included files when typechecking/verifying/compiling the including files. We could localize this reported error to the line of the pertinent
include
statement to indicate to the user what has gone wrong.This issue does not exist in Visual Studio; however, it does not seem like such a bad thing to produce an error annotation on the
include
statement saying "errors exist in this included file," even if those errors are reported from within their own file. Indeed, this would clarify for the user why it is that this file is refusing to verify, should they forget that they had included the file whose errors are being reported.I suggest the following format for the error message: If there are errors in an included file
A.dfy
, and we haveB.dfy
with a lineinclude "A.dfy"
, let Dafny say:B.dfy(<line>,<col>): Error: the included file "A.dfy" contains error(s)."
I don't think we wish to report all ofA.dfy
's potentially many errors here; it is best, I would guess, to merely point the user towardA.dfy
so that they can investigate these errors within the context of that file.What do you think about this solution, @RustanLeino and @cpitclaudel?
The text was updated successfully, but these errors were encountered: