update to zig 0.13-dev.365 (zig nominated build 2024.05)
Some checks failed
aws-zig mach nominated build / build-zig-nominated-mach-latest (push) Failing after 1m57s
aws-zig nightly build / build-zig-nightly (push) Failing after 3m49s

This commit is contained in:
Emil Lerch 2024-06-04 14:53:09 -07:00
parent be9a52ed6a
commit 7d80f42a3e
Signed by: lobo
GPG Key ID: A7B62D657EF764F8
5 changed files with 18 additions and 15 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@ libs/
src/git_version.zig
zig-out
core
.zig-cache

View File

@ -72,7 +72,7 @@ pub fn build(b: *Builder) !void {
// It relies on code gen and is all fouled up when getting imported
const exe = b.addExecutable(.{
.name = "demo",
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
@ -86,13 +86,13 @@ pub fn build(b: *Builder) !void {
// Expose module to others
_ = b.addModule("aws", .{
.root_source_file = .{ .path = "src/aws.zig" },
.root_source_file = b.path("src/aws.zig"),
.imports = &.{.{ .name = "smithy", .module = smithy_module }},
});
// Expose module to others
_ = b.addModule("aws-signing", .{
.root_source_file = .{ .path = "src/aws_signing.zig" },
.root_source_file = b.path("src/aws_signing.zig"),
.imports = &.{.{ .name = "smithy", .module = smithy_module }},
});
// TODO: This does not work correctly due to https://github.com/ziglang/zig/issues/16354
@ -122,7 +122,7 @@ pub fn build(b: *Builder) !void {
const cg_exe = b.addExecutable(.{
.name = "codegen",
.root_source_file = .{ .path = "codegen/src/main.zig" },
.root_source_file = b.path("codegen/src/main.zig"),
// We need this generated for the host, not the real target
.target = b.host,
.optimize = if (b.verbose) .Debug else .ReleaseSafe,
@ -197,7 +197,7 @@ pub fn build(b: *Builder) !void {
// Creates a step for unit testing. This only builds the test executable
// but does not run it.
const unit_tests = b.addTest(.{
.root_source_file = .{ .path = "src/aws.zig" },
.root_source_file = b.path("src/aws.zig"),
.target = b.resolveTargetQuery(t),
.optimize = optimize,
});

View File

@ -2,15 +2,17 @@
.name = "aws",
.version = "0.0.1",
.paths = .{
"build.zig",
"build.zig.zon",
"src",
"build.zig",
"build.zig.zon",
"src",
"README.md",
"LICENSE.md",
},
.dependencies = .{
.smithy = .{
.url = "https://git.lerch.org/lobo/smithy/archive/1e534201c4df5ea4f615faeedc69d414adbec0b1.tar.gz",
.hash = "1220af63ae0498010004af79936cedf3fe6702f516daab77ebbd97a274eba1b42aad",
.url = "https://git.lerch.org/lobo/smithy/archive/6083ceefe262bb016033a7dfbd995968c86b48b2.tar.gz",
.hash = "122036fbf9a1aae606de5e1a622d7dbbc37338d0fad7a4a018920c1365a1c49ba497",
},
.models = .{
.url = "https://github.com/aws/aws-sdk-go-v2/archive/58cf6509525a12d64fd826da883bfdbacbd2f00e.tar.gz",

View File

@ -34,7 +34,7 @@ pub fn main() anyerror!void {
models_dir = try std.fs.cwd().openDir(args[i + 1], .{ .iterate = true });
}
// TODO: Seems like we should remove this in favor of a package
try output_dir.writeFile("json.zig", json_zig);
try output_dir.writeFile(.{ .sub_path = "json.zig", .data = json_zig });
// TODO: We need a different way to handle this file...
const manifest_file_started = false;
@ -123,11 +123,11 @@ fn processDirectories(models_dir: std.fs.Dir, output_dir: std.fs.Dir) !void {
// re-calculate so we can store the manifest
model_digest = calculated_manifest.model_dir_hash_digest;
calculated_manifest = try calculateDigests(models_dir, output_dir, &thread_pool);
try output_dir.writeFile("output_manifest.json", try std.json.stringifyAlloc(
try output_dir.writeFile(.{ .sub_path = "output_manifest.json", .data = try std.json.stringifyAlloc(
allocator,
calculated_manifest,
.{ .whitespace = .indent_2 },
));
) });
}
var model_digest: ?[Hasher.hex_multihash_len]u8 = null;

View File

@ -32,8 +32,8 @@ pub fn log(
const prefix = "[" ++ @tagName(level) ++ "] " ++ scope_prefix;
// Print the message to stderr, silently ignoring any errors
std.debug.getStderrMutex().lock();
defer std.debug.getStderrMutex().unlock();
std.debug.lockStdErr();
defer std.debug.unlockStdErr();
const stderr = std.io.getStdErr().writer();
nosuspend stderr.print(prefix ++ format ++ "\n", args) catch return;
}