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

problem description of zig libstd for testing printed paths #5

Open
matu3ba opened this issue Apr 3, 2022 · 3 comments
Open

problem description of zig libstd for testing printed paths #5

matu3ba opened this issue Apr 3, 2022 · 3 comments

Comments

@matu3ba
Copy link
Owner

matu3ba commented Apr 3, 2022

build.zig: StdIoAction limits make, which executes *RunStep
requires comptime-selection of string compare function, which is currently not possible in libstd.

child_process.zig ExecResult we can not reuse dependency resolving
src/test.zig is not usable and neither has custom string matching

possible solutions:

  1. comptime-selection of user-provided function in build.zig for the stuff in make() of RunStep.zig
  2. work around with 1 level of indirection and more code
  3. own build runner
  4. own test runner (lib)

Long-term goal is to have parallelization and user-configuration of zig test_runner, which does step 2.
However, writing the test cases into test-blocks feels like an aweful hack and having an idea how to make it in build.zig is needed eventually anyway.

@matu3ba
Copy link
Owner Author

matu3ba commented Apr 3, 2022

xq on discord:

expand build.zig

@matu3ba
Copy link
Owner Author

matu3ba commented Apr 4, 2022

Without ziglang/zig#11214 its more annoying to call zig build.

The other open question is, if Zig should have stuff for testing build.zig inside build.zig (temporary files/persistent files) and/or how to combine the autodoc system with that.

@matu3ba
Copy link
Owner Author

matu3ba commented Apr 28, 2022

pending ziglang/zig#11472

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant