Open mapierce opened 3 weeks ago
similar here:
❌ error: SWIFT_VERSION '6.0' is unsupported, supported versions are: 4.0, 4.2, 5.0. (in target 'MyTarget' from project 'myProject')
even if I select Xcode 15.4 which is supported, I guess somehow need to set Swift version to 5.x in Xcode project for the unit tests, but what about the actual module which I want to use 6.0 IDK
Generating mocks with version
4.1.0
of SwiftyMocky results in odd behaviour in my test target when using Xcode 16 beta (any version). I get a lot of errors like:around lines such as:
where
dictionary
is defined as type[String: Any]
.Removing the
Mock.generated.swift
file from the "Compile Sources" step of the build phases gets rid of these errors and allows it to build (where SwiftMocky isn't used and this the mock file is not depended on).I attempted to update to
4.2.0
of SwiftyMocky, but runninggenerate
results in a large amount of warnings, a sample of which look like:but then I also get what appear to be Swift 6 concurrency errors like:
So I appear to be fully blocked from running any of my tests on Xcode 16.
Hoping there's a fix for this soon 🙏 as it's a pretty big blocker.
Update
I dug into this a bit and it seems to be related to this issue and SE-0364. It looks like it's occurring as a result of the extensions on the
Optional
type to add conformance to expressible by string / integer / boolean etc. literal. It looks like the best option in a scenario like this is to create a new wrapper type for optionals instead of explicitly extending the Optional type to work withParameter
. I would suggest something likeOptionalParameter
which would change the mocked method signature of a function like:from this:
to something like: