Skip to content

Commit

Permalink
Merge pull request #45 from JohanMabille/isolation
Browse files Browse the repository at this point in the history
Moved xauthentication.hpp and xzmq_serializer.hpp to src folder
  • Loading branch information
JohanMabille authored Apr 12, 2024
2 parents 928a044 + 8ed01d0 commit c4cf0b7
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 25 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ find_package(OpenSSL REQUIRED)
# ============

set(XEUS_ZMQ_HEADERS
${XEUS_ZMQ_INCLUDE_DIR}/xeus-zmq/xauthentication.hpp
${XEUS_ZMQ_INCLUDE_DIR}/xeus-zmq/xclient_zmq.hpp
${XEUS_ZMQ_INCLUDE_DIR}/xeus-zmq/xdap_tcp_client.hpp
${XEUS_ZMQ_INCLUDE_DIR}/xeus-zmq/xdebugger_base.hpp
Expand All @@ -132,11 +131,11 @@ set(XEUS_ZMQ_HEADERS
${XEUS_ZMQ_INCLUDE_DIR}/xeus-zmq/xserver_zmq.hpp
${XEUS_ZMQ_INCLUDE_DIR}/xeus-zmq/xthread.hpp
${XEUS_ZMQ_INCLUDE_DIR}/xeus-zmq/xzmq_context.hpp
${XEUS_ZMQ_INCLUDE_DIR}/xeus-zmq/xzmq_serializer.hpp
)

set(XEUS_ZMQ_SOURCES
${XEUS_ZMQ_SOURCE_DIR}/xauthentication.cpp
${XEUS_ZMQ_SOURCE_DIR}/xauthentication.hpp
${XEUS_ZMQ_SOURCE_DIR}/xclient_zmq.cpp
${XEUS_ZMQ_SOURCE_DIR}/xclient_messenger.hpp
${XEUS_ZMQ_SOURCE_DIR}/xclient_messenger.cpp
Expand Down Expand Up @@ -181,6 +180,7 @@ set(XEUS_ZMQ_SOURCES
${XEUS_ZMQ_SOURCE_DIR}/xzmq_messenger.hpp
${XEUS_ZMQ_SOURCE_DIR}/xzmq_messenger.cpp
${XEUS_ZMQ_SOURCE_DIR}/xzmq_serializer.cpp
${XEUS_ZMQ_SOURCE_DIR}/xzmq_serializer.hpp
)

# Targets and link
Expand Down
2 changes: 1 addition & 1 deletion src/xauthentication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#endif

#include "xeus/xstring_utils.hpp"
#include "xeus-zmq/xauthentication.hpp"
#include "xauthentication.hpp"

namespace xeus
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
#include <memory>
#include <string>

#include "xeus-zmq.hpp"

namespace xeus
{
class XEUS_ZMQ_API xraw_buffer
class xraw_buffer
{
public:

Expand All @@ -33,7 +31,7 @@ namespace xeus
size_t m_size;
};

class XEUS_ZMQ_API xauthentication
class xauthentication
{
public:

Expand Down Expand Up @@ -74,7 +72,6 @@ namespace xeus
const xraw_buffer& content) const = 0;
};

XEUS_ZMQ_API
std::unique_ptr<xauthentication> make_xauthentication(const std::string& scheme,
const std::string& key);
}
Expand Down
4 changes: 2 additions & 2 deletions src/xclient_zmq_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

#include <iostream>

#include "xeus-zmq/xauthentication.hpp"
#include "xauthentication.hpp"
#include "xclient_zmq_impl.hpp"
#include "xeus-zmq/xzmq_serializer.hpp"
#include "xzmq_serializer.hpp"

namespace xeus
{
Expand Down
2 changes: 1 addition & 1 deletion src/xdap_tcp_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#include "zmq_addon.hpp"
#include "nlohmann/json.hpp"
#include "xeus/xmessage.hpp"
#include "xeus-zmq/xzmq_serializer.hpp"
#include "xeus-zmq/xdap_tcp_client.hpp"
#include "xdap_tcp_client_impl.hpp"
#include "xzmq_serializer.hpp"

namespace xeus
{
Expand Down
2 changes: 1 addition & 1 deletion src/xdap_tcp_client_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include "zmq_addon.hpp"
#include "nlohmann/json.hpp"
#include "xeus/xmessage.hpp"
#include "xeus-zmq/xzmq_serializer.hpp"
#include "xdap_tcp_client_impl.hpp"
#include "xzmq_serializer.hpp"

namespace xeus
{
Expand Down
2 changes: 1 addition & 1 deletion src/xdap_tcp_client_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include "xeus/xkernel_configuration.hpp"
#include "xeus/xeus_context.hpp"

#include "xeus-zmq/xauthentication.hpp"
#include "xeus-zmq/xdap_tcp_client.hpp"
#include "xauthentication.hpp"

namespace nl = nlohmann;

Expand Down
3 changes: 1 addition & 2 deletions src/xiopub_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@

#include <iostream>

#include "xeus-zmq/xzmq_serializer.hpp"

#include "xiopub_client.hpp"
#include "xclient_zmq_impl.hpp"
#include "xmiddleware_impl.hpp"
#include "xzmq_serializer.hpp"

namespace xeus
{
Expand Down
4 changes: 2 additions & 2 deletions src/xserver_zmq_default.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <iostream>

#include "xeus/xguid.hpp"
#include "xeus-zmq/xauthentication.hpp"
#include "xeus-zmq/xzmq_serializer.hpp"
#include "xauthentication.hpp"
#include "xzmq_serializer.hpp"
#include "xserver_zmq_default.hpp"
#include "xmiddleware_impl.hpp"
#include "xpublisher.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/xserver_zmq_split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

#include "zmq_addon.hpp"
#include "xeus/xguid.hpp"
#include "xeus-zmq/xauthentication.hpp"
#include "xeus-zmq/xmiddleware.hpp"
#include "xeus-zmq/xzmq_serializer.hpp"
#include "xauthentication.hpp"
#include "xzmq_serializer.hpp"
#include "xserver_zmq_split.hpp"
#include "xcontrol.hpp"
#include "xheartbeat.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/xzmq_serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* The full license is in the file LICENSE, distributed with this software. *
****************************************************************************/

#include "xeus-zmq/xzmq_serializer.hpp"
#include "xzmq_serializer.hpp"

namespace xeus
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@

#include "xeus/xmessage.hpp"

#include "xeus-zmq.hpp"
#include "xauthentication.hpp"

namespace xeus
{
class XEUS_ZMQ_API xzmq_serializer
class xzmq_serializer
{
public:

Expand Down
4 changes: 3 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ set_tests_properties(test_kernel_shell
PROPERTIES
ENVIRONMENT "JUPYTER_PATH=${CMAKE_CURRENT_BINARY_DIR}")

if (UNIX)
# TODO: enable this again when the ipc client
# is implemented
if (FALSE)

# Test_kernel_ipc
# ===============
Expand Down
9 changes: 7 additions & 2 deletions test/client_ipc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
* The full license is in the file LICENSE, distributed with this software. *
****************************************************************************/

#include <iostream>
// TODO: this client should be reimplemented with
// the new client framework. Notice that it was not
// tested in the CI but was here for trying to reproduce
// some issue with IPC.

/*#include <iostream>
#include "zmq_addon.hpp"
#include "nlohmann/json.hpp"
Expand Down Expand Up @@ -53,5 +58,5 @@ int main(int, char**)
std::cout << resp.content().dump(4) << std::endl;
return 0;
}
}*/

0 comments on commit c4cf0b7

Please sign in to comment.