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

List modules which contributed dependency conflicting with root #24424

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Silic0nS0ldier
Copy link
Contributor

With --check_direct_dependencies=warning|error the reason for errors is not given, complicating investigation.

This PR adds logic to find the "source modules" that brought the resolved version into the graph.

# BEFORE
ERROR: For repository 'rules_proto', the root module requires module version [email protected], but got [email protected]
in the resolved dependency graph. ...
# AFTER
ERROR: For repository 'rules_proto', the root module requires module version [email protected], but got [email protected]
in the resolved dependency graph. Source module(s): [email protected] ...

This same information can be retrieved with bazel mod commands, however this relies on;

  • MODULE.bazel.lock existing
  • MODULE.bazel.lock being in sync with MODULE.bazel

Neither of which is necessarily true when the check direct deps error/warning is shown.

If nothing else, this saves time.

@github-actions github-actions bot added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. awaiting-review PR is awaiting review from an assigned reviewer labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review PR is awaiting review from an assigned reviewer team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant