~mil/mepo-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
4 2

[PATCH 1/4] zig 0.13: use std.Build.path

Details
Message ID
<20240608005239.11723-1-lauren@selfisekai.rocks>
DKIM signature
pass
Download raw message
Patch: +3 -3
---
 build.zig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/build.zig b/build.zig
index a61082e..923eca5 100644
--- a/build.zig
@@ -11,7 +11,7 @@ fn setDependencies(step: *std.Build.Step.Compile) void {

pub fn build(b: *std.Build) void {
    b.installDirectory(.{
        .source_dir = .{ .path = "scripts" },
        .source_dir = b.path("scripts"),
        .install_dir = .{ .bin = {} },
        .install_subdir = "",
    });
@@ -24,7 +24,7 @@ pub fn build(b: *std.Build) void {
    const optimize = b.standardOptimizeOption(.{});
    const exe = b.addExecutable(.{
        .name = "mepo",
        .root_source_file = .{ .path = "src/main.zig" },
        .root_source_file = b.path("src/main.zig"),
        .target = target,
        .optimize = optimize,
    });
@@ -42,7 +42,7 @@ pub fn build(b: *std.Build) void {

    // Setup test
    const tests = b.addTest(.{
        .root_source_file = .{ .path = "./src/test.zig" },
        .root_source_file = b.path("./src/test.zig"),
        .target = target,
        .optimize = optimize,
    });
-- 
2.45.2

[PATCH 2/4] zig 0.13: require zig 0.13 now

Details
Message ID
<20240608005239.11723-2-lauren@selfisekai.rocks>
In-Reply-To
<20240608005239.11723-1-lauren@selfisekai.rocks> (view parent)
DKIM signature
pass
Download raw message
Patch: +2 -2
---
 src/main.zig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.zig b/src/main.zig
index b477ad7..6ba77e2 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -12,8 +12,8 @@ const utildbg = @import("./util/utildbg.zig");
pub fn main() !void {
    comptime {
        const v = builtin.zig_version;
        if (v.major != 0 or v.minor != 12)
            @panic("Must be built against Zig 0.12.x");
        if (v.major != 0 or v.minor != 13)
            @panic("Must be built against Zig 0.13.x");
    }

    const allocator = std.heap.c_allocator;
-- 
2.45.2

[PATCH 3/4] zig 0.13: std.ChildProcess -> std.process.Child

Details
Message ID
<20240608005239.11723-3-lauren@selfisekai.rocks>
In-Reply-To
<20240608005239.11723-1-lauren@selfisekai.rocks> (view parent)
DKIM signature
pass
Download raw message
Patch: +2 -2
---
 src/api/shellpipe_async.zig | 2 +-
 src/api/shellpipe_sync.zig  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/api/shellpipe_async.zig b/src/api/shellpipe_async.zig
index 9ebcfbf..e0f722e 100644
--- a/src/api/shellpipe_async.zig
+++ b/src/api/shellpipe_async.zig
@@ -60,7 +60,7 @@ fn async_shellpipe_run_catch_errors(mepo: *Mepo, unique_handle_id: i8, cmd: []co
    const max_output_bytes: usize = 50 * 1024;
    var arena = std.heap.ArenaAllocator.init(mepo.allocator);
    defer arena.deinit();
    var child = std.ChildProcess.init(argv[0..], arena.allocator());
    var child = std.process.Child.init(argv[0..], arena.allocator());
    child.stdin_behavior = .Ignore;
    child.stdout_behavior = .Pipe;
    const env = try get_env_vars(mepo, mepo.allocator);
diff --git a/src/api/shellpipe_sync.zig b/src/api/shellpipe_sync.zig
index 133b8c7..d0f6186 100644
--- a/src/api/shellpipe_sync.zig
+++ b/src/api/shellpipe_sync.zig
@@ -32,7 +32,7 @@ fn shellpipe_sync(mepo: *Mepo, cmd: []const u8) !void {
    try mepo.blit();
    const env_vars = try get_env_vars(mepo, arena.allocator());
    const args = [_][]const u8{ "sh", "-c", cmd };
    const process_result = try std.ChildProcess.run(.{
    const process_result = try std.process.Child.run(.{
        .allocator = arena.allocator(),
        .argv = args[0..],
        .env_map = &env_vars,
-- 
2.45.2

[PATCH 4/4] zig 0.13: adapt to new Dir.writeFile API (aka Dir.writeFile2)

Details
Message ID
<20240608005239.11723-4-lauren@selfisekai.rocks>
In-Reply-To
<20240608005239.11723-1-lauren@selfisekai.rocks> (view parent)
DKIM signature
pass
Download raw message
Patch: +1 -1
---
 src/TileCache.zig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/TileCache.zig b/src/TileCache.zig
index 0b1fa63..17e662c 100644
--- a/src/TileCache.zig
+++ b/src/TileCache.zig
@@ -425,7 +425,7 @@ fn download_loop_transfer_complete(tile_cache: *@This(), msg: *curl.CURLMsg) !vo
                    // Save to FS
                    if (is_valid_png_data) {
                        const path = try png_path(tile_cache.allocator, p.get(p.pref.tile_cache_url).t.?, coords);
                        try cache_dir.writeFile(path, datum_array);
                        try cache_dir.writeFile(.{ .sub_path = path, .data = datum_array });
                    }
                }
                if (tile_cache.transfer_map.get(coords).?.load_to_texture) {
-- 
2.45.2

Re: [PATCH 4/4] zig 0.13: adapt to new Dir.writeFile API (aka Dir.writeFile2)

Details
Message ID
<66fafd4d-6a09-40f4-83fd-8e336e1c1cf5@app.fastmail.com>
In-Reply-To
<20240608005239.11723-4-lauren@selfisekai.rocks> (view parent)
DKIM signature
pass
Download raw message
On Fri, Jun 7, 2024, at 8:52 PM, lauren n. liberda wrote:
> ---
>  src/TileCache.zig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/TileCache.zig b/src/TileCache.zig
> index 0b1fa63..17e662c 100644
> --- a/src/TileCache.zig
> +++ b/src/TileCache.zig
> @@ -425,7 +425,7 @@ fn download_loop_transfer_complete(tile_cache: 
> *@This(), msg: *curl.CURLMsg) !vo
>                      // Save to FS
>                      if (is_valid_png_data) {
>                          const path = try 
> png_path(tile_cache.allocator, p.get(p.pref.tile_cache_url).t.?, 
> coords);
> -                        try cache_dir.writeFile(path, datum_array);
> +                        try cache_dir.writeFile(.{ .sub_path = path, 
> .data = datum_array });
>                      }
>                  }
>                  if 
> (tile_cache.transfer_map.get(coords).?.load_to_texture) {
> -- 
> 2.45.2

Awesome - thank you once again for taking care of the zig version update.

Applied!

Miles
Reply to thread Export thread (mbox)