Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#969: Use new CTPG parser in java vm #970

Merged
merged 6 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .current_gitmodules

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions .github/workflows/check_bazel_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check Bazel Build

on:
push:
branches:
- develop
pull_request:


jobs:
build:
runs-on: ubuntu-22.04
env:
UDF_CLIENT_ENV_FILE: /tmp/.udf_client_env
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'

- name: Install UDF Client Dependencies
run: |
sudo bash scripts/installUdfClientDeps.sh "$UDF_CLIENT_ENV_FILE"
- uses: r-lib/actions/setup-r@v2
- name: Build
run: |
source "$UDF_CLIENT_ENV_FILE"
bazel build --lockfile_mode=off --config no-tty -c dbg --config python --config java --config fast-binary --config r --verbose_failures
working-directory: ./exaudfclient/
42 changes: 0 additions & 42 deletions .github/workflows/check_bazel_tests.yml

This file was deleted.

1 change: 1 addition & 0 deletions doc/changes/changes_8.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This release uses version 1.0.0 of the container tool.
- #967: Added ctpg script options parser
- #972: Refactor exception handling for Script Options parser
- #973: Support new lines and white spaces at the beginning in script options values
- #969: Use new CTPG Parser in Java VM

## Bugs
- #977: Fixed Trivy update cache workflow
Expand Down
4 changes: 2 additions & 2 deletions exaudfclient/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ cc_binary(
srcs = ["exaudfclient.cc", "//base:load_dynamic"],
linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace
deps = ["//base/exaudflib:header", "//base/utils:utils"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+VM_R_DEPS+
["//base/exaudflib:exaudflib-deps", "//base/swig_factory:swig_factory"],
["//base/exaudflib:exaudflib-deps"],
defines = VM_ENABLED_DEFINES,
data = ["//base:libexaudflib_complete.so"]
)
Expand All @@ -113,7 +113,7 @@ cc_binary(
srcs = ["exaudfclient.cc", "//base:load_dynamic"],
linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace
deps = ["//base/exaudflib:header", "//base/utils:utils"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+VM_R_DEPS+
["//base/exaudflib:exaudflib-deps", "//base/swig_factory:swig_factory"] + [ "@zmq//:zmq", "@protobuf//:protobuf"],
["//base/exaudflib:exaudflib-deps"] + [ "@zmq//:zmq", "@protobuf//:protobuf"],
defines = VM_ENABLED_DEFINES,
data = ["//base:libexaudflib_complete.so"],
)
Expand Down
7 changes: 2 additions & 5 deletions exaudfclient/exaudfclient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <inttypes.h>

#ifdef ENABLE_JAVA_VM
#include "base/javacontainer/javacontainer.h"
#include "base/javacontainer/javacontainer_builder.h"
#endif //ENABLE_JAVA_VM

#ifdef ENABLE_PYTHON_VM
Expand All @@ -49,8 +49,6 @@
#include "protegrityclient.h"
#endif

#include "base/swig_factory/swig_factory_impl.h"

using namespace std;
using namespace SWIGVMContainers;

Expand Down Expand Up @@ -140,7 +138,6 @@ int main(int argc, char **argv) {
::setlocale(LC_ALL, "en_US.utf8");

std::function<SWIGVMContainers::SWIGVM*()>vmMaker=[](){return nullptr;}; // the initial vm maker returns NULL
SwigFactoryImpl swigFactory;
#ifdef UDF_PLUGIN_CLIENT
vmMaker = [](){return new SWIGVMContainers::Protegrity(false);};
#else
Expand Down Expand Up @@ -170,7 +167,7 @@ int main(int argc, char **argv) {
} else if (strcmp(argv[2], "lang=java")==0)
{
#ifdef ENABLE_JAVA_VM
vmMaker = [&](){return new SWIGVMContainers::JavaVMach(false, swigFactory);};
vmMaker = [&](){return SWIGVMContainers::JavaContainerBuilder().build();};
#else
throw SWIGVM::exception("this exaudfclient has been compilied without Java support");
#endif
Expand Down
2 changes: 1 addition & 1 deletion script-languages
Submodule script-languages updated 40 files
+75 −29 .github/workflows/check_bazel_tests.yml
+2 −0 .github/workflows/test_package_management_scripts.yaml
+13 −0 exaudfclient/.bazelrc
+2 −2 exaudfclient/BUILD
+4 −3 exaudfclient/base/javacontainer/BUILD
+3 −2 exaudfclient/base/javacontainer/javacontainer.cc
+11 −2 exaudfclient/base/javacontainer/javacontainer.h
+32 −0 exaudfclient/base/javacontainer/javacontainer_builder.cc
+35 −0 exaudfclient/base/javacontainer/javacontainer_builder.h
+19 −18 exaudfclient/base/javacontainer/javacontainer_impl.cc
+11 −2 exaudfclient/base/javacontainer/javacontainer_impl.h
+5 −3 exaudfclient/base/javacontainer/script_options/BUILD
+4 −6 exaudfclient/base/javacontainer/script_options/extractor.cc
+1 −6 exaudfclient/base/javacontainer/script_options/extractor.h
+33 −0 exaudfclient/base/javacontainer/script_options/keywords.cc
+4 −8 exaudfclient/base/javacontainer/script_options/keywords.h
+2 −3 exaudfclient/base/javacontainer/script_options/parser.h
+142 −0 exaudfclient/base/javacontainer/script_options/parser_ctpg.cc
+41 −0 exaudfclient/base/javacontainer/script_options/parser_ctpg.h
+99 −0 exaudfclient/base/javacontainer/script_options/parser_ctpg_script_importer.cc
+46 −0 exaudfclient/base/javacontainer/script_options/parser_ctpg_script_importer.h
+8 −7 exaudfclient/base/javacontainer/script_options/parser_legacy.cc
+10 −4 exaudfclient/base/javacontainer/script_options/parser_legacy.h
+10 −0 exaudfclient/base/javacontainer/script_options/test/BUILD
+66 −0 exaudfclient/base/javacontainer/script_options/test/ctpg_script_importer_test.cc
+105 −0 exaudfclient/base/javacontainer/script_options/test/swig_factory_test.cc
+20 −0 exaudfclient/base/javacontainer/script_options/test/swig_factory_test.h
+41 −4 exaudfclient/base/javacontainer/test/BUILD
+109 −0 exaudfclient/base/javacontainer/test/cpp/javacontainer_ctpg_test.cc
+27 −0 exaudfclient/base/javacontainer/test/cpp/javacontainer_perf_test.cc
+31 −27 exaudfclient/base/javacontainer/test/cpp/javacontainer_test.cc
+17 −10 exaudfclient/base/javacontainer/test/cpp/javavm_test.cc
+3 −2 exaudfclient/base/javacontainer/test/cpp/javavm_test.h
+2 −2 exaudfclient/base/javacontainer/test/cpp/swig_factory_test.cc
+27 −20 exaudfclient/base/script_options_parser/ctpg/script_option_lines_ctpg.cc
+0 −2 exaudfclient/base/script_options_parser/ctpg/script_option_lines_ctpg.h
+4 −0 exaudfclient/base/script_options_parser/ctpg/test/script_option_lines_test.cpp
+1 −0 exaudfclient/base/swig_factory/swig_factory.h
+2 −5 exaudfclient/exaudfclient.cc
+56 −0 scripts/installUdfClientDeps.sh