docs: rewrite how-resolver-works.md to STE rules - #2046
Conversation
|
CI seems borked: |
gnodet
left a comment
There was a problem hiding this comment.
The prose improvements are welcome, but there are several factual accuracy issues that need fixing before this can be merged:
resolveArtifactsdescription is wrong — it does not build a flattened list; flattening is done bydoFlattenDependencyNodesinsideresolveDependencies- TODO left in published docs — "TODO: do they give the same result?" on line 119
- Grammar error — "also be resolved" missing "can" on line 68
- "binary resource" is inaccurate — POMs are text/XML; the
ArtifactJavadoc says "identifying coordinates and optionally a file" - Dirty graph omits cycles —
CollectResultexplicitly tracksList<DependencyCycle> <aside>HTML tag — not used anywhere else in site markdown, rendering risk with Doxia
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
| * Method `DependencyResult resolveDependencies(RepositorySystemSession session, DependencyRequest request)` performs both | ||
| collection and resolution steps. | ||
| * `CollectResult collectDependencies(RepositorySystemSession session, CollectRequest request)` performs the dependency collection step. It builds the dependency graph and resolves conflicts in that graph before returning. | ||
| * `List<ArtifactResult> resolveArtifacts(RepositorySystemSession session, Collection<? extends ArtifactRequest> requests)` performs the artifact resolution step. It builds a flattened list and downloads artifacts before returning. |
There was a problem hiding this comment.
This description is factually incorrect. resolveArtifacts takes a pre-supplied Collection<? extends ArtifactRequest> and resolves their paths — it does not build a flattened list. DefaultRepositorySystem.resolveArtifacts (lines 308-334) delegates directly to artifactResolver.resolveArtifacts(session, requests). Flattening is done only inside resolveDependencies via doFlattenDependencyNodes (line 421-422).
Suggested:
| * `List<ArtifactResult> resolveArtifacts(RepositorySystemSession session, Collection<? extends ArtifactRequest> requests)` performs the artifact resolution step. It builds a flattened list and downloads artifacts before returning. | |
| * `List<ArtifactResult> resolveArtifacts(RepositorySystemSession session, Collection<? extends ArtifactRequest> requests)` performs only the artifact resolution step. It resolves the paths for a collection of artifacts, downloading them from remote repositories if necessary. |
| Resolver 2.x has two conflict resolution implementations. | ||
| The legacy implementation does multiple graph passes. | ||
| The faster path-based implementation does a single graph pass. | ||
| TODO: do they give the same result? |
There was a problem hiding this comment.
This TODO should not appear in published documentation. Either answer the question and replace with a factual statement, or remove it.
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
gnodet
left a comment
There was a problem hiding this comment.
Thanks for fixing the grammar error and adding cycles to the dirty graph description. Four issues from the previous review remain:
- TODO in published docs (line 119) — still present
resolveArtifactsdescription (line 148) — still says "builds a flattened list"; it takes a pre-suppliedCollectionand resolves paths, no flattening- "binary resource" (line 34) — POMs are text/XML, not binary
<aside>tag (line 67) — not used elsewhere in site markdown
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
Along with the usual style improvements: