SIGN IN SIGN UP

Drop cached db connections in macros upon hitting an error (#4009)

Once a connection to the database is lost all future macro evaluations
will fail. This is fine for normal compilation since it tends to be
short but causes issues with rust-analyzer since it keeps the macro
binaries loaded for a long time.

This commit changes the macro implementation to drop the cached
connection when it encounters an IO or protocol error. In practice these
seem to be the errors that show up when the connection is lost and
dumping the connection on every error would have unnecessary overhead.
S
Sean Lynch committed
69bb5952ab665f6edfb461b45e63cc3b6d99a4d0
Parent: 3abb186
Committed by GitHub <noreply@github.com> on 8/29/2025, 3:37:49 AM