Skip to content

Commit

Permalink
Remove label-typed starlark build settings (in favor of label_flag an…
Browse files Browse the repository at this point in the history
…d label_setting)

RELNOTES: None.
PiperOrigin-RevId: 247480051
  • Loading branch information
juliexxia authored and copybara-github committed May 9, 2019
1 parent 4538f70 commit 235a3f1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

package com.google.devtools.build.lib.analysis.skylark;

import static com.google.devtools.build.lib.packages.BuildType.LABEL;
import static com.google.devtools.build.lib.packages.BuildType.LABEL_LIST;
import static com.google.devtools.build.lib.syntax.Type.BOOLEAN;
import static com.google.devtools.build.lib.syntax.Type.INTEGER;
import static com.google.devtools.build.lib.syntax.Type.STRING;
Expand Down Expand Up @@ -49,16 +47,6 @@ public BuildSetting stringListSetting(Boolean flag) {
return new BuildSetting(flag, STRING_LIST);
}

@Override
public BuildSetting labelSetting(Boolean flag) {
return new BuildSetting(flag, LABEL);
}

@Override
public BuildSetting labelListSetting(Boolean flag) {
return new BuildSetting(flag, LABEL_LIST);
}

@Override
public void repr(SkylarkPrinter printer) {
printer.append("<config>");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,34 +110,6 @@ public interface StarlarkConfigApi extends SkylarkValue {
})
BuildSettingApi stringListSetting(Boolean flag);

@SkylarkCallable(
name = "label",
doc = "A label typed build setting",
parameters = {
@Param(
name = FLAG_ARG,
type = Boolean.class,
defaultValue = "False",
doc = FLAG_ARG_DOC,
named = true,
positional = false)
})
BuildSettingApi labelSetting(Boolean flag);

@SkylarkCallable(
name = "label_list",
doc = "A label list-typed build setting",
parameters = {
@Param(
name = FLAG_ARG,
type = Boolean.class,
defaultValue = "False",
doc = FLAG_ARG_DOC,
named = true,
positional = false)
})
BuildSettingApi labelListSetting(Boolean flag);

/** The API for build setting descriptors. */
@SkylarkModule(
name = "BuildSetting",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@ public BuildSettingApi stringListSetting(Boolean flag) {
return new FakeBuildSettingDescriptor();
}

@Override
public BuildSettingApi labelSetting(Boolean flag) {
return new FakeBuildSettingDescriptor();
}

@Override
public BuildSettingApi labelListSetting(Boolean flag) {
return new FakeBuildSettingDescriptor();
}

@Override
public void repr(SkylarkPrinter printer) {}
}

0 comments on commit 235a3f1

Please sign in to comment.