Skip to content

Merge IncrementalEdit and SourceEdit #2532

Closed
@ahoppen

Description

@ahoppen

After #2527, IncrementalEdit and SourceEdit are more or less equivalent types. Both store a replacement range and a replacement. The only meaningful difference is that SourceEdit has String as a replacement and IncrementalEdit has an array of bytes as a replacement and can thus also represent invalid UTF-8. We should merge them, ideally into a type that is byte-based (because it’s more versatile) but that offers String-based accessors.

The best outcome would be if SourceEdit could be the type that’s used to represent the edits, IncrementalEdit becomes a deprecated typealias to SourceEdit and SourceEdit gains (possibly deprecated) members for all the members that IncrementalEdit had, for API compatibility.

Metadata

Metadata

Assignees

Labels

refactoringAn internal refactoring of the codebase

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions