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

Provide binary name for KSClassDeclaration in Resolver #1336

Open
bubenheimer opened this issue Mar 2, 2023 · 2 comments · May be fixed by #1338
Open

Provide binary name for KSClassDeclaration in Resolver #1336

bubenheimer opened this issue Mar 2, 2023 · 2 comments · May be fixed by #1338

Comments

@bubenheimer
Copy link

I need the binary name corresponding to KSClassDeclaration in my processor, and would like to see this functionality added to ksp. The functionality is readily available from asm, but not currently exposed at the ksp API level. It is similar to what Resolver.mapToJvmSignature() provides, but for class binary names. It also is similar to Resolver.getOwnerJvmClassName(), without the part of finding the owner.

It may make sense to instead mirror Resolver.mapToJvmSignature() with Resolver.mapToJvmClassName(), making this functionality available for KSClassDeclaration, KSFunctionDeclaration, and KSPropertyDeclaration. I am not clear on the implementation in the latter two cases, while the first one is trivial.

I can provide a PR for the KSClassDeclaration case. I am not as clear on the KSFunctionDeclaration and KSPropertyDeclaration cases.

@neetopia
Copy link
Collaborator

neetopia commented Mar 7, 2023

This is introducing new APIs, I need some time to think about it.

@bubenheimer
Copy link
Author

Thank you! Would it be possible to address this in the next month or two? I'd like to make my processor public without relying on private builds.

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