-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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: align PriorityQueue and ArrayList API-wise #19960
Conversation
Note: I haven't run the tests locally. I'd love to, but there's a conspicuous lack of a single command that I can just copy-paste to get the tests going at https://github.com/ziglang/zig/wiki/Contributing#testing, and I am not motivated enough at this point to extract that command from the overall build instructions :) |
1ce79b6
to
06dd34c
Compare
I'm... not sure I understand how there isn't a single easily copyable command to run the tests. It's at the top of the section you linked here. That aside, the first subsection has an even more easy-to-run local test that you can copy paste... https://github.com/ziglang/zig/wiki/Contributing#directly-testing-the-standard-library-with-zig-test |
I have neither |
06dd34c
to
e86e428
Compare
ArrayList uses `items` slice to store len initialized items, while PriorityQueue stores `capacity` potentially uninitialized items. This is a surprising difference in the API that leads to bugs! tigerbeetle/tigerbeetle#1948
e86e428
to
cf7b9db
Compare
@matklad just FYI, I don't think having |
The problem is not PATH per se, but rather the fact that I don’t know which Zig I need (or, rather, which command I need to type to get the right zig without understanding which zig is right one). To clarify, I know that I personally, if I spend time reading the docs, will be able to get the command to build/download the right version of Zig. I went through this exercise a couple of times already during the past year. It’s just that I remember that being non-trivial (the docs specify like five different ways to do this, and it’s unclear which one I need), and that I’ve already forgot what I’ve learned back then :-) |
Thanks! Great patch. |
ArrayList uses
items
slice to store len initialized items, while PriorityQueue storescapacity
potentially uninitialized items.This is a surprising difference in the API that leads to bugs!
tigerbeetle/tigerbeetle#1948