mirror of
https://github.com/jetzig-framework/jetzig.git
synced 2025-05-14 14:06:08 +00:00
Merge pull request #134 from jetzig-framework/zig-build-fixes
Zig build fixes for latest Zig nightly build
This commit is contained in:
commit
413fd30aee
@ -129,7 +129,7 @@ pub fn jetzigInit(b: *std.Build, exe: *std.Build.Step.Compile, options: JetzigIn
|
||||
return error.ZmplVersionNotSupported;
|
||||
}
|
||||
|
||||
const target = b.host;
|
||||
const target = exe.root_module.resolved_target orelse @panic("Unable to detect compile target.");
|
||||
const optimize = exe.root_module.optimize orelse .Debug;
|
||||
|
||||
if (optimize != .Debug) exe.linkLibC();
|
||||
@ -159,10 +159,7 @@ pub fn jetzigInit(b: *std.Build, exe: *std.Build.Step.Compile, options: JetzigIn
|
||||
|
||||
const jetzig_dep = b.dependency(
|
||||
"jetzig",
|
||||
.{
|
||||
.optimize = optimize,
|
||||
.target = target,
|
||||
},
|
||||
.{ .optimize = optimize, .target = target },
|
||||
);
|
||||
|
||||
const jetquery_dep = jetzig_dep.builder.dependency("jetquery", .{
|
||||
@ -399,7 +396,7 @@ pub fn jetzigInit(b: *std.Build, exe: *std.Build.Step.Compile, options: JetzigIn
|
||||
|
||||
exe_routes.root_module.addImport("jetzig", jetzig_module);
|
||||
exe_routes.root_module.addImport("routes", routes_module);
|
||||
exe_routes.root_module.addImport("app", &exe.root_module);
|
||||
exe_routes.root_module.addImport("app", exe.root_module);
|
||||
const run_routes_cmd = b.addRunArtifact(exe_routes);
|
||||
routes_step.dependOn(&run_routes_cmd.step);
|
||||
}
|
||||
|
@ -7,16 +7,16 @@
|
||||
.hash = "1220d0e8734628fd910a73146e804d10a3269e3e7d065de6bb0e3e88d5ba234eb163",
|
||||
},
|
||||
.zmpl = .{
|
||||
.url = "https://github.com/jetzig-framework/zmpl/archive/7b5e0309ee49c06b99c242fecd218d3f3d15cd40.tar.gz",
|
||||
.hash = "12204d61eb58ee860f748e5817ef9300ad56c9d5efef84864ae590c87baf2e0380a1",
|
||||
.url = "https://github.com/jetzig-framework/zmpl/archive/f9a3c602d060d6b337312b820c852376cd111766.tar.gz",
|
||||
.hash = "1220f61c70456b8bb7f407ff539d1d8569acea64f68db12f9245f1d4113495c33907",
|
||||
},
|
||||
.jetkv = .{
|
||||
.url = "https://github.com/jetzig-framework/jetkv/archive/acaa30db281f1c331d20c48cfe6539186549ad45.tar.gz",
|
||||
.hash = "1220b260b20cb65d801a00a39dc6506387f5faa1a225f85160e011bd2aabd2ce6e0b",
|
||||
},
|
||||
.jetquery = .{
|
||||
.url = "https://github.com/jetzig-framework/jetquery/archive/52e1cf900c94f3c103727ade6ba2dab3057c8663.tar.gz",
|
||||
.hash = "12208a37407d1a7548fd7e81d9f6a9d4897793918023ed559a279a7647dab2d43145",
|
||||
.url = "https://github.com/jetzig-framework/jetquery/archive/387ad885bb29a16d38dbb71f5b4b5b083fa320e3.tar.gz",
|
||||
.hash = "12206089a3d9de179a0d40cf35c48786eb4525a203ebf8cc131e23e430625713c402",
|
||||
},
|
||||
.jetcommon = .{
|
||||
.url = "https://github.com/jetzig-framework/jetcommon/archive/86f24cfdf2aaa0e8ada4539a6edef882708ced2b.tar.gz",
|
||||
@ -27,8 +27,8 @@
|
||||
.hash = "1220411a8c46d95bbf3b6e2059854bcb3c5159d428814099df5294232b9980517e9c",
|
||||
},
|
||||
.pg = .{
|
||||
.url = "https://github.com/karlseguin/pg.zig/archive/0bfc46029c6a3e8ded7a3e0544fcbcb5baba2208.tar.gz",
|
||||
.hash = "1220fb3f43073a6f9f201764c3ae78aa87b29edbc7b021c1174b29b020967d0b146c",
|
||||
.url = "https://github.com/karlseguin/pg.zig/archive/a03737e8c9404d1642e9b2fdea8e719dfae5cda8.tar.gz",
|
||||
.hash = "1220eff52824f32e7ab225cd50bf962324ca14c498c7c197a554dc55e5bb612f119f",
|
||||
},
|
||||
.smtp_client = .{
|
||||
.url = "https://github.com/karlseguin/smtp_client.zig/archive/3cbe8f269e4c3a6bce407e7ae48b2c76307c559f.tar.gz",
|
||||
|
@ -9,8 +9,8 @@
|
||||
.hash = "1220411a8c46d95bbf3b6e2059854bcb3c5159d428814099df5294232b9980517e9c",
|
||||
},
|
||||
.jetquery = .{
|
||||
.url = "https://github.com/jetzig-framework/jetquery/archive/52e1cf900c94f3c103727ade6ba2dab3057c8663.tar.gz",
|
||||
.hash = "12208a37407d1a7548fd7e81d9f6a9d4897793918023ed559a279a7647dab2d43145",
|
||||
.url = "https://github.com/jetzig-framework/jetquery/archive/387ad885bb29a16d38dbb71f5b4b5b083fa320e3.tar.gz",
|
||||
.hash = "12206089a3d9de179a0d40cf35c48786eb4525a203ebf8cc131e23e430625713c402",
|
||||
},
|
||||
},
|
||||
.paths = .{
|
||||
|
@ -203,7 +203,7 @@ inline fn viewType(path: []const u8) enum { with_id, without_id, with_args } {
|
||||
pub fn createRoutes(
|
||||
allocator: std.mem.Allocator,
|
||||
comptime_routes: []const jetzig.views.Route,
|
||||
) ![]*jetzig.views.Route {
|
||||
) ![]const *const jetzig.views.Route {
|
||||
var routes = std.ArrayList(*jetzig.views.Route).init(allocator);
|
||||
|
||||
for (comptime_routes) |const_route| {
|
||||
|
@ -9,8 +9,8 @@ const httpz = @import("httpz");
|
||||
allocator: std.mem.Allocator,
|
||||
logger: jetzig.loggers.Logger,
|
||||
env: jetzig.Environment,
|
||||
routes: []*jetzig.views.Route,
|
||||
custom_routes: []jetzig.views.Route,
|
||||
routes: []const *const jetzig.views.Route,
|
||||
custom_routes: []const jetzig.views.Route,
|
||||
job_definitions: []const jetzig.JobDefinition,
|
||||
mailer_definitions: []const jetzig.MailerDefinition,
|
||||
mime_map: *jetzig.http.mime.MimeMap,
|
||||
@ -20,7 +20,7 @@ job_queue: *jetzig.kv.Store.JobQueueStore,
|
||||
cache: *jetzig.kv.Store.CacheStore,
|
||||
repo: *jetzig.database.Repo,
|
||||
global: *anyopaque,
|
||||
decoded_static_route_params: []*jetzig.data.Value = &.{},
|
||||
decoded_static_route_params: []const *jetzig.data.Value = &.{},
|
||||
debug_mutex: std.Thread.Mutex = .{},
|
||||
|
||||
const Server = @This();
|
||||
|
@ -16,7 +16,7 @@ pub const JobEnv = struct {
|
||||
/// Environment configured at server launch
|
||||
vars: jetzig.Environment.Vars,
|
||||
/// All routes detected by Jetzig on startup
|
||||
routes: []*const jetzig.Route,
|
||||
routes: []const *const jetzig.Route,
|
||||
/// All mailers detected by Jetzig on startup
|
||||
mailers: []const jetzig.MailerDefinition,
|
||||
/// All jobs detected by Jetzig on startup
|
||||
|
Loading…
x
Reference in New Issue
Block a user