Method cannot be declared open because its parameter uses an internal type
m7mdra opened this issue · 6 comments
Hello
I'm using latest version of the library 4.1.0
everything went smoothly until i tried to use mock i get this error
Method cannot be declared open because its parameter uses an internal type
marking mocked protocol and classes as public resolve the issue but i don't know if is intended to work this way its a bug
swiftymocky doctor
✅ XCode project found at: /Users/user12/Desktop/project1/project1.xcodeproj
1. Inspecting tools dependencies:
✅ Mint available
✅ Sourcery is available through Mint
⚠️ Mint does not yet have matching Sourcery version installed.
Required Sourcery version would be installed upon first generation. It might take a bit more time
2. Inspecting Mockfile:
✅ Mockfile exists
✅ Mockfile contains mocks definitions
3. Linting 'project1Tests' mock:
✅ Output file exists
Targets:
✅ Mock defines targets correctly
✅ All targets include './project1Tests/Mock.generated.swift' file.
Sources:
✅ Sources are defined correctly
Imports:
✅ Testable imports are defined
✅ Imports are defined
it shows a warning Mint does not yet have matching Sourcery version installed.
but i dont it is relevant to my problem
thanks in advance.
Thank you, i found a solution long time ago but forgot to close the issue, thanks again.
hey @VilemKurz , it was a long time ago since i worked on that project where i encountered the issue.
maybe if you could show me part of your code where the issue occur... maybe i can help.
maybe also try to follow @spaluchiewicz comment.
I tried to reinstall using brew, same issue. To reproduce the problem
- have internal protocol, with method/properties which use internal types in their signature, marked as mockable
- generate mocks
- bug: the generated method is public. But types in its signature are internal. Thus, xcode spits the error - title of this issue.
@VilemKurz
OK i will try to reproduce the problem and cross compare it with my project.