Skip to content

favour ArrayList over ArrayListUnmanaged#25958

Merged
andrewrk merged 2 commits into
ziglang:masterfrom
bnjmnjrk:task
Nov 20, 2025
Merged

favour ArrayList over ArrayListUnmanaged#25958
andrewrk merged 2 commits into
ziglang:masterfrom
bnjmnjrk:task

Conversation

@bnjmnjrk

Copy link
Copy Markdown
Contributor

Make ArrayListUnmanaged ready for removal from the standard library.

zig/lib/std/std.zig

Lines 57 to 58 in f0a3df9

/// Deprecated; use `ArrayList`.
pub const ArrayListUnmanaged = ArrayList;


I have left two instances of 'ArrayListUnmanaged' unchanged:

  1. # Handles both ArrayList and ArrayListUnmanaged.
    class ArrayListPrinter:
    def __init__(self, val):
    self.val = val
    def to_string(self):
    type = self.val.type.name[len('std.array_list.'):]
    type = re.sub(r'^ArrayListAligned(Unmanaged)?\((.*),null\)$', r'ArrayList\1(\2)', type)
    return '%s of length %s, capacity %s' % (type, self.val['items']['len'], self.val['capacity'])

    So, the tool can still be used when working with older Zig code.

  2. zig/lib/std/std.zig

    Lines 57 to 58 in f0a3df9

    /// Deprecated; use `ArrayList`.
    pub const ArrayListUnmanaged = ArrayList;

    ArrayListUnmanaged is still available, and it is up to the project maintainers to decide when to delete it.

@bnjmnjrk

Copy link
Copy Markdown
Contributor Author

The failed test on Windows seems unrelated to my changes. Does anyone have any idea what could be causing it?

@squeek502

Copy link
Copy Markdown
Member

The failed test on Windows seems unrelated to my changes. Does anyone have any idea what could be causing it?

#22510, will restart that job if it fails again

@squeek502

squeek502 commented Nov 20, 2025

Copy link
Copy Markdown
Member

FYI there's no need to continually rebase unless there are conflicts that need to be resolved (unsure if there were conflicts before the latest rebase, just letting you know).

@andrewrk andrewrk merged commit 4b5351b into ziglang:master Nov 20, 2025
9 checks passed
@andrewrk

Copy link
Copy Markdown
Member

thanks!

@bnjmnjrk bnjmnjrk deleted the task branch November 22, 2025 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants