Skip to content

fix(plugin-oracle): handle transactionLost in the diagnostics switch - #3008

Merged
datlechin merged 2 commits into
mainfrom
fix/oracle-diagnostics-transaction-lost
Sep 20, 2026
Merged

datlechin merged 2 commits into
mainfrom
fix/oracle-diagnostics-transaction-lost

Conversation

@datlechin

Copy link
Copy Markdown
Member

AllPlugins does not compile on main.

#3001 added case transactionLost to OracleCoreError (Packages/TableProOracle/Sources/TableProOracleCore/OracleCoreError.swift:24) and did not add it to the exhaustive switch in OraclePlugin+Diagnostics.swift:15, which has no default: arm:

Plugins/OracleDriverPlugin/OraclePlugin+Diagnostics.swift:15:9: error: switch must be exhaustive

The app scheme does not build the Oracle plugin, so this passes a normal build. It fails the AllPlugins aggregate, which is what PR CI's "Compile every plugin" step runs for any change touching Plugins/, and what the release build needs. Every open pull request that touches a plugin is red on it right now.

The fix

.transactionLost joins the arm that already returns nil for the errors with no extra diagnostic to offer. Its errorDescription already tells the user what to do ("The connection was lost while a transaction was open. Check which of its changes were saved before running them again."), and diagnose returning nil is what makes the app show exactly that.

Whether transaction loss deserves a titled diagnostic panel with suggested actions, the way .queryTimedOut has, is a product call for the author of #3001. This restores the build without making it.

No CHANGELOG entry: #3001 is itself still unreleased.

Verified

  • AllPlugins aggregate builds (28,462-line log, status: PASS). It fails on main at the same commit without this change.
  • swiftlint lint --strict on the changed file: 0 violations.

Found while verifying the fix for #2994, which touches Plugins/ and cannot go green until this lands.

Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
@datlechin
datlechin merged commit 5395ece into main Sep 20, 2026
5 checks passed
@datlechin
datlechin deleted the fix/oracle-diagnostics-transaction-lost branch September 20, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant