Skip to content

Commit

Permalink
make latest patches work on zig master
Browse files Browse the repository at this point in the history
  • Loading branch information
renerocksai committed Feb 23, 2024
1 parent 4393866 commit d51a0b8
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 35 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/build-zig-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ jobs:
- name: Check zig version
run: zig version
- name: Build all examples
run: ./build_all.sh
- name: Run all tests
run: zig build test
run: zig build all
# - name: Run all tests
# run: zig build test
# Run tests separately so we can see more clearly which one fails
- name: Run mustache tests
run: zig build test-mustache
- name: Run httpparams tests
run: zig build test-httpparams
- name: Run sendfile tests
run: zig build test-sendfile
- name: Run authentication tests
run: zig build test-authentication
- name: Report end of tests
run: echo "tests finished"
2 changes: 1 addition & 1 deletion .github/workflows/mastercheck-localhost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
sleep 3
zig build
- name: Build all examples
run: ./build_all.sh
run: zig build all
- name: Run authentication tests
run: zig build test-authentication
- name: Run http parameter tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mastercheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- name: Check zig version
run: zig version
- name: Build all examples
run: ./build_all.sh
run: zig build all
- name: Run all tests
run: zig build test
2 changes: 1 addition & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const build_facilio = @import("facil.io/build.zig").build_facilio;

pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
if (target.getOsTag() == .windows) {
if (target.result.os.tag == .windows) {
std.log.err("\x1b[31mPlatform Not Supported\x1b[0m\nCurrently, Facil.io and Zap are not compatible with Windows. Consider using Linux or Windows Subsystem for Linux (WSL) instead.\nFor more information, please see:\n- https://github.com/zigzap/zap#most-faq\n- https://facil.io/#forking-contributing-and-all-that-jazz\n", .{});
std.os.exit(1);
}
Expand Down
6 changes: 0 additions & 6 deletions build_all.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/request.zig
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub const HttpParamBinaryFile = struct {
filename: ?[]const u8 = null,

/// format function for printing file upload data
pub fn format(value: @This(), comptime _: []const u8, _: std.fmt.FormatOptions, writer: anytype) std.os.WriteError!void {
pub fn format(value: @This(), comptime _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
const d = value.data orelse "\\0";
const m = value.mimetype orelse "null";
const f = value.filename orelse "null";
Expand Down
21 changes: 0 additions & 21 deletions targets.txt

This file was deleted.

2 changes: 1 addition & 1 deletion wrk/zigstd/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn main() !void {
}){};
const allocator = gpa.allocator();

var server = std.http.Server.init(allocator, .{
var server = std.http.Server.init(.{
.reuse_address = true,
});
defer server.deinit();
Expand Down

0 comments on commit d51a0b8

Please sign in to comment.