-
-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
types.implementing
with an extension?
#35
Comments
Could it be related to this comment? In my particular case I'm not extending a third party framework, but a class defined in the same target in objective c. |
Hi, @bejar37 . No, that comment addresses the case when you extend not your own types. I'll check what can be an issue. |
"defined in the same target in objective c" - is the reason, I think. I think what happens is that we don't get information about Objective-C types, so we treat them as unknown. Then it is really related to that comment and looks like a valid use case to put that functionality back. @krzysztofzablocki |
Yeah we don't have that info, only Swift sources that are under that given directory, we can enable that functionality, but let's tweak the log warning because I think it should be there so people are aware, we already have |
The type is defined in objective c but "conformed" in Swift, I don't know if that would make a difference. So in Swift I've written: extension MyObjCClass: MyProtocol {} |
Once @ilyapuchka enables that use-case of exposing partial types, you'll find your type there but it won't contain metadata transferred from Objective-C, that's, unfortunately, a limitation right now. So if you were e.g. adding some computed variables there, those you'll have access to in Sourcery |
Sure, that's not my use case, anyways! Thanks so much for the help. |
I've released 0.3.9 version that should solve this issue, could you confirm it's working now @bejar37 ? |
I'm getting an error in my xcode build phase in 0.3.9 @krzysztofzablocki:
Looking to see if that's something on my end. |
aren't you calling |
If not what arguments are you passing in? Does it work when you grab the binary from release tab on github? |
@krzysztofzablocki My build phase is the following: The output is:
I'll try to get set up with the binary. |
@krzysztofzablocki yes, FWIW I'm having the same problem with the binary release. Kinda stumped, do you think there's anything else I can do to find the cause of the crash? Thanks for all the help! |
I don't think the Pathes are correct? can you try running against full paths? or using something like: "${PODS_ROOT}/Sourcery/bin/sourcery" "${SRCROOT}/Sourcery-Example" "${SRCROOT}/Templates" "${SRCROOT}/CodeGenerated" |
Weird, I upgraded to 0.4.0 yesterday and the script was running again. I must have been doing something strange. And this feature works great! Thanks again. |
Hi,
I'm using a phantom protocol to guide my code generation, and I noticed something interesting.
I have a template that looks like this:
This works fine when I declare conformance like this:
but not like this:
Is there a particular reason why the second example isn't picked up?
The text was updated successfully, but these errors were encountered: