Skip to content

Commit bfbd9ff

Browse files
authored
Merge pull request #13 from JohanMabille/upgrade_xeus
Upgraded to xeus 5
2 parents ca30c6b + f37d4ee commit bfbd9ff

File tree

7 files changed

+10
-33
lines changed

7 files changed

+10
-33
lines changed

BuildWasmDockerfile

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,6 @@ RUN mkdir -p /install/lib
1010
# make install dir
1111
RUN mkdir install
1212

13-
##################################################################
14-
# xtl
15-
##################################################################
16-
17-
RUN mkdir -p /deps/xtl/build && \
18-
git clone --branch 0.7.2 https://github.com/xtensor-stack/xtl.git /deps/xtl/src
19-
#RUN cd /deps/xtl/src && git checkout tags/0.7.2
20-
21-
RUN cd /deps/xtl/build && \
22-
emcmake cmake ../src/ -DCMAKE_INSTALL_PREFIX=/install
23-
24-
RUN cd /deps/xtl/build && \
25-
emmake make -j8 install
26-
27-
2813
##################################################################
2914
# nloman json
3015
##################################################################
@@ -42,15 +27,14 @@ RUN cd /deps/nlohmannjson/build && \
4227
##################################################################
4328

4429
RUN mkdir -p /deps/xeus/build
45-
RUN git clone --branch 4.0.1 https://github.com/jupyter-xeus/xeus.git /deps/xeus/src
30+
RUN git clone --branch 5.0.0 https://github.com/jupyter-xeus/xeus.git /deps/xeus/src
4631

4732
#COPY xeus /deps/xeus/src
4833

4934
RUN cd /deps/xeus/build && \
5035
emcmake cmake ../src \
5136
-DCMAKE_INSTALL_PREFIX=/install \
5237
-Dnlohmann_json_DIR=/install/share/cmake/nlohmann_json \
53-
-Dxtl_DIR=/install/share/cmake/xtl \
5438
-DXEUS_EMSCRIPTEN_WASM_BUILD=ON
5539

5640
RUN cd /deps/xeus/build && \
@@ -69,7 +53,6 @@ RUN mkdir -p /xeus-build && cd /xeus-build && \
6953
emcmake cmake .. \
7054
-DCMAKE_INSTALL_PREFIX=/install \
7155
-Dnlohmann_json_DIR=/install/share/cmake/nlohmann_json \
72-
-Dxtl_DIR=/install/share/cmake/xtl \
7356
-Dxeus_DIR=/install/lib/cmake/xeus \
7457
-DXEUS_LITE_BUILD_BROWSER_TEST_KERNEL=ON \
7558
-DXEUS_LITE_BUILD_NODE_TESTS=ON

CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,7 @@ message(STATUS "XEUS_LITE_BUILD_NODE_TESTS: ${XEUS_LITE_BUILD_NOD
5454
# Dependencies
5555
# ============
5656

57-
set(xtl_REQUIRED_VERSION 0.7)
58-
set(xeus_REQUIRED_VERSION 4.0.0)
59-
60-
if (NOT TARGET xtl)
61-
find_package(xtl ${xtl_REQUIRED_VERSION} REQUIRED)
62-
endif ()
57+
set(xeus_REQUIRED_VERSION 5.0.0)
6358

6459
if (NOT TARGET xeus)
6560
find_package(xeus ${xeus_REQUIRED_VERSION} REQUIRED)
@@ -93,7 +88,6 @@ target_include_directories(
9388
)
9489
target_link_libraries(
9590
xeus-lite
96-
PUBLIC xtl
9791
PUBLIC xeus-static
9892
)
9993

include/xeus-lite/xembind.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#ifndef XEUS_LITE_XEMBIND_HPP
1111
#define XEUS_LITE_XEMBIND_HPP
1212

13+
#include <memory>
1314
#include <string>
1415

1516
#include "xeus/xkernel.hpp"

test/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010

1111
if(XEUS_LITE_BUILD_NODE_TESTS)
1212
add_executable(emscripten_wasm_test main_emscripten_wasm.cpp xmock_interpreter.cpp)
13+
target_compile_features(emscripten_wasm_test PRIVATE cxx_std_17)
1314
target_link_libraries(emscripten_wasm_test PRIVATE xeus-lite)
1415
xeus_wasm_compile_options(emscripten_wasm_test)
1516
xeus_wasm_link_options(emscripten_wasm_test "node")
1617
endif()
1718

1819
if(XEUS_LITE_BUILD_BROWSER_TEST_KERNEL)
1920
add_executable(xlite main_emscripten_wasm.cpp xmock_interpreter.cpp)
21+
target_compile_features(xlite PRIVATE cxx_std_17)
2022
target_link_libraries(xlite PRIVATE xeus-lite)
2123
xeus_wasm_compile_options(xlite)
2224
xeus_wasm_link_options(xlite "web,worker")

test/xmock_interpreter.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,20 @@ namespace xeus
2929
using function_type = std::function<void(xeus::xcomm&&, const xeus::xmessage&)>;
3030
}
3131

32-
void xmock_interpreter::execute_request_impl(xrequest_context request_context,
33-
send_reply_callback cb,
32+
void xmock_interpreter::execute_request_impl(send_reply_callback cb,
3433
int execution_counter,
3534
const std::string& code,
3635
execute_request_config config,
3736
nl::json /* user_expressions */)
3837
{
3938
if (code.compare("hello, world") == 0)
4039
{
41-
publish_stream(request_context, "stdout", code);
40+
publish_stream("stdout", code);
4241
}
4342

4443
if (code.compare("error") == 0)
4544
{
46-
publish_stream(request_context, "stderr", code);
45+
publish_stream("stderr", code);
4746
}
4847

4948
if (code.compare("?") == 0)
@@ -67,7 +66,7 @@ namespace xeus
6766

6867
nl::json pub_data;
6968
pub_data["text/plain"] = code;
70-
publish_execution_result(request_context, execution_counter, std::move(pub_data), nl::json::object());
69+
publish_execution_result(execution_counter, std::move(pub_data), nl::json::object());
7170

7271
cb(xeus::create_successful_reply());
7372
return;

test/xmock_interpreter.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ namespace xeus
2626

2727
void configure_impl() override;
2828

29-
void execute_request_impl(xrequest_context context,
30-
send_reply_callback cb,
29+
void execute_request_impl(send_reply_callback cb,
3130
int execution_counter,
3231
const std::string& code,
3332
execute_request_config config,

xeus-liteConfig.cmake.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR};${CMAKE_MODULE_PATH}")
2323
@XEUS_LITE_CONFIG_CODE@
2424

2525
include(CMakeFindDependencyMacro)
26-
find_dependency(xtl @xtl_REQUIRED_VERSION@)
2726
find_dependency(xeus @xeus_REQUIRED_VERSION@)
2827

2928
if(NOT TARGET xeus-lite)

0 commit comments

Comments
 (0)