Skip to content

Commit 4031837

Browse files
committed
refactor(cli): move repl engine to reply module
1 parent 89f8a9d commit 4031837

23 files changed

Lines changed: 33 additions & 4734 deletions

CMakeLists.txt

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ function(vix_append_if_exists out_var path_value)
7777
endif()
7878
endfunction()
7979

80+
# ----------------------------------------------------
81+
# Reply module
82+
# - The CLI REPL command depends on vix::reply.
83+
# - Load it before umbrella/core short-circuit branches.
84+
# ----------------------------------------------------
85+
get_filename_component(_VIX_MODULES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE)
86+
set(_VIX_REPLY_DIR "${_VIX_MODULES_DIR}/reply")
87+
88+
if (EXISTS "${_VIX_REPLY_DIR}/CMakeLists.txt" AND NOT TARGET vix::reply)
89+
add_subdirectory("${_VIX_REPLY_DIR}" "${CMAKE_BINARY_DIR}/_vix_reply")
90+
endif()
91+
8092
# ----------------------------------------------------
8193
# Link dependencies
8294
# Priority:
@@ -88,18 +100,25 @@ if (TARGET vix::vix)
88100
message(STATUS "[cli] Using umbrella target vix::vix")
89101
target_link_libraries(vix_cli PRIVATE vix::vix)
90102

103+
if (TARGET vix::reply)
104+
target_link_libraries(vix_cli PRIVATE vix::reply)
105+
endif()
106+
91107
elseif (TARGET vix::core)
92108
message(STATUS "[cli] Using umbrella target vix::core")
93109
target_link_libraries(vix_cli PRIVATE vix::core)
94110

111+
if (TARGET vix::reply)
112+
target_link_libraries(vix_cli PRIVATE vix::reply)
113+
endif()
114+
95115
else()
96116
get_filename_component(_VIX_MODULES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE)
97117

98118
set(_VIX_CORE_DIR "${_VIX_MODULES_DIR}/core")
99119
set(_VIX_UTILS_DIR "${_VIX_MODULES_DIR}/utils")
100120
set(_VIX_ASYNC_DIR "${_VIX_MODULES_DIR}/async")
101121
set(_VIX_JSON_DIR "${_VIX_MODULES_DIR}/json")
102-
set(_VIX_REPLY_DIR "${_VIX_MODULES_DIR}/reply")
103122
set(_VIX_TEMPLATE_DIR "${_VIX_MODULES_DIR}/template")
104123
set(_VIX_NET_DIR "${_VIX_MODULES_DIR}/net")
105124
set(_VIX_CRYPTO_DIR "${_VIX_MODULES_DIR}/crypto")

include/vix/cli/commands/repl/ReplConsole.hpp

Lines changed: 0 additions & 33 deletions
This file was deleted.

include/vix/cli/commands/repl/ReplDetail.hpp

Lines changed: 0 additions & 40 deletions
This file was deleted.

include/vix/cli/commands/repl/ReplDispatcher.hpp

Lines changed: 0 additions & 38 deletions
This file was deleted.

include/vix/cli/commands/repl/ReplFlow.hpp

Lines changed: 0 additions & 21 deletions
This file was deleted.

include/vix/cli/commands/repl/ReplHistory.hpp

Lines changed: 0 additions & 42 deletions
This file was deleted.

include/vix/cli/commands/repl/ReplLineEditor.hpp

Lines changed: 0 additions & 50 deletions
This file was deleted.

include/vix/cli/commands/repl/ReplMath.hpp

Lines changed: 0 additions & 35 deletions
This file was deleted.

include/vix/cli/commands/repl/ReplUtils.hpp

Lines changed: 0 additions & 42 deletions
This file was deleted.

include/vix/cli/commands/repl/api/ReplApi.hpp

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)