Skip to content
Open
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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
os:
- 'ubuntu-latest'
#- 'macos-latest'
# Homebrew bottle builds on macos-14, so we need to as well
- 'macos-14'
- 'macos-15-intel'
steps:
- name: Checkout skipstone.git
uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.10
// swift-tools-version: 6.1
import PackageDescription

let package = Package(
Expand Down
2 changes: 1 addition & 1 deletion Sources/SkipBuild/Commands/ADBCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fileprivate let adbCommandEnabled = false

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct ADBCommand: MessageCommand, ToolOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "adb",
abstract: "Run an adb command with error scanning",
usage: """
Expand Down
38 changes: 19 additions & 19 deletions Sources/SkipBuild/Commands/AndroidCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fileprivate let androidCommandEnabled = false

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidCommand: AsyncParsableCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "android",
abstract: "Build, run, and test Swift packages for Android",
discussion: """
Expand All @@ -41,7 +41,7 @@ struct AndroidCommand: AsyncParsableCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidHomeCommand: AsyncParsableCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "home",
abstract: "Install and manage the Android SDK in ANDROID_HOME",
discussion: """
Expand All @@ -55,7 +55,7 @@ struct AndroidHomeCommand: AsyncParsableCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidHomeInstallCommand: MessageCommand, ToolOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "install",
abstract: "Install Android SDK Command-line Tools, platform-tools, and emulator in ANDROID_HOME",
usage: """
Expand Down Expand Up @@ -303,7 +303,7 @@ func installSDKComponents(

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidSDKCommand: AsyncParsableCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "sdk",
abstract: "Manage installation of Swift Android SDK",
discussion: """
Expand Down Expand Up @@ -421,7 +421,7 @@ extension ToolchainOptionsCommand where Self : StreamingCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidSDKInstallCommand: MessageCommand, ToolchainOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "install",
abstract: "Install the native Swift Android SDK",
usage: """
Expand Down Expand Up @@ -482,7 +482,7 @@ struct AndroidSDKInstallCommand: MessageCommand, ToolchainOptionsCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidSDKUninstallCommand: MessageCommand, ToolchainOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "uninstall",
abstract: "Uninstall the Swift Android SDK",
usage: """
Expand Down Expand Up @@ -555,7 +555,7 @@ struct AndroidSDKUninstallCommand: MessageCommand, ToolchainOptionsCommand {
struct AndroidSDKListCommand: SkipCommand, StreamingCommand, OutputOptionsCommand, ToolOptionsCommand {
typealias Output = SwiftSDKOutput

static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "list",
abstract: "List the installed Swift Android SDKs",
usage: """
Expand Down Expand Up @@ -624,7 +624,7 @@ struct AndroidSDKListCommand: SkipCommand, StreamingCommand, OutputOptionsComman

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidToolchainCommand: AsyncParsableCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "toolchain",
abstract: "Manage installation of Swift Android Host Toolchain",
discussion: """
Expand All @@ -638,7 +638,7 @@ struct AndroidToolchainCommand: AsyncParsableCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidToolchainVersionCommand: AndroidOperationCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "version",
abstract: "Show the version of the Swift Android Host Toolchain",
shouldDisplay: true)
Expand Down Expand Up @@ -723,8 +723,8 @@ extension AndroidOperationCommand {
) {
continue
}
print(outputLine.line, to: &TSCBasic.stderrStream)
TSCBasic.stderrStream.flush()
print(outputLine.line, to: &skipBuildStderrStream)
skipBuildStderrStream.flush()
} else {
if !outputOptions.verbose && (
outputLine.line.hasPrefix("warning: Could not read SDKSettings.json for SDK")
Expand All @@ -733,8 +733,8 @@ extension AndroidOperationCommand {
) {
continue
}
print(outputLine.line, to: &TSCBasic.stdoutStream)
TSCBasic.stdoutStream.flush()
print(outputLine.line, to: &skipBuildStdoutStream)
skipBuildStdoutStream.flush()
}
}
#endif
Expand Down Expand Up @@ -1433,7 +1433,7 @@ extension AndroidOperationCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidBuildCommand: AndroidOperationCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "build",
abstract: "Build the native project for Android",
usage: """
Expand Down Expand Up @@ -1475,7 +1475,7 @@ struct AndroidBuildCommand: AndroidOperationCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidRunCommand: AndroidOperationCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "run",
abstract: "Run the executable target on an Android device or emulator",
usage: """
Expand Down Expand Up @@ -1529,7 +1529,7 @@ struct AndroidRunCommand: AndroidOperationCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidEmulatorCommand: AsyncParsableCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "emulator",
abstract: "Manage Android emulators",
discussion: """
Expand All @@ -1546,7 +1546,7 @@ struct AndroidEmulatorCommand: AsyncParsableCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidEmulatorCreateCommand: MessageCommand, ToolOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "create",
abstract: "Install and create an Android emulator image",
usage: """
Expand Down Expand Up @@ -1640,7 +1640,7 @@ struct AndroidEmulatorCreateCommand: MessageCommand, ToolOptionsCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidEmulatorLaunchCommand: MessageCommand, ToolOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "launch",
abstract: "Launch an Android emulator",
usage: """
Expand Down Expand Up @@ -1787,7 +1787,7 @@ struct AndroidEmulatorLaunchCommand: MessageCommand, ToolOptionsCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidEmulatorListCommand: MessageCommand, ToolOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "list",
abstract: "List installed Android emulator images (AVDs)",
usage: """
Expand Down
8 changes: 4 additions & 4 deletions Sources/SkipBuild/Commands/AndroidTestCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import SkipDriveExternal

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AndroidTestCommand: AndroidOperationCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "test",
abstract: "Test the native project on an Android device or emulator",
usage: """
Expand Down Expand Up @@ -490,8 +490,8 @@ fileprivate extension AndroidOperationCommand {
if line.hasPrefix(instrumentationStatusPrefix) {
let output = String(line.dropFirst(instrumentationStatusPrefix.count))
if let formatted = formatTestEvent(output, term: outputOptions.term) {
print(formatted, to: &TSCBasic.stdoutStream)
TSCBasic.stdoutStream.flush()
print(formatted, to: &skipBuildStdoutStream)
skipBuildStdoutStream.flush()
}
eventLines.append(output)
} else if line.hasPrefix(instrumentationCodePrefix) {
Expand Down Expand Up @@ -600,7 +600,7 @@ private let testFullClass = "\(testPackage).\(testClassName)"
/// Package.swift for the generated Swift test harness package.
/// Defines a dynamic library target that produces `libtest_harness.so`
private let harnessPackageSwift: String = """
// swift-tools-version: 6.0
// swift-tools-version: 6.1
import PackageDescription

let package = Package(
Expand Down
4 changes: 2 additions & 2 deletions Sources/SkipBuild/Commands/AppCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import SkipSyntax

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AppCommand: AsyncParsableCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "app",
abstract: "Build, run, and manage Skip apps",
discussion: """
Expand All @@ -24,7 +24,7 @@ struct AppCommand: AsyncParsableCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct AppLaunchCommand: MessageCommand, ToolOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "launch",
abstract: "Build and launch the Skip app on iOS simulator and/or Android emulator",
usage: """
Expand Down
4 changes: 2 additions & 2 deletions Sources/SkipBuild/Commands/CheckupCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import Glibc
#endif

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct CheckupCommand: MessageCommand, ToolOptionsCommand {
static var configuration = CommandConfiguration(
struct CheckupCommand: MessageCommand, ToolOptionsCommand, @unchecked Sendable {
static let configuration = CommandConfiguration(
commandName: "checkup",
abstract: "Run tests to ensure Skip is in working order",
usage: """
Expand Down
4 changes: 2 additions & 2 deletions Sources/SkipBuild/Commands/CreateCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import FoundationNetworking

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct CreateCommand: StreamingCommand, ToolchainOptionsCommand, CreateOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "create",
abstract: "Create a new Skip project interactively",
usage: """
Expand Down Expand Up @@ -54,7 +54,7 @@ struct CreateCommand: StreamingCommand, ToolchainOptionsCommand, CreateOptionsCo
print(msg)
} else {
print(msg, terminator: "")
stdoutStream.flush()
skipBuildStdoutStream.flush()
}
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/SkipBuild/Commands/DevicesCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Either
struct DevicesCommand: SkipCommand, StreamingCommand, OutputOptionsCommand, ToolOptionsCommand {
typealias Output = DevicesOutput

static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "devices",
abstract: "List connected devices and emulators/simulators",
usage: """
Expand Down
2 changes: 1 addition & 1 deletion Sources/SkipBuild/Commands/DoctorCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import TSCUtility
struct DoctorCommand: SkipCommand, StreamingCommand, ToolOptionsCommand {
typealias Output = MessageBlock

static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "doctor",
abstract: "Evaluate and diagnose Skip development environment",
usage: """
Expand Down
2 changes: 1 addition & 1 deletion Sources/SkipBuild/Commands/DumpSkipCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import TSCBasic
import SkipSyntax

struct DumpSkipCommand: AsyncParsableCommand {
static var configuration = CommandConfiguration(commandName: "ast-skip", abstract: "Print the Skip AST", shouldDisplay: false)
static let configuration = CommandConfiguration(commandName: "ast-skip", abstract: "Print the Skip AST", shouldDisplay: false)

@Option(name: [.customShort("S")], help: ArgumentHelp("Preprocessor symbols", valueName: "file"))
var symbols: [String] = []
Expand Down
2 changes: 1 addition & 1 deletion Sources/SkipBuild/Commands/DumpSwiftCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import SwiftParser
import SkipSyntax

struct DumpSwiftCommand: AsyncParsableCommand {
static var configuration = CommandConfiguration(commandName: "ast-swift", abstract: "Print the Swift AST", shouldDisplay: false)
static let configuration = CommandConfiguration(commandName: "ast-swift", abstract: "Print the Swift AST", shouldDisplay: false)

@Option(name: [.customShort("S")], help: ArgumentHelp("Preprocessor symbols", valueName: "file"))
var symbols: [String] = []
Expand Down
2 changes: 1 addition & 1 deletion Sources/SkipBuild/Commands/ExportCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fileprivate let exportCommandEnabled = false

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct ExportCommand: MessageCommand, ToolOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "export",
abstract: "Export the Gradle project and built artifacts",
usage: """
Expand Down
2 changes: 1 addition & 1 deletion Sources/SkipBuild/Commands/GradleCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fileprivate let gradleCommandEnabled = false

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct GradleCommand: SkipCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "gradle",
abstract: "Launch the gradle build tool",
usage: """
Expand Down
14 changes: 7 additions & 7 deletions Sources/SkipBuild/Commands/IconCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import struct UniformTypeIdentifiers.UTType

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct IconCommand: MessageCommand, StreamingCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "icon",
abstract: "Create and manage app icons",
usage: """
Expand Down Expand Up @@ -649,13 +649,13 @@ extension CGContext {
@objc
class CGSVGDocument: NSObject { }

private var CGSVGDocumentRetain: (@convention(c) (CGSVGDocument?) -> Unmanaged<CGSVGDocument>?) = loadFunction("CGSVGDocumentRetain")
private var CGSVGDocumentRelease: (@convention(c) (CGSVGDocument?) -> Void) = loadFunction("CGSVGDocumentRelease")
private var CGSVGDocumentCreateFromData: (@convention(c) (CFData?, CFDictionary?) -> Unmanaged<CGSVGDocument>?) = loadFunction("CGSVGDocumentCreateFromData")
private var CGContextDrawSVGDocument: (@convention(c) (CGContext?, CGSVGDocument?) -> Void) = loadFunction("CGContextDrawSVGDocument")
private var CGSVGDocumentGetCanvasSize: (@convention(c) (CGSVGDocument?) -> CGSize) = loadFunction("CGSVGDocumentGetCanvasSize")
nonisolated(unsafe) private var CGSVGDocumentRetain: (@convention(c) (CGSVGDocument?) -> Unmanaged<CGSVGDocument>?) = loadFunction("CGSVGDocumentRetain")
nonisolated(unsafe) private var CGSVGDocumentRelease: (@convention(c) (CGSVGDocument?) -> Void) = loadFunction("CGSVGDocumentRelease")
nonisolated(unsafe) private var CGSVGDocumentCreateFromData: (@convention(c) (CFData?, CFDictionary?) -> Unmanaged<CGSVGDocument>?) = loadFunction("CGSVGDocumentCreateFromData")
nonisolated(unsafe) private var CGContextDrawSVGDocument: (@convention(c) (CGContext?, CGSVGDocument?) -> Void) = loadFunction("CGContextDrawSVGDocument")
nonisolated(unsafe) private var CGSVGDocumentGetCanvasSize: (@convention(c) (CGSVGDocument?) -> CGSize) = loadFunction("CGSVGDocumentGetCanvasSize")

private let CoreSVG = dlopen("/System/Library/PrivateFrameworks/CoreSVG.framework/CoreSVG", RTLD_NOW)
nonisolated(unsafe) private let CoreSVG = dlopen("/System/Library/PrivateFrameworks/CoreSVG.framework/CoreSVG", RTLD_NOW)

private func loadFunction<T>(_ name: String) -> T {
unsafeBitCast(dlsym(CoreSVG, name), to: T.self)
Expand Down
2 changes: 1 addition & 1 deletion Sources/SkipBuild/Commands/InfoCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct InfoCommand: SingleStreamingCommand {
}
}

static var configuration = CommandConfiguration(commandName: "info",
static let configuration = CommandConfiguration(commandName: "info",
abstract: "Print system information",
shouldDisplay: false)

Expand Down
2 changes: 1 addition & 1 deletion Sources/SkipBuild/Commands/InitCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import FoundationNetworking

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct InitCommand: MessageCommand, CreateOptionsCommand, ProjectCommand, ToolOptionsCommand, BuildOptionsCommand, StreamingCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "init",
abstract: "Initialize a new Skip project",
usage: """
Expand Down
4 changes: 2 additions & 2 deletions Sources/SkipBuild/Commands/MetaCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fileprivate let metaCommandEnabled = false

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct MetaCommand: AsyncParsableCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "meta",
abstract: "App metadata and SBOM tools",
discussion: """
Expand All @@ -40,7 +40,7 @@ struct MetaCommand: AsyncParsableCommand {

@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct MetaIndexCommand: MessageCommand, ToolOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "index",
abstract: "Generate a JSON metadata index for the app",
usage: """
Expand Down
2 changes: 1 addition & 1 deletion Sources/SkipBuild/Commands/PluginCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import TSCBasic
/// It is means to be run from an app's settings.gradle.kts to ensure that the plugin is always available.
@available(macOS 13, iOS 16, tvOS 16, watchOS 8, *)
struct PluginCommand: MessageCommand, ToolOptionsCommand {
static var configuration = CommandConfiguration(
static let configuration = CommandConfiguration(
commandName: "plugin",
abstract: "Set up the Skip gradle plugin",
shouldDisplay: false)
Expand Down
Loading
Loading