Skip to content

Revert "package import Foundation.NSData (#231)" - #238

Merged
stephencelis merged 1 commit into
mainfrom
revert-package-import
Aug 31, 2026
Merged

stephencelis merged 1 commit into
mainfrom
revert-package-import

Conversation

@stephencelis

Copy link
Copy Markdown
Member

This reverts commit 4dfe1b9.

While the syntax works on macOS, that seems to be an Objective-C fluke, and we're seeing failures on Linux now.

@JanGorman I think we'll need some kind of integration-style test to address this. Our Linux CI started failing with this:

Sources/Sharing/Internal/Deprecations.swift:2:18: error: no such module 'Foundation.NSData'
 1 | #if canImport(Foundation)
 2 |   package import Foundation.NSData
   |                  `- error: no such module 'Foundation.NSData'
 3 | #endif
 4 | 

And unfortunately doing the package import class syntax introduces a warning we can't suppress. Ideally there's a workaround that doesn't require a warning that might get accidentally "fixed" later on.

We're going to revert for now, but let us know if you want to dig in deeper.

This reverts commit 4dfe1b9.

While the syntax works on macOS, that seems to be an Objective-C fluke, and we're seeing failures on
Linux now.
@stephencelis
stephencelis merged commit a7771cd into main Aug 31, 2026
11 of 12 checks passed
@stephencelis
stephencelis deleted the revert-package-import branch August 31, 2026 17:43
@JanGorman

Copy link
Copy Markdown
Contributor

Terribly sorry about that guys. I'll do some digging, most likely the underlying issue is something with our build configuration.

@JanGorman

Copy link
Copy Markdown
Contributor

Found the underlying issue, it turned out to be our project setup 🙈 #229 (comment)

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.

3 participants