EngFlow / bazel_invocation_analyzer

A tool that automatically analyzes a Bazel build's profile and offers suggestions on how to make it faster.
https://analyzer.engflow.com
Apache License 2.0
90 stars 10 forks source link

Get no such package '@maven//' error when running cli target #176

Closed AngelaGuardia closed 5 months ago

AngelaGuardia commented 6 months ago

Description

When running bazel run //cli -- /path/to/profile I get the following error:

ERROR: /Users/aguardia/Development/engflow/bazel_invocation_analyzer/third_party/jsr305/BUILD:1:13: no such package '@maven//': The repository '@maven' could not be resolved: Repository '@maven' is not defined and referenced by '//third_party/jsr305:jsr305'
ERROR: Analysis of target '//cli:cli' failed; build aborted:
INFO: Elapsed time: 0.621s
INFO: 0 processes.
ERROR: Build failed. Not running target

Observed behavior

See error message above

Expected behavior

Successful profile analysis

Step-by-step guide on how to reproduce the bug

  1. Clone current version of this repo: b441e9330819bc4ba0fba029c0a674ff97425707
  2. bazel run //cli -- /path/to/profile

Additional context

I was able to resolve this by adding build --enable_bzlmod to the .bazelrc - should that be checked into the repo?

Environment

Details about the environment this bug was observed in.

saraadams commented 5 months ago

Thanks for the report. This should now be fixed.