Skip to content

Commit

Permalink
Simpler, more modern API for listen/notify. (#910)
Browse files Browse the repository at this point in the history
No more inheritance, no more virtual functions, no more mandatory base
class — just pass in a lambda or any other matching callable.

Only one handler per channel — makes the channel name the key, and you
can disable a handler simply by overwriting it.

No more hassle with case-insensitive channel names.  We'll just quote
them consistently.

No more logging of exceptions, to a notice-processing callback which
probably just ignores the message.  Exceptions during handling now just
propagate up the call chain.
  • Loading branch information
jtv authored Dec 21, 2024
1 parent c9e8a31 commit 6f02798
Show file tree
Hide file tree
Showing 17 changed files with 722 additions and 179 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
7.10.0
- Deprecate `errorhandler`; replace with lambda-friendly "notice handlers."
- Deprecate `notification_receiver`; replace with "notification handlers"
- Bump minimum CMake version to 3.28. (#874)
- Fixed error message on clashing transaction focuses. (#879)
- Don't call`/bin/true`; macOS doesn't have it. Just call `true`. (#885)
Expand Down
2 changes: 1 addition & 1 deletion config/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ am__can_run_installinfo = \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in compile config.guess \
config.sub install-sh ltmain.sh missing mkinstalldirs
config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
Expand Down
3 changes: 1 addition & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -17160,7 +17160,6 @@ then
-Wattribute-alias=2 \
-Wlogical-op \
-Wmismatched-tags \
-Wnoexcept \
-Wredundant-tags \
-Wrestrict \
-Wstringop-overflow \
Expand Down Expand Up @@ -18690,7 +18689,7 @@ if test "$found_fslib" != "yes"
then
as_fn_error $? "
There seems to be <filesystem> support, but I could not figure out now to make
it work. You'll have to add set your own build options for this.
it work. You'll have to set your own build options for this.
" "$LINENO" 5
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $result_msg" >&5
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ then
-Wattribute-alias=2 \
-Wlogical-op \
-Wmismatched-tags \
-Wnoexcept \
-Wredundant-tags \
-Wrestrict \
-Wstringop-overflow \
Expand Down
3 changes: 2 additions & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# XXX: Pin versions.
# TODO: Pin versions.
# TODO: Do we even still need this file?
dia
sphinx-rtd-theme
myst-parser
Loading

0 comments on commit 6f02798

Please sign in to comment.