Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop mergeDiagnosticJson having @CacheableTransform; speed up build #1693

Merged
merged 5 commits into from
Sep 12, 2024
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
7 changes: 7 additions & 0 deletions changelog/@unreleased/pr-1693.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: fix
fix:
description: Do not use the remote build cache for `mergeDiagnosticJson`; it takes
far longer than just doing the operation locally. Avoids spamming output with
"Requesting from remote build cache" too.
links:
- https://github.com/palantir/sls-packaging/pull/1693
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@
import java.nio.file.Files;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.gradle.api.artifacts.transform.CacheableTransform;
import org.gradle.api.artifacts.transform.InputArtifact;
import org.gradle.api.artifacts.transform.TransformAction;
import org.gradle.api.artifacts.transform.TransformOutputs;
import org.gradle.api.file.FileSystemLocation;
import org.gradle.api.provider.Provider;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.work.DisableCachingByDefault;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@CacheableTransform
@DisableCachingByDefault(
because = "Extracting a single file from a zip is much faster than making network requests to the build cache")
public abstract class ExtractFileFromJar implements TransformAction<FileExtractParameter> {
CRogers marked this conversation as resolved.
Show resolved Hide resolved
private static final Logger log = LoggerFactory.getLogger(ExtractFileFromJar.class);

Expand Down