[Scons-dev] --interact use cases

anatoly techtonik techtonik at gmail.com
Thu Jun 30 08:21:55 EDT 2016


This morning I was thinking that SCons doesn't have any
kind of interactive mode that is tied to modern user needs.

Here is how it looks now:

    $ scons --interact
    scons: Reading SConscript files ...
    scons: done reading SConscript files.
    scons>>> ?
    build [TARGETS]         Build the specified TARGETS and their dependencies.
                            'b' is a synonym.
    clean [TARGETS]         Clean (remove) the specified TARGETS and their
                            dependencies.  'c' is a synonym.
    exit                    Exit SCons interactive mode.
    help [COMMAND]          Prints help for the specified COMMAND.  'h' and
                            '?' are synonyms.
    shell [COMMANDLINE]     Execute COMMANDLINE in a subshell.  'sh' and '!'
                            are synonyms.
    version                 Prints SCons version information.

    scons>>>
    scons>>> help b
    scons>>> help build
    build [TARGETS]         Build the specified TARGETS and their
                        dependencies.  'b' is a synonym.

Note that command help is not helpful at all.

How it could look like:

    $ scons --interact
    scons: Reading SConscript files ...
    scons: no SConscript files found.
    scons: SCons 2.5.0 interactive mode.
    scons: Type "help" to learn more or "exit" to quit.
    scons>>> help
    build [TARGETS]         Build TARGETS and their dependencies.
    clean [TARGETS]         Clean (remove) TARGETS and their dependencies.
    exit                    Exit interactive mode.
    help [COMMAND]          Print help for the specified COMMAND.  '?'
is synonym.
    shell [COMMANDLINE]     Execute COMMANDLINE in a subshell.  '!' is synonym.

    scons>>>

Note that 'b', 'c' and 'h' are not there. It is better to choose command
using longest match.


What doesn't work?

1. --interactive without a SConstruct.

    $ scons --interact

    scons: *** No SConstruct file found.
    File "../engine/SCons/Script/Main.py", line 912, in _main


What is missing?

1. target list
2. builder tree
3. help on specific builders and SCons commands
4. pager for all the above

-- 
anatoly t.


More information about the Scons-dev mailing list