Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
Remove SourceRoot from thrift
Browse files Browse the repository at this point in the history
Summary: SourceRoot was removed from the rest of source code.

Reviewed By: bobyangyf

fbshipit-source-id: fbe9f5bda5
  • Loading branch information
Sergey Tyurin authored and facebook-github-bot committed Jan 24, 2019
1 parent f241824 commit 2202bf4
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 86 deletions.
61 changes: 0 additions & 61 deletions src-gen/com/facebook/buck/log/thrift/rulekeys/Value.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions src/com/facebook/buck/log/thrift/rulekeys.thrift
Expand Up @@ -65,10 +65,6 @@ struct ArchiveMemberPath {
3: string hash;
}

struct SourceRoot {
1: string path;
}

/*
* A string describing the type of a rule. e.g. java_library
*/
Expand Down Expand Up @@ -128,7 +124,7 @@ union Value {
11: list<Value> containerList;
12: RuleKeyHash ruleKeyHash;
13: ArchiveMemberPath archiveMemberPath;
14: SourceRoot sourceRoot;
// 14: DEPRECATED
15: BuildRuleType buildRuleType;
16: Wrapper wrapper;
17: BuildTarget buildTarget;
Expand Down
Expand Up @@ -264,8 +264,6 @@ public static String valueAsReadableString(ParsedRuleKeyFile file, Value value)
value.getArchiveMemberPath().archivePath,
value.getArchiveMemberPath().memberPath,
value.getArchiveMemberPath().hash);
case SOURCE_ROOT:
return String.format("SourceRoot: %s", value.getSourceRoot().path);
case BUILD_RULE_TYPE:
return String.format("BuildRuleType: %s", value.getBuildRuleType().type);
case WRAPPER:
Expand Down Expand Up @@ -350,8 +348,6 @@ private static String getRuleKeyName(ParsedRuleKeyFile file, Value value) {
return String.format(
"%s!%s",
value.getArchiveMemberPath().archivePath, value.getArchiveMemberPath().memberPath);
case SOURCE_ROOT:
return value.getSourceRoot().path;
case BUILD_RULE_TYPE:
return value.getBuildRuleType().type;
case WRAPPER:
Expand Down
Expand Up @@ -162,7 +162,6 @@ private void printDiff(
case PATTERN:
case BYTE_ARRAY:
case ARCHIVE_MEMBER_PATH:
case SOURCE_ROOT:
case BUILD_RULE_TYPE:
case BUILD_TARGET:
case TARGET_PATH:
Expand Down
Expand Up @@ -27,7 +27,6 @@
import com.facebook.buck.log.thrift.rulekeys.Pattern;
import com.facebook.buck.log.thrift.rulekeys.RuleKeyHash;
import com.facebook.buck.log.thrift.rulekeys.Sha1;
import com.facebook.buck.log.thrift.rulekeys.SourceRoot;
import com.facebook.buck.log.thrift.rulekeys.TargetPath;
import com.facebook.buck.log.thrift.rulekeys.Value;
import com.facebook.buck.log.thrift.rulekeys.Wrapper;
Expand Down Expand Up @@ -349,11 +348,6 @@ public void convertsToReadableStringProperly() {
Value.archiveMemberPath(
new ArchiveMemberPath("archive path", "member path", "some hash"))));

Assert.assertEquals(
"SourceRoot: some path",
RuleKeyDiffPrinter.valueAsReadableString(
sampleParsedFile, Value.sourceRoot(new SourceRoot("some path"))));

Assert.assertEquals(
"BuildRuleType: rule type",
RuleKeyDiffPrinter.valueAsReadableString(
Expand Down Expand Up @@ -501,11 +495,6 @@ public void returnsNameForVariousArgPropertyTypesWithMissingName() {
Value.archiveMemberPath(
new ArchiveMemberPath("archive path", "member path", "some hash")))));

Assert.assertEquals(
"argument: some path",
RuleKeyDiffPrinter.getRuleKeyName(
sampleParsedFile, f.apply(Value.sourceRoot(new SourceRoot("some path")))));

Assert.assertEquals(
"argument: rule type",
RuleKeyDiffPrinter.getRuleKeyName(
Expand Down
Expand Up @@ -26,7 +26,6 @@
import com.facebook.buck.log.thrift.rulekeys.Pattern;
import com.facebook.buck.log.thrift.rulekeys.RuleKeyHash;
import com.facebook.buck.log.thrift.rulekeys.Sha1;
import com.facebook.buck.log.thrift.rulekeys.SourceRoot;
import com.facebook.buck.log.thrift.rulekeys.TargetPath;
import com.facebook.buck.log.thrift.rulekeys.Value;
import com.facebook.buck.log.thrift.rulekeys.Wrapper;
Expand Down Expand Up @@ -108,9 +107,6 @@ private Map<String, Value> generateSampleValues(long id, long valueSeed) {
String.format("archive_path_%s", valueSeed),
String.format("member_path_%s", valueSeed),
String.format("hash_%s", valueSeed))));
ret.put(
String.format("source_root_%s", id),
Value.sourceRoot(new SourceRoot(String.format("source_root_%s", valueSeed))));
ret.put(
String.format("build_rule_type_%s", id),
Value.buildRuleType(new BuildRuleType(String.format("rule_type_%s", valueSeed))));
Expand Down

0 comments on commit 2202bf4

Please sign in to comment.