Skip to content

Mark Terminal.Gui.TextView as [Obsolete] in favor of gui-cs/Editor #5303

@tig

Description

@tig

With the alpha of gui-cs/Editor shipped and the project tracking toward beta (full MLP feature set — selection, multi-caret, find/replace, syntax highlighting, folding, soft wrap, line numbers, indentation, clipboard, mouse, undo, large-file responsiveness), Terminal.Gui.TextView should be marked [Obsolete] to steer new code at the dedicated editor View.

Proposal

Add [Obsolete] to TextView (and any closely-related types like Autocomplete that only make sense in a TextView context) with a message pointing at the new package:

[Obsolete (
    \"TextView is superseded by gui-cs/Editor's Editor view, which ships a rope-backed document, \" +
    \"cell-aware rendering, multi-caret, undo, syntax highlighting, folding, find/replace, and soft wrap. \" +
    \"See https://github.com/gui-cs/Editor.\",
    error: false)]
public class TextView : View { ... }

Soft obsolete (error: false) so existing consumers compile with a warning and have a release to migrate.

Why

  • Editor is not drop-in source-compatible with TextView — that's an explicit non-goal. Marking TextView [Obsolete] is the only signal the compiler can give users that there's a better answer.
  • TextView carries the limitations the new project was built to fix: char-by-char rendering, no rope, no cell-grid grapheme math, no real undo granularity, ad-hoc selection model.
  • Beta release of gui-cs/Editor is the right moment — by then the MLP feature set is complete and consumers (gui-cs/clet, downstream apps) have a credible target to migrate to.

Open questions

  • Timing. Add on next TG minor, or hold for the TG release that coincides with gui-cs/Editor beta? Probably the latter so the warning message points at something real.
  • Scope. Just TextView, or also internals only TextView uses?
  • Removal horizon. Do we commit to removing in TG 3.0, or leave indefinitely obsolete?

Migration aid (out of scope here, but worth tracking)

A short migration doc in gui-cs/Editor mapping TextView API → Editor equivalents would soften the warning. Filing a follow-up over there.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions