ConPTY internal API: "--flagName --flagName" or "--flags.required 0xABCD --flags.optional 0xDEF0"? #20028

Open
opened 2026-01-31 07:01:13 +00:00 by claunia · 0 comments
Owner

Originally created by @DHowett on GitHub (Jun 2, 2023).

"In the future", we might want to add more types of conpty flags. Maybe. I don't love it, but maybe we will.

Mike and Michael used to prefer --real --arguments that set flags, rather than --flags 0xABCD to bulk enable all of 0xABCD. The argument was that it was easier spot in a debugger or a process list.

I still think there's value in having --flags 0xABCD, but this PR made me realize that maybe what we actually want is --flags.required 0x0001 --flags.optional 0x0002. Conforming versions of conhost can say, "I don't support flag 0x0001" if 0x0001 is too new for their blood... but they can ignore 0x0002 if they don't know what it is.

Is that YAGNI?

Originally posted by @DHowett in https://github.com/microsoft/terminal/pull/15476#discussion_r1210899544

Originally created by @DHowett on GitHub (Jun 2, 2023). "In the future", we might want to add more types of conpty flags. Maybe. I don't love it, but maybe we will. Mike and Michael used to prefer `--real --arguments` that set flags, rather than `--flags 0xABCD` to bulk enable all of `0xABCD`. The argument was that it was easier spot in a debugger or a process list. I still think there's value in having `--flags 0xABCD`, but this PR made me realize that maybe what we actually want is `--flags.required 0x0001 --flags.optional 0x0002`. Conforming versions of conhost can say, "I don't support flag 0x0001" if `0x0001` is too new for their blood... but they can ignore `0x0002` if they don't know what it is. Is that YAGNI? _Originally posted by @DHowett in https://github.com/microsoft/terminal/pull/15476#discussion_r1210899544_
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 07:01:13 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20028