diff --git a/BRANCH_TODO b/BRANCH_TODO index 83accc79d0f31ada93ec3dab277d9a49d3fac410..8cbceb355c7e9c787904df86dddf2adffdd2aee0 100644 --- a/BRANCH_TODO +++ b/BRANCH_TODO @@ -40,5 +40,5 @@ if (b.args) |args| { ⬇️ ```zig -run_cmd.addBuildPositionals(); +run_cmd.addCliExtras(); ``` diff --git a/lib/compiler/Maker/Step/Run.zig b/lib/compiler/Maker/Step/Run.zig index 0c2c6c70db9fd7953780165cb6541f761bba8052..bbba65ef913573400921996fd4d7e340fdaa39fd 100644 --- a/lib/compiler/Maker/Step/Run.zig +++ b/lib/compiler/Maker/Step/Run.zig @@ -177,7 +177,7 @@ pub fn make( }); argv_list.items.len += 1; }, - .cli_positionals => { + .cli_extras => { any_cli_positionals = true; if (maker.run_args) |run_args| { try argv_list.appendSlice(gpa, run_args); @@ -1599,7 +1599,7 @@ pub fn rerunInFuzzMode( }, .output_file => unreachable, .output_directory => unreachable, - .cli_positionals => unreachable, + .cli_extras => unreachable, } } diff --git a/lib/compiler/configurer.zig b/lib/compiler/configurer.zig index 9feb803677b63865f3136fd51b76d3c3b511d045..ba6afb0db80d8541a2cab143a8b2ed1893b98346 100644 --- a/lib/compiler/configurer.zig +++ b/lib/compiler/configurer.zig @@ -492,9 +492,9 @@ const Serialize = struct { .producer = .{ .value = null }, .generated = .{ .value = a.generated_file }, }, - .cli_positionals => .{ + .cli_extras => .{ .flags = .{ - .tag = .cli_positionals, + .tag = .cli_extras, .prefix = false, .suffix = false, .basename = false, diff --git a/lib/init/build.zig b/lib/init/build.zig index d4477c46a9db58da05f18dcca149979f5128a503..8de488f2e0c1965c32ea76c9a704104fb42c3e58 100644 --- a/lib/init/build.zig +++ b/lib/init/build.zig @@ -111,7 +111,7 @@ pub fn build(b: *std.Build) void { // This allows the user to pass arguments to the application in the build // command itself, like this: `zig build run -- arg1 arg2 etc` - run_cmd.addCliPositionals(); + run_cmd.addCliExtras(); // Creates an executable that will run `test` blocks from the provided module. // Here `mod` needs to define a target, which is why earlier we made sure to diff --git a/lib/std/Build/Configuration.zig b/lib/std/Build/Configuration.zig index 47aa0566af6236539e73872e9c0ccac9725d597c..be5748922507ec8de344e6f111b7349c2421c7ae 100644 --- a/lib/std/Build/Configuration.zig +++ b/lib/std/Build/Configuration.zig @@ -567,7 +567,7 @@ pub const Step = extern struct { file_content, output_file, output_directory, - cli_positionals, + cli_extras, }; pub const Index = IndexType(@This()); diff --git a/lib/std/Build/Step/Run.zig b/lib/std/Build/Step/Run.zig index 478df688f34a84ae07284718e31dcf29061ee35a..1db2600f4f7cc61f0aeba76d283bbc16a5191a17 100644 --- a/lib/std/Build/Step/Run.zig +++ b/lib/std/Build/Step/Run.zig @@ -142,7 +142,7 @@ pub const Arg = union(enum) { output_file_dep: *Output, output_directory: *Output, /// The arguments passed after "--" on the "zig build" CLI. - cli_positionals, + cli_extras, }; pub const PrefixedArtifact = struct { @@ -523,10 +523,10 @@ pub fn addArgs(run: *Run, args: []const []const u8) void { /// /// In the example command `zig build run -- arg1 arg2`, "arg1" and "arg2" will /// be passed to the process being run. -pub fn addCliPositionals(run: *Run) void { +pub fn addCliExtras(run: *Run) void { const graph = run.step.owner.graph; const arena = graph.arena; - run.argv.append(arena, .cli_positionals) catch @panic("OOM"); + run.argv.append(arena, .cli_extras) catch @panic("OOM"); } pub fn setStdIn(run: *Run, stdin: StdIn) void {