salesforce / rules_spring

Bazel rule for building Spring Boot apps as a deployable jar
BSD 3-Clause "New" or "Revised" License
224 stars 48 forks source link

use captive python instead of system python, and other improvements #57

Closed plaird closed 3 years ago

plaird commented 3 years ago

Mainly, this PR improves the Spring Boot rule in that it will use the captive Python3 toolchain in Bazel (if one is configured), rather than system python. This is good because for hermetic builds, as we don't want to rely on system Python.

Details of the changes:

  1. the dupe class checker python script is now called directly from Starlark instead of a genrule
  2. the rule will now use python from the toolchain if it is configured
  3. we now short circuit the invocation before invoking the python script if fail_on_duplicate_classes = False
  4. the output file from the rule invocation will now contain the full description of the errors, if the invocation fails

Fixes issue #44