Skip to content

Use minDependencies instead of orderedDependencies in allDeps#4749

Closed
joan38 wants to merge 1 commit intomainfrom
allDeps
Closed

Use minDependencies instead of orderedDependencies in allDeps#4749
joan38 wants to merge 1 commit intomainfrom
allDeps

Conversation

@joan38
Copy link
Collaborator

@joan38 joan38 commented Mar 18, 2025

We have a plugin that was doing:

  defaultResolver()
    .allDeps(dependencies)
    .find(_.module.name.value == "flink-core")
    .getOrElse(
      throw new IllegalStateException("Dependency flink-core not found to determine the Flink version")
    )

And it's not working anymore. I noticed with minDependencies it works. I don't understand everything so maybe @alexarchambault can provide a review?

@joan38 joan38 marked this pull request as ready for review March 18, 2025 19:02
@alexarchambault
Copy link
Collaborator

orderedDependencies returns dependencies in a sorted fashion, ready to be used as class path.

In the Mill code base, allDeps is used by the BSP server, where we should keep using orderedDependencies IMO.

@joan38 What does allDeps return in your case? orderedDependencies and minDependencies ought to contain the same modules at least.

@joan38
Copy link
Collaborator Author

joan38 commented Apr 4, 2025

This is resolved with the new defaultResolver().resolution() API.
Thanks

@joan38 joan38 closed this Apr 4, 2025
@lefou lefou deleted the allDeps branch April 9, 2025 19:21
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

Comments