Remove `IAppendable` and `ISpanAppendable` from `ICharTermAttribute` and buffer types
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 658
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 9
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Task description
Follow-up to #1315 (step 4-5 of the plan in https://github.com/apache/lucenenet/issues/1315#issuecomment-4683039760). Depends on #1337 landing first.
### Phase 1 - Migrate callers (non-breaking)
Audit and prep all callers still relying on `IAppendable` so they use `IBufferWriter` or the concrete `Append()` methods instead:
- Includes the ICU4N integration in `ICUNormalizer2Filter`. **This step is partly gated on an ICU4N release** that ships an `IBufferWriter` overload.
- Most callers can call `Append()` on the concrete buffer types without needing the interface at all.
### Phase 2 - Remove the interfaces (breaking)
Remove `IAppendable` and `ISpanAppendable` from `ICharTermAttribute`, `OpenStringBuilder`, and any other buffer types. The `Append(ReadOnlySpan)` overload added in #1315 means callers no longer need `ISpanAppendable`'s extension-method/type-check path.
Note: per the discussion, `IAppendable` is less problematic to keep around than `ICharSequence` if some corner case turns up that still needs append semantics, so validate during Phase 1 that nothing genuinely requires it.
This is a breaking change and should be done in a beta release before 4.x final.
Contributor guide
Research direction
Start by reviewing the step 4–5 plan in issue #1315 and searching callers of IAppendable and ISpanAppendable, including ICUNormalizer2Filter. Confirm the ICU4N IBufferWriter overload and wait for #1337 before removing the interfaces from ICharTermAttribute, OpenStringBuilder, and other buffer types. Done means callers use the supported buffer APIs and the breaking removal is validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- search
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100