[0.1.7] Gate cli_overrides on 1.6.2 - #65
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes
Server error: NoMethodError: undefined method 'any?' for nilon projects with docscribe < 1.6.2 (e.g. 1.6.0/1.6.1 on older Rubies).Root cause: the plugin always sends
cli_overrides({validate_types: true}, plus RBS flags) with every daemon RPC. Daemons before 1.6.2 merge overrides raw intoConfigBuilder, whosefilter_overrides?callsoptions[:include].any?on the partial hash —nil.any?crashes the request. CLI check works fine on the same project, only the daemon path breaks, so every file shows a redServer errorsquiggle.Changes:
DocscribeDaemongainssupportsCliOverrides(version): daemons older than 1.6.2 get RPC params withoutcli_overridesand fall back to their owndocscribe.yml; unknown versions keep current behavior. Applied tocheck/fix(buildExecuteParams),check_batch(buildBatchParams) andupdate_types(buildUpdateTypesParams) via anincludeCliOverridesflag (defaults keep existing call sites green).DocscribeDaemonCliOverridesTest(5 tests): gate on versions below/at/above 1.6.2, unknown versions, and override omission in batch/update-types params.Checklist
./gradlew test— 278 tests, 0 failures, including 5 new gate tests)./gradlew spotlessCheck)./gradlew detekt— fixedLargeClass+MagicNumberfindings)./gradlew verifyPlugin— not run in this session)Screenshots (if applicable)
N/A — verified by unit tests; live check on a 1.6.0 project shows no
Server errorsquiggles after the fix.