Skip to content
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
12 changes: 6 additions & 6 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ let package = Package(
.executable(name: "carton-release", targets: ["carton-release"]),
],
dependencies: [
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.6.3"),
.package(
url: "https://github.com/swift-server/async-http-client.git",
.upToNextMinor(from: "1.6.4")
),
.package(
url: "https://github.com/apple/swift-argument-parser.git",
from: "0.4.3"
),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.33.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.34.0"),
.package(
name: "SwiftPM",
url: "https://github.com/apple/swift-package-manager.git",
Expand All @@ -37,7 +40,7 @@ let package = Package(
.branch("release/5.5")
),
.package(url: "https://github.com/OpenCombine/OpenCombine.git", from: "0.12.0"),
.package(url: "https://github.com/vapor/vapor.git", from: "4.49.2"),
.package(url: "https://github.com/vapor/vapor.git", from: "4.53.0"),
.package(url: "https://github.com/apple/swift-crypto.git", from: "1.1.0"),
.package(url: "https://github.com/JohnSundell/Splash.git", from: "0.16.0"),
.package(
Expand Down
2 changes: 1 addition & 1 deletion Sources/CartonHelpers/DefaultToolchain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.

public let defaultToolchainVersion = "wasm-5.5-SNAPSHOT-2021-11-16-a"
public let defaultToolchainVersion = "wasm-5.5.0-RELEASE"
2 changes: 1 addition & 1 deletion Sources/CartonHelpers/Version.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.

public let cartonVersion = "0.11.0"
public let cartonVersion = "0.12.0"
21 changes: 17 additions & 4 deletions Sources/SwiftToolchain/ToolchainInstallation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,24 @@ extension ToolchainSystem {
var subscriptions = [AnyCancellable]()
let request = try HTTPClient.Request.get(url: url)

// Clean up the downloaded file (especially important for failed downloads, otherwise running
// `carton` again will fail trying to pick up the broken download).
defer {
do {
try fileSystem.removeFileTree(archivePath)
} catch {
terminal.write("Failed to remove downloaded file with error \(error)\n", inColor: .red)
}
}

_ = try tsc_await { (completion: @escaping (Result<(), Error>) -> ()) in
client.execute(request: request, delegate: delegate).futureResult.whenComplete { _ in
subject.send(completion: .finished)
client.execute(request: request, delegate: delegate).futureResult.whenComplete {
switch $0 {
case .success:
subject.send(completion: .finished)
case let .failure(error):
subject.send(completion: .failure(error))
}
}

subject
Expand Down Expand Up @@ -101,8 +116,6 @@ extension ToolchainSystem {
terminal.logLookup("Unpacking the archive: ", arguments.joined(separator: " "))
_ = try processDataOutput(arguments)

try fileSystem.removeFileTree(archivePath)

return installationPath
}

Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/TestApp/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Tests/Fixtures/TestApp/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let package = Package(
.executable(name: "TestApp", targets: ["TestApp"]),
],
dependencies: [
.package(url: "https://github.com/swiftwasm/JavaScriptKit", from: "0.10.1"),
.package(url: "https://github.com/swiftwasm/JavaScriptKit", from: "0.11.1"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "carton",
"version": "0.11.0",
"version": "0.12.0",
"description": "📦 Watcher, bundler, and test runner for your SwiftWasm apps ",
"main": "index.js",
"scripts": {
Expand Down