Repository navigation
chore: sweep dead code, collapse PACKAGE_SPECS, repair garbled strings - #157
Conversation
|
Warning Review limit reachedNext included review available in 22 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (33)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
ℹ️ No critical issues — one minor suggestion inline.
Reviewed changes
The full 34-file diff was read end-to-end, and the dead-code and sweep claims were re-verified locally: cargo check --workspace --all-targets is clean, the 29 ported suppression tests pass, the zed crate tests pass, test_posit_messages.py and check-ledger.py both validate, and repo-wide greps find zero lingering references to any deleted symbol or old string.
- Dead-API removal (
ry-checker): the legacy suppression line-scanner (parse_suppressions,parse_ignore_comment,line_before_comment,has_file_suppression,filter_suppressed), bothapply_filtervariants,with_confidence,filter_default_disabled, and thery_checker::packagesre-export shim — every production caller already used the_from_commentslexical API. - Test port: the 16 affected tests moved to
parse_suppressions_from_commentsvia ascan_commentshelper whoseCommentsemantics (0-based line, byte column, body after#) match the parser'scollect_comments; the real-parser path itself stays covered bycorpus.rs, the LSP, and the CLI. PACKAGE_SPECScollapse: struct-literal table → 32(&str, &str)tuples, same packages in the same order;PackageSpec, theFunctionSig::params/return_accessors, andTypeshedError::Jsonall removed with their call sites rewritten.- Garbled-string fixes: RY032 message reword (purrr snapshot + 48 posit-ledger entries regenerated through the real update path),
dump-types --formaterror text, andry checkno longerDebug-printing aVec<PathBuf>when no files are found. - Breaking
r-versionremoval:deny_unknown_fieldsis real onConfig, so the CHANGELOG's parse-failure claim is accurate; the entry sits under### Removedper convention, and0.9.0is unreleased so no shipped schema is affected. - Editor cleanup: VS Code dead helpers and the no-op
addExecutableToTerminalPathsetting removed — thery.showLogs/ry.showServerLogscommands remain registered via inline lambdas inextension.ts, sopackage.jsonand the README stay consistent; the unused zed SHA-256 + FIPS vectors are gone with the archive-digest NOTE intact.
openai-compatible/glm-5.3 | 𝕏
|
Addressed pullfrog's CHANGELOG note in 803dd41: one |

Cleanup sprint, PR 1 of 7. Net −593 lines (34 files, +213/−806). Everything deleted was verified dead by workspace-wide grep before deletion; the few judgment calls are called out below.
Dead API (ry-checker)
Checker::apply_filter,Project::apply_filter(every real caller usesapply_filter_to_diagnostics; the "kept so apply_filter can run after check()" doc comments were stale and are rewritten),Diagnostic::with_confidence,filter_default_disabled(its doc claimed the LSP uses it — false since #144), and thepackages.rsbackward-compat shim (nothing imports that path; the one internal user now imports fromry_workspace::packagesdirectly).Legacy suppression parser (
parse_suppressions,parse_ignore_comment,line_before_comment,has_file_suppression,filter_suppressed, ~89 lines): production code reached it zero times — every real entry point uses the_from_commentslexical API; only its own tests kept it alive. The 16 affected tests are ported toparse_suppressions_from_commentsvia ascan_commentshelper that reproduces the parser'sCommentsemantics (verified againstast.rs/parser.rs); all 29 tests in the module keep their behavioral intent.Dead code elsewhere
environment.ts(never-constructed placeholder), thery.addExecutableToTerminalPathsetting (forwarded by settings, applied by nothing — the checkbox did nothing), plus verified-dead helpers (getProjectRoot,pathExists,resolveVariables,showLogs*commands,setCommand,MINIMUM_VERSIONalias).ClassVector::with_class(copy-paste twin offrom_slice),FunctionSig::params/return_accessors over public fields, unconstructibleTypeshedError::Json,Default for DiscoveryLimits, never-readTruncationReport.root, unused derives/re-export, hidden duplicateExplainTypeshedsubcommand,ecosystem/diff.sh,.yamllint.yml.r_versionconfig key (the one deliberate schema change): documented "Reserved for future use; accepted but currently ignored", read by nothing. Removed — breaking forry.tomlfiles that set it (now an unknown-field parse error). CHANGELOG entry added under[Unreleased]. Revert this hunk if you'd rather keep the forward-compat affordance.PACKAGE_SPECS
The 130-line struct-literal table → a 33-line
&[(&str, &str)]tuple list. Programmatically verified: same 32 packages, same order;PackageSpecstruct deleted.Garbled strings
posit_messages.py updatepath; both the PR fast tier and the scheduled full tier of the corpus check pass locally (negative control confirms the harness catches the old drift).dump-types --formaterror: "expected one of: json" (a list of one) → "onlyjsonis supported".ry checkwith no files: no longer prints RustDebugof aVec<PathBuf>.Gates
cargo test --workspace×3, clippy-D warnings, fmt, VS Code lint/tsc/compile + unit tests, zedcargo test --locked— all green. VS Code e2e and the zed wasm build run in CI only (need xvfb / wasm target). Independently audited before push (see the ledger catch above).