From e41cecf72de072cf73b010094a4a4b51c2c72fa4 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 26 Apr 2022 12:07:27 +0000 Subject: [PATCH 1/5] Rewrite for clarity @logophile --- docs/jvm_aot.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/jvm_aot.md b/docs/jvm_aot.md index 304c82961c..d9c1b6be2d 100644 --- a/docs/jvm_aot.md +++ b/docs/jvm_aot.md @@ -1,8 +1,8 @@ -# Ahead Of Time (AOT) compilation for the Java Virtual Machine (JVM)" +# Ahead Of Time (AOT) compilation for the Java Virtual Machine (JVM) Ahead Of Time (AOT) compilation build tools such as those provided by [GraalVM's `native-image`](https://www.graalvm.org/reference-manual/native-image/) can require some configuration when using protobuf. -Protobuf for the JVM uses reflection and some of its target classes are not possible to determine in advance. -Historically, there were good reasons to use reflection based on APIs that were published effectively requiring them, and this situation is unlikely to change. +Protobuf for the JVM uses reflection, and some of its target classes are not possible to determine in advance. +This situation is unlikely to change. [The Lite version of protobuf for the JVM](https://github.com/protocolbuffers/protobuf/blob/main/java/lite.md) avoids reflection and may be better suited for use with AOT compilation tooling. This Lite version was originally targeted for use on Android which has similar AOT compilation @@ -10,9 +10,11 @@ goals as GraalVM's native-image tool. ## GraalVM native-image -This section addresses GraalVM's `native-image` configuration specifically as this AOT compilation tool due to its popularity. The `native-image` tool can be configured -with respect to: the [Java Native Interface](https://en.wikipedia.org/wiki/Java_Native_Interface) (JNI), http proxying, reflection, and other resources. While these -considerations can be manually declared as JSON files, we recommend that a JVM application is exercised along with +The GraalVM `native-image` tool can be configured with options for the +[Java Native Interface](https://www.graalvm.org/22.0/reference-manual/native-image/JNI/) (JNI), +http proxying, reflection, and other resources. While these +configuration options can be manually specified in JSON files, we recommend +that you exercise the application with [the assisted configuration agent](https://www.graalvm.org/reference-manual/native-image/BuildConfiguration/#assisted-configuration-of-native-image-builds). The agent -will generate files that you can then subsequently point at when invoking `native-image`. We recommend that the generated files are retained with a project's source -code. +will generate native-image.properties files that you add to the project's +META-INF/native-image/ directory. The Native Image builder uses configuration options provided in META-INF/native-image/ to construct native-image command line arguments. From 79e9614edf2f13723d345e99b7a3eef7bd918107 Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Wed, 29 Jun 2022 23:52:31 +0000 Subject: [PATCH 2/5] Change phpunit version to fix error --- php/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/composer.json b/php/composer.json index f712f0ebb9..9744d81b4a 100644 --- a/php/composer.json +++ b/php/composer.json @@ -9,7 +9,7 @@ "php": ">=7.0.0" }, "require-dev": { - "phpunit/phpunit": ">=5.0.0" + "phpunit/phpunit": "8.5.26" }, "autoload": { "psr-4": { From 8535efb3aa2b85ab691c78cd0f7769e9cb7abdc1 Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Thu, 30 Jun 2022 00:06:11 +0000 Subject: [PATCH 3/5] Change version to make a range --- php/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/composer.json b/php/composer.json index 9744d81b4a..756704f8fc 100644 --- a/php/composer.json +++ b/php/composer.json @@ -9,7 +9,7 @@ "php": ">=7.0.0" }, "require-dev": { - "phpunit/phpunit": "8.5.26" + "phpunit/phpunit": ">=5.0.0 <8.5.27" }, "autoload": { "psr-4": { From fd202c02a6fbb5f6d5330e4a416f3b3aa8d94a9f Mon Sep 17 00:00:00 2001 From: theodorerose Date: Thu, 30 Jun 2022 15:51:09 +0000 Subject: [PATCH 4/5] fix C# minimum lang version to 10.0 --- csharp/src/Google.Protobuf/Google.Protobuf.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.csproj b/csharp/src/Google.Protobuf/Google.Protobuf.csproj index 5517b0030c..37d86ce043 100644 --- a/csharp/src/Google.Protobuf/Google.Protobuf.csproj +++ b/csharp/src/Google.Protobuf/Google.Protobuf.csproj @@ -5,8 +5,7 @@ Copyright 2015, Google Inc. Google Protocol Buffers 3.21.2 - - 7.2 + 10.0 Google Inc. netstandard1.1;netstandard2.0;net45;net50 true From 651a60cfdc90c8979b62817bc075440e71915bbb Mon Sep 17 00:00:00 2001 From: Mike Kruskal <62662355+mkruskal-google@users.noreply.github.com> Date: Thu, 30 Jun 2022 12:45:43 -0700 Subject: [PATCH 5/5] Disabling broken mac php tests (#10197) --- kokoro/macos/php7.0_mac/build.sh | 3 ++- kokoro/macos/php7.3_mac/build.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kokoro/macos/php7.0_mac/build.sh b/kokoro/macos/php7.0_mac/build.sh index e5a37e30ee..c6717e071b 100755 --- a/kokoro/macos/php7.0_mac/build.sh +++ b/kokoro/macos/php7.0_mac/build.sh @@ -8,4 +8,5 @@ cd $(dirname $0)/../../.. # Prepare worker environment to run tests source kokoro/macos/prepare_build_macos_rc -./tests.sh php7.0_mac +# TODO(mkruskal) Re-enable this once we can get a working PHP 7.0 installed. +#./tests.sh php7.0_mac diff --git a/kokoro/macos/php7.3_mac/build.sh b/kokoro/macos/php7.3_mac/build.sh index 2d2f679da2..2688ddbf65 100755 --- a/kokoro/macos/php7.3_mac/build.sh +++ b/kokoro/macos/php7.3_mac/build.sh @@ -8,4 +8,5 @@ cd $(dirname $0)/../../.. # Prepare worker environment to run tests source kokoro/macos/prepare_build_macos_rc -./tests.sh php7.3_mac +# TODO(mkruskal) Re-enable this once we can get a working PHP 7.0 installed. +#./tests.sh php7.3_mac