-
Notifications
You must be signed in to change notification settings - Fork 724
feat: force parser v2 with devtools flag #6764
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
base: develop
Are you sure you want to change the base?
feat: force parser v2 with devtools flag #6764
Conversation
brice-stacks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks! I just commented on one little nit about the style used for the feature-gating.
federico-stacks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up: I allowed the CI workflow execution, and it surfaced a Rust formatting issue.
|
Thanks @federico-stacks, that should be good |
clarity/src/vm/ast/mod.rs
Outdated
| #[cfg(feature = "devtools")] | ||
| #[allow(unused_variables)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I explicitly wanted to allow it only if feature = "devtools", so that it's more obvious that the argument can be removed when #3662 is resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or you could just mention this fact in a comment, even referencing the issue (if clippy doesn't ask for it) :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah actually my approach doesn't work, #[cfg(feature = "devtools")] is applied to the epoch_id, removing the argument totally. I just wanted it to apply to the clippy rule but that was dumb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clippy issue this time :)
You probably already know, but just in case: you can save some time by running these locally to check formatting and clippy warnings:
cargo fmt-stackscargo clippy-stacks
(dnd current rust version is 1.92.0)
clarity/src/vm/ast/mod.rs
Outdated
| #[cfg(feature = "devtools")] | ||
| #[allow(unused_variables)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or you could just mention this fact in a comment, even referencing the issue (if clippy doesn't ask for it) :)
|
Yeah clippy was already complaining after the first commit/ And I made it worse in the second commit (completely broke it). Should be good now |
Codecov Report❌ Patch coverage is
❌ Your project check has failed because the head coverage (57.86%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #6764 +/- ##
============================================
- Coverage 68.57% 57.86% -10.71%
============================================
Files 582 582
Lines 361458 361452 -6
============================================
- Hits 247879 209167 -38712
- Misses 113579 152285 +38706
... and 438 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
|
||
| [features] | ||
| default = ["rusqlite"] | ||
| default = ["devtools"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is causing problems.
This PR forces the use of the parser v2 when the
devtoolscargo feature flag is enabled.This feature flag is also used to enable directly calling private_function.
Clarinet has been forcing parser v2 for the past ~3 years by forcing contract the epoch on contracts to be >= 2.1. But it has a few unwanted side effects.
This will eventually become unnecessary when we are able to merge #3662, but for now, the block validation is failing.
By adding this check here with the feature flag, we'll be able to remove the epoch hack in Clarinet.