-
Notifications
You must be signed in to change notification settings - Fork 144
Document how resolver works internally #1794
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
base: master
Are you sure you want to change the base?
Conversation
To have a place to direct users asking wrong questions, but also to align "lingo" we use.
| under the License. | ||
| --> | ||
|
|
||
| Maven Artifact Resolver (former Aether) is central piece of Maven, and thus, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a central
| --> | ||
|
|
||
| Maven Artifact Resolver (former Aether) is central piece of Maven, and thus, | ||
| is many times target of questions and curiosity how it actually works under the hood. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete ", and thus,
is many times target of questions and curiosity how it actually works under the hood."
|
|
||
| Maven Artifact Resolver (former Aether) is central piece of Maven, and thus, | ||
| is many times target of questions and curiosity how it actually works under the hood. | ||
| This document tries to shed some light on this topic, and explain the main concepts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shed some light on this topic --> explain how resolver works under the hood
| This document tries to shed some light on this topic, and explain the main concepts | ||
| and building blocks of Resolver. | ||
|
|
||
| One important aspect of Resolver is that itself, alone is "incomplete". Integrating application, like Maven is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One important aspect of Resolver is that itself, alone --> Resolver along
|
|
||
| One important aspect of Resolver is that itself, alone is "incomplete". Integrating application, like Maven is | ||
| the one that provides the "glue" (models) and logic how to resolve versions, ranges, build effective models. | ||
| Hence, Resolver itself, alone is unusable. To make it usable, one needs to complement it with models and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hence, Resolver itself, alone is unusable. To make it usable, one needs to complement it with models and
implementations of missing components. Historically, Maven module completing Resolver is the
org.apache.maven:maven-resolver-provider module.
-->
By itself, Resolver is unusable. One needs to complement it with models and implementations of missing components. Historically, the Maven module completing Resolver is
org.apache.maven:maven-resolver-provider.
| In general, steps "dependency graph collection" and "conflict resolution" are performed together, and lingo we use for that operation is "dependency collection". | ||
| The "flattening" and "artifact resolving" are also usually done together, and we use for those the term "artifact resolving". | ||
| To have the story more confusing, when all the steps are performed together is also called "dependency resolution". | ||
| Resolver API reflects this terminology and offers methods doing collection, resolution or both. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Resolve API
| To have the story more confusing, when all the steps are performed together is also called "dependency resolution". | ||
| Resolver API reflects this terminology and offers methods doing collection, resolution or both. | ||
| * | ||
| * Method `CollectResult collectDependencies(RepositorySystemSession session, CollectRequest request)` performs only the collection step, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method
| Resolver API reflects this terminology and offers methods doing collection, resolution or both. | ||
| * | ||
| * Method `CollectResult collectDependencies(RepositorySystemSession session, CollectRequest request)` performs only the collection step, | ||
| as name suggests. Hence, only steps "collection" and "conflict resolution" are performed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its name
the steps
| * Method `DependencyResult resolveDependencies(RepositorySystemSession session, DependencyRequest request)` performs both | ||
| collection and resolution steps. | ||
|
|
||
| Also, each subsequent step depends on the previous one, for example a "dirty graph" cannot be flattened (due possible cycles). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one. For example,
| collection and resolution steps. | ||
|
|
||
| Also, each subsequent step depends on the previous one, for example a "dirty graph" cannot be flattened (due possible cycles). | ||
| And many times, what you want depends on your use case. For example, to investigate dependency graph, one may |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And many times --> Many times
To have a place to direct users asking wrong questions, but also to align "lingo" we use.