Skip to content

Multiple compiler errors in std #20505

Open
@PauloCampana

Description

@PauloCampana

All lines inside the test below are individual compiler errors, commented ones have been fixed by these PRs:

#19494
#20526
#20734
#20756
#20532
#21643
#21575
#22511
#20511
#22275
#23797
#23811

const std = @import("std");

test {
    // _ = &std.ArrayHashMap(void, void, void, true).move;
    // _ = &std.Build.Cache.Path.makeOpenPath;
    // _ = &std.coff.SectionHeader.setAlignment;
    // _ = &std.crypto.stream.chacha.ChaCha8With64BitNonce.stream;
    // _ = &std.crypto.pwhash.bcrypt.pbkdf;
    // _ = &std.os.windows.GetFileAttributes;
    // _ = &std.os.windows.MoveFileEx;
    // _ = &std.valgrind.innerThreads;
    // _ = &std.valgrind.monitorCommand;
    // _ = &std.valgrind.memcheck.doAddedLeakCheck;
    // _ = &std.valgrind.memcheck.doChangedLeakCheck;
    // _ = &std.valgrind.memcheck.doLeakCheck;
    // _ = &std.valgrind.memcheck.doQuickLeakCheck;
    // _ = &std.valgrind.memcheck.getVbits;
    // _ = &std.valgrind.memcheck.setVbits;

    // _ = &std.fs.createFileAbsoluteW;
    // _ = &std.fs.deleteDirAbsoluteW;
    // _ = &std.fs.deleteFileAbsoluteW;
    // _ = &std.fs.makeDirAbsoluteW;
    // _ = &std.fs.readlinkAbsoluteW;
    // _ = &std.fs.renameW;
    // _ = &std.fs.symLinkAbsoluteW;
    // _ = &std.fs.Dir.makeDirW;
    // _ = &std.fs.Dir.renameW;

    // _ = &std.crypto.Certificate.Parsed.pubKeySigAlgo;
    // _ = &std.crypto.onetimeauth.Poly1305.pad;
    // _ = &std.crypto.ecc.P256.subMixed;
    // _ = &std.crypto.ecc.P384.subMixed;
    // _ = &std.crypto.ecc.Secp256k1.subMixed;

    // _ = &std.Build.Step.Compile.dependsOnSystemLibrary;
    // _ = &std.Build.Step.TranslateC.defineCMacro;
    // _ = &std.DynLib.openZ;
    // _ = &std.heap.alignPageAllocLen;
    // _ = &std.process.changeCurDirC;

    // _ = &std.fmt.Parser.peek;
    // _ = &std.fmt.Parser.until;

    _ = &std.debug.UnwindError;
}

first block are simple fixes, they have typos, missing cast, wrong error set, uses non-pub fn or mismatch type

the std.fs ones are simple fixes but i'd like someone to take a closer look

the std.crypto ones seems to reference stuff that is not implemented yet, or under a different name

the next block needs a deeper look too

std.fmt ones are because these functions are only called at comptime where otherwise it's not valid, could be fixed by marking the inputs as comptime and some other touches, but not necessary for functionality

the last one is very cryptic, dependency loop in the creation of the error set, i have no idea whats going on

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions