Skip to content

Commit

Permalink
Remove the --incompatible_disallow_old_octal_notation flag
Browse files Browse the repository at this point in the history
    It is not useful to keep the flag around.

    bazelbuild/bazel#8059

    RELNOTES: None.
    PiperOrigin-RevId: 249537925
  • Loading branch information
Luca Di Grazia committed Sep 4, 2022
1 parent 0d1328d commit 633d00a
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 251 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,6 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl
+ "`transition()` function) in Starlark.")
public boolean experimentalStarlarkConfigTransitions;

@Option(
name = "experimental_starlark_unused_inputs_list",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
effectTags = {OptionEffectTag.CHANGES_INPUTS},
metadataTags = {OptionMetadataTag.EXPERIMENTAL},
help = "If set to true, enables use of 'unused_inputs_list' in starlark action.run().")
public boolean experimentalStarlarkUnusedInputsList;

@Option(
name = "incompatible_bzl_disallow_load_after_statement",
defaultValue = "true",
Expand Down Expand Up @@ -207,7 +198,7 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl

@Option(
name = "incompatible_disable_deprecated_attr_params",
defaultValue = "true",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS},
metadataTags = {
Expand Down Expand Up @@ -263,19 +254,6 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl
help = "If set to true, the `+` becomes disabled for dicts.")
public boolean incompatibleDisallowDictPlus;

@Option(
name = "incompatible_disallow_empty_glob",
defaultValue = "false",
category = "incompatible changes",
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 default value of the `allow_empty` argument of glob() is False.")
public boolean incompatibleDisallowEmptyGlob;

@Option(
name = "incompatible_disallow_filetype",
defaultValue = "true",
Expand Down Expand Up @@ -354,7 +332,7 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl

@Option(
name = "incompatible_string_join_requires_strings",
defaultValue = "true",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS},
metadataTags = {
Expand Down Expand Up @@ -412,7 +390,7 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl

@Option(
name = "incompatible_new_actions_api",
defaultValue = "true",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS},
metadataTags = {
Expand Down Expand Up @@ -494,7 +472,7 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl

@Option(
name = "incompatible_no_kwargs_in_build_files",
defaultValue = "true",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS},
metadataTags = {
Expand Down Expand Up @@ -557,7 +535,7 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl

@Option(
name = "incompatible_do_not_split_linking_cmdline",
defaultValue = "true",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.BUILD_TIME_OPTIMIZATION,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
Expand Down Expand Up @@ -628,15 +606,13 @@ public StarlarkSemantics toSkylarkSemantics() {
experimentalJavaCommonCreateProviderEnabledPackages)
.experimentalPlatformsApi(experimentalPlatformsApi)
.experimentalStarlarkConfigTransitions(experimentalStarlarkConfigTransitions)
.experimentalStarlarkUnusedInputsList(experimentalStarlarkUnusedInputsList)
.incompatibleBzlDisallowLoadAfterStatement(incompatibleBzlDisallowLoadAfterStatement)
.incompatibleDepsetIsNotIterable(incompatibleDepsetIsNotIterable)
.incompatibleDepsetUnion(incompatibleDepsetUnion)
.incompatibleDisableThirdPartyLicenseChecking(incompatibleDisableThirdPartyLicenseChecking)
.incompatibleDisableDeprecatedAttrParams(incompatibleDisableDeprecatedAttrParams)
.incompatibleDisableObjcProviderResources(incompatibleDisableObjcProviderResources)
.incompatibleDisallowDictPlus(incompatibleDisallowDictPlus)
.incompatibleDisallowEmptyGlob(incompatibleDisallowEmptyGlob)
.incompatibleDisallowFileType(incompatibleDisallowFileType)
.incompatibleDisallowLegacyJavaInfo(incompatibleDisallowLegacyJavaInfo)
.incompatibleDisallowLegacyJavaProvider(incompatibleDisallowLegacyJavaProvider)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import com.google.devtools.build.lib.syntax.SkylarkImport.SkylarkImportSyntaxException;
import com.google.devtools.build.lib.syntax.StarlarkSemantics;
import com.google.devtools.build.lib.syntax.Statement;
import com.google.devtools.build.lib.syntax.ValidationEnvironment;
import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.lib.vfs.RootedPath;
import com.google.devtools.build.skyframe.RecordingSkyFunctionEnvironment;
Expand Down Expand Up @@ -542,7 +541,6 @@ private Extension createExtension(
public static void execAndExport(BuildFileAST ast, Label extensionLabel,
EventHandler eventHandler,
com.google.devtools.build.lib.syntax.Environment extensionEnv) throws InterruptedException {
ast.replayLexerEvents(extensionEnv, eventHandler);
ImmutableList<Statement> statements = ast.getStatements();
for (Statement statement : statements) {
ast.execTopLevelStatement(statement, extensionEnv, eventHandler);
Expand All @@ -557,8 +555,7 @@ private static void possiblyExport(Statement statement, Label extensionLabel,
return;
}
AssignmentStatement assignmentStatement = (AssignmentStatement) statement;
ImmutableSet<Identifier> boundIdentifiers =
ValidationEnvironment.boundIdentifiers(assignmentStatement.getLHS());
ImmutableSet<Identifier> boundIdentifiers = assignmentStatement.getLValue().boundIdentifiers();
for (Identifier ident : boundIdentifiers) {
Object lookup = extensionEnv.moduleLookup(ident.getName());
if (lookup instanceof SkylarkExportable) {
Expand Down
Loading

0 comments on commit 633d00a

Please sign in to comment.