rules_jvm
rules_jvm copied to clipboard
Preserve Cache between the runs
We have large build targets (one for each top level directory) in https://github.com/harness/harness-core.
When I run gazelle - I have to deal (manually fix) with a bunch of cyclic dependencies. Each time I refactor, I run gazelle to regenerate the build files. Even if changes are isolated to a sub-directory, I have to run gazelle on entire workspace. It appears on each run, we map package to build target -- so if we try running gazelle only on a sub-directory, it does not resolve imports from other directories.
Is there a way to create a cache of such mapping and update it with new runs?
Unfortunately not easily - see https://github.com/bazelbuild/bazel-gazelle/issues/1181 for some discussion on this topic. I definitely agree that this would be a useful thing to have!
Thanks Daniel! Have you tried using go_prefix for java -- does that help our usecase as discussed in the other ticket?