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

Breaking - Delete XcodeGraphTesting #7

Merged
merged 7 commits into from
Jun 10, 2024
Merged

Breaking - Delete XcodeGraphTesting #7

merged 7 commits into from
Jun 10, 2024

Conversation

pepicrft
Copy link
Contributor

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 in tuist/tuist we always set MOCKING in the debug configuration, so I don't see the point in introducing a new directive.

@pepicrft pepicrft requested a review from fortmarek June 10, 2024 14:09
@pepicrft pepicrft self-assigned this Jun 10, 2024
@pepicrft pepicrft changed the title **Breaking** Delete XcodeGraphTesting Breaking - Delete XcodeGraphTesting Jun 10, 2024
@@ -19,3 +19,178 @@ public struct DependenciesGraph: Equatable, Codable {
/// An empty `DependenciesGraph`.
public static let none: DependenciesGraph = .init(externalDependencies: [:], externalProjects: [:])
}

#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.

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.

Copy link
Contributor Author

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.

Copy link
Member

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 🤔

Copy link
Contributor Author

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.

Copy link
Member

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 👍

@pepicrft pepicrft merged commit ea54083 into main Jun 10, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants