-
-
Notifications
You must be signed in to change notification settings - Fork 601
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
satisfyAllOf and satisfyAnyOf should only evaluate the expression once. #1045
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
renovate bot
referenced
this pull request
in cgrindel/rules_swift_package_manager
Jul 7, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [Quick/Nimble](https://github.com/Quick/Nimble) | major | `from: "10.0.0"` -> `from: "v12.0.1"` | --- ### Release Notes <details> <summary>Quick/Nimble (Quick/Nimble)</summary> ### [`v12.0.1`](https://github.com/Quick/Nimble/releases/tag/v12.0.1) [Compare Source](https://github.com/Quick/Nimble/compare/v12.0.0...v12.0.1) #### What's Changed - Fix wasm build by [@​ikesyo](https://github.com/ikesyo) in [https://github.com/Quick/Nimble/pull/1053](https://github.com/Quick/Nimble/pull/1053) - Bump cocoapods from 1.12.0 to 1.12.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Quick/Nimble/pull/1054](https://github.com/Quick/Nimble/pull/1054) - Bump swiftwasm/swiftwasm-action from 5.7 to 5.8 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Quick/Nimble/pull/1057](https://github.com/Quick/Nimble/pull/1057) - Make the async version of poll concurrency-safe by wrapping it in an actor by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1059](https://github.com/Quick/Nimble/pull/1059) - cast an empty array to avoid a warning during compile time by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1060](https://github.com/Quick/Nimble/pull/1060) **Full Changelog**: Quick/Nimble@v12.0.0...v12.0.1 ### [`v12.0.0`](https://github.com/Quick/Nimble/releases/tag/v12.0.0) [Compare Source](https://github.com/Quick/Nimble/compare/v11.2.2...v12.0.0) Nimble 12 adds the ability to using polling expectations with async expressions. Additionally, Nimble 12 includes a number of quality-of-life improvements and bug fixes. #### What's Changed - Update the README to have an accurate usage of expect by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1038](https://github.com/Quick/Nimble/pull/1038) - Allow usage of toEventually with async expressions by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1039](https://github.com/Quick/Nimble/pull/1039) - Replace public usage of DispatchTimeInterval with a new NimbleTimeInterval by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1042](https://github.com/Quick/Nimble/pull/1042) - Make NimbleTimeInterval.dispatchTimeInterval public by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1043](https://github.com/Quick/Nimble/pull/1043) - Run SyncExpectation's expression in async contexts of toEventually on the main actor. by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1044](https://github.com/Quick/Nimble/pull/1044) - satisfyAllOf and satisfyAnyOf should only evaluate the expression once. by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1045](https://github.com/Quick/Nimble/pull/1045) - Rename AsyncDefaults to PollingDefaults by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1023](https://github.com/Quick/Nimble/pull/1023) - Fixed Swift.package: added macCatalyst to the condition for CwlPreconditionTesting dependency by [@​uebelack](https://github.com/uebelack) in [https://github.com/Quick/Nimble/pull/1048](https://github.com/Quick/Nimble/pull/1048) - Raise minimum watchos deployment target to 7.0 by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1050](https://github.com/Quick/Nimble/pull/1050) - Feature/handle multithreaded notifications by [@​johnmckerrell](https://github.com/johnmckerrell) and [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1051](https://github.com/Quick/Nimble/pull/1051) - Objective-C support in the Swift Package version by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1005](https://github.com/Quick/Nimble/pull/1005) - Update documentation in preparation for Nimble 12 by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1052](https://github.com/Quick/Nimble/pull/1052) #### New Contributors - [@​uebelack](https://github.com/uebelack) made their first contribution in [https://github.com/Quick/Nimble/pull/1048](https://github.com/Quick/Nimble/pull/1048) - [@​johnmckerrell](https://github.com/johnmckerrell) made their first contribution in [https://github.com/Quick/Nimble/pull/1051](https://github.com/Quick/Nimble/pull/1051) **Full Changelog**: Quick/Nimble@v11.2.2...v12.0.0 ### [`v11.2.2`](https://github.com/Quick/Nimble/releases/tag/v11.2.2) [Compare Source](https://github.com/Quick/Nimble/compare/v11.2.1...v11.2.2) ### Highlights Nimble v11.2.2 is a minor bug fix release which fixes the build on Xcode 14.3 and Wasm. Thanks to [@​dymv](https://github.com/dymv) for fixing the Xcode 14.3 build and to [@​ikesyo](https://github.com/ikesyo) for fixing the wasm build! ### Autogenerated Changelog #### What's Changed - Bump activesupport from 6.1.5 to 6.1.7.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Quick/Nimble/pull/1029](https://github.com/Quick/Nimble/pull/1029) - Bump cocoapods from 1.11.3 to 1.12.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Quick/Nimble/pull/1032](https://github.com/Quick/Nimble/pull/1032) - Fixes the build on Xcode 14.3b2 by [@​dymv](https://github.com/dymv) in [https://github.com/Quick/Nimble/pull/1033](https://github.com/Quick/Nimble/pull/1033) - Bump activesupport from 7.0.4.2 to 7.0.4.3 by [@​dependabot](https://github.com/dependabot) in [https://github.com/Quick/Nimble/pull/1034](https://github.com/Quick/Nimble/pull/1034) - Fix wasm build by [@​ikesyo](https://github.com/ikesyo) in [https://github.com/Quick/Nimble/pull/1036](https://github.com/Quick/Nimble/pull/1036) #### New Contributors - [@​dymv](https://github.com/dymv) made their first contribution in [https://github.com/Quick/Nimble/pull/1033](https://github.com/Quick/Nimble/pull/1033) **Full Changelog**: Quick/Nimble@v11.2.1...v11.2.2 ### [`v11.2.1`](https://github.com/Quick/Nimble/releases/tag/v11.2.1) [Compare Source](https://github.com/Quick/Nimble/compare/v11.2.0...v11.2.1) Fixed tripping the main thread checker in async `toEventually` checks. Your CI should no longer report that tests erroneously crashed because the expression's `debugDescription` dared to reference something that needed to run on the main thread. #### What's Changed - Add documentation on recommended ways to configure AsyncDefaults by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1022](https://github.com/Quick/Nimble/pull/1022) - Ensure that stringify'ing an expression as part of the async/await polling infrastructure always happens on the main thread by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1024](https://github.com/Quick/Nimble/pull/1024) **Full Changelog**: Quick/Nimble@v11.2.0...v11.2.1 ### [`v11.2.0`](https://github.com/Quick/Nimble/releases/tag/v11.2.0) [Compare Source](https://github.com/Quick/Nimble/compare/v11.1.1...v11.2.0) Improved developer experience by allowing you to use the sync form of `expect` in a test that has other usage of async test. i.e. the following code compiles again: ```swift class MyTest: XCTestCase { func testExample() { await someAsyncFunction() expect(someValue).to(equal(expectedValue)) } } ``` #### What's Changed - Remove autoclosure tag with async expectations by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1020](https://github.com/Quick/Nimble/pull/1020) **Full Changelog**: Quick/Nimble@v11.1.1...v11.2.0 ### [`v11.1.1`](https://github.com/Quick/Nimble/releases/tag/v11.1.1) [Compare Source](https://github.com/Quick/Nimble/compare/v11.1.0...v11.1.1) #### What's Changed - Fix regression where named tuples could not be compared with unnamed tuples of the same types using the == operator by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1017](https://github.com/Quick/Nimble/pull/1017) - Use uncached expression in the async versions of toEventually by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1018](https://github.com/Quick/Nimble/pull/1018) **Full Changelog**: Quick/Nimble@v11.1.0...v11.1.1 ### [`v11.1.0`](https://github.com/Quick/Nimble/releases/tag/v11.1.0) [Compare Source](https://github.com/Quick/Nimble/compare/v11.0.0...v11.1.0) 11.1.0 **drops support** for Swift 5.6 (you must use Xcode 14 or later). [https://github.com/Quick/Nimble/pull/1009](https://github.com/Quick/Nimble/pull/1009) 11.1.0 fixes a developer experience bug where you could unknowingly use the sync version of `toEventually` in an async context, which will cause test timeout failures. [https://github.com/Quick/Nimble/pull/1010](https://github.com/Quick/Nimble/pull/1010) That is, the following test method (XCTest-style) would compile with no errors or warnings emitted, but fail at test runtime due to timeout issues. In v11.1.0, this now emits a warning that you're using the wrong version of `toEventually` (and similar). ```swift @​MainActor func testSomething() async { expect(1).toEventually(equal(1)) // (in v11.0.0, this would not emit any kind of warning or error, but would definitely fail with a timeout error) } ``` **Full Changelog**: Quick/Nimble@v11.0.0...v11.1.0 ### [`v11.0.0`](https://github.com/Quick/Nimble/releases/tag/v11.0.0) [Compare Source](https://github.com/Quick/Nimble/compare/v10.0.0...v11.0.0) This closes the [v11.0.0 milestone](https://github.com/Quick/Nimble/milestone/12). ### Highlights Primarily, this release now supports running tests in async contexts. #### Fixed - `toEventually` et. al. now works from background threads. [https://github.com/Quick/Nimble/pull/1000](https://github.com/Quick/Nimble/pull/1000) - `toEventually` et. al. now work in async tests. [https://github.com/Quick/Nimble/issues/1007](https://github.com/Quick/Nimble/issues/1007) #### New - Async/await support in expectation expressions (e.g. `await expect(await someAsyncFunction()).to(...)`). [https://github.com/Quick/Nimble/pull/1004](https://github.com/Quick/Nimble/pull/1004) - `append(details:)` now respects whitespace that is in the message. [https://github.com/Quick/Nimble/pull/1001](https://github.com/Quick/Nimble/pull/1001) - watchOS support. [https://github.com/Quick/Nimble/pull/916](https://github.com/Quick/Nimble/pull/916) - You can now directly check if an expectation has passed or not. [https://github.com/Quick/Nimble/pull/995](https://github.com/Quick/Nimble/pull/995) #### Breaking - Raised version requirements to Swift 5.6, iOS 13, macOS 10.15, tvOS 13, and watchOS 6. [https://github.com/Quick/Nimble/issues/984](https://github.com/Quick/Nimble/issues/984) - The `Expectation` struct is now a protocol. There are 2 concrete implementations, `SyncExpectation` and `AsyncExpectation`. `AsyncExpectation` does not support `toEventually`, and is meant for awaiting on async functions. `SyncExpectation` is effectively the older `Expectation` implementation, and works as it used to. [https://github.com/Quick/Nimble/pull/1004](https://github.com/Quick/Nimble/pull/1004) ### Auto-generated release notes #### What's Changed - Add support for watchOS by [@​JosephDuffy](https://github.com/JosephDuffy) in [https://github.com/Quick/Nimble/pull/916](https://github.com/Quick/Nimble/pull/916) - Add [@​younata](https://github.com/younata) to funding.yml by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/994](https://github.com/Quick/Nimble/pull/994) - Expose whether an expectation has passed and provide an option to throw by [@​bnickel](https://github.com/bnickel) in [https://github.com/Quick/Nimble/pull/995](https://github.com/Quick/Nimble/pull/995) - Raise minimum required OS and Swift Versions to Async-Support versions. by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/999](https://github.com/Quick/Nimble/pull/999) - Don't strip whitespace from appended newlines by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1001](https://github.com/Quick/Nimble/pull/1001) - Allow toEventually to run on background threads by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1000](https://github.com/Quick/Nimble/pull/1000) - Allow using async/await in expect by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1004](https://github.com/Quick/Nimble/pull/1004) - Get toEventually et al working in async contexts. by [@​younata](https://github.com/younata) in [https://github.com/Quick/Nimble/pull/1007](https://github.com/Quick/Nimble/pull/1007) #### New Contributors - [@​JosephDuffy](https://github.com/JosephDuffy) made their first contribution in [https://github.com/Quick/Nimble/pull/916](https://github.com/Quick/Nimble/pull/916) - [@​bnickel](https://github.com/bnickel) made their first contribution in [https://github.com/Quick/Nimble/pull/995](https://github.com/Quick/Nimble/pull/995) **Full Changelog**: Quick/Nimble@v10.0.0...v11.0.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/cgrindel/rules_swift_package_manager). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNTkuNyIsInVwZGF0ZWRJblZlciI6IjM1LjE1OS43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #529, going with the option to cache the expression as part of satisfyAllOf.
Also does this same thing for
satisfyAnyOf
.