move lua/ up to the top level directory where python/ lives

PiperOrigin-RevId: 486786325
pull/13171/head
Eric Salo 2 years ago committed by Copybara-Service
parent d4425d3f5b
commit a77b9665e1
  1. 2
      .github/workflows/bazel_tests.yml
  2. 2
      BUILD
  3. 6
      lua/BUILD.bazel
  4. 8
      lua/README.md
  5. 2
      lua/def.c
  6. 2
      lua/lua_proto_library.bzl
  7. 6
      lua/main.c
  8. 6
      lua/msg.c
  9. 0
      lua/test.proto
  10. 2
      lua/test_upb.lua
  11. 2
      lua/upb.c
  12. 0
      lua/upb.h
  13. 0
      lua/upb.lua
  14. 0
      lua/upbc.cc
  15. 8
      upb/bindings/lua/README.md

@ -25,7 +25,7 @@ jobs:
- { NAME: "GCC Optimized", BAZEL: bazel, CC: gcc, os: ubuntu-20.04, flags: "-c opt" }
- { NAME: "FastTable", BAZEL: bazel, CC: clang, os: ubuntu-20.04, flags: "--//:fasttable_enabled=true -- -cmake:test_generated_files" }
- { NAME: "ASAN", BAZEL: bazel, CC: clang, os: ubuntu-20.04, flags: "--config=asan -c dbg -- -benchmarks:benchmark -python/..." }
- { NAME: "UBSAN", BAZEL: bazel, CC: clang, os: ubuntu-20.04, flags: "--config=ubsan -c dbg -- -benchmarks:benchmark -python/... -upb/bindings/lua/...", install: "libunwind-dev" }
- { NAME: "UBSAN", BAZEL: bazel, CC: clang, os: ubuntu-20.04, flags: "--config=ubsan -c dbg -- -benchmarks:benchmark -python/... -lua/...", install: "libunwind-dev" }
- { NAME: "32-bit", BAZEL: bazel, CC: clang, os: ubuntu-20.04, flags: "--copt=-m32 --linkopt=-m32 -- -... benchmarks:benchmark ", install: "g++-multilib" }
- { NAME: "macOS", BAZEL: bazel, CC: clang, os: macos-11, flags: "" }
# We support two Bazel versions back per https://opensource.google/documentation/policies/cplusplus-support

@ -1196,7 +1196,7 @@ exports_files(
"third_party/lunit/console.lua",
"third_party/lunit/lunit.lua",
],
visibility = ["//upb/bindings/lua:__pkg__"],
visibility = ["//lua:__pkg__"],
)
filegroup(

@ -29,7 +29,7 @@ load(
"UPB_DEFAULT_CPPOPTS",
)
load(
"//upb/bindings/lua:lua_proto_library.bzl",
"//lua:lua_proto_library.bzl",
"lua_proto_library",
)
@ -82,13 +82,13 @@ cc_test(
":test_proto_lua",
"//:third_party/lunit/console.lua",
"//:third_party/lunit/lunit.lua",
"//upb/bindings/lua:upb.lua",
"//lua:upb.lua",
"@com_google_protobuf//:descriptor_proto",
"@com_google_protobuf//conformance:conformance_proto",
],
linkstatic = 1,
deps = [
"//upb/bindings/lua:lupb",
"//lua:lupb",
"@lua//:liblua",
],
)

@ -0,0 +1,8 @@
# upb Lua bindings
These are some bare-bones upb bindings for Lua.
These bindings exist primarily for experimentation and testing.
They are incomplete and are not really intended for use in any application.
This is by no means a complete or supported protobuf library, and in fact
we don't even claim it to be functional.

@ -33,7 +33,7 @@
#include <string.h>
#include "lauxlib.h"
#include "upb/bindings/lua/upb.h"
#include "lua/upb.h"
#include "upb/reflection.h"
#define LUPB_ENUMDEF "lupb.enumdef"

@ -127,7 +127,7 @@ _lua_proto_library_aspect = aspect(
"_upbc": attr.label(
executable = True,
cfg = "exec",
default = "//upb/bindings/lua:protoc-gen-lua",
default = "//lua:protoc-gen-lua",
),
"_protoc": attr.label(
executable = True,

@ -30,7 +30,7 @@
#include <lualib.h>
#include <signal.h>
#include "upb/bindings/lua/upb.h"
#include "lua/upb.h"
lua_State* L;
@ -57,7 +57,7 @@ const char* init =
"bazel-bin/external/com_google_protobuf/src/?.lua;"
"bazel-bin/external/com_google_protobuf/?.lua;"
"bazel-bin/external/com_google_protobuf/?.lua;"
"upb/bindings/lua/?.lua"
"lua/?.lua"
"'";
int main(int argc, char** argv) {
@ -70,7 +70,7 @@ int main(int argc, char** argv) {
signal(SIGINT, sighandler);
ret = ret || lua_pcall(L, 1, LUA_MULTRET, 0) ||
luaL_dofile(L, "upb/bindings/lua/test_upb.lua");
luaL_dofile(L, "lua/test_upb.lua");
signal(SIGINT, SIG_DFL);
if (ret) {

@ -38,13 +38,13 @@
#include <string.h>
#include "lauxlib.h"
#include "upb/bindings/lua/upb.h"
#include "lua/upb.h"
#include "upb/collections/map.h"
#include "upb/json/decode.h"
#include "upb/json/encode.h"
#include "upb/map.h"
#include "upb/port/def.inc"
#include "upb/reflection/message.h"
#include "upb/text_encode.h"
#include "upb/text/encode.h"
/*
* Message/Map/Array objects. These objects form a directed graph: a message

@ -29,7 +29,7 @@
local upb = require "lupb"
local lunit = require "lunit"
local upb_test = require "upb.bindings.lua.test_pb"
local upb_test = require "lua.test_pb"
local test_messages_proto3 = require "google.protobuf.test_messages_proto3_pb"
local test_messages_proto2 = require "google.protobuf.test_messages_proto2_pb"
local descriptor = require "google.protobuf.descriptor_pb"

@ -47,7 +47,7 @@
* domain of [u]int64 values.
*/
#include "upb/bindings/lua/upb.h"
#include "lua/upb.h"
#include <float.h>
#include <math.h>

@ -1,8 +0,0 @@
# upb Lua bindings
These are some bare-bones upb bindings for Lua.
These bindings exist primarily for experimentation and testing. They are
incomplete and are not really intended for use in any application. This is by
no means a complete or supported protobuf library.
Loading…
Cancel
Save