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

Macro generated by other macro doesn't expand fully #2629

Closed
jmgawecki opened this issue Apr 27, 2024 · 1 comment
Closed

Macro generated by other macro doesn't expand fully #2629

jmgawecki opened this issue Apr 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jmgawecki
Copy link

jmgawecki commented Apr 27, 2024

Description

The CoreDataManaged (memberAttribute and a few others that aren't relevant here) macro
Screenshot 2024-04-27 at 07 15 40
Expands to following, where CoreDataArray is now attached to the property entities
Screenshot 2024-04-27 at 07 17 32
Then, CoreDataArray (peer, accessor) macro expands but not fully, the peer expansion is missing from the viewer but I can confirm that the property has been in fact generated and and can be accessed.
Screenshot 2024-04-27 at 07 18 11

This is what happens when I attach the CoreDataArray myself:
Screenshot 2024-04-27 at 07 20 26

This looks like a bug to me when the macro expansions are interfering with each other somehow.
This was noted on both Swift 6.0 snapshot and Swift 5.10 release version running Xcode 15.3

@jmgawecki jmgawecki added the bug Something isn't working label Apr 27, 2024
@ahoppen
Copy link
Collaborator

ahoppen commented May 6, 2024

This is an issue in Xcode, not with swift-syntax or the compiler. I just verified that sourcekitd (which provides semantic that raw expansion information to Xcode and lives in the compiler repo) does return the nested expansions, so I’m closing the issue.

I did pass the issue on to the Xcode team. If you are interested in seeing the status of that issue, I suggest that you file a feedback at https://feedbackassistant.apple.com.

@ahoppen ahoppen closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants