Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std: Convert deprecated aliases to compile errors and fix usages #19847

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 23, 2024

  1. std: Convert deprecated aliases to compile errors and fix usages

    Deprecated aliases that are now compile errors:
    
    - `std.fs.MAX_PATH_BYTES` (renamed to `std.fs.max_path_bytes`)
    - `std.mem.tokenize` (split into `tokenizeAny`, `tokenizeSequence`, `tokenizeScalar`)
    - `std.mem.split` (split into `splitSequence`, `splitAny`, `splitScalar`)
    - `std.mem.splitBackwards` (split into `splitBackwardsSequence`, `splitBackwardsAny`, `splitBackwardsScalar`)
    - `std.unicode`
      + `utf16leToUtf8Alloc`, `utf16leToUtf8AllocZ`, `utf16leToUtf8`, `fmtUtf16le` (all renamed to have capitalized `Le`)
      + `utf8ToUtf16LeWithNull` (renamed to `utf8ToUtf16LeAllocZ`)
    - `std.zig.CrossTarget` (moved to `std.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 to `std.Random`)
    - `std.TailQueue` (renamed to `std.DoublyLinkedList`)
    - `std.ChildProcess` (renamed/moved to `std.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`
      + anything in `src/`
    squeek502 committed May 23, 2024
    Configuration menu
    Copy the full SHA
    0b833ed View commit details
    Browse the repository at this point in the history