Skip to content

Commit

Permalink
Add filetree api to kytheproxy (#7723)
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerwilliams authored Oct 10, 2024
1 parent 4d87687 commit c8e0e55
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ gazelle_binary(
# TODO(siggisim): remove once we support .css imports properly
# gazelle:exclude website/**
# gazelle:resolve go kythe.io/kythe/proto/common_go_proto @io_kythe//kythe/proto:common_go_proto
# gazelle:resolve go kythe.io/kythe/proto/filetree_go_proto @io_kythe//kythe/proto:filetree_go_proto
# gazelle:resolve go kythe.io/kythe/proto/graph_go_proto @io_kythe//kythe/proto:graph_go_proto
# gazelle:resolve go kythe.io/kythe/proto/xref_go_proto @io_kythe//kythe/proto:xref_go_proto
#
Expand Down
5 changes: 1 addition & 4 deletions codesearch/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func (css *codesearchServer) Search(ctx context.Context, req *srpb.SearchRequest

func (css *codesearchServer) KytheProxy(ctx context.Context, req *srpb.KytheRequest) (*srpb.KytheResponse, error) {
var rsp = new(srpb.KytheResponse)
var err error
var err = status.UnimplementedError("method not implemented in codesearch backend")

switch req.Value.(type) {
case *srpb.KytheRequest_NodesRequest:
Expand All @@ -356,9 +356,6 @@ func (css *codesearchServer) KytheProxy(ctx context.Context, req *srpb.KytheRequ
CrossReferencesReply: crossReferencesReply,
}
err = crossReferencesErr
default:
rsp = nil
err = status.UnimplementedError("method not implemented in codesearch backend")
}

return rsp, err
Expand Down
7 changes: 4 additions & 3 deletions proto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ proto_library(
srcs = ["search.proto"],
deps = [
":context_proto",
"@io_kythe//kythe/proto:filetree_proto",
"@io_kythe//kythe/proto:graph_proto",
"@io_kythe//kythe/proto:xref_proto",
],
Expand Down Expand Up @@ -780,13 +781,11 @@ ts_proto_library(
ts_proto_library(
name = "kythe_identifier_ts_proto",
proto = "@io_kythe//kythe/proto:identifier_proto",
deps = [],
)

ts_proto_library(
name = "kythe_filetree_ts_proto",
proto = "@io_kythe//kythe/proto:identifier_proto",
deps = [],
proto = "@io_kythe//kythe/proto:filetree_proto",
)

proto_library(
Expand Down Expand Up @@ -1831,6 +1830,7 @@ go_proto_library(
proto = ":search_proto",
deps = [
":context_go_proto",
"@io_kythe//kythe/proto:filetree_go_proto",
"@io_kythe//kythe/proto:graph_go_proto",
"@io_kythe//kythe/proto:xref_go_proto",
],
Expand Down Expand Up @@ -2213,6 +2213,7 @@ ts_proto_library(
proto = ":search_proto",
deps = [
":context_ts_proto",
":kythe_filetree_ts_proto",
":kythe_graph_ts_proto",
":kythe_xref_ts_proto",
],
Expand Down
5 changes: 5 additions & 0 deletions proto/search.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";

import "kythe/proto/filetree.proto";
import "kythe/proto/graph.proto";
import "kythe/proto/xref.proto";
import "proto/context.proto";
Expand Down Expand Up @@ -99,6 +100,8 @@ message KytheRequest {
kythe.proto.NodesRequest nodes_request = 2;
kythe.proto.DecorationsRequest decorations_request = 3;
kythe.proto.CrossReferencesRequest cross_references_request = 4;
kythe.proto.CorpusRootsRequest corpus_roots_request = 5;
kythe.proto.DirectoryRequest directory_request = 6;
}
}

Expand All @@ -109,5 +112,7 @@ message KytheResponse {
kythe.proto.NodesReply nodes_reply = 2;
kythe.proto.DecorationsReply decorations_reply = 3;
kythe.proto.CrossReferencesReply cross_references_reply = 4;
kythe.proto.CorpusRootsReply corpus_roots_reply = 5;
kythe.proto.DirectoryReply directory_reply = 6;
}
}

0 comments on commit c8e0e55

Please sign in to comment.