deno_std
deno_std copied to clipboard
What's happening with `writeAll` and `writeAllSync`?
trafficstars
Context:
Deno.writeAllandDeno.writeAllSyncwere deprecated and then removed.writeAllandwriteAllSyncof@std/streamswere deprecated, moved to@std/io, and then removed.- Per https://github.com/denoland/std/issues/5003,
@std/iois no longer due for stabilization in order to "to nudge people to use@std/streamsinstead". - Docs for
Deno.stdout.writeandDeno.stdout.writeSyncboth warn that "It is not guaranteed that the full buffer will be written in a single call" (as do the corresponding methods ofDeno.stderr).
In light of all that, what if anything is the stabilization path for a high-level "write all this stuff to stdout/stderr (with no newline at the end) and definitely don't bail part-way through" method in Deno/std?
Conversely, is there any reason for that method not to simply be Deno.std(out|err).write(Sync)?? I'm struggling to think of any low-level use case where it'd be preferable to bail part-way through in an unspecified way (as opposed to, say, relying on userland code to chunk/paginate the input as appropriate).