Skip to content
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

When using include, helpful "this is the precondition that might not hold" information is missing from flycheck errors #5

Open
wilcoxjay opened this issue Apr 10, 2016 · 1 comment

Comments

@wilcoxjay
Copy link
Contributor

Consider a that has two files A.dfy and B.dfy. A contains library declarations, which B uses via the include directive.

// A.dfy
method foo(x: int)
  requires x > 0
  requires x % 2 == 0
{
} 
// B.dfy
include "A.dfy"

method bar()
{
  foo(0);
}

Then flycheck will report that a precondition of foo is violated, but it won't tell you which one. This gets annoying when there are many preconditions, and I am reduced to copy-pasting the contents of A into B or to running dafny on the command line.

Would it be possible to get this information into flycheck, preferably including the ability to jump to the precondition, just like when the caller and callee are in the same file?

@cpitclaudel
Copy link
Member

Thanks for that report! That's indeed annoying :/ C-c C-c is probably a half-decent workaround, as long as your files are quick to process.

The issue is within the Dafny server implementation (not within the Emacs mode), and I need to debug that. That could take a while; I may have time next week-end though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants