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

Compiler errors in std pt. 2 #21094

Open
PauloCampana opened this issue Aug 16, 2024 · 2 comments
Open

Compiler errors in std pt. 2 #21094

PauloCampana opened this issue Aug 16, 2024 · 2 comments
Labels
bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals. standard library This issue involves writing Zig code for the standard library.
Milestone

Comments

@PauloCampana
Copy link
Contributor

PauloCampana commented Aug 16, 2024

Similar to #20505, all of these are compiler errors

Commented lines have been fixed by
#21138
#21240
#21181

const std = @import("std");

test {
    // _ = &std.debug.dumpStackPointerAddr; // missing {s} format

    // windows
    _ = &std.os.windows.sendmsg; // wrong type
    _ = &std.fs.File.tryLock; // returning void instead of bool
    _ = &std.debug.SelfInfo.Module.getDwarfInfoForAddress; // no such field debug_data

    // _ = &std.os.linux.BPF.btf.IntInfo; // invalid packed struct
    // _ = &std.os.linux.futex2_wake; // illegal [*]anyopaque
    // _ = &std.os.linux.futex2_wait; // missing intfromenum
    // _ = &std.os.linux.futex2_waitv;
    // _ = &std.os.linux.VFS_CAP_FLAGS_MASK; // ~ on comptime_int
    // _ = &std.os.linux.vfs_cap_data; // invalid extern stuct
    // _ = &std.os.linux.sendmmsg; // wrong type and field names
    // _ = &std.os.linux.sigismember; // bit shift with wrong type

    // haiku
    _ = &std.c._kern_get_current_team; // got deleted?
    _ = &std.c._kern_open_dir;
    _ = &std.c._kern_read_dir;
    _ = &std.c._kern_read_stat;
    _ = &std.c._kern_rewind_dir;
    _ = &std.c.vregs;

    // darwin
    // _ = &std.c.THREAD_STATE_NONE; // switch missing else
    _ = &std.c.EXC.MASK; // invalid packed struct
    _ = &std.c.sigaddset; // typo in segset_t
    _ = &std.c.os_log_create; // extern fn with opaque
    _ = &std.c.os_log_type_enabled;
    _ = &std.c.os_signpost_enabled;
    _ = &std.c.os_signpost_id_generate;
    _ = &std.c.os_signpost_id_make_with_pointer;
    _ = &std.c.os_signpost_interval_begin;
    _ = &std.c.os_signpost_interval_end;
    _ = &std.c.NOTE.PCTRLMASK; // ~ on comptime_int

    _ = &std.posix.timestamp_t; // doesnt exist inside `system.` but `std.os.wasi.`

    // on systems where usize != u64
    _ = &std.Build.Fuzz.WebServer.coverageRun;
    _ = &std.Build.Fuzz.WebServer.run;
}
@andrewrk andrewrk added bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals. standard library This issue involves writing Zig code for the standard library. labels Aug 16, 2024
@andrewrk andrewrk added this to the 0.16.0 milestone Aug 16, 2024
@fardragon
Copy link
Contributor

#21138 fixes the std.os.linux part

NicoElbers added a commit to NicoElbers/zig that referenced this issue Aug 29, 2024
Very simply add the format specifier to the print statement.
Since debug.print is hard coded I couldn't come up with a reasonalble
way to add a test, and since this function is simple enough I doubt it's
useful.

fixes one part of ziglang#21094
andrewrk pushed a commit that referenced this issue Sep 1, 2024
Very simply add the format specifier to the print statement.
Since debug.print is hard coded I couldn't come up with a reasonalble
way to add a test, and since this function is simple enough I doubt it's
useful.

fixes one part of #21094
andrewrk pushed a commit that referenced this issue Sep 25, 2024
@sfiedler0
Copy link
Contributor

sfiedler0 commented Oct 11, 2024

_ = &std.c._kern_get_current_team; // got deleted?

Regressed in #20679, see lib/std/c/haiku.zig:1389 (link does not work because large diff is not rendered).

@andrewrk should that part be deleted entirely or restored?

richerfu pushed a commit to richerfu/zig that referenced this issue Oct 28, 2024
Very simply add the format specifier to the print statement.
Since debug.print is hard coded I couldn't come up with a reasonalble
way to add a test, and since this function is simple enough I doubt it's
useful.

fixes one part of ziglang#21094
richerfu pushed a commit to richerfu/zig that referenced this issue Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals. standard library This issue involves writing Zig code for the standard library.
Projects
None yet
Development

No branches or pull requests

4 participants