You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to request the ability to use a relative path when generating test mocks with Apollo iOS. Currently, the primary code generation configuration supports specifying a relative path, which allows efficient distribution of code across individual frameworks. This capability helps our team reduce build times effectively.
However, when it comes to generating test mocks, we are forced to place them all within a single framework. As a result, this framework becomes a dependency for most of our test frameworks, leading to significant build slowdowns — adding minutes to each build process.
Describe the solution you'd like
By facilitating the use of relative paths for test mock generation, similar to the primary codegen config, we can distribute test mocks across individual frameworks. This change would:
Reduce build times by preventing unnecessary dependencies on a single framework.
Enhance encapsulation and modularity of individual frameworks, improving the overall architecture.
Align the test mock generation process with the flexibility provided by the primary code generation configuration.
Benefits:
Performance:
Distribution of test mocks would decrease the build time significantly.
Encapsulation:
Frameworks remain independent, aligning test code with framework-specific needs.
Scalability:
Enables teams to scale and manage their iOS projects more effectively by leveraging clean architectural boundaries.
The text was updated successfully, but these errors were encountered:
Thanks for the request @trevor-holliday-instacart! We would need to do some exploration to ensure that this is feasible, but I can't come up with a reason why not off the top of my head.
Test Mocks are in need or a lot of TLC in general, and this seems like something I'd like to support with them. But we have a lot of other projects on our roadmap right now, and it may be a while before Test Mocks get any new attention. I'll keep this issue open for when we get a chance to look at them again.
@trevor-holliday-instacart I'm curious why you believe this is affecting your build times so dramatically. Have you done profiling to validate that this is the case?
Okay thanks for following up. That still seems really odd to me, but seems like it IS happening. At some point, we're going to make another pass at a lot of improvements to the TestMocks. This should be included in that effort.
Use case
I would like to request the ability to use a relative path when generating test mocks with Apollo iOS. Currently, the primary code generation configuration supports specifying a relative path, which allows efficient distribution of code across individual frameworks. This capability helps our team reduce build times effectively.
However, when it comes to generating test mocks, we are forced to place them all within a single framework. As a result, this framework becomes a dependency for most of our test frameworks, leading to significant build slowdowns — adding minutes to each build process.
Describe the solution you'd like
By facilitating the use of relative paths for test mock generation, similar to the primary codegen config, we can distribute test mocks across individual frameworks. This change would:
Benefits:
Performance:
Encapsulation:
Scalability:
The text was updated successfully, but these errors were encountered: