Skip to content

Error building generated library with release configuration #3595

@jmccance

Description

@jmccance

Summary

Building the generated schema module in the release configuration when mocks are enabled results in a build error due to the addition of @testable imports.

Version

1.25.0

Steps to reproduce the behavior

  1. Clone https://github.com/jmccance/apollo-ios-3595
  2. cd RocketResolverAPI
  3. Try building it with swift build -c release

Logs

[1/1] Planning build
Building for production...
/Users/jmccance/tmp/apollo-ios-odyssey/final/RocketReserverAPI/RocketReserverAPITestMocks/Launch+Mock.graphql.swift:5:18: error: module 'RocketReserverAPI' was not compiled for testing
 3 |
 4 | import ApolloTestSupport
 5 | @testable import RocketReserverAPI
   |                  `- error: module 'RocketReserverAPI' was not compiled for testing
 6 |
 7 | public class Launch: MockObject {

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions