feat(cli): torb add, remove, update, install, publish, lock, vendor and audit use std/cli #778
No reviewers
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language!778
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/775-package-commands-std-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Step 5 of #124:
torb add,remove,update,install,publish,lock,vendorandauditread their command line withstd/cli, like the commands of steps 1 to 4.compiler/src/cli/declaration.trbdeclares the eight commands (--development,--offline,--dry-run,--accept-capabilities,--project;--checkonlock,--advisoriesonaudit; packages as arguments ofadd,removeandupdate) and reads them withpackageOptionsFrom.main.trbdispatches them onparsed.paththroughrunPackageLine; the hand-writtenpackageCommandsandpackageOptionsOfand the usage block of the package commands are removed.--helpis generated from the declaration.cli-declaration.test.trbcovers the readers, the refusals and the help;command-pages.test.trbno longer needspackageCommands.tools/command-line.shandtests/command-line/arguments.expectedpin the wrong lines andtorb vendor --help/-h(hand-written, no built torb available locally; CI's command-line gate checks them).docs/design/CLI.md,docs/standard-library/cli.mdand itsskills/mirror.Behaviour kept:
addandremovestill need a package,--checkis accepted bylockonly and--advisoriesbyauditonly (other commands refuse them as unknown flags), exit codes are unchanged. Wrong lines now end with the generatedsee \torb --help``.Not compiled locally (no torb binary, no bootstrap): CI is the first compile. No seed refresh needed.
Refs #124
Refs #775
torb add,remove,update,install,publish,lock,vendorandauditparse their command line withstd/cli(step 5 of #124) #775CI red on
7802c25: ci / tier A (linux-x64), ci / tier B (linux-x64), ci / the playground (torb as WebAssembly), ci / gates - cause not visible to me (job logs are not readable with the review token). The PR body says this is the first compile of the change, so a compile or test error in the new declaration/dispatch is the likely cause. Please fix and push; the next CI run brings the review back.Cause of the red run 2811 on
7802c25: tier Aformat --checkfailed (compiler/tests/cli-declaration.test.trb, one line:packageOptionsFrom(inputOf(...))must bepackageOptionsFrom inputOf(...)). Compile,test compiler/tests (native), the command-line and docs gates were green; tier B and the playground were cancelled by the runner right after the tier A failure (context canceled), not by errors of their own.Fix:
0bfcadestyle(cli): format cli-declaration.test.trb(nightly 20261111 torb;format --checkover the six changed .trb files was the failing input, formatted now). Review re-requested.torb add,remove,update,install,publish,lock,vendorandauditparse their command line withstd/cli(step 5 of #124) #7750bfcade0049bc887c0feApproved at
9bc887c.cli-declaration.test.trbcovers the reader for all eight commands (flags, packages before/after flags, required package onadd/remove,--checkonly onlock,--advisoriesonly onaudit, no package oninstall/publish/lock/vendor/audit, unknown flag, missing option value) and the generated help. The command-line gate pins the wrong lines. CI is green for exactly this head (tier A, tier B, playground, gates, pdisc).runPackageCommandfrom a plain function withoutawait(), as before.docs/design/CLI.md,docs/standard-library/cli.mdand its skills mirror updated.Non-blocking: none.
torb add,remove,update,install,publish,lock,vendorandauditparse their command line withstd/cli(step 5 of #124) #775torb login,logout,owner,yankanddeprecateparse their command line withstd/cli(step 6 of #124) #783torb add,remove,update,install,publish,lock,vendorandauditparse their command line withstd/cli(step 5 of #124) #775torbparses its command line withstd/cli(CLI slice 2) #124