-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This completes and simplifies the decoding logic, by using derived predicate introduced in D59333044 to decode all symbol ids with three components (file, typename, field). The derived predicate DeclarationMember replaces the fieldDecl and functionName queries and also contains the enum value case which was missing. Next step is to disambiguate the symbol id (see comment in Fbthrift.hs) Reviewed By: simonmar Differential Revision: D59331450 fbshipit-source-id: ac4364290fe15993ca3651f2ace9ece95db6cb94
- Loading branch information
1 parent
55326c8
commit 8f75744
Showing
15 changed files
with
323 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
glean/glass/test/regression/tests/thrift/describe_enum.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[ | ||
"@generated", | ||
{ | ||
"comments": [], | ||
"contains_relation": { | ||
"firstChild": "nondeterministic", | ||
"firstParent": "nondeterministic", | ||
"hasMoreChildren": false, | ||
"hasMoreParents": false | ||
}, | ||
"extends_relation": { | ||
"firstChild": "nondeterministic", | ||
"firstParent": "nondeterministic", | ||
"hasMoreChildren": false, | ||
"hasMoreParents": false | ||
}, | ||
"kind": 12, | ||
"language": 9, | ||
"location": { | ||
"filepath": "lib.thrift", | ||
"range": { | ||
"columnBegin": 1, | ||
"columnEnd": 2, | ||
"lineBegin": 163, | ||
"lineEnd": 194 | ||
}, | ||
"repository": "test" | ||
}, | ||
"modifiers": [], | ||
"name": { | ||
"container": "lib", | ||
"localName": "SymbolKind" | ||
}, | ||
"pretty_comments": [], | ||
"repo_hash": "testhash", | ||
"signature": "enum lib::SymbolKind", | ||
"sym": "test/thrift/lib.thrift/SymbolKind", | ||
"sym_location": { | ||
"filepath": "lib.thrift", | ||
"range": { | ||
"columnBegin": 1, | ||
"columnEnd": 2, | ||
"lineBegin": 163, | ||
"lineEnd": 194 | ||
}, | ||
"repository": "test" | ||
}, | ||
"sym_other_locations": [], | ||
"type_xrefs": [] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
action: describeSymbol | ||
args: "test/thrift/lib.thrift/SymbolKind" |
51 changes: 51 additions & 0 deletions
51
glean/glass/test/regression/tests/thrift/describe_enum_value.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[ | ||
"@generated", | ||
{ | ||
"comments": [], | ||
"contains_relation": { | ||
"firstChild": "nondeterministic", | ||
"firstParent": "nondeterministic", | ||
"hasMoreChildren": false, | ||
"hasMoreParents": false | ||
}, | ||
"extends_relation": { | ||
"firstChild": "nondeterministic", | ||
"firstParent": "nondeterministic", | ||
"hasMoreChildren": false, | ||
"hasMoreParents": false | ||
}, | ||
"kind": 24, | ||
"language": 9, | ||
"location": { | ||
"filepath": "lib.thrift", | ||
"range": { | ||
"columnBegin": 3, | ||
"columnEnd": 12, | ||
"lineBegin": 165, | ||
"lineEnd": 165 | ||
}, | ||
"repository": "test" | ||
}, | ||
"modifiers": [], | ||
"name": { | ||
"container": "SymbolKind", | ||
"localName": "Type" | ||
}, | ||
"pretty_comments": [], | ||
"repo_hash": "testhash", | ||
"signature": "enum value lib::SymbolKind::Type", | ||
"sym": "test/thrift/lib.thrift/SymbolKind/Type", | ||
"sym_location": { | ||
"filepath": "lib.thrift", | ||
"range": { | ||
"columnBegin": 3, | ||
"columnEnd": 12, | ||
"lineBegin": 165, | ||
"lineEnd": 165 | ||
}, | ||
"repository": "test" | ||
}, | ||
"sym_other_locations": [], | ||
"type_xrefs": [] | ||
} | ||
] |
2 changes: 2 additions & 0 deletions
2
glean/glass/test/regression/tests/thrift/describe_enum_value.query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
action: describeSymbol | ||
args: "test/thrift/lib.thrift/SymbolKind/Type" |
51 changes: 51 additions & 0 deletions
51
glean/glass/test/regression/tests/thrift/describe_exception.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[ | ||
"@generated", | ||
{ | ||
"comments": [], | ||
"contains_relation": { | ||
"firstChild": "nondeterministic", | ||
"firstParent": "nondeterministic", | ||
"hasMoreChildren": false, | ||
"hasMoreParents": false | ||
}, | ||
"extends_relation": { | ||
"firstChild": "nondeterministic", | ||
"firstParent": "nondeterministic", | ||
"hasMoreChildren": false, | ||
"hasMoreParents": false | ||
}, | ||
"kind": 25, | ||
"language": 9, | ||
"location": { | ||
"filepath": "lib.thrift", | ||
"range": { | ||
"columnBegin": 1, | ||
"columnEnd": 2, | ||
"lineBegin": 139, | ||
"lineEnd": 141 | ||
}, | ||
"repository": "test" | ||
}, | ||
"modifiers": [], | ||
"name": { | ||
"container": "lib", | ||
"localName": "ServerException" | ||
}, | ||
"pretty_comments": [], | ||
"repo_hash": "testhash", | ||
"signature": "struct lib::ServerException", | ||
"sym": "test/thrift/lib.thrift/ServerException", | ||
"sym_location": { | ||
"filepath": "lib.thrift", | ||
"range": { | ||
"columnBegin": 1, | ||
"columnEnd": 2, | ||
"lineBegin": 139, | ||
"lineEnd": 141 | ||
}, | ||
"repository": "test" | ||
}, | ||
"sym_other_locations": [], | ||
"type_xrefs": [] | ||
} | ||
] |
2 changes: 2 additions & 0 deletions
2
glean/glass/test/regression/tests/thrift/describe_exception.query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
action: describeSymbol | ||
args: "test/thrift/lib.thrift/ServerException" |
Oops, something went wrong.