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

avoid overwriting proofsEnabled through default parameter #1827

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

Trivo25
Copy link
Member

@Trivo25 Trivo25 commented Sep 18, 2024

MyProgram.setProofsEnabled(false);
await MyProgram.compile();

Wouldn't work because compile() sets the internal flag to true no matter what since that's the default parameter. The fix is to specify no default parameter (undefined by default) and only setting the internal flag if the developer actually passes in a value. This is backwards compatible because 1) the API doesn't change and 2) the internal flag is still initiated with true so its behavior stays the same

thanks for pointing this out @rpanic

@mitschabaude
Copy link
Collaborator

force merging as well because this now requires regression checks 1 and 2

@mitschabaude mitschabaude merged commit f37d476 into main Sep 18, 2024
24 checks passed
@mitschabaude mitschabaude deleted the fix-proofs-enabled branch September 18, 2024 15:07
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.

2 participants