Skip to content

Commit

Permalink
Enable RUST_BACKTRACE by default
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Sep 8, 2023
1 parent 1eac02f commit dedfb93
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
5 changes: 0 additions & 5 deletions ElementX.xcodeproj/xcshareddata/xcschemes/ElementX.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@
<CommandLineArguments>
</CommandLineArguments>
<EnvironmentVariables>
<EnvironmentVariable
key = "RUST_BACKTRACE"
value = "full"
isEnabled = "NO">
</EnvironmentVariable>
<EnvironmentVariable
key = "HTTPS_PROXY"
value = "localhost:9090"
Expand Down
8 changes: 7 additions & 1 deletion ElementX/Sources/Application/AppCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
@Consumable private var storedAppRoute: AppRoute?

init() {
Self.setupEnvironmentVariables()

let appSettings = AppSettings()

if appSettings.otlpTracingEnabled {
Expand All @@ -77,7 +79,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
navigationRootCoordinator = NavigationRootCoordinator()

Self.setupServiceLocator(navigationRootCoordinator: navigationRootCoordinator, appSettings: appSettings)

ServiceLocator.shared.analytics.startIfEnabled()

stateMachine = AppCoordinatorStateMachine()
Expand Down Expand Up @@ -230,6 +232,10 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,

// MARK: - Private

private static func setupEnvironmentVariables() {
setenv("RUST_BACKTRACE", "1", 1)
}

private static func setupServiceLocator(navigationRootCoordinator: NavigationRootCoordinator, appSettings: AppSettings) {
ServiceLocator.shared.register(userIndicatorController: UserIndicatorController(rootCoordinator: navigationRootCoordinator))
ServiceLocator.shared.register(appSettings: appSettings)
Expand Down
3 changes: 0 additions & 3 deletions ElementX/SupportingFiles/target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ schemes:
run:
config: Debug
environmentVariables:
- variable: RUST_BACKTRACE
value: full
isEnabled: false
- variable: HTTPS_PROXY
value: localhost:9090
isEnabled: false
Expand Down

0 comments on commit dedfb93

Please sign in to comment.