Bug
ant dev example <name> -l <language> advertises itself as the way to run the bundled examples, but only Python and C# are wired up. Every other SDK in this repo (antd-cpp, antd-dart, antd-elixir, antd-go, antd-java, antd-js, antd-kotlin, antd-lua, antd-php, antd-ruby, antd-rust, antd-swift, antd-zig) ships runnable examples in its own directory, but the CLI can't reach them:
$ ant dev example --help
usage: ant dev example [-h] [-l {python,csharp}] name
Location
ant-dev/src/ant_dev/cmd_example.py:
def run(args) -> None:
...
if lang == "python":
_run_python(sdk_root, name)
else:
_run_csharp(sdk_root, name)
Only _run_python and _run_csharp exist; the parser also hardcodes choices=["python","csharp"] (see ant-dev/src/ant_dev/cli.py).
What examples exist today
I cloned main and looked at each SDK directory. All 14 desktop SDKs have example source files (Kotlin's are bundled into one Main.kt dispatched by arg; macOS-only Swift has Sources/AntdExamples/Main.swift):
| SDK |
Example sources |
Invocation today |
| antd-cpp |
examples/01-connect.cpp, 02-data.cpp, … |
CMake build + run binary |
| antd-dart |
example/01_connect.dart, … |
dart run example/02_data.dart |
| antd-elixir |
examples/01_connect.exs, … |
elixir examples/02_data.exs |
| antd-go |
examples/02-data/main.go, … |
cd examples/02-data && go run . |
| antd-java |
Example02PublicData.java, … |
javac + java -cp … |
| antd-js |
examples/02-data.ts, … |
npx tsx examples/02-data.ts |
| antd-kotlin |
examples/src/main/kotlin/…/Main.kt |
./gradlew :examples:run --args="2" |
| antd-lua |
examples/02-data.lua, … |
lua examples/02-data.lua |
| antd-php |
examples/02-data.php, … |
php examples/02-data.php |
| antd-ruby |
examples/02_data.rb, … |
ruby examples/02_data.rb |
| antd-rust |
examples/02-data.rs, … |
cargo run --example 02-data |
| antd-swift |
Sources/AntdExamples/Main.swift |
swift run (macOS) |
| antd-zig |
examples/02-data.zig, … |
zig build run-02-data |
Suggested shape of the fix
Three reasonable directions, in increasing scope:
-
Plugin per language. Each SDK ships a examples/.runner.json (or a [tool.ant-dev.examples] block in its native manifest) describing how to build and invoke each example. ant-dev reads the file and dispatches — no per-language Python in ant-dev.
-
Hard-coded dispatchers in ant-dev, one _run_<lang> per SDK that just shells out the canonical command above. Cheap to ship, but ant-dev grows whenever a new SDK joins.
-
Status quo + escape hatch: leave ant dev example to python+csharp, but add ant dev shell -l <lang> that drops you into the SDK directory with the right env set up. Users run examples themselves.
(1) feels right long-term, (2) is fine as a stopgap.
Why this matters
For anyone standing up a testbox (e.g. cross-language verification of a data round-trip), it's not obvious from the CLI alone that 13/15 SDKs aren't usable through ant dev example. Hitting this lengthens onboarding noticeably.
Surfaced while building a multi-language testbox — happy to take a stab at (2) if there's interest.
Bug
ant dev example <name> -l <language>advertises itself as the way to run the bundled examples, but only Python and C# are wired up. Every other SDK in this repo (antd-cpp,antd-dart,antd-elixir,antd-go,antd-java,antd-js,antd-kotlin,antd-lua,antd-php,antd-ruby,antd-rust,antd-swift,antd-zig) ships runnable examples in its own directory, but the CLI can't reach them:Location
ant-dev/src/ant_dev/cmd_example.py:Only
_run_pythonand_run_csharpexist; the parser also hardcodeschoices=["python","csharp"](seeant-dev/src/ant_dev/cli.py).What examples exist today
I cloned
mainand looked at each SDK directory. All 14 desktop SDKs have example source files (Kotlin's are bundled into oneMain.ktdispatched by arg; macOS-only Swift hasSources/AntdExamples/Main.swift):examples/01-connect.cpp,02-data.cpp, …example/01_connect.dart, …dart run example/02_data.dartexamples/01_connect.exs, …elixir examples/02_data.exsexamples/02-data/main.go, …cd examples/02-data && go run .Example02PublicData.java, …javac+java -cp …examples/02-data.ts, …npx tsx examples/02-data.tsexamples/src/main/kotlin/…/Main.kt./gradlew :examples:run --args="2"examples/02-data.lua, …lua examples/02-data.luaexamples/02-data.php, …php examples/02-data.phpexamples/02_data.rb, …ruby examples/02_data.rbexamples/02-data.rs, …cargo run --example 02-dataSources/AntdExamples/Main.swiftswift run(macOS)examples/02-data.zig, …zig build run-02-dataSuggested shape of the fix
Three reasonable directions, in increasing scope:
Plugin per language. Each SDK ships a
examples/.runner.json(or a[tool.ant-dev.examples]block in its native manifest) describing how to build and invoke each example.ant-devreads the file and dispatches — no per-language Python inant-dev.Hard-coded dispatchers in
ant-dev, one_run_<lang>per SDK that just shells out the canonical command above. Cheap to ship, butant-devgrows whenever a new SDK joins.Status quo + escape hatch: leave
ant dev exampleto python+csharp, but addant dev shell -l <lang>that drops you into the SDK directory with the right env set up. Users run examples themselves.(1) feels right long-term, (2) is fine as a stopgap.
Why this matters
For anyone standing up a testbox (e.g. cross-language verification of a
dataround-trip), it's not obvious from the CLI alone that 13/15 SDKs aren't usable throughant dev example. Hitting this lengthens onboarding noticeably.Surfaced while building a multi-language testbox — happy to take a stab at (2) if there's interest.