deno icon indicating copy to clipboard operation
deno copied to clipboard

🐛(WinOS) `Deno.setRaw()` when changed for stabilization is no longer able to effect 'CONIN$'

Open rivy opened this issue 3 years ago • 1 comments

Deno.setRaw(rid: number), when changed to only be applicable to Deno.stdin and stabilized, is no longer able to be used for 'CONIN$' (and also, I expect, '/dev/tty').

Previously, when stdin could be closed or redirected and 'CONIN$' could still be used as console input and used in 'raw' mode. 'CONIN$' can still now be used for console input, but it's impossible to configure it to use 'raw' mode without using FFI (which is still unstable, as of 2023-03).

There was some discussion about applicability for PTYs in #15797, but no mentioned process for actual functionality beyond Deno.stdin.

If, as @lucacasonato said, rid's are undesirable for stabilized functions, and that abstraction for file references is lost, it seems that this functionality would need to be added to the Deno.Reader or the Deno.FsFile interface. As a counter example, Deno.isatty(rid: number) is already stable and uses the rid abstraction. So, maybe a return of Deno.setRaw(rid: number) would be ok?

Thoughts?

rivy avatar Mar 14 '23 02:03 rivy

Ping, anyone?

rivy avatar Apr 27 '24 22:04 rivy