Commit Graph

6371 Commits

Author SHA1 Message Date
Matthias Beyer f1f7abddae Add iterator extensions for store-id touched reporting
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:48:00 +02:00
Matthias Beyer d8354ce6f3 Add id-in-collection command
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:19:19 +02:00
Matthias Beyer a0c5ea1fda Convert id-in-collection command to new binary crate layout
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:19:10 +02:00
Matthias Beyer b6facfff6b Merge branch 'resiter-update' into master
Update the resiter dependency, so we can remove our implementation of
the `IterInnerOkOrElse` extension trait.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:17:01 +02:00
Matthias Beyer 106be5746d Revert "Add extension traits for handling Result<Option<T>, E> conversion"
This reverts commit d810b63886f4006d01bca894982bbc867616f37c.

As resiter v0.4.0 does provide this extension now, we don't need it in
the codebase anymore.
2019-10-26 18:16:37 +02:00
Matthias Beyer 434f84c80d Use resiter 0.4.0 for IterInnerOkOrElse extension 2019-10-26 18:16:37 +02:00
Matthias Beyer 0529fcc7ad Use resiter::IterInnerOkOrElse instead of libimagerror version
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer e880fc3358 Use resiter::IterInnerOkOrElse instead of libimagerror version
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer c4e7dd482d Use resiter::IterInnerOkOrElse instead of libimagerror version
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer 41323224f4 Use resiter::IterInnerOkOrElse instead of libimagerror version
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer 8d4a5dade8 Use resiter::IterInnerOkOrElse instead of libimagerror version
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer 9bcd99a1c0 Use resiter::IterInnerOkOrElse instead of libimagerror version
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer a92efdae40 Use resiter::IterInnerOkOrElse instead of libimagerror version
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer 580320c496 Use resiter::IterInnerOkOrElse instead of libimagerror version
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer 02b212feb3 update: resiter v0.3.0 -> v0.4.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer c9fb7f685f update: resiter v0.3.0 -> v0.4.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer 72e2186d91 update: resiter v0.3.0 -> v0.4.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer 99875785e5 update: resiter v0.3.0 -> v0.4.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer 7680c538ae update: resiter v0.3.0 -> v0.4.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer 6c842a9368 update: resiter v0.3.0 -> v0.4.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer de81e767d3 update: resiter v0.3.0 -> v0.4.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer 7947221617 update: resiter v0.3.0 -> v0.4.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer e3afdf0c2f update: resiter v0.3.0 -> v0.4.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer cc6a833ab6 Merge branch 'noexit' into master
This merge includes the first batch of "no-exit()-call" patches.

With this patchset, we do not exit() anywhere in the core binaries
anymore, but propagate errors up to the main() function, where they are
returned.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:09 +02:00
Matthias Beyer a3eccc0723 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:15:20 +02:00
Matthias Beyer 58e303116d Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:15:20 +02:00
Matthias Beyer e67f5374be Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:15:20 +02:00
Matthias Beyer e740b2faaa Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:15:20 +02:00
Matthias Beyer ab39aa9353 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:15:20 +02:00
Matthias Beyer 0e14f953ca Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:15:20 +02:00
Matthias Beyer 2811ad3d4d Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer eb8912ffe6 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer 9b8faec86e Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer 0e74225094 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer f881f44d06 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer df2c5faf73 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer 05685a6f2d Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer 4b8ca2b110 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer fd40715b29 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer 0e20b25091 Add extension traits for handling Result<Option<T>, E> conversion
This extension traits help transforming Result<Option<T>, E> to
Result<T, E> or transforming an iterator over the former type to an
iterator over the latter type.

Should be moved to resiter of course, but we need to implement this
first.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer e7e5d30645 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer 6ab5d1d880 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer 647ca2fea6 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer b36454ac38 Refactor to not call exit() anywhere
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer e259015a61 Remove calls to exit() and replace them with error propagation up to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer 19f6391d8a Implement Error for ExitCode
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:35:31 +02:00
Matthias Beyer e3db947e68 Add Entry::set_content()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:24:02 +02:00
Matthias Beyer 447a73f438 Fix indention
It seems Leon messed up here... :-)

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 16:23:16 +02:00
Matthias Beyer 7a06544654 Merge Leons patches for single-binary and CLI completion preparation
This merge pulls in the changes that Leon developed over the course of
the last months which change the binaries to actually be libraries with
a _very_ minimal binary surface. This enables us to actually generate
commandline completion scripts with clap without doing any fancy
file-include magic in a build.rs script.

From the original request-pull message (Mon, 24 Jun 2019 21:48:51 +0200):

> This patch is yet another attempt at bringing CLI completion to this
> workspace project. The details are explained in the commit message.
>
> Advantages of this approach include:
> - Use of standard dependency management features (`cargo install`
>   compatible)
> - Exposing further "binary" business logic to other Rust crates as a
>   library
> - (Possibly) hard linking the "binary" into the main imag binary, so
>   only one binary needs to be shipped. This should improve startup time,
>   and the Runtime instance could even be reused. I'd favor this
>   approach, while making it all configurable via features and still
>   searching the $PATH to allow bash-scripts etc. to provide imag
>   subcommands.
>
> However, this *could* increase binary size, I didn't perform any
> measures (at least when not only using in the build script but in the
> main binary as well). Anyhow, with LTO enabled this shouldn't matter if
> the dependencies aren't used.

Some patches were added by me before the merge, because Leon did not
check whether the tests still work (just minimal adjustments, see the
log).

Also, one change was made to the final patchset send by Leon, which was
a fixup of the Copyright date in bin/core/imag/build.rs. This change
does not appear in the commit logs because it was just bumping the year
from 2018 to 2019 in the Copyright header. This was acked by Leon in a
private conversation.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 15:15:35 +02:00
Matthias Beyer ae7a633ab3 Fix: Pass path to ui builder function when creating mock app
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 15:00:37 +02:00