salesforce / salesforce/rules_spring

rules_spring springboot requires @bazel_tools//tools/jdk:singlejar usage

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

Nobody has claimed this yet.

2.7.0 bug
Dominant language
Starlark
Stars
257
Forks
58
PR merge metrics
No merged PRs in 30d

Description

We need to use a different target for the singlejar tool but it is fixed to @bazel_tools//tools/jdk:singlejar in https://github.com/salesforce/rules_spring/blob/main/springboot/springboot.bzl#L596C1-L602C11 :

        cmd = "$(location @rules_spring//springboot:springboot_pkg.sh) " +
              "$(location @bazel_tools//tools/jdk:singlejar) " + boot_app_class + " " + boot_launcher_class +
              " $(JAVABASE) " + name + " " + str(deps_use_starlark_order) + " " + str(include_git_properties_file) + " $@ $(SRCS)",
        tools = [
            "@rules_spring//springboot:springboot_pkg.sh",
            "@bazel_tools//tools/jdk:singlejar",
        ],

it would be nice if this was a parameter to the method instead so we don't have to do a local_override patch

(there might be an alternative solution involving the jar_toolchains parameter but i couldn't figure it out)

Contributor guide

No contributing guide indexed for this repository

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 springboot/springboot.bzl around lines 596-602, where the singlejar target is passed to springboot_pkg.sh. Investigate the existing jar_toolchains parameter mentioned in the issue before deciding how the target should be exposed. Done means callers can select a different singlejar target without applying a local_override patch.

Written by the indexing model from the issue text.

Assessment

Tech stack
spring-boot
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.