Skip to content

Document not relocating Kotlin stdlib and reflect#1760

Merged
Goooler merged 1 commit into
mainfrom
g/20250918/dont-relocate-kotlin-stdlib
Sep 18, 2025
Merged

Document not relocating Kotlin stdlib and reflect#1760
Goooler merged 1 commit into
mainfrom
g/20250918/dont-relocate-kotlin-stdlib

Conversation

@Goooler

@Goooler Goooler commented Sep 18, 2025

Copy link
Copy Markdown
Member

@Goooler Goooler requested a review from Copilot September 18, 2025 02:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Goooler Goooler force-pushed the g/20250918/dont-relocate-kotlin-stdlib branch from b2f9520 to 361e984 Compare September 18, 2025 02:49
@Goooler Goooler requested a review from Copilot September 18, 2025 02:49

This comment was marked as outdated.

@Goooler Goooler force-pushed the g/20250918/dont-relocate-kotlin-stdlib branch from 361e984 to c52c99e Compare September 18, 2025 02:50
Comment thread docs/configuration/relocation/README.md Outdated

## Relocating Kotlin Standard Library and Reflect

It is not recommended to relocate Kotlin Standard Library and Reflect because they are tightly coupled with Kotlin

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@Goooler Goooler force-pushed the g/20250918/dont-relocate-kotlin-stdlib branch from c52c99e to 32550d9 Compare September 18, 2025 11:24
Comment thread docs/configuration/relocation/README.md Outdated
> dependencies if you do not intend to shadow them into your library.


## Relocating Kotlin Standard Library and Reflect

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think it should be called Relocating Kotlin Standard Library because this paragraph does not mention the relocation of Reflect itself.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread docs/configuration/relocation/README.md Outdated

## 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

@shanshin shanshin Sep 18, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add links to Kotlin Metadata and Kotlin Reflect?
https://kotlinlang.org/docs/metadata-jvm.html, https://kotlinlang.org/docs/reflection.html

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Done.

Comment thread docs/configuration/relocation/README.md Outdated
@Goooler Goooler force-pushed the g/20250918/dont-relocate-kotlin-stdlib branch from 63bca9d to 0e5f643 Compare September 18, 2025 11:51
@Goooler Goooler enabled auto-merge (squash) September 18, 2025 11:52
@Goooler Goooler merged commit 13d460a into main Sep 18, 2025
10 checks passed
@Goooler Goooler deleted the g/20250918/dont-relocate-kotlin-stdlib branch September 18, 2025 11:58
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 this pull request may close these issues.

Relocated kotlin-reflect error like: Built-in class shadow.kotlin.Any is not found

3 participants