build problem only use mach-core: update to Zig 2024.5.0-mach, hit build problem #1216

Closed
opened 2024-06-13 13:24:08 +00:00 by limitee · 1 comment
limitee commented 2024-06-13 13:24:08 +00:00 (Migrated from github.com)

when update to Zig 2024.5.0-mach, I hit something strange: When I change something in a sub module, run zig build, will do nothing. This not happens when use 0.12.

const ui_module = std.Build.Module.Import{
        .name = "ui",
        .module = b.createModule(.{
            .root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "src/context/mod.zig" } },
        }),
    };

const crypto = try mach.CoreApp.init(b, mach_dep.builder, .{
        .name = "crypto",
        .src = "src/app.zig",
        .target = target,
        .optimize = optimize,
        .deps = &[_]std.Build.Module.Import{ zmath_module, zigimg_module, zul_module, service_module },
    });

crypto.module.addImport("ui", ui_module.module);

change something in ui module's source code. then run zig build, nothing happens.
when in 0.12, It will rebuild the poject.
And If not use the mach core, It will rebuild the project, too.

when update to Zig 2024.5.0-mach, I hit something strange: When I change something in a sub module, run zig build, will do nothing. This not happens when use 0.12. ``` const ui_module = std.Build.Module.Import{ .name = "ui", .module = b.createModule(.{ .root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "src/context/mod.zig" } }, }), }; const crypto = try mach.CoreApp.init(b, mach_dep.builder, .{ .name = "crypto", .src = "src/app.zig", .target = target, .optimize = optimize, .deps = &[_]std.Build.Module.Import{ zmath_module, zigimg_module, zul_module, service_module }, }); crypto.module.addImport("ui", ui_module.module); ``` change something in ui module's source code. then run zig build, nothing happens. when in 0.12, It will rebuild the poject. And If not use the mach core, It will rebuild the project, too.
emidoots commented 2024-06-13 13:55:02 +00:00 (Migrated from github.com)
You should migrate away from `CoreApp` / follow https://machengine.org/core/migrations/#machcore-migration-to-new-mach-module-system-2024-06-02
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach#1216
No description provided.