bazel-contrib / bazel-contrib/rules_jvm_external

Maven download failure reason not clear

Open
#732 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
373
Forks
301
Avg merge
7d 17h
Merged PRs (30d)
3

Description

Please see: https://github.com/google/conscrypt/issues/1080 for the full context

TL;DR - bazel wasn't able to automatically resolve / download an architecture-dependent jar and there were no errors reported that made it obvious what was going wrong. I've provided more info and a repro case linked to the conscrypt issue above.

The conscrypt team suggested the logging could be improved in bazel, and I agree. Also:

"PS if Bazel has an osdetector equivalent, we'd welcome a PR to update https://github.com/google/conscrypt/blob/master/README.md with the recipe!"

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

I've shared an example project here for easy repro: https://drive.google.com/file/d/1tdCAGkkTxCDZyZwku8ttYwoagZx2XOmG/view?usp=sharing - it should be accessible to Googlers.

Running bazel build java/example should demonstrate that Tink classes can be found, but a Conscrypt one cannot. It's also trivial to switch to the -uber version of the jar to confirm that works.

Which operating system are you running Bazel on?

MacOS and Linux

What is the output of bazel info release?

release 5.2.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Conscrypt issue and reproducing with the provided example project using bazel build java/example; compare the failing architecture-dependent jar with the working -uber jar. Trace where the download failure is reported, and consider the work done when the build output clearly identifies why the artifact could not be resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.