bazel-contrib / bazel-contrib/rules_jvm_external

Any way to use ijar?

Open
#263 8 comments 0 reactions 0 assignees View on GitHub
type: feature request
Dominant language
Java
Stars
373
Forks
301
Avg merge
6d 3h
Merged PRs (30d)
5

Description

Somewhat open-ended.

As noted in jvm_import.bzl, this project removes the use of ijar, which is specific to Java compilation (not Kotlin, not Scala).

To name Scala as an example, higherkindness/rules_scala suggests `java_import` for typical library JARs and `scala_import` for JARs that contain macros, @inline annotations, or other cases incompatible with ijar.

---

For external imports I currently use bazel-deps. I have a handful of custom lines to loop over the Python data structure it provides, selecting java_import (95%) or scala_import (5%) by referencing a whitelist of libraries.

This way I can still use ijar a maximal amount. Though non-interface changes from maven JARs are likely a rare occurrence, it is nice to reduce file size for dozens/hundreds of JARs for remote execution, I think.

Or maybe I am overthinking it? Are there in fact reasons why it would still be best to use ijar even for external dependencies?

Contributor guide

Open the contributing guide

Research direction

Start by reading jvm_import.bzl and comparing the issue's use of java_import and scala_import with the external-import flow from bazel-deps. Determine whether the project can support ijar for external dependencies and document or define the required behavior; completion should resolve the trade-offs and give users a clear supported approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, scala
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.