Skip to content

Remove FoundationPreview umbrella module #818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,14 @@ var dependencies: [Package.Dependency] {
}

let package = Package(
name: "FoundationPreview",
name: "swift-foundation",
platforms: [.macOS("13.3"), .iOS("16.4"), .tvOS("16.4"), .watchOS("9.4")],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(name: "FoundationPreview", targets: ["FoundationPreview"]),
.library(name: "FoundationEssentials", targets: ["FoundationEssentials"]),
.library(name: "FoundationInternationalization", targets: ["FoundationInternationalization"]),
],
dependencies: dependencies,
targets: [
// Foundation (umbrella)
.target(
name: "FoundationPreview",
dependencies: [
"FoundationEssentials",
"FoundationInternationalization",
],
path: "Sources/Foundation"),

// _FoundationCShims (Internal)
.target(name: "_FoundationCShims",
cSettings: [.define("_CRT_SECURE_NO_WARNINGS",
Expand Down
13 changes: 0 additions & 13 deletions Sources/Foundation/Foundation.swift

This file was deleted.

2 changes: 1 addition & 1 deletion Tests/FoundationEssentialsTests/ProcessInfoTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ final class ProcessInfoTests : XCTestCase {
#if FOUNDATION_FRAMEWORK
let targetName = "TestHost"
#elseif os(Linux) || os(Windows)
let targetName = "FoundationPreviewPackageTests.xctest"
let targetName = "swift-foundationPackageTests.xctest"
#else
let targetName = "xctest"
#endif
Expand Down
4 changes: 2 additions & 2 deletions Tests/FoundationEssentialsTests/ResourceUtilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ func testData(forResource resource: String, withExtension ext: String, subdirect
return try? Data(contentsOf: essentialsURL)
#else
// swiftpm drops the resources next to the executable, at:
// ./FoundationPreview_FoundationEssentialsTests.resources/Resources/
// ./swift-foundation_FoundationEssentialsTests.resources/Resources/
// Hard-coding the path is unfortunate, but a temporary need until we have a better way to handle this
var path = URL(filePath: ProcessInfo.processInfo.arguments[0])
.deletingLastPathComponent()
.appending(component: "FoundationPreview_FoundationEssentialsTests.resources", directoryHint: .isDirectory)
.appending(component: "swift-foundation_FoundationEssentialsTests.resources", directoryHint: .isDirectory)
.appending(component: "Resources", directoryHint: .isDirectory)
if let subdirectory {
path.append(path: subdirectory, directoryHint: .isDirectory)
Expand Down