-
Notifications
You must be signed in to change notification settings - Fork 5
Add require_type config option to enforce type definitions #27
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: main
Are you sure you want to change the base?
Add require_type config option to enforce type definitions #27
Conversation
When enabled, raises MissingTypeError if arguments or outputs are defined without a type option. Defaults to false for backwards compatibility.
Add require_type to configuration docs with examples and table entry. Add cross-reference hints in arguments and outputs documentation.
- Change require_type default from false to true - Update README simple example with basic Ruby types - Update README advanced example with dry-types - Update configuration docs to reflect new default - Update tests for new default value
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 is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on January 7
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| raise_on_warning: false, | ||
| rollback_on_warning: false, | ||
|
|
||
| require_type: true, |
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.
Bug: Default value contradicts PR's backwards compatibility intent
The PR description explicitly states that require_type should "default to false for backwards compatibility," but the implementation sets require_type: true as the default. This would break existing services that define arguments or outputs without type annotations, causing them to raise MissingTypeError upon upgrading. The documentation also incorrectly shows true as the default.
Additional Locations (1)
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
============================================
- Coverage 100.00% 55.75% -44.25%
============================================
Files 28 20 -8
Lines 1185 608 -577
============================================
- Hits 1185 339 -846
- Misses 0 269 +269 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
When enabled, raises MissingTypeError if arguments or outputs are
defined without a type option. Defaults to false for backwards
compatibility.
Note
Introduces
require_type(default true) to requiretypeon allarg/output, raisingMissingTypeError, with DSL validation, docs, examples, and tests updated.config.require_type(default:true) to enforce explicittypeon allarg/output.Light::Services::MissingTypeError.Validation.validate_type_presence!and invoke it inArgumentsDsl.argandOutputsDsl.output.README.mdexamples to includetypeand showcase dry-types.docs/arguments.mdanddocs/outputs.mdaboutrequire_type.require_typedefault and accessor.require_type_speccovering enabled/disabled behavior for args/outputs.Written by Cursor Bugbot for commit 66f8fb2. This will update automatically on new commits. Configure here.