Default to development build profile if a `.git` directory exists, else
error out of build configuration.
This make `auto` the default build profile and if set and a `.git`
directory is present default to `development`, else raise an error.
Add some docs to INSTALL describing build profiles and update how they
are used in the source to match.
Application.MainWindow: Sort folders already available in an account
by path so that FolderListTree is able to add them all successfully.
Application.FolderContext: Implement Gee.Comparable so instances can
be sorted.
Fixes#1004
Get the interface font from Gtk.Settings instead of GLib.Settings since
the latter can't actually access desktop settings under Flatpak.
Partial fix for #989
See also GNOME/glib#2213
Don't use client lib vala ags when building the web process extension,
since that will cause it to also write a VAPI with the same name as
the client lib, causing the build to fail if the web process side wins
that race.
Fixes#985
New composers have no associated GLib Application instance, so when the
main window is already showing a composer and another is opened, the
new composer has no application to pass its window.
Fix by requiring `Composer.detach` be passed an application instance
and find an appropriate instance at each call site.
We've had reports on Matrix that existing batch transactions in
`create_or_merge_email_async` are taking up to 30s to run, which is
getting uncomfortably close to the 60s timeout.
Drop the batch size down from 25 to 10 to reduce the chance that this
will eventually fail with a "database is locked" error.
See #921 for context.
Although populating the search table had been broken up into batches
of 50 email, it was still search for and loading every single message
id in both the MessageTable and MessageSearchTable, doing a manual
join, and then updating the batch, for *each* batch, and in a RW
transaction.
Break this up so that the ids are loaded and joined only once, the
queries happens in a RO transaction, the manual join happens in a side
thread, leaving each RW transaction only having to load the messages
and update the search index for up to 50 messages.
Ensure all code paths that execute SQL are logging it if enabled, and
clean up the log formatting.
Add new `enable_result_logging` static property to control result
logging separately from SQL logging, so we can get SQL logged without
having to see email. Clean up result formatting, and keep track of the
current result row number and log that as context.
Since each context type already has access to the object that is its
context parent, don't bother with a stand-alone `logging_parent`
property, just have context types implement it and return the
appropriate object.
Ensure internal code can access a DatabaseConnection from context
objects to get access to connection-specific code, but make the
polymorphic context accessors internal so transactions can't access
them.
When constructing a new record, rather that getting the state object
from a source and hanging on to it, just keep a few salient details
and then release it, so we don't keep a ref to the source hanging
around. This also means we need to pre-fill well-known up front, adding
some overhead when not logging.
This fixes hitting resource limits like memory and file descriptors
when lots of objects are logged, as seen when logging is enabled for
the DB, and in particular for `DatabaseConnection` objects, since each
one represents an open SQLite database file and related state.
It also ruins the glorious future in which we could inspect logged
objects in the Inspector in the same way that Firefox allows you to
inspect objects in the JS console, but c'est la ve. The way forward
there is probably adding structured data to state objects, allowing
sources to provide a curated set of properties to log.
This isn't a good place to do it, but neither GLib's error model not the
engine's database model makes it possible to getting access to
transaction state otherwise at the moment.
Fix infinite recursion logging from DatabaseConnection caused by
`to_string` and Context implementing `to_logging_state` that calls that.
Make individual objects implement `Logging.Source` instead and have
them return appropriate, custom logging state individually.