Skip to content

Commit

Permalink
Deleted the legacy "Handlers" APIs. upb can finally be deserving of i…
Browse files Browse the repository at this point in the history
…ts name.

This is possible now that all users have been migrated to the new
upb_msg APIs.
  • Loading branch information
haberman committed Jan 11, 2021
1 parent 0f40d59 commit f5d2d55
Show file tree
Hide file tree
Showing 38 changed files with 15 additions and 17,846 deletions.
82 changes: 0 additions & 82 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -210,85 +210,6 @@ cc_library(
],
)

# Legacy C/C++ Libraries (not recommended for new code) ########################

cc_library(
name = "handlers",
srcs = [
"upb/handlers.c",
"upb/handlers-inl.h",
"upb/sink.c",
],
hdrs = [
"upb/handlers.h",
"upb/sink.h",
],
copts = UPB_DEFAULT_COPTS,
visibility = ["//tests:__pkg__"],
deps = [
":port",
":reflection",
":table",
":upb",
],
)

cc_library(
name = "upb_pb",
srcs = [
"upb/pb/compile_decoder.c",
"upb/pb/decoder.c",
"upb/pb/decoder.int.h",
"upb/pb/encoder.c",
"upb/pb/textprinter.c",
"upb/pb/varint.c",
"upb/pb/varint.int.h",
],
hdrs = [
"upb/pb/decoder.h",
"upb/pb/encoder.h",
"upb/pb/textprinter.h",
],
copts = UPB_DEFAULT_COPTS,
visibility = ["//tests:__pkg__"],
deps = [
":descriptor_upb_proto",
":handlers",
":port",
":reflection",
":table",
":upb",
],
)

# copybara:strip_for_google3_begin
cc_library(
name = "upb_json",
srcs = [
"upb/json/parser.c",
"upb/json/printer.c",
],
hdrs = [
"upb/json/parser.h",
"upb/json/printer.h",
],
copts = UPB_DEFAULT_COPTS,
visibility = ["//tests:__pkg__"],
deps = [
":upb",
":upb_pb",
],
)

genrule(
name = "generate_json_ragel",
srcs = ["//:upb/json/parser.rl"],
outs = ["upb/json/parser.c"],
cmd = "$(location @ragel//:ragelc) -C -o upb/json/parser.c $< && mv upb/json/parser.c $@",
tools = ["@ragel//:ragelc"],
visibility = ["//cmake:__pkg__"],
)

# Amalgamation #################################################################

py_binary(
Expand All @@ -308,10 +229,7 @@ upb_amalgamation(
":fastdecode",
":descriptor_upb_proto",
":reflection",
":handlers",
":port",
":upb_pb",
":upb_json",
],
)

Expand Down
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,6 @@ Then in your `.c` file you can #include the generated header:
/* Insert code that uses generated types. */
```

## Old "handlers" interfaces

This library contains several semi-deprecated interfaces (see BUILD
file for more info about which interfaces are deprecated). These
deprecated interfaces are still used in some significant projects,
such as the Ruby and PHP C bindings for protobuf in the [main protobuf
repo](https://github.com/protocolbuffers/protobuf). The goal is to
migrate the Ruby/PHP bindings to use the newer, simpler interfaces
instead. Please do not use the old interfaces in new code.

## Lua bindings

This repo has some Lua bindings for the core library. These are
Expand Down
8 changes: 0 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ http_archive(
],
)

http_archive(
name = "ragel",
build_file = "//bazel:ragel.BUILD",
sha256 = "5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f",
strip_prefix = "ragel-6.10",
urls = ["http://www.colm.net/files/ragel/ragel-6.10.tar.gz"],
)

http_archive(
name = "com_google_googletest",
urls = ["https://github.com/google/googletest/archive/b6cd405286ed8635ece71c72f118e659f4ade3fb.zip"], # 2019-01-07
Expand Down
195 changes: 0 additions & 195 deletions bazel/ragel.BUILD

This file was deleted.

8 changes: 0 additions & 8 deletions cmake/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ genrule(
tools = [":make_cmakelists"],
)

genrule(
name = "copy_json_ragel",
srcs = ["//:upb/json/parser.c"],
outs = ["generated-in/upb/json/parser.c"],
cmd = "cp $< $@",
)

genrule(
name = "copy_protos",
srcs = ["//:descriptor_upb_proto"],
Expand All @@ -59,7 +52,6 @@ generated_file_staleness_test(
"CMakeLists.txt",
"google/protobuf/descriptor.upb.c",
"google/protobuf/descriptor.upb.h",
"upb/json/parser.c",
],
generated_pattern = "generated-in/%s",
)
Expand Down
37 changes: 0 additions & 37 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,43 +124,6 @@ target_link_libraries(json
add_library(table INTERFACE)
target_link_libraries(table INTERFACE
port)
add_library(handlers
../upb/handlers.c
../upb/handlers-inl.h
../upb/sink.c
../upb/handlers.h
../upb/sink.h)
target_link_libraries(handlers
port
reflection
table
upb)
add_library(upb_pb
../upb/pb/compile_decoder.c
../upb/pb/decoder.c
../upb/pb/decoder.int.h
../upb/pb/encoder.c
../upb/pb/textprinter.c
../upb/pb/varint.c
../upb/pb/varint.int.h
../upb/pb/decoder.h
../upb/pb/encoder.h
../upb/pb/textprinter.h)
target_link_libraries(upb_pb
descriptor_upb_proto
handlers
port
reflection
table
upb)
add_library(upb_json
../cmake/upb/json/parser.c
../upb/json/printer.c
../upb/json/parser.h
../upb/json/printer.h)
target_link_libraries(upb_json
upb
upb_pb)
add_library(wyhash INTERFACE)


Loading

0 comments on commit f5d2d55

Please sign in to comment.