-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a mechanism to separate internal and external default experiments
Summary: This diff provides a temporary mechanism to allow different experiments to be enabled by default between internal and external builds of IGListKit. It works similarly to `IGListAssert` where a different copy of `IGListDefaultExperiments.h` is provided by BUCK when performing internal builds. For the open source copies of IGListKit, the standard system behaviour of triggering an `NSInconsistencyException` when an invalid batch transaction occurs is set. For internal builds, the `IGListExperimentThrowOnInconsistencyException` experiment is disabled, where invalid transactions are forwarded to `IGListAssert` instead. Differential Revision: D54571550 fbshipit-source-id: c6c339de20c24eb487846b6567d6c8bc08bc20f2
- Loading branch information
1 parent
eeb5208
commit 7f20f5c
Showing
4 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#if __has_include(<IGListDiffKit/IGListDiffKit.h>) | ||
#import <IGListDiffKit/IGListExperiments.h> | ||
#else | ||
#import "IGListExperiments.h" | ||
#endif | ||
|
||
/// Provides a list of experiments that are enabled by default in IGListKit. | ||
static inline IGListExperiment IGListDefaultExperiments(void) { | ||
return IGListExperimentThrowOnInconsistencyException; | ||
} |