Files
clice/pixi.toml
ykiko c14b8de18f chore: remove xmake, clean up unused files, simplify CLI parsing (#392)
## Summary
- **Remove xmake build system**: delete `xmake.lua`, `test-xmake.yml`
workflow, and all xmake-related pixi tasks
- **Migrate packaging to CMake**: `publish-clice.yml` now uses `cmake
-DCLICE_RELEASE=ON` instead of xmake pack
- **Clean up**: remove unused `tests/uv.lock`, `.xmake/` from
`.gitignore`, xmake references from docs
- **Benchmark CI**: change trigger from `pull_request` to
`workflow_dispatch` (manual only)
- **Simplify CLI parsing**: use `DecoKV(style =
KVStyle::JoinedOrSeparate)` in `clice.cc` and `unit_tests.cc`, replacing
verbose `DecoKVStyled` with manual `static_cast` bitmask; use comma
separators; explicit `names` only for underscore fields

## Test plan
- [x] `pixi run cmake-build RelWithDebInfo` compiles successfully
- [x] Verify `pixi run test` passes
- [x] Verify `pixi run package` produces correct archives via CMake
release build
- [x] Verify benchmark workflow can be triggered manually via `gh
workflow run benchmark`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Consolidated CI workflows; some automated triggers converted to manual
invocation
* Standardized shell for workflow steps and removed legacy build
workflow
* Switched packaging/build tasks to a CMake/Ninja flow and updated
artifact paths
  * Adjusted ignore rules to include previously-ignored build metadata

* **Documentation**
* Removed XMake-specific build and test instructions; docs now reflect
the CMake-based workflow

* **Style**
* Updated CLI option declaration style (no user-facing flag name
changes)

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 17:33:20 +08:00

208 lines
6.4 KiB
TOML

# tombi: format.rules.table-keys-order.disabled = true
[workspace]
name = "clice"
version = "0.1.0"
description = "A next-generation C++ language server for modern C++"
authors = [
"ykiko <ykiko@clice.io>",
"clice contributors <clice@clice.io>",
]
license = "Apache-2.0"
license-file = "LICENSE"
readme = "README.md"
documentation = "https://docs.clice.io/clice/"
repository = "https://github.com/clice-io/clice"
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-arm64"]
[environments]
default = ["build", "test"]
package = ["build", "test", "package"]
node = ["node"]
format = ["format"]
# ============================================================================== #
# DEPENDENCIES #
# ============================================================================== #
[feature.build.dependencies]
python = ">=3.13"
cmake = ">=3.30"
ninja = "*"
clang = "==20.1.8"
clangxx = "==20.1.8"
lld = "==20.1.8"
llvm-tools = "==20.1.8"
compiler-rt = "==20.1.8"
[feature.build.target.win-64.dependencies]
sccache = "*"
[feature.build.target.linux-64.dependencies]
sysroot_linux-64 = "==2.17"
gcc = "==14.2.0"
gxx = "==14.2.0"
ccache = "*"
[feature.build.target.osx-arm64.dependencies]
ccache = "*"
[feature.build.target.linux-64.activation]
scripts = ["scripts/activate_linux.sh"]
[feature.build.target.win-64.activation]
scripts = ["scripts/activate_asan.bat"]
[feature.test.pypi-dependencies]
pytest = "*"
pytest-asyncio = ">=1.1.0"
pygls = ">=2.0.0"
lsprotocol = ">=2024.0.0"
[feature.package.dependencies]
xz = ">=5.8.1,<6"
[feature.package.tasks.package]
cmd = """
cmake -B build/RelWithDebInfo -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake \
-DCLICE_RELEASE=ON && \
cmake --build build/RelWithDebInfo
"""
# ============================================================================== #
# CMAKE #
# ============================================================================== #
[feature.build.tasks.cmake-config]
args = [
{ arg = "type", default = "RelWithDebInfo" },
{ arg = "ci", default = "OFF" },
{ arg = "extra", default = "" },
]
cmd = """
cmake -B build/{{ type }} -G Ninja \
-DCMAKE_BUILD_TYPE={{ type }} \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake \
-DCLICE_ENABLE_TEST=ON \
-DCLICE_CI_ENVIRONMENT={{ ci }} {{extra}} \
"""
[feature.build.tasks.cmake-build]
args = [{ arg = "type", default = "RelWithDebInfo" }]
cmd = "cmake --build build/{{ type }}"
[feature.build.tasks.build]
args = [
{ arg = "type", default = "RelWithDebInfo" },
{ arg = "ci", default = "OFF" },
{ arg = "extra", default = "" },
]
depends-on = [
{ task = "cmake-config", args = ["{{ type }}", "{{ ci }}", "{{extra}}"] },
{ task = "cmake-build", args = ["{{ type }}"] },
]
[feature.build.tasks.unit-test]
args = [{ arg = "type", default = "RelWithDebInfo" }]
cmd = './build/{{ type }}/bin/unit_tests --test-dir="./tests/data"'
[feature.test.tasks.integration-test]
args = [{ arg = "type", default = "RelWithDebInfo" }]
cmd = """
pytest -s --log-cli-level=INFO tests/integration \
--executable=./build/{{ type }}/bin/clice
"""
[feature.test.tasks.smoke-test]
args = [{ arg = "type", default = "RelWithDebInfo" }]
cmd = """
python tests/replay.py tests/smoke/*.jsonl \
--clice=./build/{{ type }}/bin/clice
"""
[feature.test.tasks.test]
args = [{ arg = "type", default = "RelWithDebInfo" }]
depends-on = [
{ task = "unit-test", args = ["{{ type }}"] },
{ task = "integration-test", args = ["{{ type }}"] },
]
# ============================================================================== #
# HELPER TASKS #
# ============================================================================== #
[tasks.build-llvm]
cmd = ["python3", "scripts/build-llvm.py"]
[tasks.upload-llvm]
args = ["workflow_id", "llvm_version", { "arg" = "branch", default = "main" }]
cmd = """
gh workflow run upload-llvm.yml \
--ref {{ branch }} \
--field workflow_id={{workflow_id}} \
--field version={{llvm_version}}
"""
[tasks.delete-artifacts]
args = ["file_name"]
cmd = ["scripts/delete-artifacts.bash", "{{ file_name }}"]
# ============================================================================== #
# DOCS & VSCODE EXTENSION #
# ============================================================================== #
[feature.node.dependencies]
nodejs = ">=20"
pnpm = "*"
[feature.node.tasks]
build-docs = { cwd = "docs", cmd = "pnpm run docs:build", depends-on = ["install-docs"] }
preview-docs = { cwd = "docs", cmd = "pnpm run docs:preview", depends-on = ["install-docs"] }
build-vscode = { cwd = "editors/vscode", cmd = "pnpm run package", depends-on = ["install-vscode"] }
publish-vscode = { cwd = "editors/vscode", cmd = "pnpm run publish", depends-on = ["install-vscode"] }
[feature.node.tasks.install-docs]
cwd = "docs"
cmd = "pnpm install"
inputs = ["docs/package.json", "docs/pnpm-lock.yaml"]
outputs = ["docs/node_modules/.modules.yaml"]
[feature.node.tasks.install-vscode]
cwd = "editors/vscode"
cmd = "pnpm install"
inputs = ["editors/vscode/package.json", "editors/vscode/pnpm-lock.yaml"]
outputs = ["editors/vscode/node_modules/.modules.yaml"]
# ============================================================================== #
# FORMAT #
# ============================================================================== #
[feature.format.dependencies]
ruff = "*"
tombi = "*"
stylua = "*"
fd-find = "*"
prettier = "*"
clang-format = "==21.1.7"
[feature.format.tasks]
format-cpp = "fd -H -e cpp -e h -e cc -e hpp -e cppm -x clang-format -i"
format-python = "ruff format ."
format-lua = "stylua ."
format-web = "fd -H -e js -e ts -e css -x prettier --write"
format-markdown = "fd -H -e md -x prettier --write"
format-json = "fd -H -e json -E package-lock.json -x prettier --write"
format-toml = "fd -H -e toml -x tombi format"
format-yaml = """
fd -H -e yaml -e yml -E pnpm-lock.yaml -x prettier --write && \
fd -H "^\\.clang-(format|tidy)$" -x prettier --write --parser yaml
"""
format = { depends-on = [
"format-cpp",
"format-python",
"format-lua",
"format-web",
"format-markdown",
"format-json",
"format-toml",
"format-yaml"
] }