workaround for parallel processing of the build steps

pull/2/head
Chris Boesch 2 years ago
parent 78e856f602
commit 3b85c24694

@ -42,7 +42,7 @@ Verify the installation and build number of `zig` like so:
```bash
$ zig version
0.11.0-dev.1844+xxxxxxxxx
0.11.0-dev.2157+xxxxxxxxx
```
Clone this repository with Git:
@ -52,11 +52,18 @@ $ git clone https://github.com/ratfactor/ziglings
$ cd ziglings
```
Then run `zig build` and follow the instructions to begin!
Then run `zig build 1` and follow the instructions to begin!
```bash
$ zig build
$ zig build 1
```
## Note
Due to Zig's new build system, exercises can currently only be run manually with their number!
```bash
$ zig build xy
```
We hope to be able to offer this again soon in the automatic way.
## A Note About Versions
@ -82,7 +89,8 @@ about input:
### Version Changes
Version-0.11.0-dev.1844+xxxxxxxxx
Version-0.11.0-dev.2157+xxxxxxxxx
* *2023-02-21* zig 0.11.0-dev.2157 - changes in `build system` - new: parallel processing of the build steps
* *2023-02-21* zig 0.11.0-dev.1711 - changes in `for loops` - new: Multi-Object For-Loops + Struct-of-Arrays
* *2023-02-12* zig 0.11.0-dev.1638 - changes in `std.Build` cache_root now returns a directory struct
* *2023-02-04* zig 0.11.0-dev.1568 - changes in `std.Build` (combine `std.build` and `std.build.Builder` into `std.Build`)

@ -571,7 +571,7 @@ pub fn build(b: *Builder) !void {
\\
\\
;
const header_step = b.step("header", logo);
const header_step = b.step("info", logo);
print("{s}\n", .{logo});
const verify_all = b.step("ziglings", "Check all ziglings");
@ -582,8 +582,7 @@ pub fn build(b: *Builder) !void {
const use_healed = b.option(bool, "healed", "Run exercises from patches/healed") orelse false;
// for (exercises) |ex| {
const ex = exercises[0];
for (exercises) |ex| {
const base_name = ex.baseName();
const file_path = std.fs.path.join(b.allocator, &[_][]const u8{
if (use_healed) "patches/healed" else "exercises", ex.main_file,
@ -591,7 +590,6 @@ pub fn build(b: *Builder) !void {
const build_step = b.addExecutable(.{ .name = base_name, .root_source_file = .{ .path = file_path } });
build_step.install();
// std.time.sleep(1000000);
const verify_step = ZiglingStep.create(b, ex, use_healed);
@ -617,10 +615,7 @@ pub fn build(b: *Builder) !void {
prev_chain_verify.dependOn(chain_verify);
prev_chain_verify = chain_verify;
// std.os.exit(0);
// while (true) {}
// }
}
}
var use_color_escapes = false;
@ -638,7 +633,6 @@ const ZiglingStep = struct {
pub fn create(builder: *Builder, exercise: Exercise, use_healed: bool) *@This() {
const self = builder.allocator.create(@This()) catch unreachable;
self.* = .{
// .step = Step.init(.custom, exercise.main_file, builder.allocator, make),
.step = Step.init(Step.Options{ .id = .custom, .name = exercise.main_file, .owner = builder, .makeFn = make }),
.exercise = exercise,
.builder = builder,

Loading…
Cancel
Save