Skip to content

Commit 92c6901

Browse files
IanChildsfacebook-github-bot
authored andcommitted
Remove compile_against option from JvmLibraryArg
Summary: We don't want to give libraries the choice of which version of their dependencies they actually build against. Reviewed By: mykola-semko fbshipit-source-id: da8a6225316a7b7bfb199e0d08c359cb314086d6
1 parent 0b6dbc0 commit 92c6901

3 files changed

Lines changed: 4 additions & 19 deletions

File tree

src/com/facebook/buck/jvm/java/DefaultJavaLibraryClasspaths.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,7 @@ public ImmutableList<JavaDependencyInfo> getDependencyInfosForSourceOnlyAbi() {
123123
private BuildRule getAbiDep(BuildRule compileTimeFullDep) {
124124
Preconditions.checkState(compileTimeFullDep instanceof HasJavaAbi);
125125
HasJavaAbi hasJavaAbi = (HasJavaAbi) compileTimeFullDep;
126-
CompileAgainstLibraryType compileAgainstLibraryType = getCompileAgainstLibraryType();
127-
Optional<BuildTarget> abiJarTarget = Optional.empty();
128-
129-
if (compileAgainstLibraryType.equals(CompileAgainstLibraryType.SOURCE_ONLY_ABI)) {
130-
abiJarTarget = hasJavaAbi.getSourceOnlyAbiJar();
131-
}
126+
Optional<BuildTarget> abiJarTarget = hasJavaAbi.getSourceOnlyAbiJar();
132127

133128
if (!abiJarTarget.isPresent()) {
134129
abiJarTarget = hasJavaAbi.getAbiJar();

src/com/facebook/buck/jvm/java/DefaultJavaLibraryRules.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -674,17 +674,9 @@ private JavacPluginParams abiProcessorsOnly(
674674

675675
@Value.Lazy
676676
CompileAgainstLibraryType getCompileAgainstLibraryType() {
677-
CoreArg args = getArgs();
678-
CompileAgainstLibraryType result = CompileAgainstLibraryType.SOURCE_ONLY_ABI;
679-
if (args != null) {
680-
result = args.getCompileAgainst().orElse(result);
681-
}
682-
683-
if (!getConfiguredCompilerFactory().shouldCompileAgainstAbis()) {
684-
result = CompileAgainstLibraryType.FULL;
685-
}
686-
687-
return result;
677+
return getConfiguredCompilerFactory().shouldCompileAgainstAbis()
678+
? CompileAgainstLibraryType.ABI
679+
: CompileAgainstLibraryType.FULL;
688680
}
689681

690682
@Value.Lazy

src/com/facebook/buck/jvm/java/JvmLibraryArg.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ public interface JvmLibraryArg extends BuildRuleArg, MaybeRequiredForSourceOnlyA
7474

7575
Optional<AbiGenerationMode> getAbiGenerationMode();
7676

77-
Optional<CompileAgainstLibraryType> getCompileAgainst();
78-
7977
Optional<SourceAbiVerificationMode> getSourceAbiVerificationMode();
8078

8179
Optional<UnusedDependenciesParams.UnusedDependenciesAction> getOnUnusedDependencies();

0 commit comments

Comments
 (0)