Support relocating list of types in RelocatorRemapper#1714
Merged
Conversation
…ernal/RelocatorRemapper.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ernal/RelocatorRemapper.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ernal/RelocatorRemapper.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…adow/internal/RelocatorRemapper.kt" This reverts commit f05f0ba.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the RelocatorRemapper to support relocating lists of types in signature strings, addressing issue #1403. The implementation changes how type signatures containing multiple class references are processed during relocation.
- Adds support for relocating signature strings containing multiple class type descriptors
- Improves pattern matching for class signatures to handle various formats like arrays and method signatures
- Includes comprehensive test coverage for different signature patterns
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/RelocatorRemapper.kt | Enhanced mapName method to split and process lists of types, updated regex pattern for better class signature matching |
| src/test/kotlin/com/github/jengelman/gradle/plugins/shadow/relocation/RelocatorRemapperTest.kt | Added unit tests covering various signature patterns including arrays, multiple classes, and method signatures |
| src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/RelocationTest.kt | Added functional test verifying relocation works correctly for multi-class signature strings in real JAR execution |
| docs/changes/README.md | Updated changelog to document the new feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/RelocatorRemapper.kt
Show resolved
Hide resolved
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/RelocatorRemapper.kt
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1403.