Why is Deno not supporting i64 as seek offset ?
It should ! Linux has devices or other big files that can be seek with a big offset.
Here is the stacktrace when trying to seek a 64bits integer:
error: Uncaught InvalidData: invalid value: integer `56762287783936`, expected i32
at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
at Object.sendAsync ($deno$/ops/dispatch_json.ts:98:10)
at [...]
Reproduce code:
const file = await Deno.open(
`/proc/${pid}/mem`,
{ read: true, write: true, truncate: false, create: false },
);
const offset: i64 = 56762287783936;
await file.seek(offset, Deno.SeekMode.Start);
Why is Deno not supporting i64 as seek offset ?
Not sure what happened here, this predates me but its being lowered to i32 before being passed into seek which takes u64.
It should !
Yes, it's in my backlog.
Also mentioned in #6169
Most helpful comment
Not sure what happened here, this predates me but its being lowered to i32 before being passed into seek which takes u64.
Yes, it's in my backlog.
Also mentioned in #6169