2.0 details#146
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refines “2.0” configuration and UI details by (a) feeding InjectionNext.app settings into SwiftPM/C compilation via environment-driven CSettings, (b) refactoring framework tracing hookup, and (c) reorganizing settings/status menu items and related state handling.
Changes:
- Add a SwiftPM manifest pass-through that converts selected environment variables into
InjectionNextCpreprocessor defines (*_SETTING) and consumes them at client boot. - Refactor
INJECTION_TRACE_FRAMEWORKShandling into a helper and extend tracing to newly injected images. - Update the macOS app UI/settings: reorganize Debug/Advanced options, tweak menu items, add “Prepare SwiftUI” actions, and make compiler patch state observable/published.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/InjectionNextC/include/InjectionClient.h | Removes older env var name defines from shared header. |
| Sources/InjectionNextC/ClientBoot.mm | Applies SwiftPM-provided *_SETTING defines to runtime env vars before connecting. |
| Sources/InjectionNext/InjectionNext.swift | Refactors framework tracing into a helper and re-applies tracing after injection. |
| Package.swift | Reads selected env vars and forwards them to InjectionNextC via cSettings defines. |
| App/InjectionNext/Views/StatusMenuView.swift | Updates menu labels, hides compiler patch action unless already patched, adds SwiftUI preparation submenu. |
| App/InjectionNext/Views/NetworkSettingsView.swift | Marks Injection Host as requiring relaunch (star indicator). |
| App/InjectionNext/Views/InjectionSettingsView.swift | Reorganizes “Debug” toggles and section labeling. |
| App/InjectionNext/Views/FileWatcherSettingsView.swift | Updates latency UI copy/help. |
| App/InjectionNext/Views/CompilerSettingsView.swift | Uses published compiler state and triggers state refresh after patch/unpatch. |
| App/InjectionNext/Views/AdvancedSettingsView.swift | Moves injection behavior and generics/keypaths controls into Advanced. |
| App/InjectionNext/MonitorXcode.swift | Prepends exported env vars when launching Xcode; adjusts project argument handling. |
| App/InjectionNext/Info.plist | Bumps build number. |
| App/InjectionNext/ConfigStore.swift | Adds published compiler state + env export helper + relaunch warnings + immediate file watcher latency application; renames version env var key. |
| App/InjectionNext/AppDelegate.swift | Removes obsolete compat shims and uses ConfigStore-driven compiler state updates. |
Comments suppressed due to low confidence (1)
App/InjectionNext/ConfigStore.swift:353
sendEnvVarsnow usesINJECTION_NEXT_VERSION, but there doesn’t appear to be any#define/constant forINJECTION_NEXT_VERSIONin the checked-in headers (andINJECTION_APP_VERSIONwas removed fromInjectionClient.h). Unless this symbol is defined in another header/module, this will fail to compile; consider adding a definition (e.g., alongside the other INJECTION_* env var names) or using a string literal consistently across client/server.
func sendEnvVars(to client: InjectionServer) {
if let version = Bundle.main
.infoDictionary?["CFBundleShortVersionString"] as? String {
sendVariable(to: client, name: INJECTION_NEXT_VERSION,
value: version)
}
sendVariable(to: client, name: INJECTION_DLOPEN_MODE,
value: String(dlOpenMode.flags))
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
8feb38a to
f20ce2a
Compare
13ffc87 to
aa070a3
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 20 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
6306788 to
611272d
Compare
82ce45a to
3551ce6
Compare
Found two ways to implement settings that have to effect before the client too connects to InjectionNext..