mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-22 19:56:08 +03:00
1
.github/workflows/nix.yml
vendored
1
.github/workflows/nix.yml
vendored
@ -14,5 +14,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ghostty
|
name: ghostty
|
||||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||||
|
useDaemon: false # sometimes fails on short jobs
|
||||||
- name: Check Zig cache hash
|
- name: Check Zig cache hash
|
||||||
run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh
|
run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh
|
||||||
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -220,6 +220,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ghostty
|
name: ghostty
|
||||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||||
|
skipPush: true
|
||||||
|
useDaemon: false # sometimes fails on short jobs
|
||||||
- name: prettier check
|
- name: prettier check
|
||||||
run: nix develop -c prettier --check .
|
run: nix develop -c prettier --check .
|
||||||
|
|
||||||
@ -234,5 +236,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ghostty
|
name: ghostty
|
||||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||||
|
skipPush: true
|
||||||
|
useDaemon: false # sometimes fails on short jobs
|
||||||
- name: alejandra check
|
- name: alejandra check
|
||||||
run: nix develop -c alejandra --check .
|
run: nix develop -c alejandra --check .
|
||||||
|
@ -24,7 +24,7 @@ const Command = @import("src/Command.zig");
|
|||||||
// but we liberally update it. In the future, we'll be more careful about
|
// but we liberally update it. In the future, we'll be more careful about
|
||||||
// using released versions so that package managers can integrate better.
|
// using released versions so that package managers can integrate better.
|
||||||
comptime {
|
comptime {
|
||||||
const required_zig = "0.12.0-dev.2075+f5978181e";
|
const required_zig = "0.12.0-dev.2701+d18f52197";
|
||||||
const current_zig = builtin.zig_version;
|
const current_zig = builtin.zig_version;
|
||||||
const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable;
|
const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable;
|
||||||
if (current_zig.order(min_zig) == .lt) {
|
if (current_zig.order(min_zig) == .lt) {
|
||||||
|
12
flake.lock
generated
12
flake.lock
generated
@ -147,11 +147,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-zig-0-12": {
|
"nixpkgs-zig-0-12": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707156663,
|
"lastModified": 1707614255,
|
||||||
"narHash": "sha256-T0Ah65Sj/HnbEkKmOCaQGSIoNDZDh3K299A0nvXceCk=",
|
"narHash": "sha256-26jDBuCgewZb+ifR3Ow6cZS/6Mz09pwC4ukKWtOjFZk=",
|
||||||
"owner": "vancluever",
|
"owner": "vancluever",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dfe11015af91c9317604d792715f166d9fce7831",
|
"rev": "85b992eb1a8d3a3742ddb21eba7f79b0e4f2e78b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -194,11 +194,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707148508,
|
"lastModified": 1707611073,
|
||||||
"narHash": "sha256-fAQN2Y8wZn8JQWQvA5dfDEorxZLLWTNSdZp39YFAWXk=",
|
"narHash": "sha256-sMsxVKXP5TLcaVMNlRZ7KlDsYGwDdJAMtY0DKmb+7fQ=",
|
||||||
"owner": "mitchellh",
|
"owner": "mitchellh",
|
||||||
"repo": "zig-overlay",
|
"repo": "zig-overlay",
|
||||||
"rev": "3e47b1a260a5521e51888b8e71cd04b8e8928cb3",
|
"rev": "aa4edff6f53e64443ca77e8d9ffe866f29e5b3d4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -178,7 +178,6 @@ fn startWindows(self: *Command, arena: Allocator) !void {
|
|||||||
.access_mask = windows.GENERIC_READ | windows.SYNCHRONIZE,
|
.access_mask = windows.GENERIC_READ | windows.SYNCHRONIZE,
|
||||||
.share_access = windows.FILE_SHARE_READ,
|
.share_access = windows.FILE_SHARE_READ,
|
||||||
.creation = windows.OPEN_EXISTING,
|
.creation = windows.OPEN_EXISTING,
|
||||||
.io_mode = .blocking,
|
|
||||||
},
|
},
|
||||||
) else null;
|
) else null;
|
||||||
defer if (null_fd) |fd| std.os.close(fd);
|
defer if (null_fd) |fd| std.os.close(fd);
|
||||||
|
@ -109,20 +109,13 @@ pub fn main() !MainReturn {
|
|||||||
try app_runtime.run();
|
try app_runtime.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const std_options = struct {
|
// The function std.log will call.
|
||||||
// Our log level is always at least info in every build mode.
|
fn logFn(
|
||||||
pub const log_level: std.log.Level = switch (builtin.mode) {
|
|
||||||
.Debug => .debug,
|
|
||||||
else => .info,
|
|
||||||
};
|
|
||||||
|
|
||||||
// The function std.log will call.
|
|
||||||
pub fn logFn(
|
|
||||||
comptime level: std.log.Level,
|
comptime level: std.log.Level,
|
||||||
comptime scope: @TypeOf(.EnumLiteral),
|
comptime scope: @TypeOf(.EnumLiteral),
|
||||||
comptime format: []const u8,
|
comptime format: []const u8,
|
||||||
args: anytype,
|
args: anytype,
|
||||||
) void {
|
) void {
|
||||||
// Stuff we can do before the lock
|
// Stuff we can do before the lock
|
||||||
const level_txt = comptime level.asText();
|
const level_txt = comptime level.asText();
|
||||||
const prefix = if (scope == .default) ": " else "(" ++ @tagName(scope) ++ "): ";
|
const prefix = if (scope == .default) ": " else "(" ++ @tagName(scope) ++ "): ";
|
||||||
@ -160,7 +153,16 @@ pub const std_options = struct {
|
|||||||
nosuspend stderr.print(level_txt ++ prefix ++ format ++ "\n", args) catch return;
|
nosuspend stderr.print(level_txt ++ prefix ++ format ++ "\n", args) catch return;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub const std_options: std.Options = .{
|
||||||
|
// Our log level is always at least info in every build mode.
|
||||||
|
.log_level = switch (builtin.mode) {
|
||||||
|
.Debug => .debug,
|
||||||
|
else => .info,
|
||||||
|
},
|
||||||
|
|
||||||
|
.logFn = logFn,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// This represents the global process state. There should only
|
/// This represents the global process state. There should only
|
||||||
|
Reference in New Issue
Block a user