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

Do not allow building libraries while silently not verifing included files #5406

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

keyboardDrummer
Copy link
Member

@keyboardDrummer keyboardDrummer commented May 6, 2024

Fixes #4762 (actually, it's only truly fixed until we remove --verify-included files, but our migration policy prevents doing this until we do another release. IMO the migration policy of always requiring a Dafny codebase to be forward compatible with an upcoming release is quite harmful to effective development of Dafny. We should drive towards being able to drop that. I'm guessing we can do that once we add a dafny migrate that automatically updates a Dafny codebase to work with an upcoming version. Creates this ticket for that: #5407)

Description

  • By default, all included files are now verified as well
  • The option --verify-included-files is replaced by --skip-included-files. For backwards compatibility purposes, --verify-included-files is still kept, although hidden and marked as deprecated.

How has this been tested?

  • Updated the test Include.dfy

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@keyboardDrummer keyboardDrummer enabled auto-merge (squash) May 6, 2024 09:51
@keyboardDrummer keyboardDrummer changed the title Skip included files Do not allow libraries to silently not verify included files May 6, 2024
@keyboardDrummer keyboardDrummer changed the title Do not allow libraries to silently not verify included files Do not allow building libraries while silently not verifing included files May 6, 2024
Copy link
Member

@robin-aws robin-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heavily in favour of making this change in general, but I think just switching the default, although safe (since it's just verifying more code than before) could make the ad-hoc build systems for existing Dafny projects grind to a crawl, if they are relying on the fact that includes aren't verified and forking many processes to verify files in parallel.

I think the dafny migrate command idea is an excellent solution and we should build that before making this change. Will add more ideas to that issue.

@keyboardDrummer
Copy link
Member Author

Heavily in favour of making this change in general, but I think just switching the default, although safe (since it's just verifying more code than before) could make the ad-hoc build systems for existing Dafny projects grind to a crawl, if they are relying on the fact that includes aren't verified and forking many processes to verify files in parallel.

I think the dafny migrate command idea is an excellent solution and we should build that before making this change. Will add more ideas to that issue.

Good callout

@robin-aws
Copy link
Member

One other thought for when we come back to this: the option name should be more explicit that it's only skipping verification somehow - dafny test --skip-included-files ... sounds too much like it's skipping tests instead for e.g. Perhaps --dont-verify-included-files? I'm fine with it being wordy and awkward given we want to discourage it in the long term anyway. :)

@robin-aws robin-aws mentioned this pull request May 7, 2024
@keyboardDrummer
Copy link
Member Author

keyboardDrummer commented May 8, 2024

One other thought for when we come back to this: the option name should be more explicit that it's only skipping verification somehow - dafny test --skip-included-files ... sounds too much like it's skipping tests instead for e.g. Perhaps --dont-verify-included-files? I'm fine with it being wordy and awkward given we want to discourage it in the long term anyway. :)

I like it. I thought of --no-verify-included-files to match with --no-verify, but TBH I would prefer dont for both.

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

Successfully merging this pull request may close these issues.

Include directives can lead to including unverified code in doo files
2 participants