Skip to content
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

Annotations are ignored for type having @MainActor on separate line #1141

Closed
adarovsky opened this issue Feb 17, 2023 · 1 comment · Fixed by #1172
Closed

Annotations are ignored for type having @MainActor on separate line #1141

adarovsky opened this issue Feb 17, 2023 · 1 comment · Fixed by #1172
Assignees

Comments

@adarovsky
Copy link

adarovsky commented Feb 17, 2023

sample code:

// sourcery: SomeAnnotation
@MainActor 
protocol SomeProtocol {
    func someMethod()
}

template:

{% for proto in types.protocols %}
    {{ proto.name }} - {{ proto.annotations }}
{% endfor %}

result:

SomeProtocol - {
}

If I put @MainActor inline,

// sourcery: SomeAnnotation
@MainActor protocol SomeProtocol {
    func someMethod()
}

output reads

SomeProtocol - {
    SomeAnnotation = 1;
}
@adarovsky adarovsky changed the title Annotations are ignored for type having @MainActor on separate thread Annotations are ignored for type having @MainActor on separate line Feb 17, 2023
@art-divin
Copy link
Collaborator

Hey @adarovsky ,

firstly, thank you very much for reporting the issue 👍

I have addressed it in #1172 MR, and I hope it would be merged soon.

@art-divin art-divin self-assigned this Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants