-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Test using type-safe accessors in ShadowJar.dependencies
#1327
Test using type-safe accessors in ShadowJar.dependencies
#1327
Conversation
* A new FilteringCachingTest * Tweak contains checks * Use assertCompositeExecutions * Remove SUCCESS check for canRegisterCustomShadowJarTask * Remove FAILED check for failBuildIfProcessingBadJar * Remove FAILED check for honorDuplicatesStrategyWithThrowing * Remove configurationCachingOfConfigurationsIsUpToDate as no inputs changed * Fix style * Reduce all assertions
* Test `relocateAllPackagesButSomeone` * Use ParameterizedTest * Cleanups * Rename
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The pull request introduces type-safe accessors in ShadowJar.dependencies
and includes functional tests to verify the behavior. The changes look good overall, but there are a few areas that could be improved for clarity and maintainability.
Summary of Findings
- Settings script modification: The settings script is modified to enable the
TYPESAFE_PROJECT_ACCESSORS
feature preview. This is necessary for the tests, but it's important to ensure that this doesn't have unintended side effects on other parts of the project. - Parameterized tests: The introduction of parameterized tests with
ValueSource
is a good way to test both with and without type-safe accessors. However, the nameuseAccessor
could be more descriptive. - Dependency resolution management: The addition of
dependencyResolutionManagement
in thedependOnAndExcludeArtifactD
function seems specific to the test case. Consider if this can be made more generic or if it's truly needed for this specific test.
Merge Readiness
The pull request is almost ready for merging. Addressing the comments regarding the test parameter name and the dependency resolution management setup would improve the code quality. I am unable to directly approve the pull request, and users should have others review and approve this code before merging.
src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/FilteringTest.kt
Show resolved
Hide resolved
src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/FilteringTest.kt
Show resolved
Hide resolved
src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/FilteringTest.kt
Show resolved
Hide resolved
src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/FilteringTest.kt
Show resolved
Hide resolved
They are not working for main branch now. |
970f537
into
g/20250307/support-type-safe-accessors
Refs #1322.