std: Convert deprecated aliases to compile errors and fix usages
Deprecated aliases that are now compile errors:
-
std.fs.MAX_PATH_BYTES(renamed tostd.fs.max_path_bytes) -
std.mem.tokenize(split intotokenizeAny,tokenizeSequence,tokenizeScalar) -
std.mem.split(split intosplitSequence,splitAny,splitScalar) -
std.mem.splitBackwards(split intosplitBackwardsSequence,splitBackwardsAny,splitBackwardsScalar) -
std.unicode-
utf16leToUtf8Alloc,utf16leToUtf8AllocZ,utf16leToUtf8,fmtUtf16le(all renamed to have capitalizedLe) -
utf8ToUtf16LeWithNull(renamed toutf8ToUtf16LeAllocZ)
-
-
std.zig.CrossTarget(moved tostd.Target.Query)
Deprecated lib/std/std.zig decls were deleted instead of made a @compileError because the refAllDecls in the test block would trigger the @compileError. The deleted top-level std namespaces are:
-
std.rand(renamed tostd.Random) -
std.TailQueue(renamed tostd.DoublyLinkedList) -
std.ChildProcess(renamed/moved tostd.process.Child)
This is not exhaustive. Deprecated aliases that I didn't touch:
-
std.io.* -
std.Build.* -
std.builtin.Mode -
std.zig.c_translation.CIntLiteralRadix -
std.fs.Dir.writeFile(handled separately in https://github.com/ziglang/zig/pull/19844) - anything in
src/
Better to wait and merge this later in the release cycle as it makes it more difficult to cherry pick bug fixes into the 0.12.x branch.
Sounds good, in the meantime would a separate PR with just the callsite updates (but not the @compileErrors) be a good idea?
EDIT: Went ahead and made one just in case: https://github.com/ziglang/zig/pull/19892
The 0.12.x branch is done, so all clear to proceed with your original intent here.
Thanks!