Skip to content

Commit

Permalink
Delete the flag 'incompatible_string_join_requires_strings'
Browse files Browse the repository at this point in the history
    bazelbuild/bazel#7802

    RELNOTES: None.
    PiperOrigin-RevId: 281069144
  • Loading branch information
Luca Di Grazia committed Sep 4, 2022
1 parent 0e678fb commit 76d039b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,6 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl
+ "cc_shared_library will be available")
public boolean experimentalCcSharedLibrary;

@Option(
name = "experimental_repo_remote_exec",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS, OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
OptionMetadataTag.EXPERIMENTAL,
},
help = "If set to true, repository_rule gains some remote execution capabilities.")
public boolean experimentalRepoRemoteExec;

@Option(
name = "incompatible_bzl_disallow_load_after_statement",
defaultValue = "true",
Expand Down Expand Up @@ -620,7 +609,6 @@ public StarlarkSemantics toSkylarkSemantics() {
.experimentalStarlarkConfigTransitions(experimentalStarlarkConfigTransitions)
.experimentalStarlarkUnusedInputsList(experimentalStarlarkUnusedInputsList)
.experimentalCcSharedLibrary(experimentalCcSharedLibrary)
.experimentalRepoRemoteExec(experimentalRepoRemoteExec)
.incompatibleBzlDisallowLoadAfterStatement(incompatibleBzlDisallowLoadAfterStatement)
.incompatibleDepsetUnion(incompatibleDepsetUnion)
.incompatibleDisableTargetProviderFields(incompatibleDisableTargetProviderFields)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public enum FlagIdentifier {
EXPERIMENTAL_STARLARK_UNUSED_INPUTS_LIST(
StarlarkSemantics::experimentalStarlarkUnusedInputsList),
EXPERIMENTAL_CC_SHARED_LIBRARY(StarlarkSemantics::experimentalCcSharedLibrary),
EXPERIMENTAL_REPO_REMOTE_EXEC(StarlarkSemantics::experimentalRepoRemoteExec),
INCOMPATIBLE_DISABLE_DEPSET_INPUTS(StarlarkSemantics::incompatibleDisableDepsetItems),
INCOMPATIBLE_NO_OUTPUT_ATTR_DEFAULT(StarlarkSemantics::incompatibleNoOutputAttrDefault),
INCOMPATIBLE_NO_RULE_OUTPUTS_PARAM(StarlarkSemantics::incompatibleNoRuleOutputsParam),
Expand Down Expand Up @@ -151,8 +150,6 @@ public boolean flagValue(FlagIdentifier flagIdentifier) {

public abstract boolean experimentalCcSharedLibrary();

public abstract boolean experimentalRepoRemoteExec();

public abstract boolean incompatibleBzlDisallowLoadAfterStatement();

public abstract boolean incompatibleDepsetUnion();
Expand Down Expand Up @@ -254,7 +251,6 @@ public static Builder builderWithDefaults() {
.experimentalStarlarkConfigTransitions(true)
.experimentalStarlarkUnusedInputsList(true)
.experimentalCcSharedLibrary(false)
.experimentalRepoRemoteExec(false)
.incompatibleBzlDisallowLoadAfterStatement(true)
.incompatibleDepsetUnion(true)
.incompatibleDisableTargetProviderFields(false)
Expand Down Expand Up @@ -314,8 +310,6 @@ public abstract static class Builder {

public abstract Builder experimentalCcSharedLibrary(boolean value);

public abstract Builder experimentalRepoRemoteExec(boolean value);

public abstract Builder incompatibleBzlDisallowLoadAfterStatement(boolean value);

public abstract Builder incompatibleDepsetUnion(boolean value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ public Sequence<String> splitLines(String self, Boolean keepEnds) throws EvalExc
result.add(line);
}
}
return StarlarkList.immutableCopyOf(result);
return Sequence.createImmutable(result);
}

@SkylarkCallable(
Expand Down Expand Up @@ -967,7 +967,7 @@ public Sequence<String> elems(String self) throws EvalException {
for (char c : self.toCharArray()) {
builder.add(String.valueOf(c));
}
return StarlarkList.immutableCopyOf(builder.build());
return Sequence.createImmutable(builder.build());
}

@SkylarkCallable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ private static StarlarkSemanticsOptions buildRandomOptions(Random rand) throws E
"--experimental_starlark_unused_inputs_list=" + rand.nextBoolean(),
"--incompatible_allow_tags_propagation=" + rand.nextBoolean(),
"--experimental_cc_shared_library=" + rand.nextBoolean(),
"--experimental_repo_remote_exec=" + rand.nextBoolean(),
"--incompatible_bzl_disallow_load_after_statement=" + rand.nextBoolean(),
"--incompatible_depset_for_libraries_to_link_getter=" + rand.nextBoolean(),
"--incompatible_depset_union=" + rand.nextBoolean(),
Expand Down Expand Up @@ -183,7 +182,6 @@ private static StarlarkSemantics buildRandomSemantics(Random rand) {
.experimentalStarlarkUnusedInputsList(rand.nextBoolean())
.experimentalAllowTagsPropagation(rand.nextBoolean())
.experimentalCcSharedLibrary(rand.nextBoolean())
.experimentalRepoRemoteExec(rand.nextBoolean())
.incompatibleBzlDisallowLoadAfterStatement(rand.nextBoolean())
.incompatibleDepsetForLibrariesToLinkGetter(rand.nextBoolean())
.incompatibleDepsetUnion(rand.nextBoolean())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,7 @@ public void testRangeType() throws Exception {
.testExpression("4 in range(0, 8, 2)", true)
.testExpression("4 in range(1, 8, 2)", false)
.testExpression("range(0, 5, 10) == range(0, 5, 11)", true)
.testExpression("range(0, 5, 2) == [0, 2, 4]", false)
.testExpression("str(list(range(1, 10, 2)))", "[1, 3, 5, 7, 9]")
.testExpression("str(range(1, 10, 2)[:99])", "range(1, 11, 2)")
.testExpression("range(1, 10, 2) == range(1, 11, 2)", true)
.testExpression("range(1, 10, 2) == range(1, 12, 2)", false);
.testExpression("range(0, 5, 2) == [0, 2, 4]", false);
}

@Test
Expand Down

0 comments on commit 76d039b

Please sign in to comment.