Skip to content

Commit 79ac3d0

Browse files
committed
Release 3.6.1
1 parent 2e63f16 commit 79ac3d0

File tree

16 files changed

+60
-25
lines changed

16 files changed

+60
-25
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55

66
## Master
77

8+
## [3.6.1](https://github.com/ReactiveX/RxSwift/releases/tag/3.6.1)
9+
10+
#### Anomalies
11+
12+
* Fixes compilation issue with Xcode 9b3. #1341
813

914
## [3.6.0](https://github.com/ReactiveX/RxSwift/releases/tag/3.6.0)
1015

Rx.playground/Sources/SupportCode.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Dispatch
55
- parameter description: example description
66
- parameter action: `Void` closure
77
*/
8-
public func example(_ description: String, action: (Void) -> Void) {
8+
public func example(_ description: String, action: () -> Void) {
99
printExampleHeader(description)
1010
action()
1111
}
@@ -24,7 +24,7 @@ public enum TestError: Swift.Error {
2424
- parameter delay: time in seconds to wait before executing `closure`
2525
- parameter closure: `Void` closure
2626
*/
27-
public func delay(_ delay: Double, closure: @escaping (Void) -> Void) {
27+
public func delay(_ delay: Double, closure: @escaping () -> Void) {
2828

2929
DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
3030
closure()

RxBlocking.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "RxBlocking"
3-
s.version = "3.6.0"
3+
s.version = "3.6.1"
44
s.summary = "RxSwift Blocking operatos"
55
s.description = <<-DESC
66
Set of blocking operators for RxSwift. These operators are mostly intended for unit/integration tests

RxBlocking/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>3.6.0</string>
18+
<string>3.6.1</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

RxCocoa.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "RxCocoa"
3-
s.version = "3.6.0"
3+
s.version = "3.6.1"
44
s.summary = "RxSwift Cocoa extensions"
55
s.description = <<-DESC
66
* UI extensions

RxCocoa/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>3.6.0</string>
18+
<string>3.6.1</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

RxExample/RxExample/Services/ReachabilityService.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
import RxSwift
1111
#endif
1212

13-
import class Dispatch.queue.DispatchQueue
13+
#if swift(>=3.2)
14+
import class Dispatch.DispatchQueue
15+
#else
16+
import class Dispatch.queue.DispatchQueue
17+
#endif
1418

1519
public enum ReachabilityStatus {
1620
case reachable(viaWiFi: Bool)

RxSwift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "RxSwift"
3-
s.version = "3.6.0"
3+
s.version = "3.6.1"
44
s.summary = "RxSwift is a Swift implementation of Reactive Extensions"
55
s.description = <<-DESC
66
This is a Swift port of [ReactiveX.io](https://github.com/ReactiveX)

RxSwift/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>3.6.0</string>
18+
<string>3.6.1</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

RxTest.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "RxTest"
3-
s.version = "3.6.0"
3+
s.version = "3.6.1"
44
s.summary = "RxSwift Testing extensions"
55
s.description = <<-DESC
66
Unit testing extensions for RxSwift. This library contains mock schedulers, observables, and observers

RxTest/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>3.6.0</string>
18+
<string>3.6.1</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Tests/RxCocoaTests/KVOObservableTests.swift

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ extension KVOObservableTests {
317317
XCTAssertTrue(latest == nil)
318318
XCTAssertTrue(!isDisposed)
319319

320-
root.property = "a" as NSString
320+
root.property = "a".duplicate()
321321

322322
XCTAssertTrue(latest == "a")
323323
XCTAssertTrue(!isDisposed)
@@ -347,7 +347,7 @@ extension KVOObservableTests {
347347
XCTAssertTrue(latest == nil)
348348
XCTAssertTrue(!isDisposed)
349349

350-
let a: NSString! = "a"
350+
let a: NSString! = "a".duplicate()
351351

352352
root.property = a
353353

@@ -386,7 +386,7 @@ extension KVOObservableTests {
386386
XCTAssertTrue(latest == nil)
387387
XCTAssertTrue(isDisposed == false)
388388

389-
let one: NSString! = "1"
389+
let one: NSString! = "1".duplicate()
390390

391391
child.property = one
392392

@@ -410,7 +410,7 @@ extension KVOObservableTests {
410410

411411
root.property = child
412412

413-
let one: NSString! = "1"
413+
let one: NSString! = "1".duplicate()
414414

415415
child.property = one
416416

@@ -463,7 +463,7 @@ extension KVOObservableTests {
463463
XCTAssertTrue(latest == nil)
464464
XCTAssertTrue(isDisposed == false)
465465

466-
let one: NSString! = "1"
466+
let one: NSString! = "1".duplicate()
467467

468468
child.property = one
469469

@@ -487,7 +487,7 @@ extension KVOObservableTests {
487487

488488
root.property = child
489489

490-
let one: NSString! = "1"
490+
let one: NSString! = "1".duplicate()
491491

492492
child.property = one
493493

@@ -615,7 +615,7 @@ extension KVOObservableTests {
615615

616616
var latest: String? = nil
617617

618-
root.property = "a" as NSString
618+
root.property = "a".duplicate()
619619

620620
XCTAssertTrue(latest == nil)
621621

@@ -646,7 +646,7 @@ extension KVOObservableTests {
646646

647647
var latest: String? = nil
648648

649-
root.property = "a" as NSString
649+
root.property = "a".duplicate()
650650

651651
XCTAssertTrue(latest == nil)
652652

@@ -658,7 +658,7 @@ extension KVOObservableTests {
658658

659659
XCTAssertTrue(latest == nil)
660660

661-
root.property = "b" as NSString
661+
root.property = "b".duplicate()
662662

663663
XCTAssertTrue(latest == "b")
664664

@@ -1581,3 +1581,11 @@ extension KVOObservableTests {
15811581
}
15821582
}
15831583
#endif
1584+
1585+
1586+
extension NSString {
1587+
func duplicate() -> NSString {
1588+
return NSMutableString(string: self)
1589+
}
1590+
}
1591+

scripts/common.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,24 @@ BOLDWHITE="\033[1m\033[37m"
2424
if [[ `uname` == "Darwin" ]]; then
2525
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-10-3 | wc -l` -eq 1 ]; then
2626
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.3
27+
elif [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-11-0 | wc -l` -eq 1 ]; then
28+
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/11.0
2729
else
2830
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.0
2931
fi
3032

3133
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.watchOS-3-2 | wc -l` -eq 1 ]; then
3234
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/3.2
35+
elif [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.watchOS-4-0 | wc -l` -eq 1 ]; then
36+
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/4.0
3337
else
3438
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/3.0
3539
fi
3640

3741
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-10-2 | wc -l` -eq 1 ]; then
3842
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/10.2
43+
elif [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-11-0 | wc -l` -eq 1 ]; then
44+
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/11.0
3945
else
4046
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/10.0
4147
fi

scripts/package-spm.swift

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,11 @@ func buildAllTestsTarget(_ testsPath: String) throws {
159159
let classMatches = splitClassesRegularExpression.matches(in: testContent as String, options: [], range: NSRange(location: 0, length: testContent.characters.count))
160160
let matchIndexes = classMatches
161161
.map { $0.range.location }
162-
let classNames = classMatches.map { (testContent as NSString).substring(with: $0.rangeAt(1)) as NSString }
163-
162+
#if swift(>=4.0)
163+
let classNames = classMatches.map { (testContent as NSString).substring(with: $0.range(at: 1)) as NSString }
164+
#else
165+
let classNames = classMatches.map { (testContent as NSString).substring(with: $0.rangeAt(1)) as NSString }
166+
#endif
164167
let ranges = zip([0] + matchIndexes, matchIndexes + [testContent.characters.count]).map { NSRange(location: $0, length: $1 - $0) }
165168
let classRanges = ranges[1 ..< ranges.count]
166169

@@ -173,7 +176,11 @@ func buildAllTestsTarget(_ testsPath: String) throws {
173176
}
174177

175178
let methodMatches = testMethodsExpression.matches(in: classCode as String, options: [], range: NSRange(location: 0, length: classCode.length))
176-
let methodNameRanges = methodMatches.map { $0.rangeAt(1) }
179+
#if swift(>=4.0)
180+
let methodNameRanges = methodMatches.map { $0.range(at: 1) }
181+
#else
182+
let methodNameRanges = methodMatches.map { $0.rangeAt(1) }
183+
#endif
177184
let testMethodNames = methodNameRanges
178185
.map { classCode.substring(with: $0) }
179186
.filter { !excludeTest($0) }

scripts/validate-headers.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ func validateRegexMatches(regularExpression: NSRegularExpression, content: Strin
8787

8888
return (matches[0 ..< matches.count].flatMap { m -> [String] in
8989
return (1 ..< m.numberOfRanges).map { index in
90-
return (content as NSString).substring(with: m.rangeAt(index))
90+
#if swift(>=4.0)
91+
let range = m.range(at: index)
92+
#else
93+
let range = m.rangeAt(index)
94+
#endif
95+
return (content as NSString).substring(with: range)
9196
}
9297
}, true)
9398
}

scripts/validate-podspec.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ done
4242
function validate() {
4343
local PODSPEC=$1
4444

45-
pod lib lint $PODSPEC --verbose --no-clean
45+
pod lib lint $PODSPEC --verbose --no-clean --allow-warnings
4646
}
4747

4848
for TARGET in ${TARGETS[@]}

0 commit comments

Comments
 (0)