ziglang/ziglang.org
14
29
Fork
You've already forked ziglang.org
31

Zig Build System > Testing: fix code examples #566

Open
generalmimon wants to merge 1 commit from generalmimon/fix-unit-testing-examples into main
pull from: generalmimon/fix-unit-testing-examples
merge into: ziglang:main
ziglang:main
ziglang:release-0.16.0
ziglang:apraga/french
ziglang:homersimpsons/fix/mobile-responsiveness
ziglang:MarkLagodych/patch-1
ziglang:Zirunis/patch-1
ziglang:zmitchell/zmitchell/build-graph-docs
ziglang:generalmimon/fix-code-snippet-in-0.15.1-relnotes
ziglang:TheConnorJohnson/main
ziglang:meeting-minutes
ziglang:enkvadrat/update-curl-example
generalmimon commented 2025年11月12日 22:33:09 +01:00 (Migrated from github.com)
Copy link

This follows up on https://github.com/ziglang/www.ziglang.org/pull/545. Although it did fix one compile error, fixing it actually revealed other issues that are addressed by this pull request:

  1. Both versions of main.zig were using the old std.ArrayList API from when it was managed, but as of Zig 0.15.1, it is no longer managed: https://ziglang.org/download/0.15.1/release-notes.html#ArrayList-make-unmanaged-the-default

  2. The file unit-testing-skip-foreign/build.zig was missing additional_option=test, so the command zig build --summary all was run instead of the intended command zig build test --summary all.

This follows up on https://github.com/ziglang/www.ziglang.org/pull/545. Although it did fix one compile error, fixing it actually revealed other issues that are addressed by this pull request: 1. Both versions of `main.zig` were using the old `std.ArrayList` API from when it was managed, but as of Zig 0.15.1, it is no longer managed: https://ziglang.org/download/0.15.1/release-notes.html#ArrayList-make-unmanaged-the-default 2. The file `unit-testing-skip-foreign/build.zig` was missing `additional_option=test`, so the command `zig build --summary all` was run instead of the intended command `zig build test --summary all`.
alexrp force-pushed generalmimon/fix-unit-testing-examples from 31652665fc to 17cd96ac18
All checks were successful
test website / build (pull_request) Successful in 2m13s
2026年03月15日 22:30:45 +01:00
Compare
All checks were successful
test website / build (pull_request) Successful in 2m13s
Required
Details
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin generalmimon/fix-unit-testing-examples:generalmimon/fix-unit-testing-examples
git switch generalmimon/fix-unit-testing-examples
Sign in to join this conversation.
No reviewers
Labels
Clear labels
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/ziglang.org!566
Reference in a new issue
ziglang/ziglang.org
No description provided.
Delete branch "generalmimon/fix-unit-testing-examples"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?