fix(plugin-oracle): handle transactionLost in the diagnostics switch - #3008
Merged
Merged
Conversation
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AllPluginsdoes not compile onmain.#3001 added
case transactionLosttoOracleCoreError(Packages/TableProOracle/Sources/TableProOracleCore/OracleCoreError.swift:24) and did not add it to the exhaustive switch inOraclePlugin+Diagnostics.swift:15, which has nodefault:arm:The app scheme does not build the Oracle plugin, so this passes a normal
build. It fails theAllPluginsaggregate, which is what PR CI's "Compile every plugin" step runs for any change touchingPlugins/, and what the release build needs. Every open pull request that touches a plugin is red on it right now.The fix
.transactionLostjoins the arm that already returnsnilfor the errors with no extra diagnostic to offer. ItserrorDescriptionalready 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."), anddiagnosereturningnilis what makes the app show exactly that.Whether transaction loss deserves a titled diagnostic panel with suggested actions, the way
.queryTimedOuthas, 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
AllPluginsaggregate builds (28,462-line log,status: PASS). It fails onmainat the same commit without this change.swiftlint lint --stricton the changed file: 0 violations.Found while verifying the fix for #2994, which touches
Plugins/and cannot go green until this lands.