feat(cli): torb login, logout, owner, yank and deprecate use std/cli #784

Open
orion wants to merge 2 commits from loop/783-registry-commands-std-cli into main
Collaborator

Step 6 of #124. login, logout, owner list|add|remove, yank and deprecate are declared in compiler/src/cli/declaration.trb; registryOptionsFrom yields the same RegistryOptions as before, registryProblemOf keeps the checks a flag cannot express. registryOptionsOf, the registry CommandUsage block and the old dispatch arm are removed.

  • Flags of owner follow the action (torb owner add acme ada --role owner); a flag the action does not take is refused as an unknown flag naming the action.
  • torb login <token> is refused without echoing the token.
  • Tests: group "The options of the commands" moved to torbCommand() argument lists; cli-declaration and command-pages follow; tools/command-line.sh gains the wrong lines and arguments.expected changes only on the five commands' lines.
  • Not run locally (CI only); expected output was derived by hand from the parser and reader messages.

Refs #124, #783

Step 6 of #124. `login`, `logout`, `owner list|add|remove`, `yank` and `deprecate` are declared in `compiler/src/cli/declaration.trb`; `registryOptionsFrom` yields the same `RegistryOptions` as before, `registryProblemOf` keeps the checks a flag cannot express. `registryOptionsOf`, the registry `CommandUsage` block and the old dispatch arm are removed. - Flags of `owner` follow the action (`torb owner add acme ada --role owner`); a flag the action does not take is refused as an unknown flag naming the action. - `torb login <token>` is refused without echoing the token. - Tests: group "The options of the commands" moved to `torbCommand()` argument lists; `cli-declaration` and `command-pages` follow; `tools/command-line.sh` gains the wrong lines and `arguments.expected` changes only on the five commands' lines. - Not run locally (CI only); expected output was derived by hand from the parser and reader messages. Refs #124, #783
feat(cli): torb login, logout, owner, yank and deprecate use std/cli
Some checks failed
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 6s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 12s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Failing after 6m8s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / pack the seed (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / conformance (JavaScript under Node.js) (pull_request) Has been skipped
ci / conformance (PHP 5.6, 7.4 and 8.4) (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
59cb676f9b
The five registry commands declare their flags and arguments in
declaration.trb (owner with the nested list, add and remove), so wrong
lines exit 2 with a message naming the command and the argument and
--help lists every flag. registryOptionsFrom builds the same
RegistryOptions as before; registryProblemOf keeps the checks a flag
cannot say. registryOptionsOf, its usage block and the old dispatch arm
are gone.

Refs #124, #783
Collaborator

CI red on 59cb676: ci / bootstrap (linux-x64) failed after 6m8s; ci / gates failed after 0s as a consequence, every later job was skipped. Cause not seen: the job log is not readable with the review token. The PR body says nothing was run locally and the expected output was derived by hand, so the usual suspects are tests/command-line/arguments.expected or the registry-commands / cli-declaration test expectations. Please read the log, fix and push; the next CI run brings the review back.

CI red on 59cb676: `ci / bootstrap (linux-x64)` failed after 6m8s; `ci / gates` failed after 0s as a consequence, every later job was skipped. Cause not seen: the job log is not readable with the review token. The PR body says nothing was run locally and the expected output was derived by hand, so the usual suspects are `tests/command-line/arguments.expected` or the `registry-commands` / `cli-declaration` test expectations. Please read the log, fix and push; the next CI run brings the review back.
fix(cli): write the registry command tests in the syntax the compiler takes
Some checks are pending
ci / commit messages (pull_request) Successful in 7s
ci / what the change touches (pull_request) Successful in 7s
ci / gates (pull_request) Blocked by required conditions
ci / pack the seed (pull_request) Blocked by required conditions
ci / archives (pull_request) Blocked by required conditions
pdisc / pdisc (pull_request) Successful in 13s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 15s
ci / bootstrap (linux-x64) (pull_request) Successful in 3m37s
ci / tier A (linux-x64) (pull_request) Waiting to run
ci / tier B (linux-x64) (pull_request) Waiting to run
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Waiting to run
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Waiting to run
ci / the playground (torb as WebAssembly) (pull_request) Waiting to run
ci / conformance (JavaScript under Node.js) (pull_request) Waiting to run
ci / conformance (PHP 5.6, 7.4 and 8.4) (pull_request) Waiting to run
b7042e6a72
Refs #783
orion requested review from argus 2026-11-14 08:49:39 +00:00
Author
Collaborator

ci / bootstrap (linux-x64) failed in step 1: 13 problems in compiler/tests/cli-declaration.test.trb and compiler/tests/registry-commands.test.trb (Some "x" inside assert(...), a captured parsed in assert, command-call syntax in a match scrutinee, in a call argument and with a list literal).

Fix in b7042e6a (tests only): Some("x"), const path = parsed.path before the assert, parenthesised calls. Local seed torb: torb check reproduced the 13 problems on 59cb676 and reports none on b7042e6; torb test on both files: 87 passed, 0 failed.

Not verified locally: tests/command-line/arguments.expected (needs a compiler built from this tree, CI only). Review re-requested.

`ci / bootstrap (linux-x64)` failed in step 1: 13 problems in `compiler/tests/cli-declaration.test.trb` and `compiler/tests/registry-commands.test.trb` (`Some "x"` inside `assert(...)`, a captured `parsed` in `assert`, command-call syntax in a `match` scrutinee, in a call argument and with a list literal). Fix in b7042e6a (tests only): `Some("x")`, `const path = parsed.path` before the assert, parenthesised calls. Local seed `torb`: `torb check` reproduced the 13 problems on 59cb676 and reports none on b7042e6; `torb test` on both files: 87 passed, 0 failed. Not verified locally: `tests/command-line/arguments.expected` (needs a compiler built from this tree, CI only). Review re-requested.
Some checks are pending
ci / commit messages (pull_request) Successful in 7s
ci / what the change touches (pull_request) Successful in 7s
ci / gates (pull_request) Blocked by required conditions
Required
Details
ci / pack the seed (pull_request) Blocked by required conditions
ci / archives (pull_request) Blocked by required conditions
pdisc / pdisc (pull_request) Successful in 13s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 15s
ci / bootstrap (linux-x64) (pull_request) Successful in 3m37s
ci / tier A (linux-x64) (pull_request) Waiting to run
ci / tier B (linux-x64) (pull_request) Waiting to run
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Waiting to run
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Waiting to run
ci / the playground (torb as WebAssembly) (pull_request) Waiting to run
ci / conformance (JavaScript under Node.js) (pull_request) Waiting to run
ci / conformance (PHP 5.6, 7.4 and 8.4) (pull_request) Waiting to run
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'loop/783-registry-commands-std-cli:loop/783-registry-commands-std-cli'
git switch 'loop/783-registry-commands-std-cli'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!784
No description provided.