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
28 changes: 1 addition & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Test
run: swift test --skip-build

xcode_16_2:
xcode_16_3:
runs-on: macos-15
env:
DEVELOPER_DIR: /Applications/Xcode_16.2.app/Contents/Developer
Expand All @@ -55,32 +55,6 @@ jobs:
- name: Test
run: swift test --skip-build

xcode_15_4:
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Version
run: swift --version
- name: Build
run: swift build --build-tests
- name: Test
run: swift test --skip-build

linux_5_10:
runs-on: ubuntu-latest
container: swift:5.10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Version
run: swift --version
- name: Build
run: swift build --build-tests
- name: Test
run: swift test --skip-build

linux_6:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions CommandLine/CommandLine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import Foundation
import SwiftDraw
import SwiftDrawDOM

extension SwiftDraw.CommandLine {

Expand Down
4 changes: 0 additions & 4 deletions DOM/Sources/TextOutputStream+StandardError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,8 @@ package extension TextOutputStream where Self == StandardErrorStream {

package struct StandardErrorStream: TextOutputStream {

#if compiler(<6.0)
fileprivate static var shared = StandardErrorStream()
#else
nonisolated(unsafe)
fileprivate static var shared = StandardErrorStream()
#endif

package func write(_ string: String) {
if #available(macOS 10.15.4, iOS 13.4, tvOS 13.4, watchOS 6.2, *) {
Expand Down
2 changes: 1 addition & 1 deletion DOM/Tests/DOM+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ extension DOM {
// Equatable just for tests

extension DOM.GraphicsElement: Swift.Equatable {
public static func ==(lhs: DOM.GraphicsElement, rhs: DOM.GraphicsElement) -> Bool {
static func ==(lhs: DOM.GraphicsElement, rhs: DOM.GraphicsElement) -> Bool {
let toString: (Any) -> String = { var text = ""; dump($0, to: &text); return text }
return toString(lhs) == toString(rhs)
}
Expand Down
2 changes: 1 addition & 1 deletion DOM/Tests/Parser.XML.PathTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ private func arc(_ rx: Coordinate, _ ry: Coordinate, _ rotate: Coordinate,


extension DOM.Path.Segment: Swift.Equatable {
public static func ==(lhs: DOM.Path.Segment, rhs: DOM.Path.Segment) -> Bool {
static func ==(lhs: DOM.Path.Segment, rhs: DOM.Path.Segment) -> Bool {
let toString: (Any) -> String = { var text = ""; dump($0, to: &text); return text }
return toString(lhs) == toString(rhs)
}
Expand Down
2 changes: 1 addition & 1 deletion DOM/Tests/ValueParserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ final class ValueParserTests: XCTestCase {
}

func testUrl() {
#if compiler(>=5.9) && canImport(Darwin)
#if canImport(Darwin)
XCTAssertEqual(try parser.parseUrl("#testing🐟").fragmentID, "testing🐟")
#else
XCTAssertEqual(try parser.parseUrl("#testing").fragmentID, "testing")
Expand Down
6 changes: 4 additions & 2 deletions DOM/Tests/XML.Parser.ScannerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
// 3. This notice may not be removed or altered from any source distribution.
//

public import Foundation
import XCTest
@testable import SwiftDrawDOM

Expand Down Expand Up @@ -234,9 +235,10 @@ private func AssertScanPercentageFloat(_ text: String, _ expected: Float?, file:
XCTAssertEqual(try? scanner.scanPercentageFloat(), expected, file: file, line: line)
}

extension CharacterSet: @retroactive ExpressibleByExtendedGraphemeClusterLiteral {}
extension CharacterSet: @retroactive ExpressibleByUnicodeScalarLiteral {}
extension CharacterSet: @retroactive ExpressibleByStringLiteral {

extension Foundation.CharacterSet: Swift.ExpressibleByStringLiteral {

static let hexadecimal: Foundation.CharacterSet = "0123456789ABCDEFabcdef"

public init(stringLiteral value: String) {
Expand Down
2 changes: 2 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ extension Array where Element == SwiftSetting {
static var upcomingFeatures: [SwiftSetting] {
[
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault"),
.enableUpcomingFeature("MemberImportVisibility"),
.swiftLanguageMode(.v6)
]
}
Expand Down
63 changes: 0 additions & 63 deletions [email protected]

This file was deleted.

2 changes: 1 addition & 1 deletion SwiftDraw.podspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"exclude_files": "SwiftDraw/Sources/NSImage+Image.swift",
"frameworks": ["UIKit", "Foundation"]
},
"swift_version": "5.10",
"swift_version": "6.0",
"pod_target_xcconfig": {
"OTHER_SWIFT_FLAGS": "-package-name SwiftDraw"
},
Expand Down
2 changes: 1 addition & 1 deletion SwiftDraw/Sources/CommandLine/CommandLine+Process.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// 3. This notice may not be removed or altered from any source distribution.
//

import Foundation
public import Foundation
#if canImport(CoreGraphics)
import CoreGraphics
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//

import SwiftDrawDOM
import Foundation
public import Foundation

extension CommandLine {

Expand Down
1 change: 1 addition & 0 deletions SwiftDraw/Sources/LayerTree/LayerTree.Builder.Text.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

// Convert a DOM.SVG into a layer tree

import SwiftDrawDOM
import Foundation
#if canImport(CoreText)
import CoreText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
// 3. This notice may not be removed or altered from any source distribution.
//
import Foundation
import SwiftDrawDOM

// Convert a LayerTree into RenderCommands

Expand Down
3 changes: 1 addition & 2 deletions SwiftDraw/Sources/NSImage+SVG.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
//

#if canImport(AppKit) && !targetEnvironment(macCatalyst)
import AppKit
import CoreGraphics
public import AppKit

public extension NSImage {

Expand Down
2 changes: 1 addition & 1 deletion SwiftDraw/Sources/Renderer/CGTextRenderer+Code.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//

import SwiftDrawDOM
import Foundation
public import Foundation

public extension CGTextRenderer {

Expand Down
1 change: 1 addition & 0 deletions SwiftDraw/Sources/Renderer/Renderer.CGText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
//
// 3. This notice may not be removed or altered from any source distribution.
//
import SwiftDrawDOM
import Foundation

struct CGTextTypes: RendererTypes {
Expand Down
16 changes: 2 additions & 14 deletions SwiftDraw/Sources/Renderer/Renderer.CoreGraphics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import UIKit
import AppKit
#endif

import SwiftDrawDOM

struct CGTypes: RendererTypes, Sendable {
typealias Float = CGFloat
typealias Point = CGPoint
Expand Down Expand Up @@ -70,20 +72,6 @@ struct CGTransformingPattern: Hashable {
let renderer = CGRenderer(context: ctx)
renderer.perform(contents)
}

#if compiler(<6.0)
func hash(into hasher: inout Hasher) {
bounds.origin.x.hash(into: &hasher)
bounds.origin.y.hash(into: &hasher)
bounds.size.width.hash(into: &hasher)
bounds.size.height.hash(into: &hasher)
contents.hash(into: &hasher)
}

static func == (lhs: CGTransformingPattern, rhs: CGTransformingPattern) -> Bool {
lhs.bounds == rhs.bounds && lhs.contents == rhs.contents
}
#endif
}

struct CGProvider: RendererTypeProvider {
Expand Down
2 changes: 1 addition & 1 deletion SwiftDraw/Sources/Renderer/Renderer.SFSymbol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//

import SwiftDrawDOM
import Foundation
public import Foundation

public struct SFSymbolRenderer {

Expand Down
4 changes: 2 additions & 2 deletions SwiftDraw/Sources/SVG/SVG+CoreGraphics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
//

#if canImport(CoreGraphics)
import CoreGraphics
import Foundation
public import CoreGraphics
public import Foundation

public extension CGContext {

Expand Down
4 changes: 2 additions & 2 deletions SwiftDraw/Sources/SVG/SVG+Deprecated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
//

#if canImport(CoreGraphics)
import CoreGraphics
import Foundation
public import CoreGraphics
public import Foundation

#if canImport(UIKit)
import UIKit
Expand Down
Loading