Skip to content

Commit

Permalink
Delete --incompatible_objc_provider_remove_compile_info
Browse files Browse the repository at this point in the history
RELNOTES: Flag --incompatible_objc_provider_remove_compile_info is removed.  See #11359.
PiperOrigin-RevId: 346156485
  • Loading branch information
googlewalt authored and copybara-github committed Dec 7, 2020
1 parent a1b19df commit 952c0d7
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 698 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -557,18 +557,6 @@ public class BuildLanguageOptions extends OptionsBase implements Serializable {
+ "instead of linkopts to cc_toolchain_config")
public boolean incompatibleLinkoptsToLinklibs;

@Option(
name = "incompatible_objc_provider_remove_compile_info",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help = "If set to true, the ObjcProvider's APIs for compile info/merge_zip will be removed.")
public boolean incompatibleObjcProviderRemoveCompileInfo;

@Option(
name = "incompatible_java_common_parameters",
defaultValue = "false",
Expand Down Expand Up @@ -660,9 +648,6 @@ public StarlarkSemantics toStarlarkSemantics() {
.setBool(INCOMPATIBLE_REQUIRE_LINKER_INPUT_CC_API, incompatibleRequireLinkerInputCcApi)
.setBool(INCOMPATIBLE_RESTRICT_STRING_ESCAPES, incompatibleRestrictStringEscapes)
.setBool(INCOMPATIBLE_LINKOPTS_TO_LINKLIBS, incompatibleLinkoptsToLinklibs)
.setBool(
INCOMPATIBLE_OBJC_PROVIDER_REMOVE_COMPILE_INFO,
incompatibleObjcProviderRemoveCompileInfo)
.set(MAX_COMPUTATION_STEPS, maxComputationSteps)
.build();
return INTERNER.intern(semantics);
Expand Down Expand Up @@ -722,8 +707,6 @@ public StarlarkSemantics toStarlarkSemantics() {
"-incompatible_no_implicit_file_export";
public static final String INCOMPATIBLE_NO_RULE_OUTPUTS_PARAM =
"-incompatible_no_rule_outputs_param";
public static final String INCOMPATIBLE_OBJC_PROVIDER_REMOVE_COMPILE_INFO =
"+incompatible_objc_provider_remove_compile_info";
public static final String INCOMPATIBLE_REQUIRE_LINKER_INPUT_CC_API =
"+incompatible_require_linker_input_cc_api";
public static final String INCOMPATIBLE_RESTRICT_STRING_ESCAPES =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import com.google.devtools.build.lib.packages.StarlarkAspect;
import com.google.devtools.build.lib.packages.StarlarkInfo;
import com.google.devtools.build.lib.packages.StructImpl;
import com.google.devtools.build.lib.packages.semantics.BuildLanguageOptions;
import com.google.devtools.build.lib.rules.apple.AppleConfiguration;
import com.google.devtools.build.lib.rules.apple.ApplePlatform;
import com.google.devtools.build.lib.rules.apple.ApplePlatform.PlatformType;
Expand All @@ -50,7 +49,6 @@
import net.starlark.java.eval.Sequence;
import net.starlark.java.eval.Starlark;
import net.starlark.java.eval.StarlarkInt;
import net.starlark.java.eval.StarlarkSemantics;
import net.starlark.java.eval.StarlarkThread;
import net.starlark.java.eval.StarlarkValue;
import net.starlark.java.syntax.Location;
Expand All @@ -69,19 +67,9 @@ public class AppleStarlarkCommon
public static final String DEPRECATED_KEY_ERROR =
"Key '%s' no longer supported in ObjcProvider (use CcInfo instead).";

@VisibleForTesting
public static final String BAD_DIRECT_DEP_PROVIDERS_ERROR =
"Argument 'direct_dep_providers' no longer supported. Please use 'strict_include' field "
+ "in ObjcProvider.";

@VisibleForTesting
public static final String BAD_KEY_ERROR =
"Argument %s not a recognized key,"
+ " 'strict_include', 'providers', or 'direct_dep_providers'.";

@VisibleForTesting
public static final String BAD_FRAMEWORK_PATH_ERROR =
"Value for key framework_search_paths must end in .framework; instead found %s.";
"Argument %s not a recognized key, 'strict_include', or 'providers'.";

@VisibleForTesting
public static final String BAD_PROVIDERS_ITER_ERROR =
Expand All @@ -92,16 +80,9 @@ public class AppleStarlarkCommon
"Value for argument 'providers' must be a list of ObjcProvider instances, instead found "
+ "iterable with %s.";

@VisibleForTesting
public static final String BAD_DIRECT_DEPENDENCY_KEY_ERROR =
"Key %s not allowed to be in direct_dep_provider.";

@VisibleForTesting
public static final String NOT_SET_ERROR = "Value for key %s must be a set, instead found %s.";

@VisibleForTesting
public static final String MISSING_KEY_ERROR = "No value for required key %s was present.";

@Nullable private StructImpl platformType;
@Nullable private StructImpl platform;

Expand Down Expand Up @@ -200,8 +181,8 @@ public SplitTransitionProviderApi getMultiArchSplitProvider() {
// This method is registered statically for Starlark, and never called directly.
public ObjcProvider newObjcProvider(
Boolean usesSwift, Dict<String, Object> kwargs, StarlarkThread thread) throws EvalException {
StarlarkSemantics semantics = thread.getSemantics();
ObjcProvider.StarlarkBuilder resultBuilder = new ObjcProvider.StarlarkBuilder(semantics);
ObjcProvider.StarlarkBuilder resultBuilder =
new ObjcProvider.StarlarkBuilder(thread.getSemantics());
if (usesSwift) {
resultBuilder.add(ObjcProvider.FLAG, ObjcProvider.Flag.USES_SWIFT);
}
Expand All @@ -213,12 +194,6 @@ public ObjcProvider newObjcProvider(
resultBuilder.addStrictIncludeFromStarlark(entry.getValue());
} else if (entry.getKey().equals("providers")) {
resultBuilder.addProvidersFromStarlark(entry.getValue());
} else if (entry.getKey().equals("direct_dep_providers")) {
if (semantics.getBool(
BuildLanguageOptions.INCOMPATIBLE_OBJC_PROVIDER_REMOVE_COMPILE_INFO)) {
throw new EvalException(BAD_DIRECT_DEP_PROVIDERS_ERROR);
}
resultBuilder.addDirectDepProvidersFromStarlark(entry.getValue());
} else {
throw Starlark.errorf(BAD_KEY_ERROR, entry.getKey());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,6 @@ ObjcCommon build() {
objcProvider.addAllDirect(HEADER, headerProvider.getDeclaredIncludeSrcs().toList());
}

for (ObjcProvider provider : runtimeDepObjcProviders) {
objcProvider.addTransitiveAndPropagate(ObjcProvider.MERGE_ZIP, provider);
}

for (CcLinkingContext linkProvider : depCcLinkProviders) {
ImmutableList<String> linkOpts = linkProvider.getFlattenedUserLinkFlags();
ImmutableSet.Builder<SdkFramework> frameworkLinkOpts = new ImmutableSet.Builder<>();
Expand Down
Loading

0 comments on commit 952c0d7

Please sign in to comment.