-
Notifications
You must be signed in to change notification settings - Fork 265
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
Regression: dafny run not working with include #4139
Comments
Tagging as release blocker to be conservative, if indeed a regression. |
This issue was first introduced by the PR #4059 after bisecting. @keyboardDrummer before I dive into it, would you know what in your PR caused that trouble? |
The translation code decides what to skip translation for based on whether it was included or not, and apparently it's skipping things too aggressively here causing the translated code from the including file to have a reference to something that wasn't translated. I guess the bug starts in
|
Ok, after investigation, here is what I found so far. Before #4059, translation happened in this order: So before, it was translating the main module, and then adding "_ctor" as a referenced method. After, it would translate the class first, and because _ctor is not referenced yet and out of scope, it would not add it to the translation. Then it proceeded to translate _default and adds a reference to the _ctor method, but it's too late. |
…4212) This PR fixes #4139 I'm not sure of the fix right now, need to see if it works on other tests. I suspect it will fail and we might need another way to separate the TopLevelDecls order for verification as well. But let's see. <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> --------- Co-authored-by: Remy Willems <rwillems@amazon.com>
Dafny version
4.1.0
Code to produce this issue
Command to run and resulting output
What happened?
4!!!) If one includes the option --verify-included-files, enven though one also has --no-verify, then it works.
What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered: