Skip to content

Add a way for collecting analysis results in the Analyzer #6772

@laeubi

Description

@laeubi

Lets assume I have an Analyzer and get a manifest from it, then I get some nice package imports with a version range. But from time to time one might ask why a given version was choose for a range. This is not always obvious because it might be depend on what interfaces are used e.g. if its a provider or consumer type.

It would therefore be good if the Analyzer has a way to install a listener that is informed about such choices, w.g. it could get a callback like:

void explain(Package pkg, VersionRange range, String why)

that is called like explain("a.b.c", "(1,1.1]", "Type X implements interface Y that is marked as provider type") whenever the analyzer takes a decision. Implementation can then keep a backlog of why a certain range was chosen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions