Repository navigation
refactor(mock-provider): make comment-only behavior explicit - #102
Merged
Merged
Conversation
Express behavior that the comment cleanup left unstated: - server: CAPABILITIES entries carry a named min_minor field - symbols: occurrences_in_document_order returns declaration and references sorted at production; symbol_occurrences keeps the declaration-first contract by construction; rename_ranges no longer re-sorts - artifact: share is_valid_identifier and delete is_ident - parse: extract the sort_diagnostics_by_range_start step - edits: each ResolvedEdit carries its request_index, so the failing edit index and the document-sorted application share one index space - text: the phantom-line empty span is stated by a test - methods: the rename parse-error refusal is the named predicate parse_cleanly Fixes #98
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.
Summary
Comment-only behavior in the conformance mock provider is now stated in code, per the owner decision on #98. All seven items:
server.rs:CAPABILITIESgains aCapability { name, min_minor }struct — theu32is namedmin_minor.symbols.rs:occurrencesbecomesoccurrences_in_document_order(declaration merged with references, sorted at production);rename_rangesOp arm drops its re-sort.symbol_occurrenceskeeps the spec §14.2 declaration-first carve-out by construction.artifact.rs: duplicateis_identdeleted;reconstruct_sourceuses sharedis_valid_identifier.parse.rs: diagnostics sorting extracted into namedsort_diagnostics_by_range_start.edits.rs:ResolvedEdit { request_index, .. }carries the original request index through sort/apply — one index space;failing_edit_indexreports it directly (spec §16.3).text.rs: phantom final line after trailing newline keeps empty-span behavior, pinned bytrailing_newline_phantom_line_has_an_empty_span.methods.rs: rename refusal on parse errors (spec §15.2) is the named predicateparse_cleanly.No comments added; protocol spec and conformance fixtures unchanged.
Verification
cargo fmt --all --check,cargo clippy --all-targets -- -D warnings: cleancargo test --workspace: passlpp-conformance-runnervs mock provider,conformance/fixtures/v1: 68 passed, 0 failedgit diff --check: cleanFixes #98