Skip to content
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

Conversation

Goooler
Copy link
Member

@Goooler Goooler commented Mar 11, 2025

Refs #1322.

Goooler added 5 commits March 7, 2025 09:13
* 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
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 name useAccessor could be more descriptive.
  • Dependency resolution management: The addition of dependencyResolutionManagement in the dependOnAndExcludeArtifactD 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.

@Goooler
Copy link
Member Author

Goooler commented Mar 11, 2025

They are not working for main branch now.

@Goooler Goooler changed the base branch from main to g/20250307/support-type-safe-accessors March 11, 2025 02:02
@Goooler Goooler merged commit 970f537 into g/20250307/support-type-safe-accessors Mar 11, 2025
1 of 7 checks passed
@Goooler Goooler deleted the g/20250307/type-safe-accessors-test branch March 11, 2025 02:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant