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

Update Thrift to version 0.16 #657

Merged
merged 26 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9e13126
feat: add wrapper thrift generation function
LoremIPsummer Oct 25, 2023
b7c32e7
feat: use wrapper function for the thrift files
LoremIPsummer Oct 25, 2023
9500b2f
fix: catch TTransportException (API change)
LoremIPsummer Oct 25, 2023
9b57eca
feat: update java client dependency
LoremIPsummer Oct 25, 2023
8580bc2
build: update web dependencies
LoremIPsummer Oct 25, 2023
01f13d0
ci: update gitlab thrift version
LoremIPsummer Oct 25, 2023
1396d4d
docs: update thrift install instructions for Ubuntu 22.04
LoremIPsummer Oct 25, 2023
7a340f1
fix: fix new webgui dependency import
LoremIPsummer Oct 27, 2023
7985d08
refactor: function naming convention
LoremIPsummer Oct 27, 2023
971553d
Revert "feat: add wrapper thrift generation function"
LoremIPsummer Oct 31, 2023
7c91d74
Revert "feat: use wrapper function for the thrift files"
LoremIPsummer Oct 31, 2023
6dcc099
fix: remove not generated files
LoremIPsummer Oct 31, 2023
ef06f15
refactor: reorganise CI script structure
LoremIPsummer Nov 8, 2023
920c810
ci: remove thrift from ubuntu 20.04 APT dependencies
LoremIPsummer Nov 8, 2023
5b53e7d
ci: extend scripts for compilation reasons
LoremIPsummer Nov 8, 2023
91e99c3
ci: extend CI with dependency compilation support (with catching)
LoremIPsummer Nov 8, 2023
2c84060
docs: update dependency installation guide
LoremIPsummer Nov 8, 2023
cf334eb
style: language
LoremIPsummer Nov 12, 2023
b188bcf
fix: correct thrift download url
LoremIPsummer Nov 12, 2023
7a6946e
refactor: hash logic
LoremIPsummer Nov 12, 2023
3ea4378
refactor: change CI compiled dependency directories
LoremIPsummer Nov 12, 2023
705fcdc
refactor: replace direct library copying
LoremIPsummer Nov 12, 2023
a467de8
Merge branch 'master' into feature/#630/update-thrift-0.16
LoremIPsummer Nov 12, 2023
77e414a
feat: remove not generated cppmetrics files
LoremIPsummer Nov 12, 2023
9c56cd5
fix: remove leftover cppmetrics not generated references
LoremIPsummer Nov 12, 2023
68679ca
fix: remove unnecessary step
LoremIPsummer Nov 12, 2023
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
8 changes: 4 additions & 4 deletions .gitlab/build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ fi
##########

cd $PACKAGES_DIR
wget --no-verbose --no-clobber http://archive.apache.org/dist/thrift/0.13.0/thrift-0.13.0.tar.gz
tar -xf thrift-0.13.0.tar.gz
cd thrift-0.13.0
wget --no-verbose --no-clobber http://archive.apache.org/dist/thrift/0.16.0/thrift-0.16.0.tar.gz
tar -xf thrift-0.16.0.tar.gz
cd thrift-0.16.0

CXXFLAGS="$CXXFLAGS -I$DEPS_INSTALL_RUNTIME_DIR/boost-install/include" \
LDFLAGS="$LDFLAGS -Wl,-rpath-link,$DEPS_INSTALL_RUNTIME_DIR/openssl-install/lib" \
Expand All @@ -342,7 +342,7 @@ LDFLAGS="$LDFLAGS -Wl,-rpath-link,$DEPS_INSTALL_RUNTIME_DIR/openssl-install/lib"
--without-python

make install --quiet --jobs $(nproc)
rm -f $PACKAGES_DIR/thrift-0.13.0.tar.gz
rm -f $PACKAGES_DIR/thrift-0.16.0.tar.gz

########
# Java #
Expand Down
3 changes: 2 additions & 1 deletion Functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,5 @@ function(join _values _glue _output)
string (REGEX REPLACE "([^\\]|^);" "\\1${_glue}" _tmpStr "${_values}")
string (REGEX REPLACE "[\\](.)" "\\1" _tmpStr "${_tmpStr}") #fixes escaping
set (${_output} "${_tmpStr}" PARENT_SCOPE)
endfunction(join)

endfunction(join)
8 changes: 4 additions & 4 deletions doc/deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ avoid using them if it's not necessary.

```bash
# Download and uncompress Thrift:
wget "http://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=thrift/0.13.0/thrift-0.13.0.tar.gz" \
-O thrift-0.13.0.tar.gz
tar -xvf ./thrift-0.13.0.tar.gz
cd thrift-0.13.0
wget "http://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=thrift/0.16.0/thrift-0.16.0.tar.gz" \
-O thrift-0.16.0.tar.gz
tar -xvf ./thrift-0.16.0.tar.gz
cd thrift-0.16.0
mcserep marked this conversation as resolved.
Show resolved Hide resolved

./configure --prefix=<thrift_install_dir> --silent --without-python \
--enable-libtool-lock --enable-tutorial=no --enable-tests=no \
Expand Down
Binary file removed lib/java/libthrift-0.13.0.jar
Binary file not shown.
Binary file added lib/java/libthrift-0.16.0.jar
Binary file not shown.
3 changes: 0 additions & 3 deletions plugins/cpp_reparse/service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ add_definitions(${LLVM_DEFINITIONS})

add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/cppreparse_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/cppreparse_constants.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/cppreparse_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/cppreparse_types.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/CppReparseService.cpp
Expand All @@ -42,7 +40,6 @@ add_custom_command(
"Generating Thrift for cppreparse.thrift")

add_library(cppreparsethrift STATIC
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/cppreparse_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/cppreparse_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/CppReparseService.cpp)

Expand Down
6 changes: 0 additions & 6 deletions plugins/dummy/service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ include_directories(SYSTEM

add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/dummy_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/dummy_constants.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/dummy_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/dummy_types.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/DummyService.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/DummyService.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp
Expand All @@ -26,8 +22,6 @@ add_custom_command(
"Generating Thrift for dummy.thrift")

add_library(dummythrift STATIC
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/dummy_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/dummy_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/DummyService.cpp)

target_compile_options(dummythrift PUBLIC -fPIC)
Expand Down
3 changes: 0 additions & 3 deletions plugins/git/service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ include_directories(SYSTEM

add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/git_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/git_constants.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/git_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/git_types.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/GitService.cpp
Expand All @@ -31,7 +29,6 @@ add_custom_command(
"Generating Thrift for git.thrift")

add_library(gitthrift STATIC
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/git_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/git_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/GitService.cpp)

Expand Down
3 changes: 0 additions & 3 deletions plugins/metrics/service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ include_directories(SYSTEM

add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/metrics_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/metrics_constants.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/metrics_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/metrics_types.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/MetricsService.cpp
Expand All @@ -30,7 +28,6 @@ add_custom_command(
"Generating Thrift for metrics.thrift")

add_library(metricsthrift STATIC
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/metrics_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/metrics_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/MetricsService.cpp)

Expand Down
25 changes: 18 additions & 7 deletions plugins/search/common/src/cc/search/common/ipc/IPCProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,24 @@ public IPCProcessor(CommonOptions options_, TProcessor processor_)
_processor = processor_;

TProtocolFactory factory = new TBinaryProtocol.Factory();
_inTransport = new TIOStreamTransport(
new FileInputStream(getFileNameFromFd(options_.ipcInFd)));
_outTransport = new TIOStreamTransport(
new FileOutputStream(getFileNameFromFd(options_.ipcOutFd)));

_inProtocol = factory.getProtocol(_inTransport);
_outProtocol = factory.getProtocol(_outTransport);
TTransport inTransport = null;
TTransport outTransport = null;
TProtocol inProtocol = null;
TProtocol outProtocol = null;

try {
inTransport = new TIOStreamTransport(new FileInputStream(getFileNameFromFd(options_.ipcInFd)));
outTransport = new TIOStreamTransport(new FileOutputStream(getFileNameFromFd(options_.ipcOutFd)));
inProtocol = factory.getProtocol(inTransport);
outProtocol = factory.getProtocol(outTransport);
} catch (TTransportException ex) {
_log.log(Level.SEVERE, "An error occured during the initialization of IO stream transports!", ex);
} finally {
_inTransport = inTransport;
_outTransport = outTransport;
_inProtocol = inProtocol;
_outProtocol = outProtocol;
}
}

/**
Expand Down
2 changes: 0 additions & 2 deletions plugins/search/service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ include_directories(SYSTEM
# Generate thrift files
add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/search_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/search_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/SearchService.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp
Expand All @@ -32,7 +31,6 @@ add_custom_command(

# Create cpp static library from thrift files
add_library(searchthrift STATIC
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/search_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/search_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/SearchService.cpp)

Expand Down
3 changes: 0 additions & 3 deletions service/authentication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ include_directories(SYSTEM

add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/authentication_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/authentication_constants.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/authentication_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/authentication_types.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/AuthenticationService.cpp
Expand All @@ -29,7 +27,6 @@ add_custom_command(
"Generating Thrift for authentication.thrift")

add_library(authenticationthrift STATIC
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/authentication_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/authentication_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/AuthenticationService.cpp)

Expand Down
3 changes: 0 additions & 3 deletions service/language/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ include_directories(SYSTEM

add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/language_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/language_constants.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/language_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/language_types.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/LanguageService.cpp
Expand All @@ -24,7 +22,6 @@ add_custom_command(
"Generating Thrift for language.thrift")

add_library(languagethrift STATIC
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/language_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/language_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/LanguageService.cpp)

Expand Down
6 changes: 0 additions & 6 deletions service/plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ include_directories(SYSTEM

add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/plugin_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/plugin_constants.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/plugin_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/plugin_types.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/PluginService.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/PluginService.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp
Expand All @@ -27,8 +23,6 @@ add_custom_command(
"Generating Thrift for plugin.thrift")

add_library(pluginthrift STATIC
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/plugin_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/plugin_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/PluginService.cpp)

target_compile_options(pluginthrift PUBLIC -fPIC -Wno-unknown-pragmas)
Expand Down
4 changes: 0 additions & 4 deletions service/project/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ add_custom_command(
# Do not add the same folders to both output commands as it produces a warning.
add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/project_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/project_constants.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/project_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/project_types.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/ProjectService.cpp
Expand All @@ -48,13 +46,11 @@ add_custom_command(
"Generating Thrift for project.thrift")

add_library(commonthrift STATIC
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/common_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/common_types.cpp)

target_compile_options(commonthrift PUBLIC -fPIC)

add_library(projectthrift STATIC
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/project_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/project_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/ProjectService.cpp)

Expand Down
3 changes: 0 additions & 3 deletions service/workspace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ include_directories(SYSTEM

add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/workspace_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/workspace_constants.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/workspace_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/workspace_types.h
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/WorkspaceService.cpp
Expand All @@ -27,7 +25,6 @@ add_custom_command(
"Generating Thrift for workspace.thrift")

add_library(workspacethrift STATIC
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/workspace_constants.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/workspace_types.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen-cpp/WorkspaceService.cpp)

Expand Down
27 changes: 21 additions & 6 deletions webgui-new/package-lock.json

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

2 changes: 1 addition & 1 deletion webgui-new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"recharts": "^2.5.0",
"sass": "^1.57.1",
"sharp": "^0.32.6",
"thrift": "0.13.0-hotfix.1"
"thrift": "0.16.0"
},
"engines": {
"node": ">=18"
Expand Down
3 changes: 2 additions & 1 deletion webgui-new/src/themes/theme.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { blue } from '@mui/material/colors';
import { alpha, createTheme } from '@mui/material/styles';
import { ReactDiffViewerStylesOverride } from 'react-diff-viewer-continued/lib/styles';
import { ReactDiffViewerStylesOverride } from 'react-diff-viewer-continued';
import React from 'react';


declare module '@mui/material/styles' {
export interface Theme {
backgroundColors?: {
Expand Down
2 changes: 1 addition & 1 deletion webgui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<!-- Third party libraries -->

<script type="text/javascript" src="scripts/node_modules/thrift/src/thrift.js"></script>
<script type="text/javascript" src="scripts/thrift.js"></script>
<script type="text/javascript" src="scripts/node_modules/codemirror/lib/codemirror.js"></script>
<script type="text/javascript" src="scripts/node_modules/codemirror/mode/clike/clike.js"></script>
<script type="text/javascript" src="scripts/node_modules/codemirror/mode/erlang/erlang.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion webgui/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<!-- Third party libraries -->

<script type="text/javascript" src="scripts/node_modules/thrift/src/thrift.js"></script>
<script type="text/javascript" src="scripts/thrift.js"></script>
<script type="text/javascript" src="scripts/node_modules/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="scripts/node_modules/jsplumb/dist/js/jsplumb.min.js"></script>
<script type="text/javascript" src="scripts/node_modules/js-cookie/src/js.cookie.js"></script>
Expand Down
1 change: 0 additions & 1 deletion webgui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"dojox" : "^1.11.2",
"dojo-util" : "^1.11.2",
"d3" : "^3.5.6",
"thrift" : "~0.13.0",
"codemirror" : "^5.19.0",
"jquery.fancytree" : "^2.19.0",
"svg-pan-zoom" : "^3.6.1",
Expand Down
Loading