* [sup.git] branch develop updated (1aae17f2 -> 73559396)
@ 2026-10-05 6:05 Dan Callaghan
2026-10-05 6:05 ` [sup.git] 01/03: contrib/nix: add Ruby shells as gc roots Dan Callaghan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dan Callaghan @ 2026-10-05 6:05 UTC (permalink / raw)
To: sup-commits
Pushed branch develop:
from 1aae17f2 update Manifest.txt for screenshot generator
new f75891bd contrib/nix: add Ruby shells as gc roots
new f72bb069 contrib/nix/test-all-rubies.sh: add Ruby 4.0
new 73559396 use MatchAll base query term instead of Kmail
Summary of changes:
Manifest.txt | 2 ++
contrib/nix/.gitignore | 1 +
contrib/nix/test-all-rubies.sh | 3 +-
lib/sup/index.rb | 4 ++-
test/integration/test_index.rb | 62 ++++++++++++++++++++++++++++++++++++++++++
5 files changed, 70 insertions(+), 2 deletions(-)
create mode 100644 contrib/nix/.gitignore
create mode 100644 test/integration/test_index.rb
^ permalink raw reply [flat|nested] 4+ messages in thread
* [sup.git] 01/03: contrib/nix: add Ruby shells as gc roots
2026-10-05 6:05 [sup.git] branch develop updated (1aae17f2 -> 73559396) Dan Callaghan
@ 2026-10-05 6:05 ` Dan Callaghan
2026-10-05 6:05 ` [sup.git] 02/03: contrib/nix/test-all-rubies.sh: add Ruby 4.0 Dan Callaghan
2026-10-05 6:05 ` [sup.git] 03/03: use MatchAll base query term instead of Kmail Dan Callaghan
2 siblings, 0 replies; 4+ messages in thread
From: Dan Callaghan @ 2026-10-05 6:05 UTC (permalink / raw)
To: sup-commits
New commit on branch develop:
https://supmua.dev/git/sup/commit/f75891bdfd125d25e5963442cf0e675d326d1dc3.html
commit f75891bdfd125d25e5963442cf0e675d326d1dc3
Author: Dan Callaghan <djc@djc.id.au>
AuthorDate: Sat Oct 3 21:49:34 2026 +1000
contrib/nix: add Ruby shells as gc roots
nix-collect-garbage keeps wiping out the derivations for all the old
Rubies, which is annoying because they are expensive to build.
---
Manifest.txt | 1 +
contrib/nix/.gitignore | 1 +
contrib/nix/test-all-rubies.sh | 1 +
3 files changed, 3 insertions(+)
diff --git a/Manifest.txt b/Manifest.txt
index 3b3d8f33..aaf1cc8b 100644
--- a/Manifest.txt
+++ b/Manifest.txt
@@ -23,6 +23,7 @@ bin/sup-tweak-labels
contrib/colorpicker.rb
contrib/completion/_sup.bash
contrib/completion/_sup.zsh
+contrib/nix/.gitignore
contrib/nix/Gemfile
contrib/nix/Gemfile.lock
contrib/nix/README
diff --git a/contrib/nix/.gitignore b/contrib/nix/.gitignore
new file mode 100644
index 00000000..c463264b
--- /dev/null
+++ b/contrib/nix/.gitignore
@@ -0,0 +1 @@
+.*shell-inputs
diff --git a/contrib/nix/test-all-rubies.sh b/contrib/nix/test-all-rubies.sh
index d1af07bd..0fdbc86e 100755
--- a/contrib/nix/test-all-rubies.sh
+++ b/contrib/nix/test-all-rubies.sh
@@ -2,5 +2,6 @@
set -e
cd "$(dirname "$0")/../.."
for rubyversion in 2.4 2.5 2.6 2.7 3.0 3.1 3.2 3.3 3.4 ; do
+ nix-build contrib/nix/ruby$rubyversion-shell.nix -A inputDerivation -o contrib/nix/.ruby$rubyversion-shell-inputs
nix-shell contrib/nix/ruby$rubyversion-shell.nix --run 'rake ci'
done
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [sup.git] 02/03: contrib/nix/test-all-rubies.sh: add Ruby 4.0
2026-10-05 6:05 [sup.git] branch develop updated (1aae17f2 -> 73559396) Dan Callaghan
2026-10-05 6:05 ` [sup.git] 01/03: contrib/nix: add Ruby shells as gc roots Dan Callaghan
@ 2026-10-05 6:05 ` Dan Callaghan
2026-10-05 6:05 ` [sup.git] 03/03: use MatchAll base query term instead of Kmail Dan Callaghan
2 siblings, 0 replies; 4+ messages in thread
From: Dan Callaghan @ 2026-10-05 6:05 UTC (permalink / raw)
To: sup-commits
New commit on branch develop:
https://supmua.dev/git/sup/commit/f72bb069cd77c4cc1376a85eeee8ca5cde5cdd79.html
commit f72bb069cd77c4cc1376a85eeee8ca5cde5cdd79
Author: Dan Callaghan <djc@djc.id.au>
AuthorDate: Sun Oct 4 13:32:34 2026 +1100
contrib/nix/test-all-rubies.sh: add Ruby 4.0
Forgot to put it in here when I added the shell.nix for it a while back.
---
contrib/nix/test-all-rubies.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/nix/test-all-rubies.sh b/contrib/nix/test-all-rubies.sh
index 0fdbc86e..84d404a0 100755
--- a/contrib/nix/test-all-rubies.sh
+++ b/contrib/nix/test-all-rubies.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/../.."
-for rubyversion in 2.4 2.5 2.6 2.7 3.0 3.1 3.2 3.3 3.4 ; do
+for rubyversion in 2.4 2.5 2.6 2.7 3.0 3.1 3.2 3.3 3.4 4.0 ; do
nix-build contrib/nix/ruby$rubyversion-shell.nix -A inputDerivation -o contrib/nix/.ruby$rubyversion-shell-inputs
nix-shell contrib/nix/ruby$rubyversion-shell.nix --run 'rake ci'
done
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [sup.git] 03/03: use MatchAll base query term instead of Kmail
2026-10-05 6:05 [sup.git] branch develop updated (1aae17f2 -> 73559396) Dan Callaghan
2026-10-05 6:05 ` [sup.git] 01/03: contrib/nix: add Ruby shells as gc roots Dan Callaghan
2026-10-05 6:05 ` [sup.git] 02/03: contrib/nix/test-all-rubies.sh: add Ruby 4.0 Dan Callaghan
@ 2026-10-05 6:05 ` Dan Callaghan
2 siblings, 0 replies; 4+ messages in thread
From: Dan Callaghan @ 2026-10-05 6:05 UTC (permalink / raw)
To: sup-commits
New commit on branch develop:
https://supmua.dev/git/sup/commit/735593960308648000dbe99d706221c24a306746.html
commit 735593960308648000dbe99d706221c24a306746
Author: Dan Callaghan <djc@djc.id.au>
AuthorDate: Mon Oct 5 14:29:38 2026 +1100
use MatchAll base query term instead of Kmail
Works around a spurious DatabaseCorruptError from Xapian, if no other
terms are added to the query (as in the "all mail" listing).
Xapian bug: https://trac.xapian.org/ticket/855
Fixes #628 (with a workaround).
---
Manifest.txt | 1 +
lib/sup/index.rb | 4 ++-
test/integration/test_index.rb | 62 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 66 insertions(+), 1 deletion(-)
diff --git a/Manifest.txt b/Manifest.txt
index aaf1cc8b..a05e069e 100644
--- a/Manifest.txt
+++ b/Manifest.txt
@@ -173,6 +173,7 @@ test/gnupg_test_home/regen_keys.sh
test/gnupg_test_home/secring.gpg
test/gnupg_test_home/sup-test-2@foo.bar.asc
test/integration/test_draft.rb
+test/integration/test_index.rb
test/integration/test_maildir.rb
test/integration/test_mbox.rb
test/integration/test_sup-add.rb
diff --git a/lib/sup/index.rb b/lib/sup/index.rb
index a37eb0da..70afc8d7 100644
--- a/lib/sup/index.rb
+++ b/lib/sup/index.rb
@@ -674,7 +674,9 @@ EOS
neglabels = [:spam, :deleted, :killed].reject { |l| (labels.include? l) || opts.member?("load_#{l}".intern) }
pos_terms, neg_terms = [], []
- pos_terms << mkterm(:type, 'mail')
+ ## workaround for https://trac.xapian.org/ticket/855
+ #pos_terms << mkterm(:type, 'mail')
+ pos_terms << Q::MatchAll
pos_terms.concat(labels.map { |l| mkterm(:label,l) })
pos_terms << opts[:qobj] if opts[:qobj]
pos_terms << mkterm(:source_id, opts[:source_id]) if opts[:source_id]
diff --git a/test/integration/test_index.rb b/test/integration/test_index.rb
new file mode 100644
index 00000000..6dbeb59d
--- /dev/null
+++ b/test/integration/test_index.rb
@@ -0,0 +1,62 @@
+require "sup"
+require "test_helper"
+
+class TestIndexIntegration < Minitest::Test
+ include Redwood
+
+ def setup
+ @path = Dir.mktmpdir
+ end
+
+ def teardown
+ ObjectSpace.each_object(Class).select {|a| a < Redwood::Singleton}.each do |klass|
+ klass.deinstantiate! unless klass == Redwood::Logger
+ end
+ FileUtils.rm_r @path
+ end
+
+ def create_large_mbox n_messages
+ mbox = File.join @path, "big.mbox"
+ File.open(mbox, "w") do |f|
+ n_messages.times do |i|
+ ## spread the dates out so that the assigned docids are not
+ ## contiguous, as in a real index
+ date = Time.utc(2011) + i * 3600
+ f.write <<EOS
+From bob@example.com Sat Jan 1 00:00:00 2011
+From: Bob <bob@example.com>
+To: Joe <joe@example.com>
+Subject: message number #{i}
+Date: #{date.strftime "%a, %d %b %Y %H:%M:%S +0000"}
+Message-ID: <message-#{i}@example.com>
+
+Hi Bob, this is test message #{i}. From Joe.
+
+EOS
+ end
+ end
+ mbox
+ end
+
+ def start_sup_and_add_source source
+ start
+ Logger.remove_sink $stderr
+ Index.init @path
+ Index.load
+ SourceManager.instance.instance_eval '@sources = {}'
+ SourceManager.instance.add_source source
+ PollManager.poll_from source
+ Index.save_index
+ end
+
+ def test_all_mail_query
+ n_messages = 1200
+ mbox = create_large_mbox n_messages
+ start_sup_and_add_source MBox.new "mbox:#{mbox}"
+
+ ## the empty query is the "all mail" listing
+ ids = []
+ Index.each_id({}) { |id| ids << id }
+ assert_equal n_messages, ids.size
+ end
+end
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-05 6:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05 6:05 [sup.git] branch develop updated (1aae17f2 -> 73559396) Dan Callaghan
2026-10-05 6:05 ` [sup.git] 01/03: contrib/nix: add Ruby shells as gc roots Dan Callaghan
2026-10-05 6:05 ` [sup.git] 02/03: contrib/nix/test-all-rubies.sh: add Ruby 4.0 Dan Callaghan
2026-10-05 6:05 ` [sup.git] 03/03: use MatchAll base query term instead of Kmail Dan Callaghan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox