-
Notifications
You must be signed in to change notification settings - Fork 762
Enable strict syntax by default #6643
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: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for nextflow-docs-staging canceled.
|
Signed-off-by: Ben Sherman <[email protected]>
f8167ff to
4af065f
Compare
Signed-off-by: Ben Sherman <[email protected]>
Signed-off-by: Ben Sherman <[email protected]>
Signed-off-by: Ben Sherman <[email protected]>
|
@claude please review |
|
Claude finished @bentsherman's task —— View job Code Review: Enable strict syntax by defaultReviewing the changes to enable strict syntax (v2 parser) by default and deprecate the Review Tasks:
Review SummaryThis is a major but well-executed change that enables strict syntax by default in Nextflow. The implementation is thorough and the extensive test updates demonstrate careful attention to maintaining compatibility while enforcing stricter parsing rules. Positive Aspects1. Clean Implementation of Default Change
2. Comprehensive Test Consolidation
3. Documentation Updates
4. Extensive Test Coverage
Areas for Improvement1. Error Handling in ScriptLoaderV2// ScriptLoaderV2.groovy:54-55
if( name )
throw new IllegalArgumentException("The `-entry` option is not supported with the strict syntax -- use a param to run a named workflow from the entry workflow")Concern: This error message could be more helpful. Consider:
2. Configuration Parser Strictness// ConfigParserV2.groovy:48
private boolean strict = trueConcern: The v2 parser defaults to strict mode, but this could cause issues for users with complex config files that haven't been updated yet. Consider:
3. Missing Migration Path for Complex CasesConcern: While documentation covers many cases, some complex Groovy patterns in configs might need more guidance:
4. Test File OrganizationObservation: Good cleanup of obsolete test utilities, but ensure all functionality is preserved in the new Technical Implementation Review1. Parser Selection LogicThe implementation correctly uses environment variable to control parser selection: // NF.groovy:36
static String getSyntaxParserVersion() {
return SysEnv.get('NXF_SYNTAX_PARSER', 'v2')
}This provides a clean escape hatch for users who need v1 behavior. 2. Backward CompatibilityThe changes maintain good backward compatibility:
3. AST TransformationsThe visitor pattern changes in Recommendations1. Consider Phased Rollout
2. Enhanced Error Messages
3. Documentation Enhancements
4. Monitoring Plan
Breaking Changes AssessmentImpact Level: Medium to High - This is a breaking change for some users, but: ✅ Mitigated by:
Overall AssessmentRecommendation: APPROVE This is a well-implemented and necessary step forward for Nextflow. The change:
The extensive test modifications (2072 additions, 3888 deletions) indicate thorough validation of the changes across the codebase. Suggested Follow-up Actions
|
| ::: | ||
|
|
||
| :::{versionchanged} 26.04.0 | ||
| The strict syntax is enabled by default. It can be disabled by setting the environment variable `NXF_SYNTAX_PARSER=v1`. |
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.
| The strict syntax is enabled by default. It can be disabled by setting the environment variable `NXF_SYNTAX_PARSER=v1`. | |
| The strict syntax is enabled by default. You can disable it by setting the environment variable `NXF_SYNTAX_PARSER=v1`. |
NXF_SYNTAX_PARSERtov2by defaultnextflow.enable.strictfeature flagScriptHelper