Rewrite your app in Rust, piece by piece, checked against the original at every step. Works with TypeScript, JavaScript, Python, Go, Ruby, Java, C, PHP, C#, Kotlin, PowerShell and Swift.
Rust agent-skillsclaude-codeclicode-migrationcodexffigolangjavajavascriptmcpmigrationnapiperformanceportingpyo3pythonrewriterubyrusttypescript
fix(app): give front-door's server hint the --http switch without a value (#1522)
RRFZcdb41c71f5b7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 715e5f6c..0488c449 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -42,6 +42,11 @@`Environment.UserDomainName`, `Environment.GetCommandLineArgs` and `AppContext.BaseDirectory`count as reading the environment, as `Environment.CurrentDirectory` does, so `bridge` keeps amethod that reads one in C# and `analyze` lists it under "State outside the arguments" (#1449).+- `app front-door`, when it reads a folder as a library and finds no export, gives the full server+ command, `` `rust-anything app record <repo> --http -- <command>` ``, and says that requests its+ docs do not show go in `--inputs <requests.jsonl>` before `--`. Before, it said to add `--http+ <requests.jsonl>`, but `--http` takes no value: the file was refused as an extra argument, or+ taken for the repository (#1458, #1522 by @Plastic-time).- `docs/STATUS.md` and its Tamil copy no longer list a CLI front door under Python's `package`cell: `package` lays out npm packages only for the front door of a Node CLI (run as`node node_modules/<package>/<file>`) and refuses any other, such as `python3 tool.py`. The testdiff --git a/src/front_door.rs b/src/front_door.rsindex b6eb2d67..c02c93f1 100644--- a/src/front_door.rs+++ b/src/front_door.rs@@ -1057,11 +1057,12 @@ fn library_front_door(ensure!(!state.api.is_empty(),"read {} as a library and found no exported function or class. \- For a CLI, first run `rust-anything app record {} -- <command>`. \- For a server, add `--http <requests.jsonl>` before `--`. \+ For a CLI, first run `rust-anything app record {repo} -- <command>`. \+ For a server, first run `rust-anything app record {repo} --http -- <command>`; add \+ `--inputs <requests.jsonl>` before `--` for requests its docs do not show. \For a library, check that this folder is its root.",repo.display(),- app::cli_path(repo)+ repo = app::cli_path(repo));let files: Vec<(&str, String)> = vec![("Cargo.toml", crate::library::cargo_toml(&package, &name)),diff --git a/tests/app.rs b/tests/app.rsindex 6a700740..b8ef8e11 100644--- a/tests/app.rs+++ b/tests/app.rs@@ -1668,10 +1668,10 @@ fn a_library_front_door_names_the_folder_when_no_exports_are_read() {.output().unwrap();let repo_name = repo.file_name().unwrap().to_str().unwrap().to_owned();- let suggested_command = format!(- "rust-anything app record {} -- <command>",- app::cli_path(repo.canonical().unwrap())- );+ let cli_repo = app::cli_path(repo.canonical().unwrap());+ let suggested_command = format!("rust-anything app record {cli_repo} -- <command>");+ // Issue #1458: `--http` is a switch, so the server form must not give it a value.+ let suggested_server = format!("rust-anything app record {cli_repo} --http -- <command>");std::fs::remove_dir_all(&repo).unwrap();assert!(!out.status.success(), "{out:?}");@@ -1679,6 +1679,12 @@ fn a_library_front_door_names_the_folder_when_no_exports_are_read() {assert!(error.contains(&repo_name), "{error}");assert!(error.contains("as a library"), "{error}");assert!(error.contains(&suggested_command), "{error}");+ assert!(error.contains(&suggested_server), "{error}");+ assert!(+ error.contains("add `--inputs <requests.jsonl>` before `--`"),+ "{error}"+ );+ assert!(!error.contains("--http <"), "{error}");assert!(error.contains("check that this folder is its root"),"{error}"