| ... | ... | @@ -852,10 +852,7 @@ pub fn addModule(b: *Build, name: []const u8, options: Module.CreateOptions) *Mo |
| 852 | 852 | module, |
| 853 | 853 | ) catch @panic("OOM"); |
| 854 | 854 | if (gop.found_existing) { |
| 855 | | panic( |
| 856 | | "A module with the name '{s}' has already been added to the package. Consider creating a private module with std.Build.createModule", |
| 857 | | .{name}, |
| 858 | | ); |
| 855 | panic("A module with the name {q} has already been added to the package. Consider creating a private module with std.Build.createModule", .{name}); |
| 859 | 856 | } |
| 860 | 857 | return module; |
| 861 | 858 | } |
| ... | ... | @@ -1016,7 +1013,7 @@ pub fn addNamedWriteFiles(b: *Build, name: []const u8) *Step.WriteFile { |
| 1016 | 1013 | ) catch @panic("OOM"); |
| 1017 | 1014 | if (gop.found_existing) { |
| 1018 | 1015 | panic( |
| 1019 | | "A WriteFile step with the name '{s}' has already been added to the package. Consider creating a private WriteFile step with std.Build.addWriteFiles", |
| 1016 | "A WriteFile step with the name {q} has already been added to the package. Consider creating a private WriteFile step with std.Build.addWriteFiles", |
| 1020 | 1017 | .{name}, |
| 1021 | 1018 | ); |
| 1022 | 1019 | } |
| ... | ... | @@ -1031,10 +1028,7 @@ pub fn addNamedLazyPath(b: *Build, name: []const u8, lp: LazyPath) void { |
| 1031 | 1028 | lp.dupe(graph), |
| 1032 | 1029 | ) catch @panic("OOM"); |
| 1033 | 1030 | if (gop.found_existing) { |
| 1034 | | panic( |
| 1035 | | "A LazyPath with the name '{s}' has already been added to the package.", |
| 1036 | | .{name}, |
| 1037 | | ); |
| 1031 | panic("A LazyPath with the name {q} has already been added to the package.", .{name}); |
| 1038 | 1032 | } |
| 1039 | 1033 | } |
| 1040 | 1034 | |
| ... | ... | @@ -1137,7 +1131,7 @@ pub fn option(b: *Build, comptime T: type, name_raw: []const u8, description_raw |
| 1137 | 1131 | .enum_options = enum_options, |
| 1138 | 1132 | }; |
| 1139 | 1133 | if ((b.available_options_map.fetchPut(arena, name, available_option) catch @panic("OOM")) != null) { |
| 1140 | | panic("option '{s}' declared twice", .{name}); |
| 1134 | panic("option {q} declared twice", .{name}); |
| 1141 | 1135 | } |
| 1142 | 1136 | |
| 1143 | 1137 | const option_ptr = b.user_input_options.getPtr(name) orelse return null; |
| ... | ... | @@ -1389,7 +1383,7 @@ pub fn parseTargetQuery(options: std.Target.Query.ParseOptions) error{ParseFaile |
| 1389 | 1383 | opts_copy.diagnostics = &diags; |
| 1390 | 1384 | return std.Target.Query.parse(opts_copy) catch |err| switch (err) { |
| 1391 | 1385 | error.UnknownCpuModel => { |
| 1392 | | std.debug.print("unknown CPU: '{s}'\navailable CPUs for architecture '{t}':\n", .{ |
| 1386 | std.debug.print("unknown CPU: {q}\navailable CPUs for architecture {t}:\n", .{ |
| 1393 | 1387 | diags.cpu_name.?, diags.arch.?, |
| 1394 | 1388 | }); |
| 1395 | 1389 | for (diags.arch.?.allCpuModels()) |cpu| { |
| ... | ... | @@ -1399,7 +1393,7 @@ pub fn parseTargetQuery(options: std.Target.Query.ParseOptions) error{ParseFaile |
| 1399 | 1393 | }, |
| 1400 | 1394 | error.UnknownCpuFeature => { |
| 1401 | 1395 | std.debug.print( |
| 1402 | | \\unknown CPU feature: '{s}' |
| 1396 | \\unknown CPU feature: {q} |
| 1403 | 1397 | \\available CPU features for architecture '{t}': |
| 1404 | 1398 | \\ |
| 1405 | 1399 | , .{ |
| ... | ... | @@ -1412,7 +1406,7 @@ pub fn parseTargetQuery(options: std.Target.Query.ParseOptions) error{ParseFaile |
| 1412 | 1406 | }, |
| 1413 | 1407 | error.UnknownOperatingSystem => { |
| 1414 | 1408 | std.debug.print( |
| 1415 | | \\unknown OS: '{s}' |
| 1409 | \\unknown OS: {q} |
| 1416 | 1410 | \\available operating systems: |
| 1417 | 1411 | \\ |
| 1418 | 1412 | , .{diags.os_name.?}); |
| ... | ... | @@ -1422,9 +1416,7 @@ pub fn parseTargetQuery(options: std.Target.Query.ParseOptions) error{ParseFaile |
| 1422 | 1416 | return error.ParseFailed; |
| 1423 | 1417 | }, |
| 1424 | 1418 | else => |e| { |
| 1425 | | std.debug.print("unable to parse target '{s}': {s}\n", .{ |
| 1426 | | options.arch_os_abi, @errorName(e), |
| 1427 | | }); |
| 1419 | std.debug.print("unable to parse target {q}: {t}\n", .{ options.arch_os_abi, e }); |
| 1428 | 1420 | return error.ParseFailed; |
| 1429 | 1421 | }, |
| 1430 | 1422 | }; |
| ... | ... | @@ -1487,7 +1479,7 @@ pub fn standardTargetOptionsQueryOnly(b: *Build, args: StandardTargetOptionsArgs |
| 1487 | 1479 | q.serializeCpuAlloc(arena) catch @panic("OOM"), |
| 1488 | 1480 | }); |
| 1489 | 1481 | } |
| 1490 | | log.err("chosen target '{s}' does not match one of the allowed targets", .{ |
| 1482 | log.err("chosen target {q} does not match one of the allowed targets", .{ |
| 1491 | 1483 | selected_target.zigTriple(arena) catch @panic("OOM"), |
| 1492 | 1484 | }); |
| 1493 | 1485 | b.markInvalidUserInput(); |
| ... | ... | @@ -1542,7 +1534,7 @@ pub fn addUserInputOption(b: *Build, name_raw: []const u8, value_raw: []const u8 |
| 1542 | 1534 | return true; |
| 1543 | 1535 | }, |
| 1544 | 1536 | .lazy_path, .lazy_path_list => { |
| 1545 | | log.warn("the lazy path value type isn't added from the CLI, but somehow '{s}' is a .{f}", .{ |
| 1537 | log.warn("the lazy path value type isn't added from the CLI, but somehow {q} is a .{f}", .{ |
| 1546 | 1538 | name, std.zig.fmtId(@tagName(gop.value_ptr.value)), |
| 1547 | 1539 | }); |
| 1548 | 1540 | return true; |
| ... | ... | @@ -1710,9 +1702,7 @@ pub fn addCheckFile( |
| 1710 | 1702 | /// References a file or directory relative to the source root. |
| 1711 | 1703 | pub fn path(b: *Build, sub_path: []const u8) LazyPath { |
| 1712 | 1704 | if (fs.path.isAbsolute(sub_path)) { |
| 1713 | | panic("sub_path is expected to be relative to the build root, but was this absolute path: '{s}'. Absolute paths can cause problems but can be created via Graph.cwdRelativePath", .{ |
| 1714 | | sub_path, |
| 1715 | | }); |
| 1705 | panic("sub_path is expected to be relative to the build root, but was this absolute path: {q}. Absolute paths can cause problems but can be created via Graph.cwdRelativePath", .{sub_path}); |
| 1716 | 1706 | } |
| 1717 | 1707 | return .{ .src_path = .{ |
| 1718 | 1708 | .owner = b, |
| ... | ... | @@ -2033,34 +2023,34 @@ pub const Dependency = struct { |
| 2033 | 2023 | for (d.builder.install_tls.step.dependencies.items) |dep_step| { |
| 2034 | 2024 | const inst = dep_step.cast(Step.InstallArtifact) orelse continue; |
| 2035 | 2025 | if (mem.eql(u8, inst.artifact.name, name)) { |
| 2036 | | if (found != null) panic("artifact name '{s}' is ambiguous", .{name}); |
| 2026 | if (found != null) panic("artifact name {q} is ambiguous", .{name}); |
| 2037 | 2027 | found = inst.artifact; |
| 2038 | 2028 | } |
| 2039 | 2029 | } |
| 2040 | 2030 | return found orelse { |
| 2041 | 2031 | for (d.builder.install_tls.step.dependencies.items) |dep_step| { |
| 2042 | 2032 | const inst = dep_step.cast(Step.InstallArtifact) orelse continue; |
| 2043 | | log.info("available artifact: '{s}'", .{inst.artifact.name}); |
| 2033 | log.info("available artifact: {q}", .{inst.artifact.name}); |
| 2044 | 2034 | } |
| 2045 | | panic("unable to find artifact '{s}'", .{name}); |
| 2035 | panic("unable to find artifact {q}", .{name}); |
| 2046 | 2036 | }; |
| 2047 | 2037 | } |
| 2048 | 2038 | |
| 2049 | 2039 | pub fn module(d: *Dependency, name: []const u8) *Module { |
| 2050 | 2040 | return d.builder.modules.get(name) orelse { |
| 2051 | | panic("unable to find module '{s}'", .{name}); |
| 2041 | panic("unable to find module {q}", .{name}); |
| 2052 | 2042 | }; |
| 2053 | 2043 | } |
| 2054 | 2044 | |
| 2055 | 2045 | pub fn namedWriteFiles(d: *Dependency, name: []const u8) *Step.WriteFile { |
| 2056 | 2046 | return d.builder.named_writefiles.get(name) orelse { |
| 2057 | | panic("unable to find named writefiles '{s}'", .{name}); |
| 2047 | panic("unable to find named writefiles {q}", .{name}); |
| 2058 | 2048 | }; |
| 2059 | 2049 | } |
| 2060 | 2050 | |
| 2061 | 2051 | pub fn namedLazyPath(d: *Dependency, name: []const u8) LazyPath { |
| 2062 | 2052 | return d.builder.named_lazy_paths.get(name) orelse { |
| 2063 | | panic("unable to find named lazypath '{s}'", .{name}); |
| 2053 | panic("unable to find named lazypath {q}", .{name}); |
| 2064 | 2054 | }; |
| 2065 | 2055 | } |
| 2066 | 2056 | |
| ... | ... | @@ -2628,7 +2618,7 @@ fn dumpBadDirnameHelp( |
| 2628 | 2618 | |
| 2629 | 2619 | if (asking_step) |as| { |
| 2630 | 2620 | stderr.setColor(.red) catch {}; |
| 2631 | | try w.print(" The step '{s}' that is missing a dependency on the above step was created by this stack trace:\n", .{as.name}); |
| 2621 | try w.print(" The step {q} that is missing a dependency on the above step was created by this stack trace:\n", .{as.name}); |
| 2632 | 2622 | stderr.setColor(.reset) catch {}; |
| 2633 | 2623 | |
| 2634 | 2624 | as.dump(stderr); |