Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the issue of release build not getting the feature flag values #40

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

ruixhuang
Copy link
Contributor

On Release build, the FeatureService.shared is assigned at a later time than the initialization of AbacusStateManager, which affects the value of deploymentUri sent to Abacus. This PR makes necessary adjustment to ensure deploymentUri is expected.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring or Technical Debt
  • Documentation update
  • Other (please describe: )

@ruixhuang ruixhuang requested review from johnqh and mike-dydx December 6, 2023 23:59
@@ -14,7 +14,8 @@ import dydxFormatter
public final class AbacusStateManager: NSObject {
public static let shared = AbacusStateManager()

public let deploymentUri = {
public lazy var deploymentUri: String = {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a private (set) here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh.. lazy var should be readonly already.

Copy link
Contributor

Choose a reason for hiding this comment

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

Without private set, it is not read only

https://stackoverflow.com/a/26048425

@ruixhuang ruixhuang merged commit 9b52cb9 into main Dec 7, 2023
1 check passed
@ruixhuang ruixhuang deleted the features/deploymentUri branch December 7, 2023 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants