Repository navigation
build(plugins): give the 41 plugin targets the app's concurrency settings - #2958
Merged
Merged
Conversation
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.
The app, both helper tools and both test bundles compile with
SWIFT_APPROACHABLE_CONCURRENCYandSWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY. TheDriverPlugintarget template, which 41 plugin bundles share, had neither. The iOS project sets both on all three of its targets, so this was drift rather than a decision.It matters because of what the first of those settings turns on. Xcode 27's
Swift.xcspecexpandsSWIFT_APPROACHABLE_CONCURRENCYinto five upcoming features, andNonisolatedNonsendingByDefault(SE-0461) is one of them: anonisolated asyncfunction runs on the caller's executor instead of hopping to the global concurrent executor. A plugin bundle isdlopened into the app's own process, so one function had two execution semantics depending on which target compiled it, and nothing checked for that.scripts/ci/check-ios-shared-isolation.pycovers the isolation keyword on shared files, not the feature set.What the second setting found
MemberImportVisibility(SE-0444) makes a file's use of an API an error unless that file imports the module defining it. Turning it on named 22 files across 8 plugins that callLogger, its log levels or its string interpolation while relying on a different file in the same module to have importedos:MariaDBCharacterSet,MariaDBPluginConnection,MySQLPluginDriver+CreateDatabase,+Flavor,+OceanBaseDefaultsLibPQPluginConnection,+ResultReading,+SpatialRenderingRedisPluginDriver,RedisPluginConnection,RedisClusterChannel,RedisSentinelChannel,HiredisSentinelTransportMongoDBConnection,+ScriptHelpers,+SyncHelpersEach one is a line of
import osin the first commit. They compile today only because of a neighbour, which is exactly the fragility the feature exists to remove.What this PR does not do, and why that is the important part
TableProPluginKitis deliberately left alone. It is the only target built withBUILD_LIBRARY_FOR_DISTRIBUTION, so its signatures are ABI, andNonisolatedNonsendingByDefaultchanges the spelling of every publicasyncdeclaration.Measured rather than assumed, with
scripts/check-pluginkit-abi.shagainst the merge base and the setting applied to PluginKit alone:nonisolated(nonsending)in front, and the other 8 are declarations whose closure parameter types gained it. Zero are relocations, zero are genuine removals.Example, before and after:
By CLAUDE.md's own rule, a changed signature on an existing requirement is a breaking ABI change: it needs
currentPluginKitVersionandminimumCompatiblePluginKitVersionbumped, plusscripts/release-all-plugins.shacross all 23 registry plugins before or with the app release. That is the #1917 and 0.49.0 failure shape, and it is not worth spending a breaking bump on a compile-time consistency win. It should ride the next breaking bump that has its own reason to exist, whenever that is.The plugin bundles carry no such risk. They are leaf
bundletargets whose calling conventions are private to themselves, which is why they can move now and PluginKit cannot.Verification
verify.sh plugins(theAllPluginsaggregate, all 41 targets): PASS.scripts/ci/verify-plugin-loads.shover the built products: all 41 pluginsdlopen.verify.sh build: PASS.verify.sh testoverMySQLPartitionBoundTests,MySQLCharacterSetTests,RedisCommandRoutingTests,PostgreSQLObjectQueriesTestsandMongoDBUuidCodecTests: 59 cases, all passing.swiftlint lint --strictover every changed file: 0 violations.One note on the
AllPluginsrun. It fails on this machine atmaintoo, insideoracle-nio, withunknown attribute 'usableFromInlinenonisolated'from a@TaskLocalmacro expansion under Swift 6.4. The resolved checkout was patched per the two known edits to get a real result; that patch is build output and is not part of this PR.