MockSwift icon indicating copy to clipboard operation
MockSwift copied to clipboard

'Mock' is ambiguous for type lookup in this context when using sourcery-generated mock types

Open eedmond opened this issue 11 months ago • 0 comments

🐞 Describe the bug

The auto-generated mocks using MockSwift.template and Sourcery have name conflicts with other classes in my project. Specifically, Mock and Predicate.

📝 To Reproduce

Generate mocks in a project that already defines a Mock and/or Predicate class.

🔍 Expected behavior

It would be great if MockSwift.template included the MockSwift. prefix on the Mock and Predicate classes to avoid this name conflict.

⚙️ Environment

MockSwift version: 1.1.0
OS:

  • [x] macOS Seqoia 15.2
  • [ ] Linux x.x.x

Swift version: 6.1 Xcode version: private version

eedmond avatar Jan 08 '25 21:01 eedmond