Skip to content

Commit

Permalink
Merge pull request #21 from ascopes/feature/GH-20-remove-deterministi…
Browse files Browse the repository at this point in the history
…c-output

GH-20: Remove deterministic output functionality
  • Loading branch information
ascopes authored Nov 25, 2023
2 parents 4c8d4ed + 88e218c commit 961ceaa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public abstract class AbstractGenerateMojo extends AbstractMojo {
private Set<Path> sourceDirectories;
private Path outputDirectory;
private Boolean fatalWarnings;
private Boolean reproducibleBuilds;

/**
* Initialise this Mojo.
Expand All @@ -72,7 +71,6 @@ protected AbstractGenerateMojo() {
sourceDirectories = null;
outputDirectory = null;
fatalWarnings = null;
reproducibleBuilds = null;
}

/**
Expand Down Expand Up @@ -144,18 +142,6 @@ public final void setFatalWarnings(boolean fatalWarnings) {
this.fatalWarnings = fatalWarnings;
}

/**
* Request that {@code protoc} should try to keep things like map ordering consistent between
* builds while a consistent version of {@code protoc} is in use.
*
* @param reproducibleBuilds whether to enable reproducible builds or not.
* @since 0.0.1
*/
@Parameter(defaultValue = "false")
public final void setReproducibleBuilds(boolean reproducibleBuilds) {
this.reproducibleBuilds = reproducibleBuilds;
}

/**
* Execute this goal.
*
Expand All @@ -172,7 +158,6 @@ public final void execute() throws MojoExecutionException, MojoFailureException
registerSource(mavenSession.getCurrentProject(), outputDirectory);

var compilerExecutor = new ProtocExecutorBuilder(protocPath)
.deterministicOutput(reproducibleBuilds)
.fatalWarnings(fatalWarnings)
.includeDirectories(sourceDirectories)
.outputDirectory(getSourceOutputType(), outputDirectory)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,6 @@ public ProtocExecutorBuilder outputDirectory(String outputType, Path outputDirec
return this;
}

/**
* Enable/disable deterministic output.
*
* <p>Calling this more than once is undefined behaviour.
*
* @param deterministicOutput whether to enable deterministic output or not.
* @return this builder.
*/
public ProtocExecutorBuilder deterministicOutput(boolean deterministicOutput) {
if (deterministicOutput) {
arguments.add("--deterministic_output");
}
return this;
}

/**
* Enable/disable fatal warnings.
*
Expand Down

0 comments on commit 961ceaa

Please sign in to comment.