Add upb "No System Python" test run
This test validates that upb Python targets can be built successfully even if
Python is not installed locally.
I also updated our pinned upb version to pull in some recent fixes needed for
this test run.
PiperOrigin-RevId: 559504790
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h
index ca4c7a9..53bc0e9 100755
--- a/ruby/ext/google/protobuf_c/ruby-upb.h
+++ b/ruby/ext/google/protobuf_c/ruby-upb.h
@@ -42,10 +42,13 @@
#include <assert.h>
#include <setjmp.h>
#include <stdbool.h>
-#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
+#ifndef UINTPTR_MAX
+Error, UINTPTR_MAX is undefined
+#endif
+
#if UINTPTR_MAX == 0xffffffff
#define UPB_SIZE(size32, size64) size32
#else
@@ -268,7 +271,7 @@
#define UPB_ASAN 1
#define UPB_ASAN_GUARD_SIZE 32
#ifdef __cplusplus
-extern "C" {
+ extern "C" {
#endif
void __asan_poison_memory_region(void const volatile *addr, size_t size);
void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
@@ -470,7 +473,10 @@
const char* data;
size_t size;
} upb_StringView;
-// LINT.ThenChange(GoogleInternalName0)
+// LINT.ThenChange(
+// GoogleInternalName0,
+// //depot/google3/third_party/upb/bits/golang/accessor.go:map_go_string
+// )
#ifdef __cplusplus
extern "C" {
@@ -505,14 +511,14 @@
#include <stdint.h>
-#ifndef UPB_MESSAGE_TYPEDEF_H_
-#define UPB_MESSAGE_TYPEDEF_H_
+#ifndef UPB_MESSAGE_TYPES_H_
+#define UPB_MESSAGE_TYPES_H_
-// This typedef needs its own header to resolve a circular dependency between
+// This typedef is in a leaf header to resolve a circular dependency between
// messages and mini tables.
typedef void upb_Message;
-#endif /* UPB_MESSAGE_TYPEDEF_H_ */
+#endif /* UPB_MESSAGE_TYPES_H_ */
// Must be last.
@@ -579,6 +585,8 @@
#ifndef UPB_MINI_TABLE_INTERNAL_ENUM_H_
#define UPB_MINI_TABLE_INTERNAL_ENUM_H_
+#include <stdint.h>
+
// Must be last.
struct upb_MiniTableEnum {
@@ -648,6 +656,8 @@
#ifndef UPB_MINI_TABLE_INTERNAL_FIELD_H_
#define UPB_MINI_TABLE_INTERNAL_FIELD_H_
+#include <stdint.h>
+
// Must be last.
@@ -1039,6 +1049,8 @@
#ifndef UPB_MEM_ARENA_H_
#define UPB_MEM_ARENA_H_
+#include <stddef.h>
+#include <stdint.h>
#include <string.h>
@@ -2740,6 +2752,7 @@
UPB_INLINE void _upb_Message_AssertMapIsUntagged(
const upb_Message* msg, const upb_MiniTableField* field) {
+ UPB_UNUSED(msg);
_upb_MiniTableField_CheckIsMap(field);
#ifndef NDEBUG
upb_TaggedMessagePtr default_val = 0;
@@ -3382,6 +3395,23 @@
#define UPB_WIRE_DECODE_H_
+#ifndef UPB_WIRE_TYPES_H_
+#define UPB_WIRE_TYPES_H_
+
+#define kUpb_WireFormat_DefaultDepthLimit 100
+
+// A list of types as they are encoded on the wire.
+typedef enum {
+ kUpb_WireType_Varint = 0,
+ kUpb_WireType_64Bit = 1,
+ kUpb_WireType_Delimited = 2,
+ kUpb_WireType_StartGroup = 3,
+ kUpb_WireType_EndGroup = 4,
+ kUpb_WireType_32Bit = 5
+} upb_WireType;
+
+#endif /* UPB_WIRE_TYPES_H_ */
+
// Must be last.
#ifdef __cplusplus
@@ -11229,6 +11259,8 @@
#ifndef UPB_LEX_ATOI_H_
#define UPB_LEX_ATOI_H_
+#include <stdint.h>
+
// Must be last.
#ifdef __cplusplus
@@ -11254,6 +11286,8 @@
#ifndef UPB_LEX_UNICODE_H_
#define UPB_LEX_UNICODE_H_
+#include <stdint.h>
+
// Must be last.
#ifdef __cplusplus
@@ -11640,23 +11674,6 @@
#endif // UPB_PORT_ATOMIC_H_
-#ifndef UPB_WIRE_COMMON_H_
-#define UPB_WIRE_COMMON_H_
-
-// Must be last.
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define kUpb_WireFormat_DefaultDepthLimit 100
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // UPB_WIRE_COMMON_H_
-
#ifndef UPB_WIRE_READER_H_
#define UPB_WIRE_READER_H_
@@ -11664,6 +11681,8 @@
#ifndef UPB_WIRE_INTERNAL_SWAP_H_
#define UPB_WIRE_INTERNAL_SWAP_H_
+#include <stdint.h>
+
// Must be last.
#ifdef __cplusplus
@@ -11696,21 +11715,6 @@
#endif /* UPB_WIRE_INTERNAL_SWAP_H_ */
-#ifndef UPB_WIRE_TYPES_H_
-#define UPB_WIRE_TYPES_H_
-
-// A list of types as they are encoded on the wire.
-typedef enum {
- kUpb_WireType_Varint = 0,
- kUpb_WireType_64Bit = 1,
- kUpb_WireType_Delimited = 2,
- kUpb_WireType_StartGroup = 3,
- kUpb_WireType_EndGroup = 4,
- kUpb_WireType_32Bit = 5
-} upb_WireType;
-
-#endif /* UPB_WIRE_TYPES_H_ */
-
// Must be last.
#ifdef __cplusplus
@@ -11910,6 +11914,8 @@
#ifndef UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_
#define UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_
+#include <stdint.h>
+
// Must be last.
@@ -12085,6 +12091,8 @@
#ifndef UPB_MINI_DESCRIPTOR_INTERNAL_ENCODE_H_
#define UPB_MINI_DESCRIPTOR_INTERNAL_ENCODE_H_
+#include <stdint.h>
+
// Must be last.