Skip to content

Commit

Permalink
prepare 6.2.0 (#277)
Browse files Browse the repository at this point in the history
## [6.2.0] - 2022-09-01
### Added:
- CI builds now include a cross-platform test suite implemented in https://github.com/launchdarkly/sdk-test-harness. This covers many test cases that are also implemented in unit tests, but may be extended in the future to ensure consistent behavior across SDKs in other areas.
- Introduced ApplicationInfo, for configuration of application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.

### Changed:
- Updated LDSwiftEventSource to 2.0.0. We no longer bind to a static product; rather, we let the build determine static vs dynamic linking.

### Fixed:
- Previously a deleted flag could be made available in the SDK if the deletion events were processed out of order. This is no longer the case.
  • Loading branch information
keelerm84 authored Sep 2, 2022
1 parent cfe3e47 commit ee40508
Show file tree
Hide file tree
Showing 39 changed files with 1,137 additions and 233 deletions.
60 changes: 42 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,48 @@
version: 2.1

jobs:
contract-tests:
macos:
xcode: '13.4.1'

steps:
- checkout

- run:
name: Install swift lint
command: brew install swiftlint
- run:
name: Run swiftlint
command: |
cd ./ContractTests
swiftlint lint --reporter junit | tee /tmp/contract-test-swiftlint-results.xml
- store_artifacts:
path: /tmp/contract-test-swiftlint-results.xml
- store_test_results:
path: /tmp/contract-test-swiftlint-results.xml

- run:
name: Install required ssl libraries
command: brew install libressl
- run:
name: make test output directory
command: mkdir /tmp/test-results
- run: make build-contract-tests
- run:
command: make start-contract-test-service
background: true
- run:
name: run contract tests
command: TEST_HARNESS_PARAMS="-junit /tmp/test-results/contract-tests-junit.xml" make run-contract-tests
- store_test_results:
path: /tmp/test-results/

build:
parameters:
xcode-version:
type: string
ios-sim:
type: string
ssh-fix:
type: boolean
default: false
build-doc:
type: boolean
default: false
Expand All @@ -25,16 +59,6 @@ jobs:
steps:
- checkout

# There's an XCode bug present in the 12.0.1 CircleCI image that prevents fetching SSH
# dependencies from working in some cases, so we disable CircleCI's rewriting of the HTTPS
# GitHub URLs to SSH.
- when:
condition: <<parameters.ssh-fix>>
steps:
- run:
name: SSH fix
command: git config --global --unset url.ssh://git@github.com.insteadof

- run:
name: Setup for builds
command: |
Expand Down Expand Up @@ -127,6 +151,10 @@ workflows:

build:
jobs:
- build:
name: Xcode 13.3 - Swift 5.6
xcode-version: '13.3.1'
ios-sim: 'platform=iOS Simulator,name=iPhone 13,OS=15.4'
- build:
name: Xcode 13.1 - Swift 5.5
xcode-version: '13.1.0'
Expand All @@ -137,12 +165,8 @@ workflows:
name: Xcode 12.5 - Swift 5.4
xcode-version: '12.5.1'
ios-sim: 'platform=iOS Simulator,name=iPhone 8,OS=14.5'
- build:
name: Xcode 12.0 - Swift 5.3
xcode-version: '12.0.1'
ios-sim: 'platform=iOS Simulator,name=iPhone 8,OS=14.0'
ssh-fix: true
- build:
name: Xcode 11.7 - Swift 5.2
xcode-version: '11.7.0'
ios-sim: 'platform=iOS Simulator,name=iPhone 8,OS=12.4'
- contract-tests
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ xcuserdata
*.playground
/default.profraw
/build
/.build
**/.build
/docs
/Carthage/Checkouts
/.swiftpm
/Package.resolved
**/.swiftpm
**/Package.resolved
/LaunchDarkly.xcworkspace/xcshareddata/swiftpm/Package.resolved
/LaunchDarkly.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
/LaunchDarkly.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
2 changes: 1 addition & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ identifier_name:
- lhs
- rhs

reporter: "xcode"
reporter: "xcode"
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

All notable changes to the LaunchDarkly iOS SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).

## [6.2.0] - 2022-09-01
### Added:
- CI builds now include a cross-platform test suite implemented in https://github.com/launchdarkly/sdk-test-harness. This covers many test cases that are also implemented in unit tests, but may be extended in the future to ensure consistent behavior across SDKs in other areas.
- Introduced ApplicationInfo, for configuration of application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations.

### Changed:
- Updated LDSwiftEventSource to 2.0.0. We no longer bind to a static product; rather, we let the build determine static vs dynamic linking.

### Fixed:
- Previously a deleted flag could be made available in the SDK if the deletion events were processed out of order. This is no longer the case.

## [6.1.0] - 2022-05-17
### Added
- Added the `LDUser.isAnonymousNullable` property that allows treating the `isAnonymous` property as nullable.
Expand Down
57 changes: 57 additions & 0 deletions ContractTests/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
disabled_rules:
- line_length
- trailing_whitespace

opt_in_rules:
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- empty_count
- first_where
- flatmap_over_map_reduce
- implicitly_unwrapped_optional
- let_var_whitespace
- missing_docs
- redundant_nil_coalescing
- sorted_first_last
- trailing_closure
- unused_declaration
- unused_import
- vertical_whitespace_closing_braces

included:
- Source

excluded:

function_body_length:
warning: 50
error: 70

type_body_length:
warning: 300
error: 500

file_length:
warning: 1000
error: 1500

identifier_name:
min_length: # only min_length
warning: 3 # only warning
max_length:
warning: 50
error: 60
excluded:
- id
- URL
- url
- obj
- key
- all
- tag
- lhs
- rhs

reporter: "xcode"
31 changes: 31 additions & 0 deletions ContractTests/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// swift-tools-version:5.2

import PackageDescription

let package = Package(
name: "ContractTests",
platforms: [
.iOS(.v10),
.macOS(.v10_15),
.watchOS(.v3),
.tvOS(.v10)
],
products: [
.executable(
name: "ContractTests",
targets: ["ContractTests"])
],
dependencies: [
Package.Dependency.package(name: "LaunchDarkly", path: ".."),
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0")
],
targets: [
.target(
name: "ContractTests",
dependencies: [
.product(name: "LaunchDarkly", package: "LaunchDarkly"),
.product(name: "Vapor", package: "vapor")
],
path: "Source"),
],
swiftLanguageVersions: [.v5])
Loading

0 comments on commit ee40508

Please sign in to comment.