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

prevent redundant AstGen compile errors #9192

Open
andrewrk opened this issue Jun 22, 2021 · 0 comments
Open

prevent redundant AstGen compile errors #9192

andrewrk opened this issue Jun 22, 2021 · 0 comments
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone

Comments

@andrewrk
Copy link
Member

Example:

--- a/lib/std/crypto/hkdf.zig
+++ b/lib/std/crypto/hkdf.zig
@@ -10,7 +10,7 @@ const hmac = std.crypto.auth.hmac;
 const mem = std.mem;
 
 /// HKDF-SHA256
-pub const HkdfSha256 = Hkdf(hmac.sha2.HmacSha256);
+pub const HkdfSha256 = comptime Hkdf(hmac.sha2.HmacSha256);
 
 /// HKDF-SHA512
 pub const HkdfSha512 = Hkdf(hmac.sha2.HmacSha512);
[nix-shell:~/dev/zig/build]$ ./zig build-exe test.zig
error: sub-compilation of compiler_rt failed
    crypto/hkdf.zig:13:24: error: redundant comptime keyword in already comptime scope
pub const HkdfSha256 = comptime Hkdf(hmac.sha2.HmacSha256);
                       ^
error: sub-compilation of zig_libc failed
    crypto/hkdf.zig:13:24: error: redundant comptime keyword in already comptime scope
pub const HkdfSha256 = comptime Hkdf(hmac.sha2.HmacSha256);
                       ^
crypto/hkdf.zig:13:24: error: redundant comptime keyword in already comptime scope
pub const HkdfSha256 = comptime Hkdf(hmac.sha2.HmacSha256);
                       ^

Only 1 file which failed AstGen should have its errors reported, and others silenced.

@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness. labels Jun 22, 2021
@andrewrk andrewrk added this to the 0.9.0 milestone Jun 22, 2021
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 Nov 24, 2021
@andrewrk andrewrk modified the milestones: 0.10.0, 0.11.0 Apr 17, 2022
@andrewrk andrewrk modified the milestones: 0.11.0, 0.12.0 Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Projects
None yet
Development

No branches or pull requests

1 participant