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

BenchmarkResults "out_stream" field setup fails on Windows #49

Closed
FObersteiner opened this issue Feb 14, 2024 · 1 comment · Fixed by #51
Closed

BenchmarkResults "out_stream" field setup fails on Windows #49

FObersteiner opened this issue Feb 14, 2024 · 1 comment · Fixed by #51
Labels
bug Something isn't working

Comments

@FObersteiner
Copy link
Collaborator

out_stream: std.io.BufferedWriter(1024, @TypeOf(std.io.getStdOut().writer())) = .{ .unbuffered_writer = std.io.getStdOut().writer() },

On Windows 10 / Zig 0.11, the type of stdout writer cannot be determined at compile-time

C:\Users\user\scoop\apps\zig\current\lib\std\os\windows.zig:1892:28: error: unable to evaluate comptime expression
                break :blk asm volatile (
                           ^~~
C:\Users\user\scoop\apps\zig\current\lib\std\os\windows.zig:1907:15: note: called from here
    return teb().ProcessEnvironmentBlock;
           ~~~^~
C:\Users\user\scoop\apps\zig\current\lib\std\io.zig:36:30: note: called from here
        return os.windows.peb().ProcessParameters.hStdOutput;
               ~~~~~~~~~~~~~~^~
C:\Users\user\scoop\apps\zig\current\lib\std\io.zig:50:34: note: called from here
        .handle = getStdOutHandle(),
                  ~~~~~~~~~~~~~~~^~
zbench.zig:253:125: note: called from here
    out_stream: std.io.BufferedWriter(1024, @TypeOf(std.io.getStdOut().writer())) = .{ .unbuffered_writer = std.io.getStdOut().writer() },
@FObersteiner FObersteiner added the bug Something isn't working label Feb 14, 2024
@FObersteiner
Copy link
Collaborator Author

FObersteiner commented Feb 16, 2024

related: #40

related PR: #39

Bryysen added a commit to Bryysen/zBench that referenced this issue Feb 19, 2024
This was done to circumvent hendriknielaender#49, which is (most likely) caused by a
bug in the compiler.
Bryysen added a commit to Bryysen/zBench that referenced this issue Feb 19, 2024
This was done to circumvent hendriknielaender#49, which is (most likely) caused by a
bug in the compiler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant