Skip to content

Commit

Permalink
😖 Javet v3.0.4 (#298)
Browse files Browse the repository at this point in the history
* Upgraded V8 to `v12.2.281.16` (2024-02-15)
* Upgraded Node.js to `v20.11.1` ([2024-02-14](https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md#20.11.1))
* Added proxy plugin system for converters
* Added `createTargetObject()`, `getProxyPlugin()`, `proxyDeleteProperty()`, `toJSON()` to `IJavetDirectProxyHandler`
* Added `asBoolean()`, `asDouble()`, `asInt()`, `asLong()`, `asString()` to `IV8Value`
* Added `IClassProxyPlugin`, `JavetProxyPluginArray`, `JavetProxyPluginClass`, `JavetProxyPluginDefault`, `JavetProxyPluginList`, `JavetProxyPluginMap`, `JavetProxyPluginSet`
* Added `V8ValueBuiltInReflect`, `JavetEntityObject`, `JavetEntityPropertyDescriptor`
* Added `BindingContextStore`, `ClassDescriptorStore`
* Added `createV8ValueStringObject()`, `createV8ValueError()`, `throwError()` to `V8Runtime`
* Added `V8ValueBooleanObject`, `V8ValueDoubleObject`, `V8ValueIntegerObject`, `V8ValueLongObject`, `V8ValueStringObject`
* Added `V8ValueErrorType`, `V8ErrorTemplate`, `JavetEntityError`
* Added `getErrorType()` to `V8ValueError`
* Added `getProxyPlugins()`, `isProxyArrayEnabled()`, `setProxyArrayEnabled()`, to `JavetConverterConfig`
* Added `getProxyPlugin()`, `proxyGetOwnPropertyDescriptor()` to `IJavetDirectProxyHandler`
* Added `getOwnPropertyDescriptor()` to `BaseJavetReflectionProxyHandler`
* Added `flat()`, `shift()`, `unshift()` to `IV8ValueArray`
* Added `asArray()`, `clear()` to `V8ValueMap`
* Added `asArray()`, `clear()` to `V8ValueSet`
* Improved performance of `JavetObjectConverter`
* Fixed improper conversions in `JavetBridgeConverter`
* Fixed a memory leak in adding a V8 module with the same name
* Swapped `JavetScriptingError.getMessage()` and `JavetScriptingError.getDetailedMessage()`
* Removed `JavetProxySymbolIterableConverter`, `JavetProxySymbolToPrimitiveConverter`
* Removed `executePrimitive()` from `IV8Executable`
  • Loading branch information
caoccao authored Feb 18, 2024
1 parent 5acc069 commit 9f9724c
Show file tree
Hide file tree
Showing 657 changed files with 53,136 additions and 9,347 deletions.
80 changes: 36 additions & 44 deletions .github/workflows/android_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
workflow_dispatch:

env:
JAVET_NODE_VERSION: 20.11.0
JAVET_V8_VERSION: 12.1.285.26
JAVET_VERSION: 3.0.3
JAVET_NODE_VERSION: 20.11.1
JAVET_V8_VERSION: 12.2.281.16
JAVET_VERSION: 3.0.4
ROOT: /home/runner/work/Javet

jobs:
Expand All @@ -21,14 +21,14 @@ jobs:
steps:

- name: Checkout the code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Ubuntu
run: |
sudo apt-get install -y execstack gcc-multilib
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand Down Expand Up @@ -61,19 +61,17 @@ jobs:
gclient sync -D
cd v8
python3 tools/dev/v8gen.py arm.release -- 'target_os="android"' 'target_cpu="arm"' 'v8_target_cpu="arm"' v8_monolithic=true v8_use_external_startup_data=false is_component_build=false v8_enable_i18n_support=false v8_enable_pointer_compression=false v8_static_library=true symbol_level=0 use_custom_libcxx=false v8_enable_sandbox=false
sed -i 's/char\[\]/char/g' src/wasm/wasm-engine.cc
sed -i 's/source_url_ = String::cast(script->name())->ToCString();/std::unique_ptr<char[]> source_url = String::cast(script->name())->ToCString(); source_url_ = {source_url.release(), source_url.get_deleter()};/' src/wasm/wasm-engine.cc
ninja -C out.gn/arm.release v8_monolith || python3 ${{ env.ROOT }}/Javet/scripts/python/patch_v8_build.py -p ./
ninja -C out.gn/arm.release v8_monolith
- name: Setup JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 11

- name: Setup Cmake
uses: jwlawson/actions-setup-cmake@v1.13
uses: jwlawson/actions-setup-cmake@v2.0
with:
cmake-version: '3.23.x'

Expand All @@ -83,7 +81,7 @@ jobs:
sh ./build-android.sh -DV8_DIR=${{ env.ROOT }}/google/v8 -DCMAKE_ANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} -DCMAKE_ANDROID_ARCH=arm
- name: Upload the Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: javet-android-v8-arm-${{ env.JAVET_VERSION }}
path: android/javet-android/src/main/jniLibs/armeabi-v7a/*.so
Expand All @@ -95,14 +93,14 @@ jobs:
steps:

- name: Checkout the code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Ubuntu
run: |
sudo apt-get install -y execstack gcc-multilib
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand Down Expand Up @@ -135,19 +133,17 @@ jobs:
gclient sync -D
cd v8
python3 tools/dev/v8gen.py arm64.release -- 'target_os="android"' 'target_cpu="arm64"' 'v8_target_cpu="arm64"' v8_monolithic=true v8_use_external_startup_data=false is_component_build=false v8_enable_i18n_support=false v8_enable_pointer_compression=false v8_static_library=true symbol_level=0 use_custom_libcxx=false v8_enable_sandbox=false
sed -i 's/char\[\]/char/g' src/wasm/wasm-engine.cc
sed -i 's/source_url_ = String::cast(script->name())->ToCString();/std::unique_ptr<char[]> source_url = String::cast(script->name())->ToCString(); source_url_ = {source_url.release(), source_url.get_deleter()};/' src/wasm/wasm-engine.cc
ninja -C out.gn/arm64.release v8_monolith || python3 ${{ env.ROOT }}/Javet/scripts/python/patch_v8_build.py -p ./
ninja -C out.gn/arm64.release v8_monolith
- name: Setup JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 11

- name: Setup Cmake
uses: jwlawson/actions-setup-cmake@v1.13
uses: jwlawson/actions-setup-cmake@v2.0
with:
cmake-version: '3.23.x'

Expand All @@ -157,7 +153,7 @@ jobs:
sh ./build-android.sh -DV8_DIR=${{ env.ROOT }}/google/v8 -DCMAKE_ANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} -DCMAKE_ANDROID_ARCH=arm64
- name: Upload the Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: javet-android-v8-arm64-${{ env.JAVET_VERSION }}
path: android/javet-android/src/main/jniLibs/arm64-v8a/*.so
Expand All @@ -169,14 +165,14 @@ jobs:
steps:

- name: Checkout the code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Ubuntu
run: |
sudo apt-get install -y execstack gcc-multilib
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand Down Expand Up @@ -209,19 +205,17 @@ jobs:
gclient sync -D
cd v8
python3 tools/dev/v8gen.py ia32.release -- 'target_os="android"' 'target_cpu="x86"' 'v8_target_cpu="x86"' v8_monolithic=true v8_use_external_startup_data=false is_component_build=false v8_enable_i18n_support=false v8_enable_pointer_compression=false v8_static_library=true symbol_level=0 use_custom_libcxx=false v8_enable_sandbox=false
sed -i 's/char\[\]/char/g' src/wasm/wasm-engine.cc
sed -i 's/source_url_ = String::cast(script->name())->ToCString();/std::unique_ptr<char[]> source_url = String::cast(script->name())->ToCString(); source_url_ = {source_url.release(), source_url.get_deleter()};/' src/wasm/wasm-engine.cc
ninja -C out.gn/ia32.release v8_monolith || python3 ${{ env.ROOT }}/Javet/scripts/python/patch_v8_build.py -p ./
ninja -C out.gn/ia32.release v8_monolith
- name: Setup JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 11

- name: Setup Cmake
uses: jwlawson/actions-setup-cmake@v1.13
uses: jwlawson/actions-setup-cmake@v2.0
with:
cmake-version: '3.23.x'

Expand All @@ -231,7 +225,7 @@ jobs:
sh ./build-android.sh -DV8_DIR=${{ env.ROOT }}/google/v8 -DCMAKE_ANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} -DCMAKE_ANDROID_ARCH=x86
- name: Upload the Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: javet-android-v8-x86-${{ env.JAVET_VERSION }}
path: android/javet-android/src/main/jniLibs/x86/*.so
Expand All @@ -243,14 +237,14 @@ jobs:
steps:

- name: Checkout the code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Ubuntu
run: |
sudo apt-get install -y execstack gcc-multilib
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand Down Expand Up @@ -283,19 +277,17 @@ jobs:
gclient sync -D
cd v8
python3 tools/dev/v8gen.py x64.release -- 'target_os="android"' 'target_cpu="x64"' 'v8_target_cpu="x64"' v8_monolithic=true v8_use_external_startup_data=false is_component_build=false v8_enable_i18n_support=false v8_enable_pointer_compression=false v8_static_library=true symbol_level=0 use_custom_libcxx=false v8_enable_sandbox=false
sed -i 's/char\[\]/char/g' src/wasm/wasm-engine.cc
sed -i 's/source_url_ = String::cast(script->name())->ToCString();/std::unique_ptr<char[]> source_url = String::cast(script->name())->ToCString(); source_url_ = {source_url.release(), source_url.get_deleter()};/' src/wasm/wasm-engine.cc
ninja -C out.gn/x64.release v8_monolith || python3 ${{ env.ROOT }}/Javet/scripts/python/patch_v8_build.py -p ./
ninja -C out.gn/x64.release v8_monolith
- name: Setup JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 11

- name: Setup Cmake
uses: jwlawson/actions-setup-cmake@v1.13
uses: jwlawson/actions-setup-cmake@v2.0
with:
cmake-version: '3.23.x'

Expand All @@ -305,7 +297,7 @@ jobs:
sh ./build-android.sh -DV8_DIR=${{ env.ROOT }}/google/v8 -DCMAKE_ANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} -DCMAKE_ANDROID_ARCH=x86_64
- name: Upload the Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: javet-android-v8-x86_64-${{ env.JAVET_VERSION }}
path: android/javet-android/src/main/jniLibs/x86_64/*.so
Expand All @@ -318,21 +310,21 @@ jobs:
steps:

- name: Checkout the code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
gradle-version: 8.2

Expand All @@ -344,25 +336,25 @@ jobs:
mkdir -p android/javet-android/src/main/jniLibs/x86_64
- name: Download Javet arm
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: javet-android-v8-arm-${{ env.JAVET_VERSION }}
path: android/javet-android/src/main/jniLibs/armeabi-v7a

- name: Download Javet arm64
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: javet-android-v8-arm64-${{ env.JAVET_VERSION }}
path: android/javet-android/src/main/jniLibs/arm64-v8a

- name: Download Javet x86
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: javet-android-v8-x86-${{ env.JAVET_VERSION }}
path: android/javet-android/src/main/jniLibs/x86

- name: Download Javet x86_64
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: javet-android-v8-x86_64-${{ env.JAVET_VERSION }}
path: android/javet-android/src/main/jniLibs/x86_64
Expand All @@ -375,27 +367,27 @@ jobs:
gradle build --debug
- name: Upload the Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: javet-android-${{ env.JAVET_VERSION }}
path: android/javet-android/build/outputs/aar/javet*release.aar

- name: Delete Javet arm
uses: geekyeggo/delete-artifact@v2
uses: geekyeggo/delete-artifact@v4
with:
name: javet-android-v8-arm-${{ env.JAVET_VERSION }}

- name: Delete Javet arm64
uses: geekyeggo/delete-artifact@v2
uses: geekyeggo/delete-artifact@v4
with:
name: javet-android-v8-arm64-${{ env.JAVET_VERSION }}

- name: Delete Javet x86
uses: geekyeggo/delete-artifact@v2
uses: geekyeggo/delete-artifact@v4
with:
name: javet-android-v8-x86-${{ env.JAVET_VERSION }}

- name: Delete Javet x86_64
uses: geekyeggo/delete-artifact@v2
uses: geekyeggo/delete-artifact@v4
with:
name: javet-android-v8-x86_64-${{ env.JAVET_VERSION }}
10 changes: 5 additions & 5 deletions .github/workflows/linux_build_artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ on:
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_REPO_JAVET: ${{ secrets.DOCKERHUB_REPO_JAVET }}
JAVET_NODE_VERSION: 20.11.0
JAVET_V8_VERSION: 12.1.285.26
JAVET_VERSION: 3.0.3
JAVET_NODE_VERSION: 20.11.1
JAVET_V8_VERSION: 12.2.281.16
JAVET_VERSION: 3.0.4

jobs:
javet_linux_x86_64:
name: Build Javet Linux x86_64 Artifact
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build the Artifact
run: |
Expand All @@ -42,7 +42,7 @@ jobs:
run: mkdir $PWD/build && docker run --rm -i -v $PWD/build:/output javet:local cp -rf /Javet/build/libs /output

- name: Upload the Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: javet-linux-x86_64
path: build/libs/javet*.jar
14 changes: 7 additions & 7 deletions .github/workflows/linux_build_node_v8_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ on:
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_REPO_JAVET: ${{ secrets.DOCKERHUB_REPO_JAVET }}
JAVET_NODE_VERSION: 20.11.0
JAVET_V8_VERSION: 12.1.285.26
JAVET_VERSION: 3.0.3
JAVET_NODE_VERSION: 20.11.1
JAVET_V8_VERSION: 12.2.281.16
JAVET_VERSION: 3.0.4

# if we skip a job using a job level `if` condition, then any dependent jobs also don't run.
# we can skip a step of the job, using a step level `if` condition.
Expand All @@ -44,7 +44,7 @@ jobs:

- name: Checkout the code
if: inputs.skip_base_jvm == false
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build Ubuntu, Build Tools and JDK 8 Base Image
if: inputs.skip_base_jvm == false
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:

- name: Checkout the code
if: inputs.skip_base_node == false
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build Node.js Base Image
if: inputs.skip_base_node == false
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:

- name: Checkout the code
if: inputs.skip_base_v8 == false
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build V8 Base Image
if: inputs.skip_base_v8 == false
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}

- name: Checkout the code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build Gradle Base Image
run: |
Expand Down
Loading

0 comments on commit 9f9724c

Please sign in to comment.