Summary
PR #126 introduced crates/weaverd/src/dispatch/act/refactor/positions.rs, a position: Option<String> field on RefactorArgs, and substantial position-to-offset conversion logic in request_building.rs. None of this internal architecture is documented in docs/developers-guide.md.
Work Required
Add a section to docs/developers-guide.md covering:
positions.rs module — purpose, public-facing parse_line_col and line_col_to_byte_offset functions, Unicode-awareness, CRLF handling, and the one-indexed column convention.
arguments.rs position field — the new --position LINE:COL flag on RefactorArgs, its validation path through parse_position_flag, and the builder lifecycle.
request_building.rs capability argument mapping — the CapabilityMappingContext struct, how apply_capability_argument_mapping dispatches by CapabilityId, and the apply_rename_symbol_mapping logic that converts CLI --position (or deprecated offset=) into a plugin-internal byte offset.
Background
Raised as an out-of-scope documentation follow-up from PR #126.
Requested by @leynos.
Backlink: #126
Summary
PR #126 introduced
crates/weaverd/src/dispatch/act/refactor/positions.rs, aposition: Option<String>field onRefactorArgs, and substantial position-to-offset conversion logic inrequest_building.rs. None of this internal architecture is documented indocs/developers-guide.md.Work Required
Add a section to
docs/developers-guide.mdcovering:positions.rsmodule — purpose, public-facingparse_line_colandline_col_to_byte_offsetfunctions, Unicode-awareness, CRLF handling, and the one-indexed column convention.arguments.rspositionfield — the new--position LINE:COLflag onRefactorArgs, its validation path throughparse_position_flag, and the builder lifecycle.request_building.rscapability argument mapping — theCapabilityMappingContextstruct, howapply_capability_argument_mappingdispatches byCapabilityId, and theapply_rename_symbol_mappinglogic that converts CLI--position(or deprecatedoffset=) into a plugin-internal byte offset.Background
Raised as an out-of-scope documentation follow-up from PR #126.
Requested by @leynos.
Backlink: #126