Merge dependency and project overloads in DependencyFilter#1328
Conversation
DependencyFilter
There was a problem hiding this comment.
Code Review
This pull request aims to reduce dependency and project overloads in the DependencyFilter interface by accepting Any type for dependency and project notations. The changes include modifications to the DependencyFilter interface, its abstract implementation, and corresponding functional tests. Overall, the changes seem reasonable and improve the flexibility of the API.
Summary of Findings
- Type safety concerns: The change to accept
Anyfor dependency and project notations might introduce runtime errors if the provided object is not of the expected type. Consider adding checks or documentation to mitigate this. - Test coverage: The functional tests have been updated to include tests for type-safe dependency accessors. Ensure that all possible scenarios and edge cases are covered.
- Error handling: The
projectfunction inAbstractDependencyFilterthrows an error for unsupported notation types. Ensure that this error is properly handled and communicated to the user.
Merge Readiness
The pull request introduces significant changes to the DependencyFilter API. While the changes seem to improve flexibility, there are potential type safety concerns that need to be addressed. I recommend addressing the high severity issue before merging. I am unable to directly approve this pull request, and other reviewers should also review and approve this code before merging.
src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/AbstractDependencyFilter.kt
Outdated
Show resolved
Hide resolved
f721a4f to
06c0330
Compare
06c0330 to
8fd8e04
Compare
There was a problem hiding this comment.
PR Overview
This pull request updates the changelog to document the removal of dependency and project overloads in DependencyFilter as part of reducing its dependency acceptability.
- Updated the "Removed" section in the changelog with a BREAKING CHANGE note.
Reviewed Changes
| File | Description |
|---|---|
| docs/changes/README.md | Added changelog entry for the removal of overloads. |
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
They are merged to accept `Any`.
8fd8e04 to
6e916b0
Compare
DependencyFilterDependencyFilter
They are merged to accept
Any.Follow up #1322.