Commit Graph

5950 Commits

Author SHA1 Message Date
Matthias Beyer fb8b50fa9a Remove boilerplate by enabling serde in "log" dependency
This patch adds the "serde" feature to the "log" dependency, so we can
deserialize logging levels directly into "log" types.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 09:32:07 +02:00
Matthias Beyer 185ec25b9e Rewrite logging config deserialization
This patch rewrites the logging config deserialization. It removes the
manual traversing of the config toml structure and replaces it with
types which implement `Deserialize`, which is way more convenient and
easy to read (and extend).

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 09:32:07 +02:00
Matthias Beyer b1330c9916 Merge branch 'update-toml-dependencies' 2019-05-30 09:30:40 +02:00
Matthias Beyer a7d53e47d1 Update toml-query to 0.9.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-29 18:39:25 +02:00
Matthias Beyer 1482f70320 Update dependency: toml: 0.4 -> 0.5
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-29 18:39:25 +02:00
Matthias Beyer b4e25df98a Merge branch 'minor' into master 2019-05-25 11:01:42 +02:00
Matthias Beyer d759e402a6 Add changelog for 0.9.3
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
(cherry picked from commit 6661b72e3d1a984f3010251698b7ee92be80af1a)
2019-05-25 10:43:59 +02:00
Matthias Beyer bce167d740 Update changelog for 0.9.2.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
(cherry picked from commit d828e5fd6ff2f13c0737260649c28a8fcaab6299)
2019-05-25 10:43:59 +02:00
Matthias Beyer 1c6b02454c Remove unused functions 2019-05-25 10:43:24 +02:00
Matthias Beyer b18c3e0361 Remove ununsed sourcefile
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-25 10:43:24 +02:00
Matthias Beyer 8bac396f09 Add imag-markdown to release script
Fixes: 632062caed ("Add imag-markdown")
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-25 10:43:24 +02:00
Matthias Beyer 5ff2c3e8e3 Remove lazy_static
we don't need lazy static here, so remove it and the dependency as well.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-25 10:43:24 +02:00
Leon Schuermann ed457495c8 Introduce proper error handling in IdPathProvider
Prior to this change, the IdPathProvider implementation would be
responsible for exiting the process on insufficient / wrong arguments.
However, such error handling should be performed together with the
business logic and not in CLI-parsing related code.

This change introduces a clear separation: both parsing errors and
insufficient id path arguments can now be return from inside the
`get_ids`-method, and get passed up to the application logic to be
handled.

This change is reflected in all instances of IdPathProvider and their
surrounding code.

Signed-off-by: Leon Schuermann <leon.git@is.currently.online>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-24 21:03:34 +02:00
Matthias Beyer fcdded90b2 travis: Update rustc to 1.33.0 as minimum required version 2019-05-24 21:02:19 +02:00
Matthias Beyer 911133818c Fix: Negation error
We have to check whether the configuration is _not_ a String type.
Dump fail.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-23 17:13:10 +02:00
Matthias Beyer b7d91f0905 Remove buildscripts
When installing (a subcrate) from crates.io, it fails because it cannot
find the buildscript. This is the quickfix, simply remove the
buildscript itself and the setup of the buildscript in all Cargo.toml
files.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-22 22:18:57 +02:00
Matthias Beyer 5c8af4460e Fix: Entries::in_collection() should be able to return error
This patch changes the Entries::in_collection() interface to return a
Result<()>. This is needed because the fs backend implementation should
be able to check whether a directory actually exists whenever we change
the iterator.

If the implementation detects that the directory does not exist, we can
fail early and error out.

All usages of the interface are adapted by the patch as well.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 13:37:46 +02:00
Matthias Beyer 55a7c268d7 Merge branch 'imag-bookmark-cli' into master 2019-05-18 12:36:08 +02:00
Matthias Beyer 6264e2cb51 Merge branch 'fix-libimagentrylink-remove-links-with-set' into master 2019-05-18 12:35:58 +02:00
Matthias Beyer 5fa6b07b9e Fix: Delete links to bookmark collection entry before deleting collection
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 02:36:02 +02:00
Matthias Beyer 5a250bd991 Remove InternalLinker::set_internal_links()
This function needs to be removed because of the following problem:

When linking from one entry to another, and then removing the link in
the first entry with ::set_internal_links(vec![]), we end up with a
dangling link in the second entry, because the ::set_internal_links()
function does not take care of removing the links in the "other"
entries.

Actually, it is not even able to do so, because it would need to
`Store::get()` those entries, but it does not have access to the store.

Adding a `store` parameter to the function would be possible, but only
increase its complexity unnecessarily. This is why I opt for removing
this function (which is btw not used once in the whole imag codebase).

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 02:31:03 +02:00
Matthias Beyer 49c7c81ff3 Remove unimplemented argument
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 01:59:39 +02:00
Matthias Beyer c4aa8dd5d5 Make "urls" positional argument
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 01:58:39 +02:00
Matthias Beyer 21b24e2d26 Remove long-term todos from doc
We really shouldn't have todos in the documentation.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 01:31:40 +02:00
Matthias Beyer 85f8082cbe Merge branch 'error-context' into master 2019-05-18 00:55:20 +02:00
Matthias Beyer d034a6f0e2 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer 27b75ba2fc Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer 5ebbcb774a Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer b808658648 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer f540a317b0 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer c02b2f88de Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer c7ea58eda2 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer d8bcb8ca8e Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer f44e10e295 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer 322c063450 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer 6e0a179550 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer 740729bfda Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer 06e78c75de Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer 99ee4fdf43 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer 26de159415 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer 3321b9a643 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer e200e40070 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +02:00
Matthias Beyer 1f97584738 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:54:35 +02:00
Matthias Beyer 741e8acb8a Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:54:35 +02:00
Matthias Beyer 5f07d7d21a Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:54:35 +02:00
Matthias Beyer 112a2d6af8 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:53:40 +02:00
Matthias Beyer 00fa3e7b78 Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:53:40 +02:00
Matthias Beyer c7f5420c1d Change is_log() implementation to use kindflag utility
This patch changes the Log::is_log() implementation for Entry to use the
provide_kindflag_path!() infrastructure.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:52:13 +02:00
Matthias Beyer 9f100f2f75 Fix: Do not write newline character when asked not to do
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:52:13 +02:00
Matthias Beyer 1d89844613 Run 'cargo fix' for rust-2018
With this patch we move the codebase to Rust-2018.

The diff was generated by executing

    cargo fix --all --all-features --edition

on the codebase.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:20:59 +02:00