Skip to content

Conversation

@Cykelero
Copy link
Collaborator

The CrashReportWindowController wouldn't find its nib when CrashReporter was loaded through SwiftPM.

Xcode generates these spontaneously.
The CrashReportWindowController wouldn't find its nib when CrashReporter was loaded through SwiftPM.

- Bump package tools version (see: https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package)
- Disable module auto discovery in nib
- Change window controller initialization code to manually load the nib
	- Add CrashReporterBundle to expose correct current bundle
Copy link
Collaborator

@DivineDominion DivineDominion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, thank you!

Could you replace tabs with 4 spaces real quick for consistency? I believe it's required to use swift format, now shipping with Xcode 16+, in the future, but that's not going to run on auto-save. Ugh. Sorry for the nit I'm picking here :(


// Replicate default init behavior
window?.delegate = self
windowDidLoad()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with inlining the function here, too, now that we are doing everything manually anyway. Less indirection, and all properties are set by this point anyway.

@DivineDominion
Copy link
Collaborator

⌃⇧I apparently also works to quickly fix indentation and such: https://troz.net/post/2024/swift_format/

@Cykelero
Copy link
Collaborator Author

No problem—I usually try to match indentation style, but forgot.

I applied swift-format, which changed more than indentation. Do tell if that's not what you had in mind!

@DivineDominion
Copy link
Collaborator

Thanks! The noise of swift-format'ing doesn't matter, as long as the result looks ok :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants