Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README #6

Merged
merged 2 commits into from
Dec 20, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/compatibility_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
compatibility_tests_macos:
name: Execute compatibility tests
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Run tests against Apple's Combine
Expand Down
1 change: 0 additions & 1 deletion Combine-Compatibility.xcconfig

This file was deleted.

9 changes: 0 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ swift-version:
test-compatibility:
$(SWIFT_EXE) test -Xswiftc -DOPENCOMBINE_COMPATIBILITY_TEST

generate-compatibility-xcodeproj:
$(SWIFT_EXE) package generate-xcodeproj --xcconfig-overrides Combine-Compatibility.xcconfig; \
open OpenCombine.xcodeproj

generate-xcodeproj:
$(SWIFT_EXE) package $(SWIFT_BUILD_FLAGS) generate-xcodeproj --enable-code-coverage

gyb:
$(shell ./utils/recursively_gyb.sh)

Expand All @@ -41,7 +34,5 @@ clean:
test-release \
swift-version \
test-compatibility-debug \
generate-compatibility-xcodeproj \
generate-xcodeproj \
gyb \
clean
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# OpenCombine
[![codecov](https://codecov.io/gh/OpenCombine/OpenCombine/branch/master/graph/badge.svg)](https://codecov.io/gh/OpenCombine/OpenCombine)
![Language](https://img.shields.io/badge/Swift-5.0-orange.svg)
[![Cocoapods](https://img.shields.io/cocoapods/v/OpenCombine?color=blue)](https://cocoapods.org/pods/OpenCombine)
[![codecov](https://codecov.io/gh/OpenSwiftUIProject/OpenCombine/branch/master/graph/badge.svg)](https://codecov.io/gh/OpenSwiftUIProject/OpenCombine)
![Language](https://img.shields.io/badge/Swift-5.9-orange.svg)

Open-source implementation of Apple's [Combine](https://developer.apple.com/documentation/combine) framework for processing values over time.

The main goal of this project is to provide a compatible, reliable and efficient implementation which can be used on Apple's operating systems before macOS 10.15 and iOS 13, as well as Linux, Windows and WebAssembly.

The documentation of the package can be found at [OpenCombine Documentation] (https://swiftpackageindex.com/OpenCombine/OpenCombine/main/documentation/OpenCombine)
The documentation of the package can be found at [OpenCombine Documentation] (https://swiftpackageindex.com/OpenSwiftUIProject/OpenCombine/main/documentation/OpenCombine)

| **CI Status** |
|---|
|[![Compatibility tests](https://github.com/OpenCombine/OpenCombine/actions/workflows/compatibility_tests.yml/badge.svg)](https://github.com/OpenCombine/OpenCombine/actions/workflows/compatibility_tests.yml)|
|[![macOS](https://github.com/OpenCombine/OpenCombine/actions/workflows/macos.yml/badge.svg)](https://github.com/OpenCombine/OpenCombine/actions/workflows/macos.yml)|
|[![Ubuntu](https://github.com/OpenCombine/OpenCombine/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/OpenCombine/OpenCombine/actions/workflows/ubuntu.yml)|
|[![Windows](https://github.com/OpenCombine/OpenCombine/actions/workflows/windows.yml/badge.svg)](https://github.com/OpenCombine/OpenCombine/actions/workflows/windows.yml)|
|[![Wasm](https://github.com/OpenCombine/OpenCombine/actions/workflows/wasm.yml/badge.svg)](https://github.com/OpenCombine/OpenCombine/actions/workflows/wasm.yml)|
|[![Compatibility tests](https://github.com/OpenSwiftUIProject/OpenCombine/actions/workflows/compatibility_tests.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenCombine/actions/workflows/compatibility_tests.yml)|
|[![macOS](https://github.com/OpenSwiftUIProject/OpenCombine/actions/workflows/macos.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenCombine/actions/workflows/macos.yml)|
|[![Ubuntu](https://github.com/OpenSwiftUIProject/OpenCombine/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenCombine/actions/workflows/ubuntu.yml)|
|[![Windows](https://github.com/OpenSwiftUIProject/OpenCombine/actions/workflows/windows.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenCombine/actions/workflows/windows.yml)|
|[![Wasm](https://github.com/OpenSwiftUIProject/OpenCombine/actions/workflows/wasm.yml/badge.svg)](https://github.com/OpenSwiftUIProject/OpenCombine/actions/workflows/wasm.yml)|


### Installation
Expand All @@ -34,7 +33,7 @@ To add `OpenCombine` to your [SwiftPM](https://swift.org/package-manager/) packa

```swift
dependencies: [
.package(url: "https://github.com/OpenCombine/OpenCombine.git", from: "0.14.0")
.package(url: "https://github.com/OpenSwiftUIProject/OpenCombine.git", from: "0.14.0")
],
targets: [
.target(
Expand All @@ -51,7 +50,7 @@ targets: [
###### Xcode
`OpenCombine` can also be added as a SwiftPM dependency directly in your Xcode project *(requires Xcode 11 upwards)*.

To do so, open Xcode, use **File** → **Swift Packages** → **Add Package Dependency…**, enter the [repository URL](https://github.com/OpenCombine/OpenCombine.git), choose the latest available version, and activate the checkboxes:
To do so, open Xcode, use **File** → **Swift Packages** → **Add Package Dependency…**, enter the [repository URL](https://github.com/OpenSwiftUIProject/OpenCombine.git), choose the latest available version, and activate the checkboxes:

<p align="center">
<img alt="Select the OpenCombine and OpenCombineDispatch targets"
Expand All @@ -71,9 +70,9 @@ pod 'OpenCombineFoundation', '~> 0.14.0'

The file `opencombine_lldb.py` defines some `lldb` type summaries for easier debugging. These type summaries improve the way `lldb` and Xcode display some OpenCombine values.

To use `opencombine_lldb.py`, figure out its full path. Let's say the full path is `~/projects/OpenCombine/opencombine_lldb.py`. Then the following statement to your `~/.lldbinit` file:
To use `opencombine_lldb.py`, figure out its full path. Let's say the full path is `~/projects/OpenSwiftUIProject/OpenCombine_lldb.py`. Then the following statement to your `~/.lldbinit` file:

command script import ~/projects/OpenCombine/opencombine_lldb.py
command script import ~/projects/OpenSwiftUIProject/OpenCombine_lldb.py

Currently, `opencombine_lldb.py` defines type summaries for these types:

Expand Down
22 changes: 22 additions & 0 deletions Tests/OpenCombineTests/PublisherTests/ZipTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -818,4 +818,26 @@ final class ZipTests: XCTestCase {
]
)
}

func testEquatable() {
enum E: Equatable {
case a, b
}
let numbersPub = Just(1)
let lettersPub = Just("A")
let enumPub = Just(E.a)
let fractionsPub = Just(1.0)

let zipNumberLetter = numbersPub.zip(lettersPub)
XCTAssertEqual(zipNumberLetter, Publishers.Zip(numbersPub, lettersPub))
XCTAssertNotEqual(zipNumberLetter, Publishers.Zip(numbersPub, Just("B")))

let zipNumberLetterEnum = numbersPub.zip(lettersPub, enumPub)
XCTAssertEqual(zipNumberLetterEnum, Publishers.Zip3(numbersPub, lettersPub, enumPub))
XCTAssertNotEqual(zipNumberLetterEnum, Publishers.Zip3(numbersPub, lettersPub, Just(E.b)))

let zipNumberLetterEnumFraction = numbersPub.zip(lettersPub, enumPub, fractionsPub)
XCTAssertEqual(zipNumberLetterEnumFraction, Publishers.Zip4(numbersPub, lettersPub, enumPub, fractionsPub))
XCTAssertNotEqual(zipNumberLetterEnumFraction, Publishers.Zip4(numbersPub, lettersPub, enumPub, Just(1.5)))
}
}
Loading