Skip to content

Conversation

@kaushalkapasi
Copy link
Collaborator

  • chore: rename openFeatureEvalReason static method to createOFEvalReason
  • chore: wrap createOFEvalReason in #if DEBUG to only allow the method to be used in Debug builds and not Release builds

@kaushalkapasi kaushalkapasi requested a review from a team as a code owner July 17, 2025 20:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR renames a static method and restricts its usage to debug builds only.

  • Renames openFeatureEvalReason to createOFEvalReason
  • Wraps createOFEvalReason in a #if DEBUG block so it’s only available in Debug builds
Comments suppressed due to low confidence (2)

DevCycle/Models/UserConfig.swift:237

  • [nitpick] Add a documentation comment explaining that createOFEvalReason is only available in debug builds and describe its intended purpose.
    public static func createOFEvalReason(reason: String) -> EvalReason {

DevCycle/Models/UserConfig.swift:236

  • Ensure there are unit tests covering createOFEvalReason in debug builds so its behavior remains validated.
    #if DEBUG

@kaushalkapasi kaushalkapasi enabled auto-merge (squash) July 17, 2025 20:28

public static func openFeatureEvalReason(reason: String) -> EvalReason {
return EvalReason(reason: reason, details: "")
#if DEBUG
Copy link
Member

Choose a reason for hiding this comment

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

is there not #if TEST?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not built in, it would require a custom implementation. Using #if DEBUG is recommend, since it works for all Debug builds (and is automatically set as part of the build stages in Xcode / command line)

@kaushalkapasi kaushalkapasi merged commit 8447ce6 into main Jul 17, 2025
8 of 9 checks passed
@kaushalkapasi kaushalkapasi deleted the chore-wrap-open-feature-reason-in-debug branch July 17, 2025 20:40
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.

3 participants