Skip to content

[MRESOLVER-390] Customize graph visiting strategy - #322

Merged
cstamas merged 16 commits into
apache:masterfrom
cstamas:MRESOLVER-390
Oct 13, 2023
Merged

cstamas merged 16 commits into
apache:masterfrom
cstamas:MRESOLVER-390

Conversation

@cstamas

@cstamas cstamas commented Jul 27, 2023 •

Copy link
Copy Markdown
Member

Resolver (and thus Maven) had "wired in" strategy to flatten dependency graph into list, and it was always "preOrder", while there existed alternate solutions like "postOrder". This PR introduces "levelOrder" as asked by users, and also makes it configurable (via session config) which strategy should be used, and exposes helper classes and methods.

This PR introduces new visitors that are able to perform the 3 visiting strategies and uses them, while the old ones are left in place (for binary compatibility) but are NOT used in Resolver and their use is discouraged.

Now session can be configured to use following strategies to flatten the graph:

  • "preOrder" -- as before
  • "postOrder" -- was already present, but unused (unless some code used it directly)
  • "levelOrder" -- as asked by users, artifact list is ordered by their depth (distance from root)

By default, this PR introduces NO behavior changes, but opens configuration that does allow to alter these.


https://issues.apache.org/jira/browse/MRESOLVER-390

Originally it was always preOrder w/ possibility to change.
Introduced config and code to support:
* "preOrder" -- as before
* "postOrder" -- unsure who want this
* "levelOrder" -- as asked by users, artifact list is ordered by their level (distance from root)

---

https://issues.apache.org/jira/browse/MRESOLVER-390
@cstamas cstamas self-assigned this Jul 27, 2023
@cstamas cstamas added this to the 1.10.0 milestone Jul 28, 2023
@cstamas
cstamas merged commit 6bc4c21 into apache:master Oct 13, 2023
@cstamas
cstamas deleted the MRESOLVER-390 branch October 13, 2023 23:50
@jira-importer

Copy link
Copy Markdown

Resolve #1074

1 similar comment
@jira-importer

Copy link
Copy Markdown

Resolve #1074

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.

2 participants