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

Fix bug in projectAsLibrary test #5545

Merged

Conversation

keyboardDrummer
Copy link
Member

Description

  • Fix bug in projectAsLibrary test

How has this been tested?

  • Existing test now completes in 1 seconds instead of getting stuck. Not sure how it ever passes in CI, but there it was taking a huge time to complete.

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) June 7, 2024 12:07
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.

Fix itself LGTM - checking my understanding, the problem was incorrectly thinking a dependency did not have compatible options, and therefore falling back to verifying the dependency when that wasn't the intent?

I'm a little worried this is a big foot gun for users to hit in the same way if so.

Source/DafnyCore/DooFile.cs Outdated Show resolved Hide resolved
@keyboardDrummer
Copy link
Member Author

Fix itself LGTM - checking my understanding, the problem was incorrectly thinking a dependency did not have compatible options, and therefore falling back to verifying the dependency when that wasn't the intent?

No. The problem was dat --libraries was considered a non-semantic option, meaning it is copied from the root project to the dependency, causing the dependency to have itself as a dependency which caused a cycle in the compilation process.

I've refactored this PR, so the resulting code is now simpler.

robin-aws
robin-aws previously approved these changes Jun 10, 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.

I do think we need another category of options rather than special-casing --library, but this is a good improvement for now.

I'm also very worried about a test that apparently should fail but instead takes a long time and then passes! But I don't think leaving this test in this state is a good idea just to not lose track of that problem.

@keyboardDrummer keyboardDrummer merged commit f170784 into dafny-lang:master Jun 11, 2024
21 checks passed
@keyboardDrummer keyboardDrummer deleted the projectAsLibraryFix branch June 11, 2024 15:59
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.

3 participants