From b5a2fdebd1a939a0ba0d7bbc96ae930b4d53ec18 Mon Sep 17 00:00:00 2001 From: Ben Pinhorn <00ben.allen@gmail.com> Date: Sat, 1 Sep 2018 13:29:56 -0400 Subject: [PATCH 1/7] Initialized project as Xcode SPM project, may support Cocoapods and Carthage later as build tools. --- .gitignore | 3 + CopyrightWaivers.txt | 1 + Package.resolved | 8 ++ Package.swift | 28 ++++ .../reactive_streams_swift.swift | 3 + Tests/LinuxMain.swift | 7 + .../XCTestManifests.swift | 9 ++ .../reactive_streams_swiftTests.swift | 16 +++ .../project.pbxproj | 124 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++ 11 files changed, 214 insertions(+) create mode 100644 Package.resolved create mode 100644 Package.swift create mode 100644 Sources/reactive-streams-swift/reactive_streams_swift.swift create mode 100644 Tests/LinuxMain.swift create mode 100644 Tests/reactive-streams-swiftTests/XCTestManifests.swift create mode 100644 Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift create mode 100644 reactive-streams-swift.xcodeproj/project.pbxproj create mode 100644 reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/.gitignore b/.gitignore index d534044..d59acaa 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,6 @@ fastlane/report.xml fastlane/Preview.html fastlane/screenshots fastlane/test_output + +# Mac Specific +.DS_Store diff --git a/CopyrightWaivers.txt b/CopyrightWaivers.txt index d921750..2ffb9dd 100644 --- a/CopyrightWaivers.txt +++ b/CopyrightWaivers.txt @@ -18,3 +18,4 @@ Underwriting parties: github name | Real Name, Email Address used for git commits, Company ---------------+---------------------------------------------------------------------------- +00benallen Ben Pinhorn, 00ben.allen@gmail.com Independant \ No newline at end of file diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..5cefbe8 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,8 @@ +{ + "object": { + "pins": [ + + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..5147f52 --- /dev/null +++ b/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:4.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "reactive-streams-swift", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "reactive-streams-swift", + targets: ["reactive-streams-swift"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "reactive-streams-swift", + dependencies: []), + .testTarget( + name: "reactive-streams-swiftTests", + dependencies: ["reactive-streams-swift"]), + ] +) diff --git a/Sources/reactive-streams-swift/reactive_streams_swift.swift b/Sources/reactive-streams-swift/reactive_streams_swift.swift new file mode 100644 index 0000000..cb71dba --- /dev/null +++ b/Sources/reactive-streams-swift/reactive_streams_swift.swift @@ -0,0 +1,3 @@ +struct reactive_streams_swift { + var text = "Hello, World!" +} diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..d6c8b56 --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,7 @@ +import XCTest + +import reactive_streams_swiftTests + +var tests = [XCTestCaseEntry]() +tests += reactive_streams_swiftTests.allTests() +XCTMain(tests) \ No newline at end of file diff --git a/Tests/reactive-streams-swiftTests/XCTestManifests.swift b/Tests/reactive-streams-swiftTests/XCTestManifests.swift new file mode 100644 index 0000000..2b6b40a --- /dev/null +++ b/Tests/reactive-streams-swiftTests/XCTestManifests.swift @@ -0,0 +1,9 @@ +import XCTest + +#if !os(macOS) +public func allTests() -> [XCTestCaseEntry] { + return [ + testCase(reactive_streams_swiftTests.allTests), + ] +} +#endif \ No newline at end of file diff --git a/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift b/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift new file mode 100644 index 0000000..29582ba --- /dev/null +++ b/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift @@ -0,0 +1,16 @@ +import XCTest +@testable import reactive_streams_swift + +final class reactive_streams_swiftTests: XCTestCase { + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. + XCTAssertEqual(reactive_streams_swift().text, "Hello, World!") + } + + + static var allTests = [ + ("testExample", testExample), + ] +} diff --git a/reactive-streams-swift.xcodeproj/project.pbxproj b/reactive-streams-swift.xcodeproj/project.pbxproj new file mode 100644 index 0000000..50c3751 --- /dev/null +++ b/reactive-streams-swift.xcodeproj/project.pbxproj @@ -0,0 +1,124 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXFileReference section */ + A98C7E61213B0209005512D9 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + A98C7E62213B0209005512D9 /* CopyrightWaivers.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CopyrightWaivers.txt; sourceTree = ""; }; + A98C7E63213B0209005512D9 /* COPYING */ = {isa = PBXFileReference; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + A98C7E64213B0209005512D9 /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = ""; }; + A98C7E65213B0209005512D9 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + A98C7E66213B0209005512D9 /* RELEASE-NOTES.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "RELEASE-NOTES.md"; sourceTree = ""; }; + A98C7E69213B0241005512D9 /* reactive_streams_swift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = reactive_streams_swift.swift; sourceTree = ""; }; + A98C7E6C213B0242005512D9 /* reactive_streams_swiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = reactive_streams_swiftTests.swift; sourceTree = ""; }; + A98C7E6D213B0242005512D9 /* XCTestManifests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = ""; }; + A98C7E6E213B0242005512D9 /* LinuxMain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinuxMain.swift; sourceTree = ""; }; + A98C7E6F213B0242005512D9 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + A98C7E5A213B01EB005512D9 = { + isa = PBXGroup; + children = ( + A98C7E6F213B0242005512D9 /* Package.swift */, + A98C7E67213B0241005512D9 /* Sources */, + A98C7E6A213B0242005512D9 /* Tests */, + A98C7E64213B0209005512D9 /* CONTRIBUTING.md */, + A98C7E63213B0209005512D9 /* COPYING */, + A98C7E62213B0209005512D9 /* CopyrightWaivers.txt */, + A98C7E61213B0209005512D9 /* LICENSE */, + A98C7E65213B0209005512D9 /* README.md */, + A98C7E66213B0209005512D9 /* RELEASE-NOTES.md */, + ); + sourceTree = ""; + }; + A98C7E67213B0241005512D9 /* Sources */ = { + isa = PBXGroup; + children = ( + A98C7E68213B0241005512D9 /* reactive-streams-swift */, + ); + path = Sources; + sourceTree = ""; + }; + A98C7E68213B0241005512D9 /* reactive-streams-swift */ = { + isa = PBXGroup; + children = ( + A98C7E69213B0241005512D9 /* reactive_streams_swift.swift */, + ); + path = "reactive-streams-swift"; + sourceTree = ""; + }; + A98C7E6A213B0242005512D9 /* Tests */ = { + isa = PBXGroup; + children = ( + A98C7E6B213B0242005512D9 /* reactive-streams-swiftTests */, + A98C7E6E213B0242005512D9 /* LinuxMain.swift */, + ); + path = Tests; + sourceTree = ""; + }; + A98C7E6B213B0242005512D9 /* reactive-streams-swiftTests */ = { + isa = PBXGroup; + children = ( + A98C7E6C213B0242005512D9 /* reactive_streams_swiftTests.swift */, + A98C7E6D213B0242005512D9 /* XCTestManifests.swift */, + ); + path = "reactive-streams-swiftTests"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXProject section */ + A98C7E5B213B01EB005512D9 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0940; + }; + buildConfigurationList = A98C7E5E213B01EB005512D9 /* Build configuration list for PBXProject "reactive-streams-swift" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = A98C7E5A213B01EB005512D9; + projectDirPath = ""; + projectRoot = ""; + targets = ( + ); + }; +/* End PBXProject section */ + +/* Begin XCBuildConfiguration section */ + A98C7E5F213B01EB005512D9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + A98C7E60213B01EB005512D9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A98C7E5E213B01EB005512D9 /* Build configuration list for PBXProject "reactive-streams-swift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A98C7E5F213B01EB005512D9 /* Debug */, + A98C7E60213B01EB005512D9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A98C7E5B213B01EB005512D9 /* Project object */; +} diff --git a/reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..a520d9f --- /dev/null +++ b/reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + From f5e78f9536d3aa5afc137aadc5d933cd34ada821 Mon Sep 17 00:00:00 2001 From: Ben Pinhorn <00ben.allen@gmail.com> Date: Sat, 1 Sep 2018 16:30:43 -0400 Subject: [PATCH 2/7] Refactoring folder structure --- Package.resolved | 8 -- Package.swift | 28 ---- .../reactive_streams_swift.swift | 3 - Tests/LinuxMain.swift | 7 - .../XCTestManifests.swift | 9 -- .../reactive_streams_swiftTests.swift | 16 --- .../project.pbxproj | 124 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 -- 9 files changed, 210 deletions(-) delete mode 100644 Package.resolved delete mode 100644 Package.swift delete mode 100644 Sources/reactive-streams-swift/reactive_streams_swift.swift delete mode 100644 Tests/LinuxMain.swift delete mode 100644 Tests/reactive-streams-swiftTests/XCTestManifests.swift delete mode 100644 Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift delete mode 100644 reactive-streams-swift.xcodeproj/project.pbxproj delete mode 100644 reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Package.resolved b/Package.resolved deleted file mode 100644 index 5cefbe8..0000000 --- a/Package.resolved +++ /dev/null @@ -1,8 +0,0 @@ -{ - "object": { - "pins": [ - - ] - }, - "version": 1 -} diff --git a/Package.swift b/Package.swift deleted file mode 100644 index 5147f52..0000000 --- a/Package.swift +++ /dev/null @@ -1,28 +0,0 @@ -// swift-tools-version:4.0 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "reactive-streams-swift", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "reactive-streams-swift", - targets: ["reactive-streams-swift"]), - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - // .package(url: /* package url */, from: "1.0.0"), - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "reactive-streams-swift", - dependencies: []), - .testTarget( - name: "reactive-streams-swiftTests", - dependencies: ["reactive-streams-swift"]), - ] -) diff --git a/Sources/reactive-streams-swift/reactive_streams_swift.swift b/Sources/reactive-streams-swift/reactive_streams_swift.swift deleted file mode 100644 index cb71dba..0000000 --- a/Sources/reactive-streams-swift/reactive_streams_swift.swift +++ /dev/null @@ -1,3 +0,0 @@ -struct reactive_streams_swift { - var text = "Hello, World!" -} diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift deleted file mode 100644 index d6c8b56..0000000 --- a/Tests/LinuxMain.swift +++ /dev/null @@ -1,7 +0,0 @@ -import XCTest - -import reactive_streams_swiftTests - -var tests = [XCTestCaseEntry]() -tests += reactive_streams_swiftTests.allTests() -XCTMain(tests) \ No newline at end of file diff --git a/Tests/reactive-streams-swiftTests/XCTestManifests.swift b/Tests/reactive-streams-swiftTests/XCTestManifests.swift deleted file mode 100644 index 2b6b40a..0000000 --- a/Tests/reactive-streams-swiftTests/XCTestManifests.swift +++ /dev/null @@ -1,9 +0,0 @@ -import XCTest - -#if !os(macOS) -public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(reactive_streams_swiftTests.allTests), - ] -} -#endif \ No newline at end of file diff --git a/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift b/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift deleted file mode 100644 index 29582ba..0000000 --- a/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift +++ /dev/null @@ -1,16 +0,0 @@ -import XCTest -@testable import reactive_streams_swift - -final class reactive_streams_swiftTests: XCTestCase { - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct - // results. - XCTAssertEqual(reactive_streams_swift().text, "Hello, World!") - } - - - static var allTests = [ - ("testExample", testExample), - ] -} diff --git a/reactive-streams-swift.xcodeproj/project.pbxproj b/reactive-streams-swift.xcodeproj/project.pbxproj deleted file mode 100644 index 50c3751..0000000 --- a/reactive-streams-swift.xcodeproj/project.pbxproj +++ /dev/null @@ -1,124 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXFileReference section */ - A98C7E61213B0209005512D9 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - A98C7E62213B0209005512D9 /* CopyrightWaivers.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CopyrightWaivers.txt; sourceTree = ""; }; - A98C7E63213B0209005512D9 /* COPYING */ = {isa = PBXFileReference; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; - A98C7E64213B0209005512D9 /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = ""; }; - A98C7E65213B0209005512D9 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - A98C7E66213B0209005512D9 /* RELEASE-NOTES.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "RELEASE-NOTES.md"; sourceTree = ""; }; - A98C7E69213B0241005512D9 /* reactive_streams_swift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = reactive_streams_swift.swift; sourceTree = ""; }; - A98C7E6C213B0242005512D9 /* reactive_streams_swiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = reactive_streams_swiftTests.swift; sourceTree = ""; }; - A98C7E6D213B0242005512D9 /* XCTestManifests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = ""; }; - A98C7E6E213B0242005512D9 /* LinuxMain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinuxMain.swift; sourceTree = ""; }; - A98C7E6F213B0242005512D9 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXGroup section */ - A98C7E5A213B01EB005512D9 = { - isa = PBXGroup; - children = ( - A98C7E6F213B0242005512D9 /* Package.swift */, - A98C7E67213B0241005512D9 /* Sources */, - A98C7E6A213B0242005512D9 /* Tests */, - A98C7E64213B0209005512D9 /* CONTRIBUTING.md */, - A98C7E63213B0209005512D9 /* COPYING */, - A98C7E62213B0209005512D9 /* CopyrightWaivers.txt */, - A98C7E61213B0209005512D9 /* LICENSE */, - A98C7E65213B0209005512D9 /* README.md */, - A98C7E66213B0209005512D9 /* RELEASE-NOTES.md */, - ); - sourceTree = ""; - }; - A98C7E67213B0241005512D9 /* Sources */ = { - isa = PBXGroup; - children = ( - A98C7E68213B0241005512D9 /* reactive-streams-swift */, - ); - path = Sources; - sourceTree = ""; - }; - A98C7E68213B0241005512D9 /* reactive-streams-swift */ = { - isa = PBXGroup; - children = ( - A98C7E69213B0241005512D9 /* reactive_streams_swift.swift */, - ); - path = "reactive-streams-swift"; - sourceTree = ""; - }; - A98C7E6A213B0242005512D9 /* Tests */ = { - isa = PBXGroup; - children = ( - A98C7E6B213B0242005512D9 /* reactive-streams-swiftTests */, - A98C7E6E213B0242005512D9 /* LinuxMain.swift */, - ); - path = Tests; - sourceTree = ""; - }; - A98C7E6B213B0242005512D9 /* reactive-streams-swiftTests */ = { - isa = PBXGroup; - children = ( - A98C7E6C213B0242005512D9 /* reactive_streams_swiftTests.swift */, - A98C7E6D213B0242005512D9 /* XCTestManifests.swift */, - ); - path = "reactive-streams-swiftTests"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXProject section */ - A98C7E5B213B01EB005512D9 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0940; - }; - buildConfigurationList = A98C7E5E213B01EB005512D9 /* Build configuration list for PBXProject "reactive-streams-swift" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = A98C7E5A213B01EB005512D9; - projectDirPath = ""; - projectRoot = ""; - targets = ( - ); - }; -/* End PBXProject section */ - -/* Begin XCBuildConfiguration section */ - A98C7E5F213B01EB005512D9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - A98C7E60213B01EB005512D9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - A98C7E5E213B01EB005512D9 /* Build configuration list for PBXProject "reactive-streams-swift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A98C7E5F213B01EB005512D9 /* Debug */, - A98C7E60213B01EB005512D9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = A98C7E5B213B01EB005512D9 /* Project object */; -} diff --git a/reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a520d9f..0000000 --- a/reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - From 10377b5301179feccc3df376d776652b79873d5d Mon Sep 17 00:00:00 2001 From: Ben Pinhorn <00ben.allen@gmail.com> Date: Sun, 2 Sep 2018 13:41:21 -0400 Subject: [PATCH 3/7] Redo package scaffolding --- Package.resolved | 8 ++++++ Package.swift | 28 +++++++++++++++++++ .../Interfaces/Processor.swift | 10 +++++++ .../Interfaces/Publisher.swift | 14 ++++++++++ .../Interfaces/Subscriber.swift | 17 +++++++++++ .../Interfaces/Subscription.swift | 20 +++++++++++++ Tests/LinuxMain.swift | 7 +++++ .../XCTestManifests.swift | 9 ++++++ .../reactive_streams_swiftTests.swift | 16 +++++++++++ 9 files changed, 129 insertions(+) create mode 100644 Package.resolved create mode 100644 Package.swift create mode 100644 Sources/reactive-streams-swift/Interfaces/Processor.swift create mode 100644 Sources/reactive-streams-swift/Interfaces/Publisher.swift create mode 100644 Sources/reactive-streams-swift/Interfaces/Subscriber.swift create mode 100644 Sources/reactive-streams-swift/Interfaces/Subscription.swift create mode 100644 Tests/LinuxMain.swift create mode 100644 Tests/reactive-streams-swiftTests/XCTestManifests.swift create mode 100644 Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..5cefbe8 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,8 @@ +{ + "object": { + "pins": [ + + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..5147f52 --- /dev/null +++ b/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:4.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "reactive-streams-swift", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "reactive-streams-swift", + targets: ["reactive-streams-swift"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "reactive-streams-swift", + dependencies: []), + .testTarget( + name: "reactive-streams-swiftTests", + dependencies: ["reactive-streams-swift"]), + ] +) diff --git a/Sources/reactive-streams-swift/Interfaces/Processor.swift b/Sources/reactive-streams-swift/Interfaces/Processor.swift new file mode 100644 index 0000000..edd6d7b --- /dev/null +++ b/Sources/reactive-streams-swift/Interfaces/Processor.swift @@ -0,0 +1,10 @@ +// +// Processor.swift +// reactive-streams-swift +// +// Created by Ben Pinhorn on 2018-09-01. +// + +import Foundation + +public protocol Processor: Subscriber, Publisher {} diff --git a/Sources/reactive-streams-swift/Interfaces/Publisher.swift b/Sources/reactive-streams-swift/Interfaces/Publisher.swift new file mode 100644 index 0000000..8dfda04 --- /dev/null +++ b/Sources/reactive-streams-swift/Interfaces/Publisher.swift @@ -0,0 +1,14 @@ +// +// Publisher.swift +// reactive-streams-swift +// +// Created by Ben Pinhorn on 2018-09-01. +// + +import Foundation + +public protocol Publisher { + + func subscribe(subscriber: Subscriber) + +} diff --git a/Sources/reactive-streams-swift/Interfaces/Subscriber.swift b/Sources/reactive-streams-swift/Interfaces/Subscriber.swift new file mode 100644 index 0000000..a875881 --- /dev/null +++ b/Sources/reactive-streams-swift/Interfaces/Subscriber.swift @@ -0,0 +1,17 @@ +// +// Subscriber.swift +// reactive-streams-swift +// +// Created by Ben Pinhorn on 2018-09-01. +// + +import Foundation + +public protocol Subscriber { + + func onSubscribe(subscription: Subscription) -> Void + func onNext(next: Any) -> Void + func onError(error: Error) -> Void + func onComplete() -> Void + +} diff --git a/Sources/reactive-streams-swift/Interfaces/Subscription.swift b/Sources/reactive-streams-swift/Interfaces/Subscription.swift new file mode 100644 index 0000000..e906ca2 --- /dev/null +++ b/Sources/reactive-streams-swift/Interfaces/Subscription.swift @@ -0,0 +1,20 @@ +// +// Subscription.swift +// reactive-streams-swift +// +// Created by Ben Pinhorn on 2018-09-01. +// + +//public interface Subscription { +// public void request(long n); +// public void cancel(); +//} + +import Foundation + +public protocol Subscription { + + func request(requested: CLong) -> Void + func cancel() -> Void + +} diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..6f9a3b4 --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,7 @@ +import XCTest + +import reactive_streams_swift_frameworkTests + +var tests = [XCTestCaseEntry]() +tests += reactive_streams_swift_frameworkTests.allTests() +XCTMain(tests) \ No newline at end of file diff --git a/Tests/reactive-streams-swiftTests/XCTestManifests.swift b/Tests/reactive-streams-swiftTests/XCTestManifests.swift new file mode 100644 index 0000000..a20da86 --- /dev/null +++ b/Tests/reactive-streams-swiftTests/XCTestManifests.swift @@ -0,0 +1,9 @@ +import XCTest + +#if !os(macOS) +public func allTests() -> [XCTestCaseEntry] { + return [ + testCase(reactive_streams_swift_frameworkTests.allTests), + ] +} +#endif \ No newline at end of file diff --git a/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift b/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift new file mode 100644 index 0000000..e82ef55 --- /dev/null +++ b/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift @@ -0,0 +1,16 @@ +import XCTest +@testable import reactive_streams_swift_framework + +final class reactive_streams_swift_frameworkTests: XCTestCase { + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. + XCTAssertEqual(reactive_streams_swift_framework().text, "Hello, World!") + } + + + static var allTests = [ + ("testExample", testExample), + ] +} From b5111099e7ae9b8b26522fbe936cd9fe295bd107 Mon Sep 17 00:00:00 2001 From: Ben Pinhorn <00ben.allen@gmail.com> Date: Sun, 2 Sep 2018 14:04:37 -0400 Subject: [PATCH 4/7] Updated ReadMe and create xcodeproj for convenience --- README.md | 26 +- .../project.pbxproj | 628 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../reactive_streams_swiftTests_Info.plist | 25 + .../reactive_streams_swift_Info.plist | 25 + .../reactive-streams-swift-Package.xcscheme | 81 +++ .../xcschemes/xcschememanagement.plist | 12 + 8 files changed, 809 insertions(+), 3 deletions(-) create mode 100644 reactive-streams-swift.xcodeproj/project.pbxproj create mode 100644 reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 reactive-streams-swift.xcodeproj/reactive_streams_swiftTests_Info.plist create mode 100644 reactive-streams-swift.xcodeproj/reactive_streams_swift_Info.plist create mode 100644 reactive-streams-swift.xcodeproj/xcshareddata/xcschemes/reactive-streams-swift-Package.xcscheme create mode 100644 reactive-streams-swift.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist diff --git a/README.md b/README.md index fc0fb06..95e487b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,26 @@ -# Reactive Streams # - -The purpose of Reactive Streams is to provide a standard for asynchronous stream processing with non-blocking backpressure. +# Reactive Streams Swift + +The purpose of Reactive Streams is to provide a standard for asynchronous stream processing with non-blocking backpressure. + +The latest release will always be the master branch on this repo (use SPM to integrate, it pulls from github as a repository source). + +To install: + +1. Add reactive-streams-swift to your Package.swift: +``` +Swift 3: .Package(url: "https://github.com/reactive-streams/reactive-streams-swift.git", majorVersion: 1) + +Swift 4: .package(url: "https://github.com/reactive-streams/reactive-streams-swift.git", from: "1.0.0") +``` + +2. For Swift 4 you also need to add reactive-streams-swift to your target's dependencies. + +``` +.target(name: "MyTarget", dependencies: ["reactive-streams-swift"]) +After a swift package update, you can now use reactive-streams-swift: +``` + +Extend the given interfaces to create your own Reactive Streams components, use the tck to test that you're in compliance (when its ready). ## Goals, Design and Scope ## diff --git a/reactive-streams-swift.xcodeproj/project.pbxproj b/reactive-streams-swift.xcodeproj/project.pbxproj new file mode 100644 index 0000000..35cfbfa --- /dev/null +++ b/reactive-streams-swift.xcodeproj/project.pbxproj @@ -0,0 +1,628 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXAggregateTarget section */ + "reactive-streams-swift::reactive-streams-swiftPackageTests::ProductTarget" /* reactive-streams-swiftPackageTests */ = { + isa = PBXAggregateTarget; + buildConfigurationList = OBJ_38 /* Build configuration list for PBXAggregateTarget "reactive-streams-swiftPackageTests" */; + buildPhases = ( + ); + dependencies = ( + OBJ_41 /* PBXTargetDependency */, + ); + name = "reactive-streams-swiftPackageTests"; + productName = "reactive-streams-swiftPackageTests"; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + A93EDD5B213C5ADD0007E69E /* reactive_streams_swiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD4F213C5ADC0007E69E /* reactive_streams_swiftTests.swift */; }; + A93EDD5C213C5ADD0007E69E /* XCTestManifests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD50213C5ADC0007E69E /* XCTestManifests.swift */; }; + A93EDD5D213C5ADD0007E69E /* LinuxMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD51213C5ADC0007E69E /* LinuxMain.swift */; }; + A93EDD5E213C5ADD0007E69E /* Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD56213C5ADD0007E69E /* Publisher.swift */; }; + A93EDD5F213C5ADD0007E69E /* Subscriber.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD57213C5ADD0007E69E /* Subscriber.swift */; }; + A93EDD60213C5ADD0007E69E /* Processor.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD58213C5ADD0007E69E /* Processor.swift */; }; + A93EDD61213C5ADD0007E69E /* Subscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD59213C5ADD0007E69E /* Subscription.swift */; }; + A93EDD75213C5AF10007E69E /* reactive_streams_swiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD69213C5AF00007E69E /* reactive_streams_swiftTests.swift */; }; + A93EDD76213C5AF10007E69E /* XCTestManifests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD6A213C5AF00007E69E /* XCTestManifests.swift */; }; + A93EDD77213C5AF10007E69E /* LinuxMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD6B213C5AF00007E69E /* LinuxMain.swift */; }; + A93EDD78213C5AF10007E69E /* Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD70213C5AF00007E69E /* Publisher.swift */; }; + A93EDD79213C5AF10007E69E /* Subscriber.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD71213C5AF00007E69E /* Subscriber.swift */; }; + A93EDD7A213C5AF10007E69E /* Processor.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD72213C5AF00007E69E /* Processor.swift */; }; + A93EDD7B213C5AF10007E69E /* Subscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD73213C5AF00007E69E /* Subscription.swift */; }; + OBJ_26 /* Processor.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* Processor.swift */; }; + OBJ_27 /* Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_11 /* Publisher.swift */; }; + OBJ_28 /* Subscriber.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* Subscriber.swift */; }; + OBJ_29 /* Subscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* Subscription.swift */; }; + OBJ_36 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; }; + OBJ_47 /* XCTestManifests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_16 /* XCTestManifests.swift */; }; + OBJ_48 /* reactive_streams_swiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_17 /* reactive_streams_swiftTests.swift */; }; + OBJ_50 /* reactive_streams_swift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "reactive-streams-swift::reactive-streams-swift::Product" /* reactive_streams_swift.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + A93EDD46213C59C80007E69E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = OBJ_1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = "reactive-streams-swift::reactive-streams-swift"; + remoteInfo = "reactive-streams-swift"; + }; + A93EDD47213C59C80007E69E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = OBJ_1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = "reactive-streams-swift::reactive-streams-swiftTests"; + remoteInfo = "reactive-streams-swiftTests"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + A93EDD4F213C5ADC0007E69E /* reactive_streams_swiftTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = reactive_streams_swiftTests.swift; sourceTree = ""; }; + A93EDD50213C5ADC0007E69E /* XCTestManifests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = ""; }; + A93EDD51213C5ADC0007E69E /* LinuxMain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinuxMain.swift; sourceTree = ""; }; + A93EDD56213C5ADD0007E69E /* Publisher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Publisher.swift; sourceTree = ""; }; + A93EDD57213C5ADD0007E69E /* Subscriber.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Subscriber.swift; sourceTree = ""; }; + A93EDD58213C5ADD0007E69E /* Processor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Processor.swift; sourceTree = ""; }; + A93EDD59213C5ADD0007E69E /* Subscription.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Subscription.swift; sourceTree = ""; }; + A93EDD62213C5AF00007E69E /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + A93EDD63213C5AF00007E69E /* CopyrightWaivers.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CopyrightWaivers.txt; sourceTree = ""; }; + A93EDD64213C5AF00007E69E /* CONTRIBUTING.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = ""; }; + A93EDD65213C5AF00007E69E /* Package.resolved */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Package.resolved; sourceTree = ""; }; + A93EDD66213C5AF00007E69E /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + A93EDD69213C5AF00007E69E /* reactive_streams_swiftTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = reactive_streams_swiftTests.swift; sourceTree = ""; }; + A93EDD6A213C5AF00007E69E /* XCTestManifests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = ""; }; + A93EDD6B213C5AF00007E69E /* LinuxMain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinuxMain.swift; sourceTree = ""; }; + A93EDD6C213C5AF00007E69E /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; + A93EDD70213C5AF00007E69E /* Publisher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Publisher.swift; sourceTree = ""; }; + A93EDD71213C5AF00007E69E /* Subscriber.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Subscriber.swift; sourceTree = ""; }; + A93EDD72213C5AF00007E69E /* Processor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Processor.swift; sourceTree = ""; }; + A93EDD73213C5AF00007E69E /* Subscription.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Subscription.swift; sourceTree = ""; }; + A93EDD74213C5AF10007E69E /* RELEASE-NOTES.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = "RELEASE-NOTES.md"; sourceTree = ""; }; + OBJ_10 /* Processor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Processor.swift; sourceTree = ""; }; + OBJ_11 /* Publisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Publisher.swift; sourceTree = ""; }; + OBJ_12 /* Subscriber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Subscriber.swift; sourceTree = ""; }; + OBJ_13 /* Subscription.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Subscription.swift; sourceTree = ""; }; + OBJ_16 /* XCTestManifests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = ""; }; + OBJ_17 /* reactive_streams_swiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = reactive_streams_swiftTests.swift; sourceTree = ""; }; + OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + "reactive-streams-swift::reactive-streams-swift::Product" /* reactive_streams_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = reactive_streams_swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + "reactive-streams-swift::reactive-streams-swiftTests::Product" /* reactive_streams_swiftTests.xctest */ = {isa = PBXFileReference; lastKnownFileType = file; name = reactive_streams_swiftTests.xctest; path = "reactive-streams-swiftTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + OBJ_30 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_49 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 0; + files = ( + OBJ_50 /* reactive_streams_swift.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + A93EDD4D213C5ADC0007E69E /* Tests */ = { + isa = PBXGroup; + children = ( + A93EDD4E213C5ADC0007E69E /* reactive-streams-swiftTests */, + A93EDD51213C5ADC0007E69E /* LinuxMain.swift */, + ); + path = Tests; + sourceTree = SOURCE_ROOT; + }; + A93EDD4E213C5ADC0007E69E /* reactive-streams-swiftTests */ = { + isa = PBXGroup; + children = ( + A93EDD4F213C5ADC0007E69E /* reactive_streams_swiftTests.swift */, + A93EDD50213C5ADC0007E69E /* XCTestManifests.swift */, + ); + path = "reactive-streams-swiftTests"; + sourceTree = ""; + }; + A93EDD53213C5ADD0007E69E /* Sources */ = { + isa = PBXGroup; + children = ( + A93EDD54213C5ADD0007E69E /* reactive-streams-swift */, + ); + path = Sources; + sourceTree = SOURCE_ROOT; + }; + A93EDD54213C5ADD0007E69E /* reactive-streams-swift */ = { + isa = PBXGroup; + children = ( + A93EDD55213C5ADD0007E69E /* Interfaces */, + ); + path = "reactive-streams-swift"; + sourceTree = ""; + }; + A93EDD55213C5ADD0007E69E /* Interfaces */ = { + isa = PBXGroup; + children = ( + A93EDD56213C5ADD0007E69E /* Publisher.swift */, + A93EDD57213C5ADD0007E69E /* Subscriber.swift */, + A93EDD58213C5ADD0007E69E /* Processor.swift */, + A93EDD59213C5ADD0007E69E /* Subscription.swift */, + ); + path = Interfaces; + sourceTree = ""; + }; + A93EDD67213C5AF00007E69E /* Tests */ = { + isa = PBXGroup; + children = ( + A93EDD68213C5AF00007E69E /* reactive-streams-swiftTests */, + A93EDD6B213C5AF00007E69E /* LinuxMain.swift */, + ); + path = Tests; + sourceTree = ""; + }; + A93EDD68213C5AF00007E69E /* reactive-streams-swiftTests */ = { + isa = PBXGroup; + children = ( + A93EDD69213C5AF00007E69E /* reactive_streams_swiftTests.swift */, + A93EDD6A213C5AF00007E69E /* XCTestManifests.swift */, + ); + path = "reactive-streams-swiftTests"; + sourceTree = ""; + }; + A93EDD6D213C5AF00007E69E /* Sources */ = { + isa = PBXGroup; + children = ( + A93EDD6E213C5AF00007E69E /* reactive-streams-swift */, + ); + path = Sources; + sourceTree = ""; + }; + A93EDD6E213C5AF00007E69E /* reactive-streams-swift */ = { + isa = PBXGroup; + children = ( + A93EDD6F213C5AF00007E69E /* Interfaces */, + ); + path = "reactive-streams-swift"; + sourceTree = ""; + }; + A93EDD6F213C5AF00007E69E /* Interfaces */ = { + isa = PBXGroup; + children = ( + A93EDD70213C5AF00007E69E /* Publisher.swift */, + A93EDD71213C5AF00007E69E /* Subscriber.swift */, + A93EDD72213C5AF00007E69E /* Processor.swift */, + A93EDD73213C5AF00007E69E /* Subscription.swift */, + ); + path = Interfaces; + sourceTree = ""; + }; + OBJ_14 /* Tests */ = { + isa = PBXGroup; + children = ( + OBJ_15 /* reactive-streams-swiftTests */, + ); + name = Tests; + sourceTree = SOURCE_ROOT; + }; + OBJ_15 /* reactive-streams-swiftTests */ = { + isa = PBXGroup; + children = ( + OBJ_16 /* XCTestManifests.swift */, + OBJ_17 /* reactive_streams_swiftTests.swift */, + ); + name = "reactive-streams-swiftTests"; + path = "Tests/reactive-streams-swiftTests"; + sourceTree = SOURCE_ROOT; + }; + OBJ_18 /* Products */ = { + isa = PBXGroup; + children = ( + "reactive-streams-swift::reactive-streams-swiftTests::Product" /* reactive_streams_swiftTests.xctest */, + "reactive-streams-swift::reactive-streams-swift::Product" /* reactive_streams_swift.framework */, + ); + name = Products; + sourceTree = BUILT_PRODUCTS_DIR; + }; + OBJ_5 /* */ = { + isa = PBXGroup; + children = ( + A93EDD64213C5AF00007E69E /* CONTRIBUTING.md */, + A93EDD6C213C5AF00007E69E /* COPYING */, + A93EDD63213C5AF00007E69E /* CopyrightWaivers.txt */, + A93EDD62213C5AF00007E69E /* LICENSE */, + A93EDD65213C5AF00007E69E /* Package.resolved */, + A93EDD66213C5AF00007E69E /* README.md */, + A93EDD74213C5AF10007E69E /* RELEASE-NOTES.md */, + A93EDD6D213C5AF00007E69E /* Sources */, + A93EDD67213C5AF00007E69E /* Tests */, + OBJ_6 /* Package.swift */, + OBJ_7 /* Sources */, + OBJ_14 /* Tests */, + OBJ_18 /* Products */, + ); + name = ""; + sourceTree = ""; + }; + OBJ_7 /* Sources */ = { + isa = PBXGroup; + children = ( + OBJ_8 /* reactive-streams-swift */, + ); + name = Sources; + sourceTree = SOURCE_ROOT; + }; + OBJ_8 /* reactive-streams-swift */ = { + isa = PBXGroup; + children = ( + OBJ_9 /* Interfaces */, + ); + name = "reactive-streams-swift"; + path = "Sources/reactive-streams-swift"; + sourceTree = SOURCE_ROOT; + }; + OBJ_9 /* Interfaces */ = { + isa = PBXGroup; + children = ( + OBJ_10 /* Processor.swift */, + A93EDD53213C5ADD0007E69E /* Sources */, + A93EDD4D213C5ADC0007E69E /* Tests */, + OBJ_11 /* Publisher.swift */, + OBJ_12 /* Subscriber.swift */, + OBJ_13 /* Subscription.swift */, + ); + path = Interfaces; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + "reactive-streams-swift::SwiftPMPackageDescription" /* reactive-streams-swiftPackageDescription */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_32 /* Build configuration list for PBXNativeTarget "reactive-streams-swiftPackageDescription" */; + buildPhases = ( + OBJ_35 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "reactive-streams-swiftPackageDescription"; + productName = "reactive-streams-swiftPackageDescription"; + productType = "com.apple.product-type.framework"; + }; + "reactive-streams-swift::reactive-streams-swift" /* reactive-streams-swift */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_22 /* Build configuration list for PBXNativeTarget "reactive-streams-swift" */; + buildPhases = ( + OBJ_25 /* Sources */, + OBJ_30 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "reactive-streams-swift"; + productName = reactive_streams_swift; + productReference = "reactive-streams-swift::reactive-streams-swift::Product" /* reactive_streams_swift.framework */; + productType = "com.apple.product-type.framework"; + }; + "reactive-streams-swift::reactive-streams-swiftTests" /* reactive-streams-swiftTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_43 /* Build configuration list for PBXNativeTarget "reactive-streams-swiftTests" */; + buildPhases = ( + OBJ_46 /* Sources */, + OBJ_49 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + OBJ_51 /* PBXTargetDependency */, + ); + name = "reactive-streams-swiftTests"; + productName = reactive_streams_swiftTests; + productReference = "reactive-streams-swift::reactive-streams-swiftTests::Product" /* reactive_streams_swiftTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + OBJ_1 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 9999; + }; + buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "reactive-streams-swift" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = OBJ_5 /* */; + productRefGroup = OBJ_18 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + "reactive-streams-swift::reactive-streams-swift" /* reactive-streams-swift */, + "reactive-streams-swift::SwiftPMPackageDescription" /* reactive-streams-swiftPackageDescription */, + "reactive-streams-swift::reactive-streams-swiftPackageTests::ProductTarget" /* reactive-streams-swiftPackageTests */, + "reactive-streams-swift::reactive-streams-swiftTests" /* reactive-streams-swiftTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + OBJ_25 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + A93EDD7A213C5AF10007E69E /* Processor.swift in Sources */, + A93EDD5E213C5ADD0007E69E /* Publisher.swift in Sources */, + OBJ_26 /* Processor.swift in Sources */, + OBJ_27 /* Publisher.swift in Sources */, + A93EDD5D213C5ADD0007E69E /* LinuxMain.swift in Sources */, + A93EDD75213C5AF10007E69E /* reactive_streams_swiftTests.swift in Sources */, + A93EDD7B213C5AF10007E69E /* Subscription.swift in Sources */, + A93EDD61213C5ADD0007E69E /* Subscription.swift in Sources */, + OBJ_28 /* Subscriber.swift in Sources */, + OBJ_29 /* Subscription.swift in Sources */, + A93EDD60213C5ADD0007E69E /* Processor.swift in Sources */, + A93EDD78213C5AF10007E69E /* Publisher.swift in Sources */, + A93EDD77213C5AF10007E69E /* LinuxMain.swift in Sources */, + A93EDD5F213C5ADD0007E69E /* Subscriber.swift in Sources */, + A93EDD5B213C5ADD0007E69E /* reactive_streams_swiftTests.swift in Sources */, + A93EDD5C213C5ADD0007E69E /* XCTestManifests.swift in Sources */, + A93EDD76213C5AF10007E69E /* XCTestManifests.swift in Sources */, + A93EDD79213C5AF10007E69E /* Subscriber.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_35 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + OBJ_36 /* Package.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_46 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + OBJ_47 /* XCTestManifests.swift in Sources */, + OBJ_48 /* reactive_streams_swiftTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + OBJ_41 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = "reactive-streams-swift::reactive-streams-swiftTests" /* reactive-streams-swiftTests */; + targetProxy = A93EDD47213C59C80007E69E /* PBXContainerItemProxy */; + }; + OBJ_51 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = "reactive-streams-swift::reactive-streams-swift" /* reactive-streams-swift */; + targetProxy = A93EDD46213C59C80007E69E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + OBJ_23 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = "reactive-streams-swift.xcodeproj/reactive_streams_swift_Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = "reactive-streams-swift"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.0; + TARGET_NAME = "reactive-streams-swift"; + }; + name = Debug; + }; + OBJ_24 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = "reactive-streams-swift.xcodeproj/reactive_streams_swift_Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = "reactive-streams-swift"; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.0; + TARGET_NAME = "reactive-streams-swift"; + }; + name = Release; + }; + OBJ_3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + MACOSX_DEPLOYMENT_TARGET = 10.10; + ONLY_ACTIVE_ARCH = YES; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + USE_HEADERMAP = NO; + }; + name = Debug; + }; + OBJ_33 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD = /usr/bin/true; + OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk"; + SWIFT_VERSION = 4.0; + }; + name = Debug; + }; + OBJ_34 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD = /usr/bin/true; + OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk"; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; + OBJ_39 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + OBJ_4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_OPTIMIZATION_LEVEL = s; + MACOSX_DEPLOYMENT_TARGET = 10.10; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + USE_HEADERMAP = NO; + }; + name = Release; + }; + OBJ_40 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; + OBJ_44 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = "reactive-streams-swift.xcodeproj/reactive_streams_swiftTests_Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SWIFT_VERSION = 4.0; + TARGET_NAME = "reactive-streams-swiftTests"; + }; + name = Debug; + }; + OBJ_45 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = "reactive-streams-swift.xcodeproj/reactive_streams_swiftTests_Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SWIFT_VERSION = 4.0; + TARGET_NAME = "reactive-streams-swiftTests"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + OBJ_2 /* Build configuration list for PBXProject "reactive-streams-swift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_3 /* Debug */, + OBJ_4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_22 /* Build configuration list for PBXNativeTarget "reactive-streams-swift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_23 /* Debug */, + OBJ_24 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_32 /* Build configuration list for PBXNativeTarget "reactive-streams-swiftPackageDescription" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_33 /* Debug */, + OBJ_34 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_38 /* Build configuration list for PBXAggregateTarget "reactive-streams-swiftPackageTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_39 /* Debug */, + OBJ_40 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_43 /* Build configuration list for PBXNativeTarget "reactive-streams-swiftTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_44 /* Debug */, + OBJ_45 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = OBJ_1 /* Project object */; +} diff --git a/reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/reactive-streams-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/reactive-streams-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/reactive-streams-swift.xcodeproj/reactive_streams_swiftTests_Info.plist b/reactive-streams-swift.xcodeproj/reactive_streams_swiftTests_Info.plist new file mode 100644 index 0000000..7c23420 --- /dev/null +++ b/reactive-streams-swift.xcodeproj/reactive_streams_swiftTests_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/reactive-streams-swift.xcodeproj/reactive_streams_swift_Info.plist b/reactive-streams-swift.xcodeproj/reactive_streams_swift_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/reactive-streams-swift.xcodeproj/reactive_streams_swift_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/reactive-streams-swift.xcodeproj/xcshareddata/xcschemes/reactive-streams-swift-Package.xcscheme b/reactive-streams-swift.xcodeproj/xcshareddata/xcschemes/reactive-streams-swift-Package.xcscheme new file mode 100644 index 0000000..8920b67 --- /dev/null +++ b/reactive-streams-swift.xcodeproj/xcshareddata/xcschemes/reactive-streams-swift-Package.xcscheme @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/reactive-streams-swift.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist b/reactive-streams-swift.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..12416c3 --- /dev/null +++ b/reactive-streams-swift.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist @@ -0,0 +1,12 @@ + + + + SchemeUserState + + reactive-streams-swift-Package.xcscheme + + + SuppressBuildableAutocreation + + + From a99557b061f1d1c7cb87e4d8f105bbf64f2d81ff Mon Sep 17 00:00:00 2001 From: Ben Pinhorn <00ben.allen@gmail.com> Date: Sun, 2 Sep 2018 14:06:05 -0400 Subject: [PATCH 5/7] Updated readme again --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 95e487b..0f71ea4 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,12 @@ Swift 4: .package(url: "https://github.com/reactive-streams/reactive-streams-swi ``` .target(name: "MyTarget", dependencies: ["reactive-streams-swift"]) -After a swift package update, you can now use reactive-streams-swift: + ``` -Extend the given interfaces to create your own Reactive Streams components, use the tck to test that you're in compliance (when its ready). +3. After a `swift package update`, you can now use reactive-streams-swift: + +4. Extend the given interfaces to create your own Reactive Streams components, use the tck to test that you're in compliance (when its ready). ## Goals, Design and Scope ## From eeff16c917a9e87e8d5dbe5a294a565388e8672d Mon Sep 17 00:00:00 2001 From: Ben Pinhorn <00ben.allen@gmail.com> Date: Sun, 2 Sep 2018 14:07:44 -0400 Subject: [PATCH 6/7] Fixing xcode file references --- .../project.pbxproj | 137 ------------------ 1 file changed, 137 deletions(-) diff --git a/reactive-streams-swift.xcodeproj/project.pbxproj b/reactive-streams-swift.xcodeproj/project.pbxproj index 35cfbfa..66650e4 100644 --- a/reactive-streams-swift.xcodeproj/project.pbxproj +++ b/reactive-streams-swift.xcodeproj/project.pbxproj @@ -21,24 +21,10 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ - A93EDD5B213C5ADD0007E69E /* reactive_streams_swiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD4F213C5ADC0007E69E /* reactive_streams_swiftTests.swift */; }; - A93EDD5C213C5ADD0007E69E /* XCTestManifests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD50213C5ADC0007E69E /* XCTestManifests.swift */; }; - A93EDD5D213C5ADD0007E69E /* LinuxMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD51213C5ADC0007E69E /* LinuxMain.swift */; }; - A93EDD5E213C5ADD0007E69E /* Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD56213C5ADD0007E69E /* Publisher.swift */; }; - A93EDD5F213C5ADD0007E69E /* Subscriber.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD57213C5ADD0007E69E /* Subscriber.swift */; }; - A93EDD60213C5ADD0007E69E /* Processor.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD58213C5ADD0007E69E /* Processor.swift */; }; - A93EDD61213C5ADD0007E69E /* Subscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD59213C5ADD0007E69E /* Subscription.swift */; }; - A93EDD75213C5AF10007E69E /* reactive_streams_swiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD69213C5AF00007E69E /* reactive_streams_swiftTests.swift */; }; - A93EDD76213C5AF10007E69E /* XCTestManifests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD6A213C5AF00007E69E /* XCTestManifests.swift */; }; - A93EDD77213C5AF10007E69E /* LinuxMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD6B213C5AF00007E69E /* LinuxMain.swift */; }; A93EDD78213C5AF10007E69E /* Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD70213C5AF00007E69E /* Publisher.swift */; }; A93EDD79213C5AF10007E69E /* Subscriber.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD71213C5AF00007E69E /* Subscriber.swift */; }; A93EDD7A213C5AF10007E69E /* Processor.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD72213C5AF00007E69E /* Processor.swift */; }; A93EDD7B213C5AF10007E69E /* Subscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = A93EDD73213C5AF00007E69E /* Subscription.swift */; }; - OBJ_26 /* Processor.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* Processor.swift */; }; - OBJ_27 /* Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_11 /* Publisher.swift */; }; - OBJ_28 /* Subscriber.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* Subscriber.swift */; }; - OBJ_29 /* Subscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* Subscription.swift */; }; OBJ_36 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; }; OBJ_47 /* XCTestManifests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_16 /* XCTestManifests.swift */; }; OBJ_48 /* reactive_streams_swiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_17 /* reactive_streams_swiftTests.swift */; }; @@ -63,31 +49,17 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - A93EDD4F213C5ADC0007E69E /* reactive_streams_swiftTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = reactive_streams_swiftTests.swift; sourceTree = ""; }; - A93EDD50213C5ADC0007E69E /* XCTestManifests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = ""; }; - A93EDD51213C5ADC0007E69E /* LinuxMain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinuxMain.swift; sourceTree = ""; }; - A93EDD56213C5ADD0007E69E /* Publisher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Publisher.swift; sourceTree = ""; }; - A93EDD57213C5ADD0007E69E /* Subscriber.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Subscriber.swift; sourceTree = ""; }; - A93EDD58213C5ADD0007E69E /* Processor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Processor.swift; sourceTree = ""; }; - A93EDD59213C5ADD0007E69E /* Subscription.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Subscription.swift; sourceTree = ""; }; A93EDD62213C5AF00007E69E /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; A93EDD63213C5AF00007E69E /* CopyrightWaivers.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CopyrightWaivers.txt; sourceTree = ""; }; A93EDD64213C5AF00007E69E /* CONTRIBUTING.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = ""; }; A93EDD65213C5AF00007E69E /* Package.resolved */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Package.resolved; sourceTree = ""; }; A93EDD66213C5AF00007E69E /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - A93EDD69213C5AF00007E69E /* reactive_streams_swiftTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = reactive_streams_swiftTests.swift; sourceTree = ""; }; - A93EDD6A213C5AF00007E69E /* XCTestManifests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = ""; }; - A93EDD6B213C5AF00007E69E /* LinuxMain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinuxMain.swift; sourceTree = ""; }; A93EDD6C213C5AF00007E69E /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; A93EDD70213C5AF00007E69E /* Publisher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Publisher.swift; sourceTree = ""; }; A93EDD71213C5AF00007E69E /* Subscriber.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Subscriber.swift; sourceTree = ""; }; A93EDD72213C5AF00007E69E /* Processor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Processor.swift; sourceTree = ""; }; A93EDD73213C5AF00007E69E /* Subscription.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Subscription.swift; sourceTree = ""; }; A93EDD74213C5AF10007E69E /* RELEASE-NOTES.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = "RELEASE-NOTES.md"; sourceTree = ""; }; - OBJ_10 /* Processor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Processor.swift; sourceTree = ""; }; - OBJ_11 /* Publisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Publisher.swift; sourceTree = ""; }; - OBJ_12 /* Subscriber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Subscriber.swift; sourceTree = ""; }; - OBJ_13 /* Subscription.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Subscription.swift; sourceTree = ""; }; OBJ_16 /* XCTestManifests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = ""; }; OBJ_17 /* reactive_streams_swiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = reactive_streams_swiftTests.swift; sourceTree = ""; }; OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; @@ -114,69 +86,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - A93EDD4D213C5ADC0007E69E /* Tests */ = { - isa = PBXGroup; - children = ( - A93EDD4E213C5ADC0007E69E /* reactive-streams-swiftTests */, - A93EDD51213C5ADC0007E69E /* LinuxMain.swift */, - ); - path = Tests; - sourceTree = SOURCE_ROOT; - }; - A93EDD4E213C5ADC0007E69E /* reactive-streams-swiftTests */ = { - isa = PBXGroup; - children = ( - A93EDD4F213C5ADC0007E69E /* reactive_streams_swiftTests.swift */, - A93EDD50213C5ADC0007E69E /* XCTestManifests.swift */, - ); - path = "reactive-streams-swiftTests"; - sourceTree = ""; - }; - A93EDD53213C5ADD0007E69E /* Sources */ = { - isa = PBXGroup; - children = ( - A93EDD54213C5ADD0007E69E /* reactive-streams-swift */, - ); - path = Sources; - sourceTree = SOURCE_ROOT; - }; - A93EDD54213C5ADD0007E69E /* reactive-streams-swift */ = { - isa = PBXGroup; - children = ( - A93EDD55213C5ADD0007E69E /* Interfaces */, - ); - path = "reactive-streams-swift"; - sourceTree = ""; - }; - A93EDD55213C5ADD0007E69E /* Interfaces */ = { - isa = PBXGroup; - children = ( - A93EDD56213C5ADD0007E69E /* Publisher.swift */, - A93EDD57213C5ADD0007E69E /* Subscriber.swift */, - A93EDD58213C5ADD0007E69E /* Processor.swift */, - A93EDD59213C5ADD0007E69E /* Subscription.swift */, - ); - path = Interfaces; - sourceTree = ""; - }; - A93EDD67213C5AF00007E69E /* Tests */ = { - isa = PBXGroup; - children = ( - A93EDD68213C5AF00007E69E /* reactive-streams-swiftTests */, - A93EDD6B213C5AF00007E69E /* LinuxMain.swift */, - ); - path = Tests; - sourceTree = ""; - }; - A93EDD68213C5AF00007E69E /* reactive-streams-swiftTests */ = { - isa = PBXGroup; - children = ( - A93EDD69213C5AF00007E69E /* reactive_streams_swiftTests.swift */, - A93EDD6A213C5AF00007E69E /* XCTestManifests.swift */, - ); - path = "reactive-streams-swiftTests"; - sourceTree = ""; - }; A93EDD6D213C5AF00007E69E /* Sources */ = { isa = PBXGroup; children = ( @@ -242,45 +151,13 @@ A93EDD66213C5AF00007E69E /* README.md */, A93EDD74213C5AF10007E69E /* RELEASE-NOTES.md */, A93EDD6D213C5AF00007E69E /* Sources */, - A93EDD67213C5AF00007E69E /* Tests */, OBJ_6 /* Package.swift */, - OBJ_7 /* Sources */, OBJ_14 /* Tests */, OBJ_18 /* Products */, ); name = ""; sourceTree = ""; }; - OBJ_7 /* Sources */ = { - isa = PBXGroup; - children = ( - OBJ_8 /* reactive-streams-swift */, - ); - name = Sources; - sourceTree = SOURCE_ROOT; - }; - OBJ_8 /* reactive-streams-swift */ = { - isa = PBXGroup; - children = ( - OBJ_9 /* Interfaces */, - ); - name = "reactive-streams-swift"; - path = "Sources/reactive-streams-swift"; - sourceTree = SOURCE_ROOT; - }; - OBJ_9 /* Interfaces */ = { - isa = PBXGroup; - children = ( - OBJ_10 /* Processor.swift */, - A93EDD53213C5ADD0007E69E /* Sources */, - A93EDD4D213C5ADC0007E69E /* Tests */, - OBJ_11 /* Publisher.swift */, - OBJ_12 /* Subscriber.swift */, - OBJ_13 /* Subscription.swift */, - ); - path = Interfaces; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -365,22 +242,8 @@ buildActionMask = 0; files = ( A93EDD7A213C5AF10007E69E /* Processor.swift in Sources */, - A93EDD5E213C5ADD0007E69E /* Publisher.swift in Sources */, - OBJ_26 /* Processor.swift in Sources */, - OBJ_27 /* Publisher.swift in Sources */, - A93EDD5D213C5ADD0007E69E /* LinuxMain.swift in Sources */, - A93EDD75213C5AF10007E69E /* reactive_streams_swiftTests.swift in Sources */, A93EDD7B213C5AF10007E69E /* Subscription.swift in Sources */, - A93EDD61213C5ADD0007E69E /* Subscription.swift in Sources */, - OBJ_28 /* Subscriber.swift in Sources */, - OBJ_29 /* Subscription.swift in Sources */, - A93EDD60213C5ADD0007E69E /* Processor.swift in Sources */, A93EDD78213C5AF10007E69E /* Publisher.swift in Sources */, - A93EDD77213C5AF10007E69E /* LinuxMain.swift in Sources */, - A93EDD5F213C5ADD0007E69E /* Subscriber.swift in Sources */, - A93EDD5B213C5ADD0007E69E /* reactive_streams_swiftTests.swift in Sources */, - A93EDD5C213C5ADD0007E69E /* XCTestManifests.swift in Sources */, - A93EDD76213C5AF10007E69E /* XCTestManifests.swift in Sources */, A93EDD79213C5AF10007E69E /* Subscriber.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; From f65447388dc2c90573dc52af85b997a5008800e9 Mon Sep 17 00:00:00 2001 From: Ben Pinhorn <00ben.allen@gmail.com> Date: Sun, 2 Sep 2018 16:55:20 -0400 Subject: [PATCH 7/7] Added in-code documentation to all interfaces and their functions. Stopped tests from failing. --- .../Interfaces/Processor.swift | 27 ++++++-- .../Interfaces/Publisher.swift | 40 ++++++++++-- .../Interfaces/Subscriber.swift | 64 +++++++++++++++++-- .../Interfaces/Subscription.swift | 49 +++++++++++--- .../reactive_streams_swiftTests.swift | 4 +- 5 files changed, 154 insertions(+), 30 deletions(-) diff --git a/Sources/reactive-streams-swift/Interfaces/Processor.swift b/Sources/reactive-streams-swift/Interfaces/Processor.swift index edd6d7b..93c59ea 100644 --- a/Sources/reactive-streams-swift/Interfaces/Processor.swift +++ b/Sources/reactive-streams-swift/Interfaces/Processor.swift @@ -1,9 +1,24 @@ -// -// Processor.swift -// reactive-streams-swift -// -// Created by Ben Pinhorn on 2018-09-01. -// +/************************************************************************ + * Licensed under Public Domain (CC0) * + * * + * To the extent possible under law, the person who associated CC0 with * + * this code has waived all copyright and related or neighboring * + * rights to this code. * + * * + * You should have received a copy of the CC0 legalcode along with this * + * work. If not, see .* + ************************************************************************/ + +/** + Processor.swift + reactive-streams-swift + + Created by Ben Pinhorn on 2018-09-01. + + A Processor represents a processing stage—which is both a Subscriber + and a Publisher and obeys the contracts of both. + + */ import Foundation diff --git a/Sources/reactive-streams-swift/Interfaces/Publisher.swift b/Sources/reactive-streams-swift/Interfaces/Publisher.swift index 8dfda04..999a317 100644 --- a/Sources/reactive-streams-swift/Interfaces/Publisher.swift +++ b/Sources/reactive-streams-swift/Interfaces/Publisher.swift @@ -1,14 +1,42 @@ -// -// Publisher.swift -// reactive-streams-swift -// -// Created by Ben Pinhorn on 2018-09-01. -// +/************************************************************************ + * Licensed under Public Domain (CC0) * + * * + * To the extent possible under law, the person who associated CC0 with * + * this code has waived all copyright and related or neighboring * + * rights to this code. * + * * + * You should have received a copy of the CC0 legalcode along with this * + * work. If not, see .* + ************************************************************************/ + +/** + Publisher.swift + reactive-streams-swift + +Created by Ben Pinhorn on 2018-09-01. + + A Publisher is a provider of a potentially unbounded number of sequenced elements, publishing them according to + the demand received from its Subscriber(s). + + A Publisher can serve multiple Subscribers subscribed dynamically + at various points in time. + + + */ import Foundation public protocol Publisher { + /** + + Subscribe a Subscriber to this Publisher, to receive elements from it + + Request elements using the Subscription given back by the Publisher using onSubscribe(), by calling Subscription.request(num of elements) + + - parameter subscriber: The subscriber which will receive the elements given by the Publisher + + */ func subscribe(subscriber: Subscriber) } diff --git a/Sources/reactive-streams-swift/Interfaces/Subscriber.swift b/Sources/reactive-streams-swift/Interfaces/Subscriber.swift index a875881..2aa4263 100644 --- a/Sources/reactive-streams-swift/Interfaces/Subscriber.swift +++ b/Sources/reactive-streams-swift/Interfaces/Subscriber.swift @@ -1,17 +1,69 @@ -// -// Subscriber.swift -// reactive-streams-swift -// -// Created by Ben Pinhorn on 2018-09-01. -// +/************************************************************************ + * Licensed under Public Domain (CC0) * + * * + * To the extent possible under law, the person who associated CC0 with * + * this code has waived all copyright and related or neighboring * + * rights to this code. * + * * + * You should have received a copy of the CC0 legalcode along with this * + * work. If not, see .* + ************************************************************************/ + +/** + Subscriber.swift + reactive-streams-swift + + Created by Ben Pinhorn on 2018-09-01. + + Will receive call to onSubscribe() once after passing an instance of Subscriber to Publisher.subscribe(). + + No further notifications will be received until Subscription.request() is called. + + After signaling demand: + + 1. One or more invocations of Subscriber.onNext(element) up to the maximum number defined by Subscription.request(n) + 2. Single invocation of Subscriber.onError(error) or Subscriber.onComplete() which signals a terminal state after which no further events will be sent. + 3. Demand can be signaled via Subscription.request(n) whenever the Subscriber instance is capable of handling more. + + */ import Foundation public protocol Subscriber { + /** + + Function which receives the signal that the Publisher has received the .subscribe() signal, and has created a Subscription + for the Subscriber to use to request elements. + + - parameter subscription: the subscription created by the Publisher + + */ func onSubscribe(subscription: Subscription) -> Void + + /** + + Function which receives the next element requested using the Subscription. Only to be called by the subscribed Publisher. + + - parameter next: the next element published by the Publisher + + */ func onNext(next: Any) -> Void + + /** + + Function which receives the signal that the Publisher encountered an unrecoverable error. The Subscriber should receive no more elements after this is called, as it signals a terminal state. + + - parameter error: the error the Publisher encountered + + */ func onError(error: Error) -> Void + + /** + + Function which receives the signal that the Publisher has published all of the requested elements. The Subscriber should receive no more elements after this is called, as it signals a terminal state. + + */ func onComplete() -> Void } diff --git a/Sources/reactive-streams-swift/Interfaces/Subscription.swift b/Sources/reactive-streams-swift/Interfaces/Subscription.swift index e906ca2..dd09841 100644 --- a/Sources/reactive-streams-swift/Interfaces/Subscription.swift +++ b/Sources/reactive-streams-swift/Interfaces/Subscription.swift @@ -1,20 +1,49 @@ -// -// Subscription.swift -// reactive-streams-swift -// -// Created by Ben Pinhorn on 2018-09-01. -// +/************************************************************************ + * Licensed under Public Domain (CC0) * + * * + * To the extent possible under law, the person who associated CC0 with * + * this code has waived all copyright and related or neighboring * + * rights to this code. * + * * + * You should have received a copy of the CC0 legalcode along with this * + * work. If not, see .* + ************************************************************************/ -//public interface Subscription { -// public void request(long n); -// public void cancel(); -//} +/** + Subscription.swift + reactive-streams-swift + + Created by Ben Pinhorn on 2018-09-01. + + A Subscription represents a one-to-one lifecycle of a Subscriber subscribing to a Publisher. + It can only be used once by a single Subscriber. + It is used to both signal desire for data and cancel demand (and allow resource cleanup). + + */ import Foundation public protocol Subscription { + /** + + This function is used by the Subscriber to signal a request for elements from the Publisher. This function is additive, meaning if you do: + + 1. .request(1) + then + 2. .request(3) + You will eventually receive 4 elements from the Publisher. + + - parameter requested: The number of elements the Subscriber is ready for next + + */ func request(requested: CLong) -> Void + + /** + + This function is used by the Subscriber to signal that it wants no more elements from the Publisher. More elements may still come, but the Publisher should stop as soon as possible once this signal is called. + + */ func cancel() -> Void } diff --git a/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift b/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift index e82ef55..bffb4d3 100644 --- a/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift +++ b/Tests/reactive-streams-swiftTests/reactive_streams_swiftTests.swift @@ -1,12 +1,12 @@ import XCTest -@testable import reactive_streams_swift_framework +@testable import reactive_streams_swift final class reactive_streams_swift_frameworkTests: XCTestCase { + func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct // results. - XCTAssertEqual(reactive_streams_swift_framework().text, "Hello, World!") }