build: adopt explicit import access-level modifiers - #1074
Merged
Merged
Conversation
Adopts two of the upcoming-feature flags from pointfreeco/sqlite-data#467 into the per-target swiftSettings loop.
Enables InternalImportsByDefault and MemberImportVisibility in the per-target swiftSettings loop, adopted from pointfreeco/sqlite-data#467, and updates every non-test source file across all targets to declare public import / package import where a type crosses that file's public or package API surface, or a plain import where a module's members are only used internally but weren't directly imported before. Only import statements were changed; no declaration's access level was modified. Verified with `swift build`, `swift build --build-tests`, and `swift test` (failures present are pre-existing: integration tests require a live Supabase instance, and two Storage snapshot tests are order-dependent under full-suite parallel execution — both reproduce identically on the unmodified base commit). Stacked on feat/swift6-warnings-as-errors.
mandarini
approved these changes
Jul 6, 2026
spydon
approved these changes
Jul 6, 2026
grdsdev
enabled auto-merge (squash)
July 6, 2026 14:27
Coverage Report for CI Build 28807969182Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+1.8%) to 83.019%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions29 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
With MemberImportVisibility enabled, URLRequest/URLResponse/HTTPURLResponse on Linux come from FoundationNetworking. Upgrading the import access level to match the declarations that use these types fixes the build errors. LoggerInterceptor also needed the FoundationNetworking import added since it accesses .httpMethod, .url, and .expectedContentLength.
public/package declarations whose types (URLRequest, URLResponse, HTTPURLResponse, URLSession) come from FoundationNetworking on Linux require a matching-or-higher access level import to compile with MemberImportVisibility enabled.
4 tasks
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.
Summary
MemberImportVisibilityin the per-targetswiftSettingsloop inPackage.swift.Helpers,Auth,Functions,PostgREST,RealtimeV2,Realtime,Storage,Supabase, andTestHelpers, which is a regular.targetdespite the name) to declarepublic import/package importwherever a type crosses that file's public or package API surface, or add a plainimportwhere a module's members were used without being directly imported (relying on a transitive import, whichMemberImportVisibilityno longer allows).Test plan
swift buildsucceeds with zero errorsswift build --build-testssucceeds with zero errorsswift test— the failures present (26) are pre-existing and reproduce identically on the unmodified base commit when run as the same full parallel suite:IntegrationTests.RealtimeIntegrationTestsfailures require a live local Supabase instance (supabase start), not present in this environment.StorageTestssnapshot tests are order-dependent under full-suite parallel execution and fail/pass depending on run order, independent of this change.swift-format lint -ron all touched files shows no new warnings versus the base commit (one pre-existing-styleOrderedImportsissue that this change itself introduced inAuthClient.swiftwas caught and fixed before committing)