Replace Indirect
Boolean with Enum Field
#6092
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
Milestone
Description
As discussed in the discussion, the current
Indirect
field is a boolean. This implementation simplifies the representation to either direct or indirect dependencies. However, this binary distinction falls short in scenarios where the dependency type cannot be determined, defaulting to false, which inaccurately represents these cases as direct dependencies.There are also instances where a dependency does not neatly fit into the direct or indirect categories, such as the root project or in complex structures like multi-module Maven projects. The binary nature of the
Indirect
field fails to capture these nuances.To address these limitations, I propose the deprecation of the
Indirect
boolean field in favor of introducing a new enumeration field, likeRelationship
, because changing the type of the existing field would be a breaking change. This enum would provide a more nuanced representation of dependency types, including but not limited to direct, indirect, unknown, and potentially more categories to accommodate complex project structures.This change would enhance the accuracy of dependency representation and provide clearer insights into project dependencies, especially in complex or ambiguous cases.
Discussed in #5729
The text was updated successfully, but these errors were encountered: