mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 08:16:13 +03:00
move crash init to crash package
This commit is contained in:
@ -4,7 +4,12 @@
|
|||||||
|
|
||||||
const sentry_envelope = @import("sentry_envelope.zig");
|
const sentry_envelope = @import("sentry_envelope.zig");
|
||||||
|
|
||||||
pub const SentryEnvelope = sentry_envelope.Envelope;
|
pub const sentry = @import("sentry.zig");
|
||||||
|
pub const Envelope = sentry_envelope.Envelope;
|
||||||
|
|
||||||
|
// The main init/deinit functions for global state.
|
||||||
|
pub const init = sentry.init;
|
||||||
|
pub const deinit = sentry.deinit;
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@import("std").testing.refAllDecls(@This());
|
@import("std").testing.refAllDecls(@This());
|
||||||
|
@ -2,10 +2,10 @@ const std = @import("std");
|
|||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const builtin = @import("builtin");
|
const builtin = @import("builtin");
|
||||||
const build_config = @import("build_config.zig");
|
const build_config = @import("../build_config.zig");
|
||||||
const sentry = @import("sentry");
|
const sentry = @import("sentry");
|
||||||
const internal_os = @import("os/main.zig");
|
const internal_os = @import("../os/main.zig");
|
||||||
const state = &@import("global.zig").state;
|
const state = &@import("../global.zig").state;
|
||||||
|
|
||||||
const log = std.log.scoped(.sentry);
|
const log = std.log.scoped(.sentry);
|
||||||
|
|
@ -7,7 +7,7 @@ const fontconfig = @import("fontconfig");
|
|||||||
const glslang = @import("glslang");
|
const glslang = @import("glslang");
|
||||||
const harfbuzz = @import("harfbuzz");
|
const harfbuzz = @import("harfbuzz");
|
||||||
const oni = @import("oniguruma");
|
const oni = @import("oniguruma");
|
||||||
const sentry = @import("sentry.zig");
|
const crash = @import("crash/main.zig");
|
||||||
const renderer = @import("renderer.zig");
|
const renderer = @import("renderer.zig");
|
||||||
const xev = @import("xev");
|
const xev = @import("xev");
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ pub const GlobalState = struct {
|
|||||||
internal_os.fixMaxFiles();
|
internal_os.fixMaxFiles();
|
||||||
|
|
||||||
// Initialize our crash reporting.
|
// Initialize our crash reporting.
|
||||||
try sentry.init(self.alloc);
|
try crash.init(self.alloc);
|
||||||
|
|
||||||
// const sentrylib = @import("sentry");
|
// const sentrylib = @import("sentry");
|
||||||
// if (sentrylib.captureEvent(sentrylib.Value.initMessageEvent(
|
// if (sentrylib.captureEvent(sentrylib.Value.initMessageEvent(
|
||||||
@ -160,7 +160,7 @@ pub const GlobalState = struct {
|
|||||||
if (self.resources_dir) |dir| self.alloc.free(dir);
|
if (self.resources_dir) |dir| self.alloc.free(dir);
|
||||||
|
|
||||||
// Flush our crash logs
|
// Flush our crash logs
|
||||||
sentry.deinit();
|
crash.deinit();
|
||||||
|
|
||||||
if (self.gpa) |*value| {
|
if (self.gpa) |*value| {
|
||||||
// We want to ensure that we deinit the GPA because this is
|
// We want to ensure that we deinit the GPA because this is
|
||||||
|
Reference in New Issue
Block a user