Commit d1ad126e34
Changed files (1)
lib
std
build
lib/std/build/OptionsStep.zig
@@ -131,7 +131,7 @@ pub fn addOption(self: *OptionsStep, comptime T: type, name: []const u8, value:
},
else => {},
}
- out.print("pub const {}: {s} = ", .{ std.zig.fmtId(name), std.zig.fmtId(@typeName(T)) }) catch unreachable;
+ out.print("pub const {}: {s} = ", .{ std.zig.fmtId(name), @typeName(T) }) catch unreachable;
printLiteral(out, value, 0) catch unreachable;
out.writeAll(";\n") catch unreachable;
}
@@ -292,9 +292,10 @@ test "OptionsStep" {
const options = builder.addOptions();
- const KeywordEnum = enum {
- @"0.8.1",
- };
+ // TODO this regressed at some point
+ //const KeywordEnum = enum {
+ // @"0.8.1",
+ //};
const nested_array = [2][2]u16{
[2]u16{ 300, 200 },
@@ -310,7 +311,7 @@ test "OptionsStep" {
options.addOption(?[]const u8, "optional_string", null);
options.addOption([2][2]u16, "nested_array", nested_array);
options.addOption([]const []const u16, "nested_slice", nested_slice);
- options.addOption(KeywordEnum, "keyword_enum", .@"0.8.1");
+ //options.addOption(KeywordEnum, "keyword_enum", .@"0.8.1");
options.addOption(std.builtin.Version, "version", try std.builtin.Version.parse("0.1.2"));
options.addOption(std.SemanticVersion, "semantic_version", try std.SemanticVersion.parse("0.1.2-foo+bar"));
@@ -341,10 +342,10 @@ test "OptionsStep" {
\\ 200,
\\ },
\\};
- \\pub const KeywordEnum = enum {
- \\ @"0.8.1",
- \\};
- \\pub const keyword_enum: KeywordEnum = KeywordEnum.@"0.8.1";
+ //\\pub const KeywordEnum = enum {
+ //\\ @"0.8.1",
+ //\\};
+ //\\pub const keyword_enum: KeywordEnum = KeywordEnum.@"0.8.1";
\\pub const version: @import("std").builtin.Version = .{
\\ .major = 0,
\\ .minor = 1,