salesforce / salesforce/rules_spring

Disable `_gengitinfo` target when `include_git_properties_file` is `False`

Open
#273 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In our builds we have turned off include_git_properties_file so that we can get better caching / more hermetic builds. However running bazel build //our/spring/boot/stuff/... still always shows a cache miss with the _gengitinfo target, presumably because it's uncacheable.

It would be great if that target did not exist when it's not needed so that our builds could report 100% cache hits.

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 tracing the Bazel definition of the _gengitinfo target and how include_git_properties_file is applied. Run the reported bazel build command with the setting false; done means the target is not created and the build reports a cache hit instead of an _gengitinfo miss.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.