Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rules/private/phases/phase_zinc_compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ load(
def phase_zinc_compile(ctx, g):
toolchain = ctx.toolchains["//rules/scala:toolchain_type"]
analysis_store = ctx.actions.declare_file("{}/analysis_store.gz".format(ctx.label.name))
analysis_store_text = ctx.actions.declare_file("{}/analysis_store.text.gz".format(ctx.label.name))
mains_file = ctx.actions.declare_file("{}.jar.mains.txt".format(ctx.label.name))
used = ctx.actions.declare_file("{}/deps_used.txt".format(ctx.label.name))
tmp = ctx.actions.declare_directory("{}/tmp".format(ctx.label.name))
Expand Down Expand Up @@ -76,6 +77,7 @@ def phase_zinc_compile(ctx, g):
g.classpaths.jar,
mains_file,
analysis_store,
analysis_store_text,
used,
tmp,
] + g.semanticdb.outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,17 +335,13 @@ object ZincRunner extends WorkerMain[ZincRunnerWorkerConfig] {
)
}

// This will be true if the `--worker_verbose` Bazel flag is set
if (task.verbosity >= 10) {
val analysisStoreText = AnalysisUtil.getAnalysisStore(
new File(pathString.substring(0, pathString.length() - 3) + ".text.gz"),
true,
readWriteMappers,
)

analysisStoreText.set(AnalysisContents.create(resultAnalysis, compileResult.setup))
}
val analysisStoreText = AnalysisUtil.getAnalysisStore(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we planning on applying this change to all branches in our main repo? How large are the text files again?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are. They're reasonably sized. Not huge by any means. Will be very valuable for debugging any determinism issues. Long term it'd be nice to have a flag set to enable/disable them. This was a quick version to get the determinism work moving along.

new File(pathString.substring(0, pathString.length() - 3) + ".text.gz"),
true,
readWriteMappers,
)

analysisStoreText.set(AnalysisContents.create(resultAnalysis, compileResult.setup))
analysisStore.set(AnalysisContents.create(resultAnalysis, compileResult.setup))

// create used deps
Expand Down