Skip to content

Fix missing imports when enabling MemberImportVisibility#3302

Open
bkolb wants to merge 1 commit intoswiftlang:mainfrom
bkolb:3301-fixMemberImportVisibilityErrors
Open

Fix missing imports when enabling MemberImportVisibility#3302
bkolb wants to merge 1 commit intoswiftlang:mainfrom
bkolb:3301-fixMemberImportVisibilityErrors

Conversation

@bkolb
Copy link
Copy Markdown

@bkolb bkolb commented Mar 28, 2026

Add missing imports when compiling with
.enableUpcomingFeature("MemberImportVisibility")

Issue: #3301

Comment thread Package.swift
Add missing imports when compiling with
`.enableUpcomingFeature("MemberImportVisibility")`

Issue: swiftlang#3301
@bkolb bkolb force-pushed the 3301-fixMemberImportVisibilityErrors branch from 003cf6a to 3695588 Compare March 29, 2026 10:53
@rintaro
Copy link
Copy Markdown
Member

rintaro commented Mar 29, 2026

Could you fix warnings?

/__w/swift-syntax/swift-syntax/Sources/SwiftRefactor/ConvertComputedPropertyToStored.swift:15:8: warning: public import of 'SwiftSyntaxBuilder' was not used in public declarations or inlinable code
13 | #if compiler(>=6)
14 | public import SwiftSyntax
15 | public import SwiftSyntaxBuilder
   |        `- warning: public import of 'SwiftSyntaxBuilder' was not used in public declarations or inlinable code
16 | #else
17 | import SwiftSyntax

Also a bunch of test targets are also missing imports:

/__w/swift-syntax/swift-syntax/Tests/SwiftSyntaxTestSupportTest/IncrementalParseTestUtilsTest.swift:33:7: error: property 'edits' is not available due to missing import of defining module 'SwiftParser' [#MemberImportVisibility]
 14 | import XCTest
 15 | import _SwiftSyntaxTestSupport
 16 | 
    | `- note: add import of module 'SwiftParser'
 17 | class IncrementalParseUtilTest: XCTestCase {
 18 |   public func testGetConcurrentEdits() {
    :
 31 | 
 32 |     XCTAssertEqual(
 33 |       concurrentEdits.edits,
    |       `- error: property 'edits' is not available due to missing import of defining module 'SwiftParser' [#MemberImportVisibility]
 34 |       [
 35 |         SourceEdit(

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.

2 participants