Skip to content

Conversation

@patrickbkr
Copy link
Contributor

Whether this is an improvement or not is up for debate.

@japhb
Copy link
Owner

japhb commented May 14, 2025

Is this PR still required for Windows compatible size detection given that T-LE now depends on Terminal-API 1.0.3?

In other words, is this PR still fixing a real breakage, or just cleanup at this point? (Not that cleanup is a bad thing, I'm just trying to understand the situation.)

@patrickbkr
Copy link
Contributor Author

patrickbkr commented May 14, 2025 via email

@japhb
Copy link
Owner

japhb commented May 15, 2025

I chewed on this one for a while, and examined the code in Terminal-API. Here are my thoughts:

  1. I am not at all opposed to the general idea of leaving T-API to handle querying operations in OS-specific ways for the rest of the Terminal-* stack, but I think the decision comes down to the details.
  2. I don't see a lot of win when some queries have to go through T-API and some have to go through ANSI VT queries, as long as those ANSI VT queries are supported on all modern terminals.
  3. Currently T-API doesn't have a way to query for cursor position, so T-LE has to support ANSI VT querying for now anyway.
  4. It's not clear to me if T-LE or T-W will need more advanced terminal queries in the future, but if so that extends the lifetime of item 3.
  5. Whatever querying path used, I'd love to get completely away from using subprocesses to run terminal queries, especially since the commands executed are unlikely to be identical across OSen.
  6. Until Rakudo supports varargs NativeCall, T-API is stuck using tput on POSIX, which violates item 5.

So I think on balance I want to keep the current code here for now, but I'm happy to reassess if/when items 2, 3, 4, and 6 are all addressed.

Closing for now, feel free to reopen if you think I'm missing something in my analysis. :-)

@japhb japhb closed this May 15, 2025
@patrickbkr
Copy link
Contributor Author

patrickbkr commented May 28, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants