75 Commits
Author SHA1 Message Date
Nick Cooke a6fb071eb9 [Docs] Update Promise+Wrap.swift to address DocC warnings 2024-11-05 12:51:18 -05:00
Nick Cooke bfee047851 Adjust resource layout for SPM 2024-01-12 17:54:38 -05:00
ykjchen 57c16a820a Add privacy manifest. 2024-01-09 20:17:56 -08:00
Nick Cooke 6592eea30d Review 2023-07-20 18:09:55 -04:00
Nick Cooke 35a4648677 [Promises] Force-link 'FBLPromises+Testing.m' 2023-07-20 18:03:57 -04:00
ykjchen c610e6410b Fix SwiftUI previews crashes when Promises is statically linked. 2023-07-19 21:27:53 -07:00
Ellis Hoag 6a7716da4b Rename generic to avoid shadowing (#219) 2023-07-12 14:57:01 -05:00
Chuck Hays 94e24b7e6b Update return type to work around kotlin compiler error. (#216)
* Update return type to work around kotlin compiler error.

See https://youtrack.jetbrains.com/issue/KT-59597/KN-Usage-of-instancetype-in-block-return-type-crashes for context.

When a method has a return type which is a block that returns instancetype, the compiler fails.
2023-06-28 19:03:04 +02:00
shingzhao 62136241ee Update Promise.swift with convenience init to create pending promise
Created convenience init to initiate a pending promise. 
This will make fake gens easier without having to create a new Default Value anymore.
2023-05-24 06:50:32 -07:00
noahric-at-google 894db2ad8c Use self/[self class] to reference FBLPromise in more places 2022-12-08 09:07:59 -08:00
Dylan Mace e3dce8703b PR changes 2022-06-23 17:39:10 -05:00
Dylan Mace d4bd98c424 Address PR requests 2022-06-20 22:15:56 -05:00
Dylan Mace 33a1a9e330 undo remove of new error logic 2022-06-14 00:21:49 -05:00
Dylan Mace cef64e437b PR updates, add new string test file 2022-06-14 00:09:22 -05:00
Dylan Mace fab5bf0fa7 Update error checking to use type(of:) rather than typecasting to verify objects are of type NSError 2022-06-13 22:49:39 -05:00
Byoungchan Lee b7da201eef Fix compilation error with -std=c11 by not using vendor extensions
Example:
../../third_party/promises/src/Sources/FBLPromises/FBLPromise+Timeout.m:38:3: error: implicit declaration of function 'typeof' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  typeof(self) __weak weakPromise = promise;
2022-01-24 15:46:20 +09:00
Soojin Ro 5d070816f1 Rename await to awaitPromise 2021-05-04 10:34:13 +08:00
Koichi Yokota db0cc64202 Add a single whitespace 2020-12-22 20:40:05 +09:00
Koichi Yokota 91b23b56eb Fix syntax error about FBLPromise+Wrap.m. 2020-12-07 19:56:35 +09:00
Eric Lindvall 5a0e74bcaf Remove reference to pendingObjects 2020-05-14 21:51:55 -07:00
Eric Lindvall 907e71bdf3 Fix tests 2020-05-14 13:01:05 -07:00
Eric Lindvall c0ae85178e Add assert 2020-05-14 12:18:47 -07:00
Eric Lindvall 8b57aa85f0 Update from feedback 2020-05-14 12:18:03 -07:00
Eric Lindvall e7fb04d08c Rename methods 2020-05-13 20:18:18 -07:00
Eric Lindvall cc9f85e773 Move to main header 2020-05-13 17:22:49 -07:00
Eric Lindvall e210615e2b Make FBLPromise.pendingObjects access threadsafe
Swift uses the NSMutableSet to hold on to references of Swift promises but the
modifications must be synchronized.
2020-05-13 17:12:41 -07:00
Anthony Shoumikhin 68c78cdc6f Tiny type improvements for ObjC and a dot syntax to create pending promises (#107)
* Add a pending dot syntax addition to FBLPromise

* Use whole module optimization for Promises Swift target in Release mode built with xcodebuild

* Refine some generic types in headers.
2019-03-29 13:17:25 -07:00
Anthony Shoumikhin 97e1071d32 Upgrade to Xcode 10.2 and satisfy linter (#94)
* Upgrade to Xcode 10.2

* Satisfy linter
2019-01-29 12:39:33 -08:00
Tristan Emrich 1904bf68d2 Updates Promise+All documentation. 2018-12-30 12:16:36 -08:00
temrich a3d9ca31a1 Converts NSError to PromiseError where applicable. (#83) 2018-11-20 07:47:25 -08:00
EthanLozano 8fd7f28a04 Adds all() that accepts 4 heterogenous values (#62)
Fixes #61
2018-07-26 08:09:25 -07:00
Anthony Shoumikhin 1e15edbd80 Tiny refinements: see commit descriptions (#60)
* Apply extension-safe falg for framework targets only to avoid warnings when linking against libswiftXCTest.dylib for Swift tests.

* Fix Error.userInfo type.
2018-07-14 15:59:00 -07:00
Jonathan Kim dd44aa6357 Fix build with Swift 4.0 and 3.2 (Xcode 9.0) and 4.1 and 3.3 (Xcode 9.4). 2018-07-11 17:45:20 -07:00
temrich 3b1bc4abbc Adds Promise+Retry operator (#53)
* Adds Promise+Retry operator that enables reattempting a task if the promise associated with that task is initially rejected.
2018-07-06 10:31:52 -07:00
Anthony Shoumikhin 57e094e0f4 Rename resolve to resolved 2018-05-24 23:06:16 -07:00
Anthony Shoumikhin ba91f23605 Add convenience methods to check for predefined errors 2018-05-22 14:12:34 -07:00
Anthony Shoumikhin 2780035e93 Add convenience methods to check for predefined errors 2018-05-18 14:19:43 -07:00
Anthony Shoumikhin 6e2bff4883 Fix umbrella header 2018-05-15 22:15:52 -07:00
Anthony Shoumikhin 0065ab2b45 Make FBLPromise covariant 2018-05-15 21:10:24 -07:00
Anthony Shoumikhin 83fea9d51d Improve code completion 2018-05-14 14:44:07 -07:00
Anthony Shoumikhin e10eaeb954 Refine convenience constructor in Swift 2018-05-10 11:12:20 -07:00
Anthony Shoumikhin 8ca3c4af98 Fix comments 2018-05-08 09:31:15 -07:00
Anthony Shoumikhin b0d7a5d3f0 Fix formatting 2018-05-08 09:01:57 -07:00
Anthony Shoumikhin 17a555f638 Fix formatting 2018-05-08 08:50:13 -07:00
Anthony Shoumikhin f3fcc67c4c await and delay operators with tests and docs 2018-04-29 01:54:41 -07:00
Anthony Shoumikhin e37c342e9f Minor refinements for timeout and catch tests 2018-04-28 19:54:57 -07:00
Anthony Shoumikhin d74163574a Add doc comments to reduce operator 2018-04-20 07:50:46 -07:00
Anthony Shoumikhin 3853e9356e Rename when to any 2018-04-18 09:21:00 -05:00
Anthony Shoumikhin eaf14aa07f Rename any to race 2018-04-17 23:12:45 -05:00
Anthony Shoumikhin 1c5b58c7b1 Add reduce operator 2018-04-17 10:25:00 -05:00