aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
Commit message (Collapse)AuthorAge
* Introduce support for user-provided extensionsDaniel Mueller2020-08-25
| | | | | | | | | | | | | | This change introduces support for discovering and executing user-provided extensions to the program. Extensions are useful for allowing users to provide additional functionality on top of the nitrocli proper. Implementation wise we stick to an approach similar to git or cargo subcommands in nature: we search the directories listed in the PATH environment variable for a file that starts with "nitrocli-", followed by the extension name. This file is then executed. It is assumed that the extension recognizes (or at least not prohibits) the following arguments: --nitrocli (providing the path to the nitrocli binary), --model (with the model passed to the main program), and --verbosity (the verbosity level).
* Remove dependency on crate::Error from arg_defsDaniel Mueller2020-04-04
| | | | | | | | | This change removes the need to import crate::Error from the arg_defs module. By dropping this dependency we make the file more independent of the rest of the crate, which subsequently will allow us to merely include! it in another file in order to get the argument related type definitions without compilation errors due to missing symbols from the rest of the crate.
* Replace argparse with structoptRobin Krahl2020-01-07
| | | | | | | | | | | | This patch changes the argument handling code to use structopt instead of argparse using the data structures we introduced in the last patch. As part of that transition we replace the old Error::ArgparseError variant with ClapError that stores a structopt::clap::Error. Because of that replacement, the format of the help messages changed, breaking some of the tests. Hence, this change adapts them accordingly. Also clap currently prints the version output to stdout, so we ignore the version_option test case for now.
* Move nitrocli source code into repository rootDaniel Mueller2020-04-04
Now that all vendored dependencies have been removed, this change moves the program's source code from the nitrocli/ directory into the root of the repository.