Remove GetPythonBinary request type

This has been dead code for over a year.

Fixes: 232976601
Test: m nothing
Change-Id: Ida305fc8fa61d8ac83d74ea2cf007073a0019cec
This commit is contained in:
Chris Parsons
2023-05-23 17:55:47 +00:00
committed by Christopher Parsons
parent a2244043ea
commit 6b49888a17
3 changed files with 0 additions and 81 deletions

View File

@@ -183,10 +183,6 @@ type BazelContext interface {
// Returns the results of GetOutputFiles and GetCcObjectFiles in a single query (in that order).
GetCcInfo(label string, cfgKey configKey) (cquery.CcInfo, error)
// Returns the executable binary resultant from building together the python sources
// TODO(b/232976601): Remove.
GetPythonBinary(label string, cfgKey configKey) (string, error)
// Returns the results of the GetApexInfo query (including output files)
GetApexInfo(label string, cfgkey configKey) (cquery.ApexInfo, error)
@@ -315,14 +311,6 @@ func (m MockBazelContext) GetCcInfo(label string, cfgKey configKey) (cquery.CcIn
return result, nil
}
func (m MockBazelContext) GetPythonBinary(label string, _ configKey) (string, error) {
result, ok := m.LabelToPythonBinary[label]
if !ok {
return "", fmt.Errorf("no target with label %q in LabelToPythonBinary", label)
}
return result, nil
}
func (m MockBazelContext) GetApexInfo(label string, _ configKey) (cquery.ApexInfo, error) {
result, ok := m.LabelToApexInfo[label]
if !ok {
@@ -431,15 +419,6 @@ func (bazelCtx *mixedBuildBazelContext) GetCcInfo(label string, cfgKey configKey
return cquery.CcInfo{}, fmt.Errorf("no bazel response found for %v", key)
}
func (bazelCtx *mixedBuildBazelContext) GetPythonBinary(label string, cfgKey configKey) (string, error) {
key := makeCqueryKey(label, cquery.GetPythonBinary, cfgKey)
if rawString, ok := bazelCtx.results[key]; ok {
bazelOutput := strings.TrimSpace(rawString)
return cquery.GetPythonBinary.ParseResult(bazelOutput), nil
}
return "", fmt.Errorf("no bazel response found for %v", key)
}
func (bazelCtx *mixedBuildBazelContext) GetApexInfo(label string, cfgKey configKey) (cquery.ApexInfo, error) {
key := makeCqueryKey(label, cquery.GetApexInfo, cfgKey)
if rawString, ok := bazelCtx.results[key]; ok {
@@ -468,10 +447,6 @@ func (n noopBazelContext) GetCcInfo(_ string, _ configKey) (cquery.CcInfo, error
panic("unimplemented")
}
func (n noopBazelContext) GetPythonBinary(_ string, _ configKey) (string, error) {
panic("unimplemented")
}
func (n noopBazelContext) GetApexInfo(_ string, _ configKey) (cquery.ApexInfo, error) {
panic("unimplemented")
}