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

website build-system static-library referencing non existant std.io members #572

Open
opened 2025年12月21日 11:13:26 +01:00 by ttambow · 0 comments
ttambow commented 2025年12月21日 11:13:26 +01:00 (Migrated from github.com)
Copy link

literally this. ziglang/zig#30211

Zig Version

n/a - this is about your website
Steps to Reproduce and Observed Behavior

hi there,

sorry i don't know where else to raise this. i asked on discord and they said to raise here.

specifically the build-system and static library is out of date: https://ziglang.org/learn/build-system/#static-library

tested on master, 0.15.1, and 0.15.2; issue is thus.

install
└─ install demo
 └─ compile exe demo Debug native 2 errors
src/demo.zig:7:11: error: unused local constant 
 const stdout = std.io.getStdOut();
 ^~~~~~
src/demo.zig:7:26: error: root source file struct 'Io' has no member named 'getStdOut' 
 const stdout = std.io.getStdOut();
 ~~~~~~^~~~~~~~~~
/home/thomas/Downloads/zig-x86_64-linux-0.15.1/lib/std/Io.zig:1:1: note: struct declared here 
const builtin = @import("builtin");

this is the code:

const std = @import("std");
extern fn fizzbuzz(n: usize) ?[*:0]const u8;
pub fn main() !void {
 const writer = std.io.Writer;
 const stdout = std.io.getStdOut();
 var bw = std.io.bufferedWriter(writer());
 const w = bw.writer();
 for (0..100) |n| {
 if (fizzbuzz(n)) |s| {
 try w.print("{s}\n", .{s});
 } else {
 try w.print("{d}\n", .{n});
 }
 }
 try bw.flush();
}

looks like bufferedWriter doesnt exist, either

Expected Behavior

For it to work, of course.

and one clarifying comment i felt compelled to make:

hi all - im not looking for the answer; im here to report that your documentation is out of date.

if it's a feature of 15.0, but was removed since, then the learning page needs to be updated with what is the recommended/standard approach here.

the point of the page is to learn, and with obstructions like this it does not install a lot of trust in the language.

again, if this is not the correct place to raise this please let me know!

literally this. https://codeberg.org/ziglang/zig/issues/30211 Zig Version n/a - this is about your website Steps to Reproduce and Observed Behavior hi there, sorry i don't know where else to raise this. i asked on discord and they said to raise here. specifically the build-system and static library is out of date: https://ziglang.org/learn/build-system/#static-library tested on master, 0.15.1, and 0.15.2; issue is thus. ``` install └─ install demo └─ compile exe demo Debug native 2 errors src/demo.zig:7:11: error: unused local constant const stdout = std.io.getStdOut(); ^~~~~~ src/demo.zig:7:26: error: root source file struct 'Io' has no member named 'getStdOut' const stdout = std.io.getStdOut(); ~~~~~~^~~~~~~~~~ /home/thomas/Downloads/zig-x86_64-linux-0.15.1/lib/std/Io.zig:1:1: note: struct declared here const builtin = @import("builtin"); ``` this is the code: ``` const std = @import("std"); extern fn fizzbuzz(n: usize) ?[*:0]const u8; pub fn main() !void { const writer = std.io.Writer; const stdout = std.io.getStdOut(); var bw = std.io.bufferedWriter(writer()); const w = bw.writer(); for (0..100) |n| { if (fizzbuzz(n)) |s| { try w.print("{s}\n", .{s}); } else { try w.print("{d}\n", .{n}); } } try bw.flush(); } ``` looks like bufferedWriter doesnt exist, either Expected Behavior For it to work, of course. and one clarifying comment i felt compelled to make: > hi all - im not looking for the answer; im here to report that your documentation is out of date. > > if it's a feature of 15.0, but was removed since, then the learning page needs to be updated with what is the recommended/standard approach here. > > the point of the page is to learn, and with obstructions like this it does not install a lot of trust in the language. > > again, if this is not the correct place to raise this please let me know! >
Sign in to join this conversation.
No Branch/Tag specified
main
release-0.16.0
apraga/french
homersimpsons/fix/mobile-responsiveness
MarkLagodych/patch-1
Zirunis/patch-1
zmitchell/zmitchell/build-graph-docs
generalmimon/fix-unit-testing-examples
generalmimon/fix-code-snippet-in-0.15.1-relnotes
TheConnorJohnson/main
meeting-minutes
enkvadrat/update-curl-example
No results found.
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
1 participant
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#572
Reference in a new issue
ziglang/ziglang.org
No description provided.
Delete branch "%!s()"

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?