-
Notifications
You must be signed in to change notification settings - Fork 6
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
Breaking - Delete XcodeGraphTesting #7
Conversation
@@ -19,3 +19,178 @@ public struct DependenciesGraph: Equatable, Codable { | |||
/// An empty `DependenciesGraph`. | |||
public static let none: DependenciesGraph = .init(externalDependencies: [:], externalProjects: [:]) | |||
} | |||
|
|||
#if DEBUG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of following the Mockable
convention and hiding this behind the MOCKING
compiler directive? That way, these symbols won't be available in non-test code that would only fail to build once you tried to build your tool in the release mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the MOCKING
directive is bound to to the Debug configuration, so practically, the effect is the same as if I directly use the compiler directive associated to that configuration, DEBUG
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the MOCKING
compiler directive should only be set in the test targets 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, it wouldn't work because the test data and mocks are generated when compiling the source target, not the test target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let's keep things as-is then 👍
To simplify our dependency graph, I'm using compiler directives to provide the testing data from the same target that provides the sources
Note
I decided to use the
DEBUG
directive, because intuist/tuist
we always setMOCKING
in the debug configuration, so I don't see the point in introducing a new directive.