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

Accessing resources by name #2008

Open
nea89o opened this issue Jul 20, 2024 · 2 comments · May be fixed by #2068
Open

Accessing resources by name #2008

nea89o opened this issue Jul 20, 2024 · 2 comments · May be fixed by #2068

Comments

@nea89o
Copy link

nea89o commented Jul 20, 2024

Right now you cannot access resources (in src/main/resources let's say), like you can access classes by name. You can obviously still read the file normally, but you won't be able to track it as a dependency. In my particular case this is not much of an issue since the resource file changes only very rarely, but for other use cases it wouldn't be great to have to manually invalidate the KSP cache anytime a resource changes.

@efemoney
Copy link

efemoney commented Aug 5, 2024

KSP is kotlin symbol processing. I am not sure why you believe it should be able to process resources ... 🤔

@nea89o
Copy link
Author

nea89o commented Aug 5, 2024

Well despite being kotlin symbol processing you are allowed to also process java sources. And accessing things like config or language files would be quite helpful. While there are ways to generate java source files from resources and have those be compiled (although it is a bit cumbersome with gradle), there really isn't a way to do this while also combining the data from those resources with data from some kotlin annotation.

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