Skip to content

Remove IAppendable and ISpanAppendable from ICharTermAttribute and buffer types #1338

Description

@paulirwin

Is there an existing issue for this?

  • I have searched the existing issues

Task description

Follow-up to #1315 (step 4-5 of the plan in #1315 (comment)). Depends on #1337 landing first.

Phase 1 - Migrate callers (non-breaking)

Audit and prep all callers still relying on IAppendable so they use IBufferWriter<char> 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<char> 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<char>) 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions