From e06632bd53b56c97fd952bcad7b829ad211c0536 Mon Sep 17 00:00:00 2001 From: Joseph Heck Date: Thu, 30 May 2024 15:10:24 -0700 Subject: [PATCH] add marker file that disables compatibility matrix for Swift on Linux at SPI (#181) --- Sources/Automerge/_AutomergeLinux.swift | 9 +++++++++ Tests/AutomergeTests/TestObservableDocument.swift | 1 + 2 files changed, 10 insertions(+) create mode 100644 Sources/Automerge/_AutomergeLinux.swift diff --git a/Sources/Automerge/_AutomergeLinux.swift b/Sources/Automerge/_AutomergeLinux.swift new file mode 100644 index 00000000..4b264450 --- /dev/null +++ b/Sources/Automerge/_AutomergeLinux.swift @@ -0,0 +1,9 @@ +#if os(Linux) +// Error on compilation on Linux - The XCFramework, on which this package depends, could be made +// available for a variety of platforms, but there's not much of a smooth path to providing those +// binary assets for Swift on Linux. +// +// This file exists so that the compatibility indicators on Swift Package Index don't infer that +// this package is easily installed and used with Swift on Linux, +#error("This explicit error is to indicate that this package doesn't support Linux as it stands") +#endif diff --git a/Tests/AutomergeTests/TestObservableDocument.swift b/Tests/AutomergeTests/TestObservableDocument.swift index 33eddc63..326b1aea 100644 --- a/Tests/AutomergeTests/TestObservableDocument.swift +++ b/Tests/AutomergeTests/TestObservableDocument.swift @@ -35,6 +35,7 @@ class ObservableDocumentTestCase: XCTestCase { let collection = doc.objectWillChange.sink { stashedHeads = doc.heads() } + XCTAssertNotNil(collection) try doc.spliceText(obj: text, start: 0, delete: 0, value: "hello world!") XCTAssertNotEqual(doc.heads(), stashedHeads) }