Skip to content

Commit

Permalink
Merge pull request #1456 from ivan444/rmpykzip
Browse files Browse the repository at this point in the history
Remove py version of kzip writer
  • Loading branch information
hzeller authored Sep 15, 2022
2 parents 0f76b23 + fd15359 commit 7ddcbdc
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 430 deletions.
7 changes: 0 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,6 @@ http_archive(
urls = ["https://github.com/grailbio/bazel-compilation-database/archive/ace73b04e76111afa09934f8771a2798847e724e.tar.gz"],
)

http_archive(
name = "absl_py",
sha256 = "b9130d6f49a21dc44f56da89d5e8409807e93d28c194c23e27777f3c8cceef81",
strip_prefix = "abseil-py-1.2.0",
urls = ["https://github.com/abseil/abseil-py/archive/refs/tags/v1.2.0.tar.gz"],
)

# zlib is imported through protobuf. Make the dependency explicit considering
# it's used outside protobuf.
maybe(
Expand Down
19 changes: 0 additions & 19 deletions third_party/proto/kythe/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@com_google_protobuf//:protobuf.bzl", "py_proto_library")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

Expand All @@ -14,20 +13,11 @@ cc_proto_library(
deps = [":storage_proto"],
)

py_proto_library(
name = "storage_py_proto",
srcs = ["storage.proto"],
srcs_version = "PY2AND3",
)

proto_library(
name = "analysis_proto",
srcs = ["analysis.proto"],
deps = [
":storage_proto",
# NOTE: These dependencies are not used in our local copy (which is
# modified because of the py_proto_library limitation). Keep it here
# until py_proto_library gets fixed.
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:timestamp_proto",
],
Expand All @@ -37,12 +27,3 @@ cc_proto_library(
name = "analysis_cc_proto",
deps = [":analysis_proto"],
)

py_proto_library(
name = "analysis_py_proto",
srcs = ["analysis.proto"],
srcs_version = "PY2AND3",
deps = [
":storage_py_proto",
],
)
4 changes: 2 additions & 2 deletions third_party/proto/kythe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

Proto schemas imported from https://github.com/kythe/kythe

* https://github.com/kythe/kythe/blob/10f830b3ea9a194d129ec3f1d8bc9d8876ccee79/kythe/proto/storage.proto
* https://github.com/kythe/kythe/blob/10f830b3ea9a194d129ec3f1d8bc9d8876ccee79/kythe/proto/analysis.proto
* https://github.com/kythe/kythe/blob/5c07b3bb2823cf29bb4ef7a9243f504ff55b84a9/kythe/proto/analysis.proto
* https://github.com/kythe/kythe/blob/5c07b3bb2823cf29bb4ef7a9243f504ff55b84a9/kythe/proto/storage.proto
13 changes: 5 additions & 8 deletions third_party/proto/kythe/analysis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ syntax = "proto3";

package kythe.proto;

// NOTE: dropped "google/protobuf/any.proto" & "google/protobuf/timestamp.proto"
// because of limitations of py_proto_library
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "third_party/proto/kythe/storage.proto";

option go_package = "analysis_go_proto";
Expand Down Expand Up @@ -145,9 +145,8 @@ message CompilationUnit {

reserved 3;

// NOTE: Dropped because of limitations of py_proto_library
// Per-language or per-tool details.
// repeated google.protobuf.Any details = 4;
repeated google.protobuf.Any details = 4;
}

// The absolute path of the current working directory where the build tool
Expand Down Expand Up @@ -177,9 +176,8 @@ message CompilationUnit {
// sort by name in order to canonicalize the message.
repeated Env environment = 10;

// NOTE: Dropped because of limitations of py_proto_library
// Per-language or per-tool details.
// repeated google.protobuf.Any details = 11;
repeated google.protobuf.Any details = 11;
}

// KzipInfo contains a summary of the contents of a kzip. It provides a
Expand Down Expand Up @@ -222,13 +220,12 @@ message KzipInfo {
// build from a repository. This message is stored in the
// CompilationUnit.details field.
message BuildMetadata {
// NOTE: Dropped because of limitations of py_proto_library
// The commit_timestamp is generally the timestamp at which the source for
// this build was checked into version control, but can be any timestamp
// associated with the origin of this build. In the case that a project is
// made up of multiple repositories, this timestamp should be the one
// associated with the primary/super repository.
// google.protobuf.Timestamp commit_timestamp = 1;
google.protobuf.Timestamp commit_timestamp = 1;
}

// A FilesRequest specifies a collection of files to be fetched from a
Expand Down
39 changes: 0 additions & 39 deletions verilog/tools/kythe/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# 'verible-verilog-kythe-extractor' is a program for extracting Verilog/SystemVerilog to kythe facts.

load("//bazel:sh_test_with_runfiles_lib.bzl", "sh_test_with_runfiles_lib")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")

licenses(["notice"])

Expand Down Expand Up @@ -264,44 +263,6 @@ sh_test(
],
)

py_library(
name = "filelist_parser",
srcs = ["filelist_parser.py"],
imports = ["."],
srcs_version = "PY3",
deps = [
"//third_party/py/dataclasses",
"@absl_py//absl/logging",
],
)

py_test(
name = "filelist_parser_test",
size = "small",
srcs = ["filelist_parser_test.py"],
main = "filelist_parser_test.py",
python_version = "PY3",
srcs_version = "PY3",
deps = [
":filelist_parser",
],
)

py_binary(
name = "verilog_kythe_kzip_writer_py",
srcs = ["verilog_kythe_kzip_writer.py"],
main = "verilog_kythe_kzip_writer.py",
python_version = "PY3",
srcs_version = "PY3",
deps = [
":filelist_parser",
"//third_party/proto/kythe:analysis_py_proto",
"@absl_py//absl:app",
"@absl_py//absl/flags",
"@absl_py//absl/logging",
],
)

cc_library(
name = "kzip_creator",
srcs = ["kzip_creator.cc"],
Expand Down
122 changes: 0 additions & 122 deletions verilog/tools/kythe/filelist_parser.py

This file was deleted.

102 changes: 0 additions & 102 deletions verilog/tools/kythe/filelist_parser_test.py

This file was deleted.

Loading

0 comments on commit 7ddcbdc

Please sign in to comment.