Skip to content

Commit

Permalink
Restore compilation for Linux
Browse files Browse the repository at this point in the history
This removes all the @retroactive guards which is unknown on Swift 5.10
  • Loading branch information
mickeyl committed Jan 13, 2025
1 parent 62e2298 commit 2cfebb7
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
import Foundation

extension Date: @retroactive ExpressibleByStringLiteral {
extension Date: ExpressibleByStringLiteral {

/// Allows initializing via string in the format `yyyy.MM.dd`.
public init(stringLiteral value: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
import Foundation

extension DispatchTimeInterval: @retroactive Comparable {
extension DispatchTimeInterval: Comparable {

var CC_nanoseconds: UInt64 {
switch self {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
import Foundation

extension FileHandle: @retroactive TextOutputStream {
extension FileHandle: TextOutputStream {

public func write(_ string: String) {
let data = Data(string.utf8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
import Foundation

extension Notification.Name: @retroactive ExpressibleByStringLiteral {
extension Notification.Name: ExpressibleByStringLiteral {

/// Initialize using a string literal:
/// ```swift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
import Foundation

extension Stream.Status: @retroactive CustomStringConvertible {
extension Stream.Status: CustomStringConvertible {

@inlinable public var description: String {
switch self {
Expand All @@ -23,7 +23,7 @@ extension Stream.Status: @retroactive CustomStringConvertible {
}
}

extension Stream.Event: @retroactive CustomStringConvertible {
extension Stream.Event: CustomStringConvertible {

@inlinable public var description: String {
var events: [String] = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
import Foundation

extension URL: @retroactive ExpressibleByStringInterpolation {
extension URL: ExpressibleByStringInterpolation {

/// Initialize from string literal.
public init(stringLiteral value: StringLiteralType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Foundation
import FoundationNetworking
#endif

extension URLRequest: @retroactive ExpressibleByStringInterpolation {
extension URLRequest: ExpressibleByStringInterpolation {

/// Initialize from string literal.
public init(stringLiteral value: StringLiteralType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public extension Cornucopia.Core {
#else
let machine = "unknown"
#endif
self.info = DeviceInfo(machine: machine, model: model)
self.info = DeviceInfo(machine: machine, model: model, operatingSystem: "linux", operatingSystemVersion: "1.0")
let urlToUUID = URL(fileURLWithPath: "/tmp/.cornucopia.core.uuid")
if let string = try? String(contentsOf: urlToUUID), let uuid = UUID(uuidString: string) {
self.uuid = uuid
Expand Down
2 changes: 2 additions & 0 deletions Sources/CornucopiaCore/Threading/RunLoopThread.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//
// Cornucopia – (C) Dr. Lauer Information Technology
//
#if canImport(ObjectiveC)
import Foundation
import Dispatch

Expand Down Expand Up @@ -68,3 +69,4 @@ extension Cornucopia.Core.RunLoopThread {
logger.trace("Thread still healthy")
}
}
#endif

0 comments on commit 2cfebb7

Please sign in to comment.