From 12d9b7ee8d6f7429eab94154391e3a859ef13694 Mon Sep 17 00:00:00 2001 From: Adrian Schoenig Date: Wed, 4 Feb 2026 17:13:42 +1100 Subject: [PATCH 1/2] Compile fix when using Swift 6.2 on linux --- .gitignore | 1 + .swift-version | 2 +- Sources/Error.swift | 2 +- Sources/Node.swift | 2 -- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 05f42f4..4d4f2e4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore ## Build generated +.build build/ DerivedData diff --git a/.swift-version b/.swift-version index 819e07a..0cda48a 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -5.0 +6.2 diff --git a/Sources/Error.swift b/Sources/Error.swift index 0c91cda..c1168ae 100644 --- a/Sources/Error.swift +++ b/Sources/Error.swift @@ -43,7 +43,7 @@ public enum XMLError: Error { } let message = (^-^errorPtr.pointee.message)?.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) let code = Int(errorPtr.pointee.code) - xmlResetError(errorPtr) + xmlResetLastError() return .libXMLError(code: code, message: message ?? "") } } diff --git a/Sources/Node.swift b/Sources/Node.swift index b2b36f7..dffd424 100644 --- a/Sources/Node.swift +++ b/Sources/Node.swift @@ -68,8 +68,6 @@ extension XMLNodeType { public static var XIncludeStart: xmlElementType { return XML_XINCLUDE_START } /// XInclude End public static var XIncludeEnd: xmlElementType { return XML_XINCLUDE_END } - /// DocbDocument - public static var DocbDocument: xmlElementType { return XML_DOCB_DOCUMENT_NODE } } infix operator ~= From 8a60ce8cc06213b052a774510966a84bd08c6391 Mon Sep 17 00:00:00 2001 From: Adrian Schoenig Date: Wed, 4 Feb 2026 17:27:33 +1100 Subject: [PATCH 2/2] Update ci.yml --- .github/workflows/ci.yml | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b30b958..aeb1c43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,44 +1,40 @@ name: CI on: - push: - branches: [master] pull_request: + push: branches: [master] jobs: - macos12: - runs-on: macos-12 - - strategy: - matrix: - xcode: ["14.2.0", "13.4.1"] - - steps: - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: ${{ matrix.xcode }} - - name: Checkout - uses: actions/checkout@v3 - - name: Build and Test - run: swift test - linux: runs-on: ubuntu-latest strategy: matrix: - swift: ["5.7.3", "5.6.3", "5.5.3"] + swift: ["6.2", "6.1", "5.10"] container: image: swift:${{ matrix.swift }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install System Dependencies run: | apt-get update apt-get install -y libxml2-dev - name: Build and Test run: swift test + + macos: + runs-on: macos-latest + needs: linux + + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + - name: Checkout + uses: actions/checkout@v4 + - name: Build and Test + run: swift test