Skip to content

Unable to use into generated ***ClientProtocol into Test Target #1526

Open
@adriantabirta

Description

@adriantabirta

Describe the bug

Got: Missing required module 'CNIOAtomics'

Hard: MacBook M1
Soft: latest Xcode version on Ventura, swift version 5.7.1, grpc-swift(1.10.0) in SPM package,

SPM package here

To reproduce

Steps to reproduce the bug you've found:

  1. Create simple Xcode project and add package as dependency
  2. Try to use GeneratedServiceClientProtocol to create RideServiceClientProtocolMock into test target
  3. Got error/s

Expected behaviour

I want to use generated client protocol to create mock classes for testing.

Additional information

  • Have tried to use @_exported import ... in SPM package - same error,
  • Have tried to add grpc-swift as dependency into Xcode project alongside with created SPM package - error, duplicated code
  • Added created package to Link binary with Libraries in Test Target - give me errors like:
Undefined symbols for architecture arm64:
  "_$s19TaxifyClientSwiftUI20RideRemoteDataSourceMp", referenced from:
      _symbolic ______pSg 19TaxifyClientSwiftUI20RideRemoteDataSourceP in RealRideRemoteDataSourceTests.o

Is there a way to forward correctly dependencies like grpc-swift -> my SPM package -> Xcode (especially test target)?
Notice: Mocking is working on application target, am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugFeature doesn't work as expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions