Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions ant-dev/src/ant_dev/cmd_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ def _venv_python() -> str:
"graph": "05-graph.lua", "private": "06-private-data.lua",
},
prep=[lambda cwd: ["luarocks", "--local", "--lua-version=5.4", "make"]],
run=lambda cwd, f: ["lua5.4", f"examples/{f}"],
# `luarocks --local make` installs into ~/.luarocks, which lua5.4
# doesn't pick up by default. Source `luarocks path` so LUA_PATH /
# LUA_CPATH point at the freshly-installed rocks.
run=lambda cwd, f: [
"bash", "-c",
'eval "$(luarocks --local --lua-version=5.4 path)" && exec lua5.4 "examples/$1"',
"--", f,
],
),
"cpp": Adapter(
sdk_dir="antd-cpp",
Expand Down Expand Up @@ -191,9 +198,12 @@ def _venv_python() -> str:
),
"swift": Adapter(
sdk_dir="antd-swift",
examples={},
run=lambda cwd, n: [],
skip_reason="REST/gRPC SDK is macOS-only per antd-swift README",
examples={
"connect": "1", "data": "2", "chunks": "3",
"files": "4", "private": "6", "all": "all",
},
prep=[lambda cwd: ["swift", "build"]],
run=lambda cwd, n: ["swift", "run", "AntdExamples", n],
),
}

Expand Down