Commit graph

2628 commits

Author SHA1 Message Date
Manos Pitsidianakis
ce53925f36
Bump version to 0.8.9
This is mostly a fixups release.

Added
=====

- cf16bf65 meli/sqlite3: add tests for reindexing
- a389772d accounts: suggest tips on mailbox_by_path error

Bug Fixes
=========

- 25f0a3f8 conf/terminal: fix serde of ProgressSpinnerSequence
- c375b48e terminal: fix Synchronized Output response parsed as input
  in PR #523 "terminal: fix Synchronized Output response parsed as
  input"
- b7e215f9
  melib/utils: fix test_fd_locks() on platforms without OFD support in
  PR #524 "melib/utils: fix test_fd_locks() on platforms without OFD
  support"
- 25c32a6b meli/docs/meli.conf.examples.5: fix .Dt macro arguments
- 18ae5848 meli: fix reindex of previously indexed account with sqlite3
  backend
- 13e917d9 Fix some compilation errors with cfg feature attrs in PR #531
  "accounts: suggest tips on mailbox_by_path error"
- 8c176d38 contacts/editor: fix crash on saving contact in PR #532
  "contacts/editor: fix crash on saving contact"
- fb5a88c2
  melib/collection: ensure mailbox exists when inserting new envelopes
  in PR #529 "Small account stuff fixes"

Changes
=======

- 7f8f1cf6 melib/gpgme bindings renewal in PR #533 "melib/gpgme
  bindings renewal"
- 9b7825bc Update futures-util dep, remove stderrlog dep
- 4be69360 Remove obsolete "encoding" dependency in PR #530
  "Remove/update obsolete dependencies"

Refactoring
===========

- 5af6e059 meli/accounts: use Arc<str> for account name
- 567270e1 melib: use Vec instead of SmallVec for search results
- 2bd8d7ba
  conf/tests.rs: Rename test functions to follow path convention

Documentation
=============

- 97242482 meli/docs: add meli.conf.examples to CLI and tests
- 0f096338 README.md: Update ways to install, add gitlab mirror link
  in PR #528 "Integrate meli.conf.examples.5 into CLI and build, also
  update README with installation instructions"

Continuous Integration
======================

- 630df308 CI: Add arm64 runners in job matrices in PR #527 "CI: Add
  arm64 runners in job matrices"
- 49ecbb56 CI: .gitea/Makefile.lint: check if nightly exists

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-27 16:16:29 +02:00
Manos Pitsidianakis
7dae430759
version_migrations: add compile-time checks
Add compile-time checks that version map is sorted.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-27 16:12:31 +02:00
Manos Pitsidianakis
a6df350843
v0.8.9: add version migrations and tests for upcoming version
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-27 14:27:54 +02:00
Manos Pitsidianakis
7f8f1cf65f
melib/gpgme bindings renewal
Regenerate libgpgme bindings for 32bit and 64bit targets separately.

This fixes the gpgme bindings tests failing for 32bit targets (which
prior to this commit where cfg'd to run only on x86-64 with #[cfg(target_arch = "x86_64")]

Tests confirm passing with:

    cross test --target i686-unknown-linux-gnu --all-targets --all -- --skip test_cli_subcommands

Note: We don't currently test on 32bit arches on CI, failure was spotted
on downstream Debian's build servers

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-26 19:35:05 +02:00
Manos Pitsidianakis
4be6936026
Remove obsolete "encoding" dependency
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-26 18:54:48 +02:00
Manos Pitsidianakis
9b7825bc59
Update futures-util dep, remove stderrlog dep
stderrlog was not used at all, so remove it.

Also update yanked futures-util dep.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-26 18:54:48 +02:00
Manos Pitsidianakis
8c176d3840
contacts/editor: fix crash on saving contact
Oops...

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-26 17:52:44 +02:00
Manos Pitsidianakis
13e917d97b
Fix some compilation errors with cfg feature attrs
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-26 16:44:02 +02:00
Manos Pitsidianakis
49ecbb56f7
CI: .gitea/Makefile.lint: check if nightly exists
If nightly toolchain exists and `cargo +nightly fmt --check --all` runs
but fails because --check returns an error, and the same error does not
trigger under the current active toolchain when the `|| cargo fmt
--check --all` path is executed, then that error is completely ignored.

That wouldn't happen on the CI where the nightly toolchain is not
installed but it would happen if someone (i.e. me) used the Makefiles
locally.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-26 14:12:56 +02:00
Manos Pitsidianakis
cf16bf65f7
meli/sqlite3: add tests for reindexing
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-26 12:19:15 +02:00
Manos Pitsidianakis
18ae584836
meli: fix reindex of previously indexed account with sqlite3 backend
Reported-by: iooioio <meli@iooioio.xyz>
Co-authored-by: iooioio <meli@iooioio.xyz>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-26 12:18:40 +02:00
Manos Pitsidianakis
a389772d96
accounts: suggest tips on mailbox_by_path error
If Account::mailbox_by_path() fails, suggest matching mailbox paths
using aho_corasick case insensitive matching, and also suggest to the
user to inspect mailboxes with the manage-mailboxes command.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-24 13:57:11 +02:00
Manos Pitsidianakis
0f09633899
README.md: Update ways to install, add gitlab mirror link
- Add repology table/badge
- Add more ways to install thanks to people packaging meli for package
  managers/platforms
- Update list of official mirrors by adding new gitlab mirror
- While at it, fix ugly html table with quickstart instructions

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-24 11:56:24 +02:00
Manos Pitsidianakis
972424829c
meli/docs: add meli.conf.examples to CLI and tests
We kinda forgot to do that when adding that new manpage, do it now.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-24 11:56:23 +02:00
Manos Pitsidianakis
25c32a6b95
meli/docs/meli.conf.examples.5: fix .Dt macro arguments
Dt macro takes two arguments, or three of the last one is the host
machine architecture.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-24 11:56:07 +02:00
Manos Pitsidianakis
fb5a88c22c
melib/collection: ensure mailbox exists when inserting new envelopes
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-24 11:53:15 +02:00
Manos Pitsidianakis
567270e177
melib: use Vec instead of SmallVec for search results
There was no point in using SmallVec with this large a size; it was
32768 bytes, or 32KiB. Let's allocate that to the heap instead.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-24 11:53:15 +02:00
Manos Pitsidianakis
5af6e059b7
meli/accounts: use Arc<str> for account name
Since it gets cloned around a lot.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-24 11:53:10 +02:00
Manos Pitsidianakis
630df3083f
CI: Add arm64 runners in job matrices
Add arm64 runs on matrices of jobs that build stuff.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-24 11:49:19 +02:00
Manos Pitsidianakis
b7e215f9c2
melib/utils: fix test_fd_locks() on platforms without OFD support
Not all platforms support open file description locks.

It is part of POSIX-2024 [1] so hopefully this will improve in the future.

[1]: "The Open Group Base Specifications Issue 8 IEEE Std 1003.1-2024" <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fcntl.h.html>

Fixes #522 "utils::tests::test_fd_locks fails on macOS"

Resolves: <https://git.meli-email.org/meli/meli/issues/522>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-20 16:45:37 +02:00
Manos Pitsidianakis
c375b48ebf
terminal: fix Synchronized Output response parsed as input
Since 2af5c8b6fd ("terminal: add
QuerySynchronizedOutputSupport WIP") we send a synchronised output
support query [1] to the terminal but we don't parse the response. If the
terminal replies, it gets parsed as user input. And if the user happens
to press a navigation key such as scroll_down which supports a number
modifier, the `2026` part of the mode response which was parsed as user
input makes meli scroll down 2026 lines.

Fixes: #502 ("Initial navigation state in mailbox index view is wrong")

[1]:
<https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036>

Resolves: <https://git.meli-email.org/meli/meli/issues/502>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-20 15:49:49 +02:00
Manos Pitsidianakis
25f0a3f814
conf/terminal: fix serde of ProgressSpinnerSequence
If ProgressSpinnerSequence / progress_spinner_sequence had a value of
just an array of strings, it could not be parsed correctly. Fix that
with a custom serde impl and also add unit tests.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-20 15:49:49 +02:00
Manos Pitsidianakis
2bd8d7ba01
conf/tests.rs: Rename test functions to follow path convention
Rename functions to follow the convention of being prefixed with the
module path before the function name (e.g. `fn
test_module_a_module_b_test_desc() {`)

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-20 11:48:08 +02:00
Manos Pitsidianakis
a27a28275b
Bump version to 0.8.8
Finally!

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-19 16:14:21 +02:00
Manos Pitsidianakis
68ec2c53a8
CHANGELOG.md: update to new format
Update commit message entries to new format, by making commit sha
monospace and bold so that they take the same width in the list.

Also, make all commit messages be surrounded by ` to show them in
monospace as well; they might not always include English words but
identifiers and abbreviations instead.

Vim substitutions used:

- %s/- [[]\(........\)[]]/- \[**`\1`**\]/

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-19 14:06:39 +02:00
Manos Pitsidianakis
f036f95eee
scripts: add generate_release_changelog_entry.sh
Add a helper script to generate a new release entry to add to
CHANGELOG.md when it's time to tag a new release.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-19 13:19:04 +02:00
Manos Pitsidianakis
7ff1db143f
manage-mailboxes: add delete option
While there was a delete-mailbox command, there was no option for it in
the manage-mailboxes interface, so add it.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-18 16:15:18 +02:00
Manos Pitsidianakis
35fa8e94a6
melib/imap: gracefully retry without DEFLATE on BYE
If server replies with BYE, try one more time without DEFLATE.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-16 11:40:41 +02:00
Manos Pitsidianakis
ecc9b4823e
Small repo cleanups
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-16 11:19:35 +02:00
Manos Pitsidianakis
707a129ea4
Coalesce repeating TUI notification messages
Don't accept new Display Messages if it has the same content as the
latest one in the display message stack.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-15 19:16:44 +02:00
Manos Pitsidianakis
e7a164de0c
Configure some gpgme stuff under gpgme feature
Some stuff that are only used with gpgme feature were not guarded by
 #[cfg(feature = "gpgme")], so fix that.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-15 19:16:08 +02:00
Manos Pitsidianakis
3040521695
melib: make notmuch feature depend on maildir feature
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-15 19:16:08 +02:00
Manos Pitsidianakis
e9ec6761f9
melib: make base64 dep mandatory
base64 is used in melib::backends::utf7 without any sort of conditional
compilation. Make base64 a mandatory dependency.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-15 19:16:07 +02:00
Manos Pitsidianakis
7b1be139f2
melib: make mbox backend build by default
Allow mbox to be built without the `notify` dependency. Add feature
`mbox-notify` to provide that instead.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-15 19:16:07 +02:00
Manos Pitsidianakis
b912aabca2
docs: add examples of file picker usage
Add an example for `fzf` use with the `add-attachment-file-picker < `
command when composing e-mail.

Closes #507

Resolves: <https://git.meli-email.org/meli/meli/issues/507>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-15 12:27:53 +02:00
Manos Pitsidianakis
0e77bd5b4c
melib/email/compose/tests: add multipart mixed attachment test
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-14 20:35:53 +02:00
Manos Pitsidianakis
d5d3457914
melib/email/compose/tests: normalise test fn names
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-14 19:31:06 +02:00
Manos Pitsidianakis
c1901c962d
melib/email/compose: add Content-Type header for utf8 text plain attachments
We should be specifying that the charset is utf-8.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-14 19:30:26 +02:00
Manos Pitsidianakis
d21c686da7
melib/attachments: Make AttachmentBuilder::set_raw generic
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-14 19:28:36 +02:00
Manos Pitsidianakis
bcbcb012ef
melib/email/compose: ensure boundary always prefixed with CRLF
When printing multipart boundaries, e.g.
`--bzz_bzz__bzz__xxxxxxxxxxxxxxxxxxxxxxxxxxx` after ending a sub-part,
ensure there's a CRLF already at the end of the accumulator string
before adding the `--...` boundary tag.

Fixes #503 ("Sending attachments does not work properly")

Resolves: <https://git.meli-email.org/meli/meli/issues/503>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-14 18:29:16 +02:00
Manos Pitsidianakis
cb2dd5def5
listing/threaded: impl missing select functionality
Selecting by searching for was missing for the threaded index style, so
add it.

Related to #513

Resolves: <https://git.meli-email.org/meli/meli/issues/513>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-11 00:55:17 +02:00
Manos Pitsidianakis
c6e9e4245d
listing/threaded: impl missing filter functionality
Somehow, filter (searching) was not implemented for the threaded index
style, so fix it.

Fixes: #513

Resolves: <https://git.meli-email.org/meli/meli/issues/513>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-11 00:41:12 +02:00
Manos Pitsidianakis
320fddad41
melib/gpgme: disable layout tests on non-x86_64 hosts
The generated bindgen layout tests make hard-coded assumptions about
target specific sizes like pointers, let's disable them for now before
we figure out a better long-term solution for gpgme compatibility.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 23:04:11 +02:00
Manos Pitsidianakis
d2559e42e5
imap: return all mailboxes, not just subscribed ones
Meli previously returned only subscribed mailboxes for IMAP. This was
erroneous behavior for two reasons:

- the front end should be able to see all mailboxes because the user is
  allowed to change subscription settings for remote mailboxes from the
  manage-mailboxes interface
- special usage mailboxes, e.g. a Trash folder, would not be visible to
  meli if it was not subscribed

Fixes #508.

Resolves: <https://git.meli-email.org/meli/meli/issues/508>
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 15:13:40 +02:00
Manos Pitsidianakis
2411481196
manage: parse scroll_{left,right} actions
They were previously silently ignored despite tables (DataColumns)
having support for scrolling on the x axis.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 15:13:40 +02:00
Manos Pitsidianakis
789a88b28d
shortcuts: add select_motion equivalent to select_entry
Change select_entry to toggle only one's selection entry (default 'V'),
while select_motion (default 'v') inherits the original functionality of
  performing a select motion when combined with a number and motion verb
  (scroll up/down etc)

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 15:13:40 +02:00
Manos Pitsidianakis
ad79bf84c2
.gitea/Makefile.lint: attempt cargo-fmt with +nightly
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 15:13:40 +02:00
Manos Pitsidianakis
81ace71b35
terminal/embedded: lift error checking earlier
Lift error checks earlier in the function, before forking, allowing any
potential errors to show up properly in the main process.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 15:13:39 +02:00
Manos Pitsidianakis
469168959f
melib/gpgme: s/NULL/NUL when referring to NUL byte
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 15:13:39 +02:00
Manos Pitsidianakis
50922d97b8
melib/README.md: update and fix feature table
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-11-04 15:13:39 +02:00