| author | |
| committer | |
| log | 8f224bc3f0065aaf971126de65b5d56d2d6d522d |
| tree | a77b397cea7dfcb441f58711ea2976a0de7b92e3 |
| parent | 0d95b44a1c9e483beb82f7b70515185159d79bdc |
they don't have to be positionals6 files changed, 10 insertions(+), 10 deletions(-)
BRANCH_TODO+1-1| ... | @@ -40,5 +40,5 @@ if (b.args) |args| { | ... | @@ -40,5 +40,5 @@ if (b.args) |args| { |
| 40 | ⬇️ | 40 | ⬇️ |
| 41 | 41 | ||
| 42 | ```zig | 42 | ```zig |
| 43 | run_cmd.addBuildPositionals(); | 43 | run_cmd.addCliExtras(); |
| 44 | ``` | 44 | ``` |
lib/compiler/Maker/Step/Run.zig+2-2| ... | @@ -177,7 +177,7 @@ pub fn make( | ... | @@ -177,7 +177,7 @@ pub fn make( |
| 177 | }); | 177 | }); |
| 178 | argv_list.items.len += 1; | 178 | argv_list.items.len += 1; |
| 179 | }, | 179 | }, |
| 180 | .cli_positionals => { | 180 | .cli_extras => { |
| 181 | any_cli_positionals = true; | 181 | any_cli_positionals = true; |
| 182 | if (maker.run_args) |run_args| { | 182 | if (maker.run_args) |run_args| { |
| 183 | try argv_list.appendSlice(gpa, run_args); | 183 | try argv_list.appendSlice(gpa, run_args); |
| ... | @@ -1599,7 +1599,7 @@ pub fn rerunInFuzzMode( | ... | @@ -1599,7 +1599,7 @@ pub fn rerunInFuzzMode( |
| 1599 | }, | 1599 | }, |
| 1600 | .output_file => unreachable, | 1600 | .output_file => unreachable, |
| 1601 | .output_directory => unreachable, | 1601 | .output_directory => unreachable, |
| 1602 | .cli_positionals => unreachable, | 1602 | .cli_extras => unreachable, |
| 1603 | } | 1603 | } |
| 1604 | } | 1604 | } |
| 1605 | 1605 |
lib/compiler/configurer.zig+2-2| ... | @@ -492,9 +492,9 @@ const Serialize = struct { | ... | @@ -492,9 +492,9 @@ const Serialize = struct { |
| 492 | .producer = .{ .value = null }, | 492 | .producer = .{ .value = null }, |
| 493 | .generated = .{ .value = a.generated_file }, | 493 | .generated = .{ .value = a.generated_file }, |
| 494 | }, | 494 | }, |
| 495 | .cli_positionals => .{ | 495 | .cli_extras => .{ |
| 496 | .flags = .{ | 496 | .flags = .{ |
| 497 | .tag = .cli_positionals, | 497 | .tag = .cli_extras, |
| 498 | .prefix = false, | 498 | .prefix = false, |
| 499 | .suffix = false, | 499 | .suffix = false, |
| 500 | .basename = false, | 500 | .basename = false, |
lib/init/build.zig+1-1| ... | @@ -111,7 +111,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -111,7 +111,7 @@ pub fn build(b: *std.Build) void { |
| 111 | 111 | ||
| 112 | // This allows the user to pass arguments to the application in the build | 112 | // This allows the user to pass arguments to the application in the build |
| 113 | // command itself, like this: `zig build run -- arg1 arg2 etc` | 113 | // command itself, like this: `zig build run -- arg1 arg2 etc` |
| 114 | run_cmd.addCliPositionals(); | 114 | run_cmd.addCliExtras(); |
| 115 | 115 | ||
| 116 | // Creates an executable that will run `test` blocks from the provided module. | 116 | // Creates an executable that will run `test` blocks from the provided module. |
| 117 | // Here `mod` needs to define a target, which is why earlier we made sure to | 117 | // Here `mod` needs to define a target, which is why earlier we made sure to |
lib/std/Build/Configuration.zig+1-1| ... | @@ -567,7 +567,7 @@ pub const Step = extern struct { | ... | @@ -567,7 +567,7 @@ pub const Step = extern struct { |
| 567 | file_content, | 567 | file_content, |
| 568 | output_file, | 568 | output_file, |
| 569 | output_directory, | 569 | output_directory, |
| 570 | cli_positionals, | 570 | cli_extras, |
| 571 | }; | 571 | }; |
| 572 | 572 | ||
| 573 | pub const Index = IndexType(@This()); | 573 | pub const Index = IndexType(@This()); |
lib/std/Build/Step/Run.zig+3-3| ... | @@ -142,7 +142,7 @@ pub const Arg = union(enum) { | ... | @@ -142,7 +142,7 @@ pub const Arg = union(enum) { |
| 142 | output_file_dep: *Output, | 142 | output_file_dep: *Output, |
| 143 | output_directory: *Output, | 143 | output_directory: *Output, |
| 144 | /// The arguments passed after "--" on the "zig build" CLI. | 144 | /// The arguments passed after "--" on the "zig build" CLI. |
| 145 | cli_positionals, | 145 | cli_extras, |
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | pub const PrefixedArtifact = struct { | 148 | pub const PrefixedArtifact = struct { |
| ... | @@ -523,10 +523,10 @@ pub fn addArgs(run: *Run, args: []const []const u8) void { | ... | @@ -523,10 +523,10 @@ pub fn addArgs(run: *Run, args: []const []const u8) void { |
| 523 | /// | 523 | /// |
| 524 | /// In the example command `zig build run -- arg1 arg2`, "arg1" and "arg2" will | 524 | /// In the example command `zig build run -- arg1 arg2`, "arg1" and "arg2" will |
| 525 | /// be passed to the process being run. | 525 | /// be passed to the process being run. |
| 526 | pub fn addCliPositionals(run: *Run) void { | 526 | pub fn addCliExtras(run: *Run) void { |
| 527 | const graph = run.step.owner.graph; | 527 | const graph = run.step.owner.graph; |
| 528 | const arena = graph.arena; | 528 | const arena = graph.arena; |
| 529 | run.argv.append(arena, .cli_positionals) catch @panic("OOM"); | 529 | run.argv.append(arena, .cli_extras) catch @panic("OOM"); |
| 530 | } | 530 | } |
| 531 | 531 | ||
| 532 | pub fn setStdIn(run: *Run, stdin: StdIn) void { | 532 | pub fn setStdIn(run: *Run, stdin: StdIn) void { |