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

Multiple compiler errors in std #20505

Open
PauloCampana opened this issue Jul 5, 2024 · 2 comments
Open

Multiple compiler errors in std #20505

PauloCampana opened this issue Jul 5, 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 Jul 5, 2024

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

#19494
#20526
#20734
#20756

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

@mlugg mlugg added bug Observed behavior contradicts documented or intended behavior standard library This issue involves writing Zig code for the standard library. labels Jul 5, 2024
@mlugg mlugg added this to the 0.14.0 milestone Jul 5, 2024
@SilasLock
Copy link

Now that #20526 has been merged, it would be a good idea to document which of the compiler errors described in this issue were fixed by it. That way future contributors know which ones still need to be patched! Could we update the giant test block in the original issue post to only contain lines which still produce individual compiler errors?

@PauloCampana
Copy link
Contributor Author

I edited the original message to mark fixed ones, saw that PR when it came out but didn't realize it got merged.

@andrewrk andrewrk modified the milestones: 0.14.0, 0.16.0 Aug 16, 2024
@andrewrk andrewrk added the contributor friendly This issue is limited in scope and/or knowledge of Zig internals. label Aug 16, 2024
PauloCampana added a commit to PauloCampana/zig that referenced this issue Oct 3, 2024
PauloCampana added a commit to PauloCampana/zig that referenced this issue Oct 3, 2024
PauloCampana added a commit to PauloCampana/zig that referenced this issue Oct 3, 2024
PauloCampana added a commit to PauloCampana/zig that referenced this issue Oct 3, 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