Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize GradleDependencyGraphBuilder #3877

Conversation

oheger-bosch
Copy link
Member

This PR is a preparation to support the optimized dependency graph format for other package managers than Gradle (see #3825).

The specific GradleDependencyGraphBuilder class is replaced by a generic implementation, which can operate on different representations of dependencies. The information required to build up the dependency graph is obtained from the package manager-specific dependencies using a DependencyHandler.

@oheger-bosch oheger-bosch force-pushed the oheger-bosch/analyzer/generalize_gradle_dependency_graph_builder branch 2 times, most recently from 3ef0916 to 36827f4 Compare April 13, 2021 08:20
@oheger-bosch oheger-bosch marked this pull request as ready for review April 13, 2021 09:16
@oheger-bosch oheger-bosch requested a review from a team as a code owner April 13, 2021 09:16
@oheger-bosch oheger-bosch force-pushed the oheger-bosch/analyzer/generalize_gradle_dependency_graph_builder branch from 36827f4 to 3a0c647 Compare April 14, 2021 14:42
This interface plays a central role to generalize the
GradleDependencyBuilder class to support other package managers as
well. The idea is that each package manager can have its own, internal
representation of a dependency. A DependencyHandler allows extracting
information from such a representation, so that it can be processed by
a generic builder, which does not need to have knowledge about the
internals of a specific package manager implementation.

Signed-off-by: Oliver Heger <[email protected]>
This class is a generalized variant of GradleDependencyGraphBuilder
that can deal with arbitrary dependency models for which a
DependencyHandler is available. In future, it is going to replace
GradleDependencyGraphBuilder and be used for other package managers as
well.

Signed-off-by: Oliver Heger <[email protected]>
This is a prerequisite to use the new generic DependencyGraphBuilder
class with the Gradle package manager.

Signed-off-by: Oliver Heger <[email protected]>
Rework the test class for GradleDependencyGraphBuilder to operate on a
generic DependencyGraphBuilder configured with a
GradleDependencyHandler. This demonstrates that the Gradle-specific
functionality has been correctly generalized.

Rename the test class accordingly and move it to the managers package.

Signed-off-by: Oliver Heger <[email protected]>
Replace GradleDependencyGraphBuilder by a combination of
DependencyGraphBuilder and GradleDependencyHandler. The
Gradle-specific implementation is going to be removed.

Signed-off-by: Oliver Heger <[email protected]>
The class has been fully replaced by DependencyGraphBuilder.

Signed-off-by: Oliver Heger <[email protected]>
@oheger-bosch oheger-bosch force-pushed the oheger-bosch/analyzer/generalize_gradle_dependency_graph_builder branch from 3a0c647 to 836610b Compare April 15, 2021 06:35
@oheger-bosch oheger-bosch requested a review from sschuberth April 15, 2021 06:36
@sschuberth sschuberth merged commit 0978978 into oss-review-toolkit:master Apr 15, 2021
@sschuberth sschuberth deleted the oheger-bosch/analyzer/generalize_gradle_dependency_graph_builder branch April 15, 2021 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants