Document not relocating Kotlin stdlib and reflect#1760
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds documentation to discourage relocating Kotlin Standard Library and Reflect packages in the Shadow plugin configuration guide. The change addresses user questions and issues by providing clear guidance on why these specific Kotlin libraries should not be relocated.
- Adds a new documentation section explaining the risks of relocating Kotlin stdlib and reflect
- References GitHub issues #1622 and #1695 for additional context and discussion
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
b2f9520 to
361e984
Compare
361e984 to
c52c99e
Compare
|
|
||
| ## Relocating Kotlin Standard Library and Reflect | ||
|
|
||
| It is not recommended to relocate Kotlin Standard Library and Reflect because they are tightly coupled with Kotlin |
There was a problem hiding this comment.
Let's rephrase to something like this: "It is not recommended to relocate Kotlin Standard Library if you are using Kotlin Metadata or Kotlin Reflect in the project ..."
I reformulated it this way because:
- for most simple cases, the stdlib relocation does not disrupt the application
- kotlin reflect can be relocated
- In addition to Reflect, Kotlin Metadata may also be disrupted
c52c99e to
32550d9
Compare
| > dependencies if you do not intend to shadow them into your library. | ||
|
|
||
|
|
||
| ## Relocating Kotlin Standard Library and Reflect |
There was a problem hiding this comment.
Also, I think it should be called Relocating Kotlin Standard Library because this paragraph does not mention the relocation of Reflect itself.
|
|
||
| ## Relocating Kotlin Standard Library and Reflect | ||
|
|
||
| It is not recommended to relocate Kotlin Standard Library if you are using Kotlin Metadata or Kotlin Reflect in the |
There was a problem hiding this comment.
Should we add links to Kotlin Metadata and Kotlin Reflect?
https://kotlinlang.org/docs/metadata-jvm.html, https://kotlinlang.org/docs/reflection.html
63bca9d to
0e5f643
Compare
shadow.kotlin.Anyis not found #1622.