Skip to content

Commit

Permalink
Merge pull request #482 from metacall/feature/cli-full-refactor
Browse files Browse the repository at this point in the history
Feature/cli full refactor
  • Loading branch information
viferga authored Feb 8, 2024
2 parents 251ee55 + d1eabd5 commit dd87f8a
Show file tree
Hide file tree
Showing 56 changed files with 1,154 additions and 2,177 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ COMPOSE_PROJECT_NAME='metacall'
# Configure default variables
METACALL_PATH=/usr/local/metacall
METACALL_BUILD_TYPE=relwithdebinfo
METACALL_BASE_IMAGE=debian:bookworm-slim # debian:bullseye-slim # ubuntu:jammy # alpine:3.17
METACALL_BASE_IMAGE=debian:trixie-slim # debian:bookworm-slim # ubuntu:jammy # alpine:3.17
2 changes: 1 addition & 1 deletion .github/workflows/linux-sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
image: ["debian:bookworm-slim", "debian:bullseye-slim", "ubuntu:jammy"]
image: ["debian:trixie-slim", "debian:bookworm-slim", "ubuntu:jammy"]
sanitizer: [address-sanitizer, thread-sanitizer] # TODO: memory-sanitizer not supported by GCC

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
build: [debug, release]
image: ["debian:bookworm-slim", "debian:bullseye-slim", "ubuntu:jammy"] # TODO: "alpine:3.17"
image: ["debian:trixie-slim", "debian:bookworm-slim", "ubuntu:jammy"] # TODO: "alpine:3.17"

steps:
- name: Check out the repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# {build: debug, sanitizer: memory-sanitizer},

# TODO: https://github.com/metacall/core/issues/461
{build: release, sanitizer: without-sanitizer}
# {build: release, sanitizer: without-sanitizer}
]

steps:
Expand Down
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ install_manifest.txt
compile_commands.json
CTestTestfile.cmake

# Avoid ignoring build hooks
!hooks/build
!tools/deps/hooks/build
!tools/dev/hooks/build
!tools/runtime/hooks/build
!tools/cli/hooks/build

# Qt cache
CMakeLists.txt.user
CMakeLists.txt.user.*
Expand Down
23 changes: 8 additions & 15 deletions source/cli/metacallcli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,13 @@ include(SecurityFlags)
#

set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}")
set(inline_path "${CMAKE_CURRENT_SOURCE_DIR}/inline/${target}")
set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source")

set(headers
${include_path}/tokenizer.hpp
${include_path}/parser.hpp
${include_path}/application.hpp
)

set(inline
${inline_path}/parser.inl
)

set(sources
${source_path}/tokenizer.cpp
${source_path}/parser.cpp
${source_path}/application.cpp
${source_path}/main.cpp
)
Expand Down Expand Up @@ -97,9 +88,6 @@ target_include_directories(${target}
${PROJECT_BINARY_DIR}/source/include
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_BINARY_DIR}/include
${PROJECT_BINARY_DIR}/source/inline
${CMAKE_CURRENT_SOURCE_DIR}/inline
${CMAKE_CURRENT_BINARY_DIR}/inline
${DEFAULT_INCLUDE_DIRECTORIES}

PUBLIC
Expand Down Expand Up @@ -173,6 +161,11 @@ add_loader_dependencies(${target}
ts_loader
)

add_dependencies(${target}
cli_repl_plugin
cli_core_plugin
)

#
# Deployment
#
Expand Down Expand Up @@ -234,7 +227,7 @@ if(OPTION_BUILD_LOADERS AND OPTION_BUILD_LOADERS_NODE AND OPTION_BUILD_SCRIPTS A
PROPERTY LABELS ${target}-node
)
set_tests_properties(${target}-node PROPERTIES
PASS_REGULAR_EXPRESSION "700.0"
PASS_REGULAR_EXPRESSION "4001534"
)
test_environment_variables(${target}-node
""
Expand Down Expand Up @@ -374,7 +367,7 @@ if(OPTION_BUILD_LOADERS AND OPTION_BUILD_LOADERS_FILE AND OPTION_BUILD_SCRIPTS A
PROPERTY LABELS ${target}-file-fail
)
set_tests_properties(${target}-file-fail PROPERTIES
PASS_REGULAR_EXPRESSION "Script \\(this-does-not-exist\\) load error in loader \\(file\\)"
PASS_REGULAR_EXPRESSION "Error: Failed to load script 'this-does-not-exist' with loader 'file'"
)
test_environment_variables(${target}-file-fail
""
Expand Down Expand Up @@ -450,7 +443,7 @@ if(OPTION_BUILD_LOADERS AND OPTION_BUILD_LOADERS_TS AND OPTION_BUILD_SCRIPTS AND
PROPERTY LABELS ${target}-ts
)
set_tests_properties(${target}-ts PROPERTIES
PASS_REGULAR_EXPRESSION "9.0"
PASS_REGULAR_EXPRESSION "51354"
)
test_environment_variables(${target}-ts
""
Expand Down
Loading

0 comments on commit dd87f8a

Please sign in to comment.