SwinjectStoryboard: Type 'SwinjectStoryboardOption' does not conform to protocol 'ServiceKeyOption'
Upgraded Swinject to 2.7.0 and SwinjectStoryboard now doesn’t compile, with the error above.
I believe, there must be something like this in code:
internal struct SwinjectStoryboardOption: ServiceKeyOption {
func hash(into: inout Hasher) {
into.combine(self.controllerType)
}
should I open a PR with a fix?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 69
- Comments: 21 (1 by maintainers)
when this problem will fixed ?
Here is the actual error.
error: type ‘SwinjectStoryboardOption’ does not conform to protocol ‘ServiceKeyOption’ internal struct SwinjectStoryboardOption: ServiceKeyOption { ^ … /Carthage/Checkouts/SwinjectStoryboard/Sources/SwinjectStoryboardOption.swift:12:17: note: do you want to add protocol stubs? internal struct SwinjectStoryboardOption: ServiceKeyOption { ^
The cause of the error is the Swinject project moving to Swift 5 as part of their 2.7.0 release. Rolling back to Swinject 2.6.2 worked around the problem for me.
@jakubvano I just want to bring up this topic again. How can I help you releasing a new version with the fix?
Please release a new version (e.g.
2.2.1) frommaster.Please add the following method: func hash(into: inout Hasher) { into.combine(self.controllerType) } in SwinjectStoryboardOption.swift then release
Clean checkout & build with carthage fails becuase it checks out commit [e687b47] tagged with
2.2.0. @jakubvano, would you tag commit [0ca45c8] with2.2.1?My Cartfile now looks like this:
github "Swinject/SwinjectStoryboard" "0ca45c83a8aa398c153d8a036c95abb4343cfa0c".(
Is there any expected ETA for this fix? Seems like a pretty simple change that would fix the currently released version?
I faced this issue. Just conform it and do not mofidy anything else in the Func which has just been added.
Can you fix this?
Still facing this issue. Using this as a temporary workaround:
I still have this issue in 2021 the problem is very much alive.
It appears that master branch head contains this code already, there’s just no update on cocoapods. so, those who use a CI for now may specify branch in Podfile. Hope @yoichitgy or @jakubvano will release it soon =)
@sam-moshenko You are right. That would work around the problem until a new release for SwinjectStoryboard is created.
But I think the bigger question is from @gilroykilroy about whether or not there is going to be another SwinjectStoryboard release. The code to fix the problem has been checked into master for quite a while. I’m really unclear why a release was not created when the code was merged?
Is there an ETA on a fix?