support new module cli arguments (#1019)

* support new module cli arguments

* capture the runtime zig version and store it on `Server`

* update build_runner action

* Use correct version for selecting arguments
This commit is contained in:
Lee Cannon
2023-02-23 12:18:52 -08:00
committed by GitHub
parent f1a8efbe5c
commit 5ede46f003
9 changed files with 133 additions and 51 deletions

View File

@@ -29,7 +29,7 @@ const default_config: Config = .{
const allocator = std.testing.allocator;
pub const Context = struct {
server: Server,
server: *Server,
arena: std.heap.ArenaAllocator,
config: *Config,
request_id: u32 = 1,
@@ -40,8 +40,8 @@ pub const Context = struct {
config.* = default_config;
var server = try Server.init(allocator, config, null, false, false);
errdefer server.deinit();
const server = try Server.create(allocator, config, null, false, false);
errdefer server.destroy();
var context: Context = .{
.server = server,
@@ -63,7 +63,7 @@ pub const Context = struct {
allocator.destroy(self.config);
self.request("shutdown", "{}", null) catch {};
self.server.deinit();
self.server.destroy();
self.arena.deinit();
}