Enhancement #1711
Change CLI to provide SVN/git-like subcommands for different tasks
Status: | Resolved | Start date: | 12/23/2013 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Moringen | % Done: | 100% | |
Category: | Common Lisp Tools | |||
Target version: | rsb-0.12 |
Description
Sub-commands identified so far:
- info
- logger
- send
- call
- introspect
Potential future sub-commands:
- bridge
- timesync
- server
- shell/repl
Associated revisions
Initial import of sub-commands stuff in src/commands/*.lisp
refs #1711
- src/commands/protocol.lisp: new file; contains protocol for using and
creating command instances - src/commands/mixins.lisp: new file; contains command mixin classes for
command classes - src/commands/redump.lisp: new file; contains the redump command
- src/commands/info.lisp: new file; contains the info command
- src/commands/logger.lisp: new file; contains the logger command
- src/commands/send.lisp: new file; contains the send command
- src/commands/call.lisp: new file; contains the call command
- src/commands/introspect.lisp: new file; contains the introspect
command - src/commands/package.lisp: new file; package definition for the
commands module - rsb-tools-commands.asd: new file; system definition for the commands
system
Unit tests for commands in test/commands/*.lisp
refs #1711
- test/commands/redump.lisp: new file; tests for redump command
- test/commands/info.lisp: new file; tests for info command
- test/commands/logger.lisp: new file; tests for logger command
- test/commands/introspect.lisp: new file; tests for introspect command
- test/commands/send.lisp: new file; tests for send command
- test/commands/call.lisp: new file; tests for call command
- test/commands/package.lisp: new file; package definition for command
tests - rsb-tools-commands.asd (system rsb-tools-commands): :in-order-to
test-op run test-op on :rsb-tools-commands-test
(system rsb-tools-commands-test): new system; tests for the commands
(perform test-op eql :rsb-tools-commands-test): new method; run
command tests - CMakeLists.txt: run tests for rsb-tools-commands system
Use commands in */main.lisp
refs #1711
- common/options.lisp (process-commandline-options): accept commandline
keyword parameter; pass to `make-context' - info/main.lisp (main): accept program-pathname and args parameters;
pass to `process-commandline-options'; make and execute `info' command - info/package.lisp (header): updated copyright
(package rsb.tools.info): added used package rsb.tools.commands - logger/main.lisp (queue-overflow-error): removed; provided by `logger'
command
(make-queue-push-handler): likewise
(make-queue-pushing-listener): likewise
(process-events): likewise
(main): accept program-pathname and args parameters; pass to
`process-commandline-options'; make and execute `logger' command - logger/package.lisp (package rsb.tools.logger): added used package
rsb.tools.commands - introspect/main.lisp (make-example-strings): use program-name
(main): accept program-pathname and args parameters; pass to
`process-commandline-options'; make and execute `introspect' command - introspect/package.lisp (header): updated copyright
(package rsb.tools.introspect): added used package rsb.tools.commands - send/main.lisp (main): accept program-pathname and args parameters;
pass to `process-commandline-options'; make and execute `send' command - send/package.lisp (header): updated copyright
(package rsb.tools.send): added used package rsb.tools.commands - call/main.lisp (main): accept program-pathname and args parameters;
pass to `process-commandline-options'; make and execute `call' command - call/package.lisp (package rsb.tools.call): added used package
rsb.tools.commands - main/main.lisp (header): updated copyright
(name->entry-point): renamed>entry-point
(program-pathname>name): new function; extract program name from
pathname
(main/program-name): new function; entry point when called via
symbolic link
(main/command): new function; entry point when called with sub-command
(main): depending on invocation, call `main/program-name' and
`main/command'
(make-static): removed; now taken care off by `redump' command
(make-dynamic): likewise - main/package.lisp (header): updated copyright
(package rsb.tools.main): added used package rsb.tools.commands - cl-rsb-tools-info.asd (header): updated copyright
(system cl-rsb-tools-info): added system dependency on
rsb-tools-commands - cl-rsb-tools-introspect.asd: similar
- cl-rsb-tools-logger.asd: similar
- cl-rsb-tools-send.asd: similar
- cl-rsb-tools-call.asd: similar
- cl-rsb-tools-main.asd: similar
- main/dump.lisp: adapted `make-dynamic' call
- CMakeLists.txt: adapted to changed commandline syntax
Unit tests for commands in test/commands/*.lisp
refs #1711
- test/commands/redump.lisp: new file; tests for redump command
- test/commands/info.lisp: new file; tests for info command
- test/commands/logger.lisp: new file; tests for logger command
- test/commands/introspect.lisp: new file; tests for introspect command
- test/commands/send.lisp: new file; tests for send command
- test/commands/call.lisp: new file; tests for call command
- test/commands/package.lisp: new file; package definition for command
tests - rsb-tools-commands.asd (system rsb-tools-commands): :in-order-to
test-op run test-op on :rsb-tools-commands-test
(system rsb-tools-commands-test): new system; tests for the commands
(perform test-op eql :rsb-tools-commands-test): new method; run
command tests - lift-rsb-tools-commands.config: new file; test configuration for
rsb-tools-commands system - CMakeLists.txt: run tests for rsb-tools-commands system
Use commands in */main.lisp
refs #1711
- common/options.lisp (process-commandline-options): accept commandline
keyword parameter; pass to `make-context' - info/main.lisp (main): accept program-pathname and args parameters;
pass to `process-commandline-options'; make and execute `info' command - info/package.lisp (header): updated copyright
(package rsb.tools.info): added used package rsb.tools.commands - logger/main.lisp (queue-overflow-error): removed; provided by `logger'
command
(make-queue-push-handler): likewise
(make-queue-pushing-listener): likewise
(process-events): likewise
(main): accept program-pathname and args parameters; pass to
`process-commandline-options'; make and execute `logger' command - logger/package.lisp (package rsb.tools.logger): added used package
rsb.tools.commands - introspect/main.lisp (make-example-strings): use program-name
(main): accept program-pathname and args parameters; pass to
`process-commandline-options'; make and execute `introspect' command - introspect/package.lisp (header): updated copyright
(package rsb.tools.introspect): added used package rsb.tools.commands - send/main.lisp (main): accept program-pathname and args parameters;
pass to `process-commandline-options'; make and execute `send' command - send/package.lisp (header): updated copyright
(package rsb.tools.send): added used package rsb.tools.commands - call/main.lisp (main): accept program-pathname and args parameters;
pass to `process-commandline-options'; make and execute `call' command - call/package.lisp (package rsb.tools.call): added used package
rsb.tools.commands - main/main.lisp (header): updated copyright
(name->entry-point): renamed>entry-point
(program-pathname>name): new function; extract program name from
pathname
(main/program-name): new function; entry point when called via
symbolic link
(main/command): new function; entry point when called with sub-command
(main): depending on invocation, call `main/program-name' and
`main/command'
(make-static): removed; now taken care off by `redump' command
(make-dynamic): likewise - main/package.lisp (header): updated copyright
(package rsb.tools.main): added used package rsb.tools.commands - cl-rsb-tools-info.asd (header): updated copyright
(system cl-rsb-tools-info): added system dependency on
rsb-tools-commands - cl-rsb-tools-introspect.asd: similar
- cl-rsb-tools-logger.asd: similar
- cl-rsb-tools-send.asd: similar
- cl-rsb-tools-call.asd: similar
- cl-rsb-tools-main.asd: similar
- main/dump.lisp: adapted `make-dynamic' call
- CMakeLists.txt: adapted to changed commandline syntax
Describe sub-command syntax in tool-*.rst
refs #1711
- tool-info.rst (Synopsis): sub-command syntax instead of symlink-based
command selection - tool-call.rst (Synopsis): likewise
(Description): likewise
(Example): likewise - tool-send.rst (Synopsis): likewise
(Description): likewise
(Example): likewise - tool-logger.rst (Synopsis): likewise
(Example): likewise - tool-introspect.rst (Synopsis): likewise
(Example): likewise - install-binary.rst (Binary Downloads of Tools): removed paragraph
about creating symlinks after download - news.rst (RSB 0.12): mention changed commandline syntax
Fixed program name in help texts in logger,introspect,send,call
refs #1711
- logger/help.lisp (header): updated copyright
(make-examples-string): fixed program-name default - logger/main.lisp (update-synopsis): accept program-name keyword
parameter; pass to `make-examples-string'
(main): pass program-name to `update-synopsis' - introspect/main.lisp (make-examples-string): fixed program-name
default
(update-synopsis): accept program-name keyword parameter; pass to
`make-examples-string'
(main): pass program-name to `update-synopsis' - send/main.lisp (make-examples-string): fixed program-name default
(update-synopsis): accept program-name keyword parameter; pass to
`make-examples-string'
(main): pass program-name to `update-synopsis' - call/main.lisp (make-examples-string): fixed program-name default
(update-synopsis): accept program-name keyword parameter; pass to
`make-examples-string'
(main): pass program-name to `update-synopsis'
Improved warning for program-name-dispatch in main/main.lisp
refs #1711
- main/main.lisp (main/program-name): generate better warning when
program-name-based dispatch is used
Removed symlink stuff in main/main.lisp, CMakeLists.txt, cpack/DebianUbuntu.cmake
refs #1711
- main/main.lisp (main/program-name): removed; no longer needed
(main/command): likewise
(main): removed link-related cases
(%maybe-create-link): removed; no longer needed
(%maybe-create-links): likewise - CMakeLists.txt: do not create symbolic links for individual commands
- cpack/DebianUbuntu.cmake: do not create symbolic links and install and
remove alternatives for individual commands
Removal of symlink-based invocation of CL tools in news.rst
refs #1711
- news.rst (RSB 0.13): mention removal of symlink-based invocation of CL
tools
(RSB 0.12): fixed a typo
History
#1 Updated by J. Moringen about 10 years ago
- Target version changed from rsb-0.11 to rsb-0.12
#2 Updated by J. Moringen about 10 years ago
- Target version changed from rsb-0.12 to rsb-1.0
#3 Updated by J. Moringen about 9 years ago
- Status changed from New to In Progress
- Target version changed from rsb-1.0 to rsb-0.12
- % Done changed from 0 to 90
#4 Updated by J. Moringen about 9 years ago
- Description updated (diff)
For backwards compatibility, symbolic link machinery remains for one more release.
#5 Updated by J. Moringen about 9 years ago
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100
Should be done. Minor fixups may follow.