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

Automatically relocate package in Kotlin module files when moving packages #843

Open
elizarov opened this issue Mar 17, 2023 · 2 comments
Open

Comments

@elizarov
Copy link

Kotlin keeps additional package metadata in .kotlin_module files; however, these files are not adjusted automatically when relocate function of shadow plugin is used. This does not prevent proper usage of the resulting libraries at runtime, but can cause issues if you try to compile Kotlin code against libraries with such relocated packages, as Kotlin compiler uses this metadata to filter out packages.

There is a kotlinx-metadata-jvm library that can manipulate (read/write) Kotlin metadata, including .kotlin_module files. I can make a PR to support automatic package relocation in Kotlin metadata when relocate is used. Will you accept this sort of contribution?

@Goooler
Copy link
Member

Goooler commented Mar 19, 2023

Good to see!

@johnrengelman
Copy link
Collaborator

@elizarov I'd be happy to take a look at a PR.
My gut is telling me that based on how complex that support is, that I might want to take this time to see if there is a way to have Shadow be extending in a way that makes adding this type of language specific support be added externally instead of in the main library. Would you be willing to work through that process? (My time is pretty small to work on this, so it could drag on, but if you're willing, we can try).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants