-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Fabric: working podspecs & works in RNTester #23803
Closed
+765
−52
Closed
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
58906c9
working podspec with no hacks!
ericlewis 0875260
Hacks necessary to run in RNTester
ericlewis 96e3e58
Allow codegen components back in
ericlewis aa9e8d4
Don’t merge: Commit codegen’d component refs.
ericlewis fd1c7d9
Use strikethrough instead of line-through
ericlewis 4e76563
use codegen when install pods
ericlewis 63c17c9
Fix shell lint
ericlewis d00b345
fix alphanumeric handling of filenames
ericlewis 1c57282
Fix script
ericlewis eecc1f6
remove hacks to internals
ericlewis 51c6997
Swizzle fabric methods so we don’t crash.
ericlewis f64646b
remove shim hack, use flag to indicate fabric.
ericlewis 45062d1
Clean-up podspecs
ericlewis cde57e8
use a diff podspec for folly on fabric
ericlewis 6df82b9
Fix header search paths
ericlewis aec36fd
Revert "Use strikethrough instead of line-through"
ericlewis 4ebf5a7
vastly simpler folly podspec
ericlewis c590e9c
Feature flag fabric, remove enable by default.
ericlewis d9ba285
Add comment to generate-rncore.sh
ericlewis b511635
create fabric subspec for folly
ericlewis 5d6872f
Update podlock
ericlewis d345857
add copyright header
ericlewis 8a68949
Silence warning, names won’t be non-alphanumberic
ericlewis 5279477
Fix missing run scheme
ericlewis 707af1b
update folly podspec
ericlewis 3235db2
Update react-fabric folly dep
ericlewis 7eec116
fix style nit
ericlewis 9676dfd
Update fixme to point to issue
ericlewis d2671a9
Add revisit todos to weakObject implementations
ericlewis b40483b
Flag nit
ericlewis 043694a
JSI: flag fabric specific code
ericlewis 31c110c
Fix header
ericlewis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#ifdef RN_FABRIC_ENABLED | ||
#include <react/uimanager/ComponentDescriptorFactory.h> | ||
#include <react/uimanager/ComponentDescriptorRegistry.h> | ||
#include <react/uimanager/ContextContainer.h> | ||
|
||
#include <react/config/ReactNativeConfig.h> | ||
#include <react/components/image/ImageComponentDescriptor.h> | ||
#include <react/components/scrollview/ScrollViewComponentDescriptor.h> | ||
#include <react/components/rncore/ComponentDescriptors.h> | ||
#include <react/components/text/ParagraphComponentDescriptor.h> | ||
#include <react/components/text/RawTextComponentDescriptor.h> | ||
#include <react/components/text/TextComponentDescriptor.h> | ||
#include <react/components/view/ViewComponentDescriptor.h> | ||
#include <react/components/slider/SliderComponentDescriptor.h> | ||
|
||
namespace facebook { | ||
namespace react { | ||
|
||
/** | ||
* This is a sample implementation. Each app should provide its own. | ||
*/ | ||
ComponentRegistryFactory getDefaultComponentRegistryFactory() { | ||
return [](const EventDispatcher::Shared &eventDispatcher, | ||
const SharedContextContainer &contextContainer) { | ||
auto registry = std::make_shared<ComponentDescriptorRegistry>(); | ||
registry->registerComponentDescriptor(std::make_shared<ViewComponentDescriptor>(eventDispatcher)); | ||
registry->registerComponentDescriptor(std::make_shared<ImageComponentDescriptor>(eventDispatcher, contextContainer)); | ||
registry->registerComponentDescriptor(std::make_shared<ScrollViewComponentDescriptor>(eventDispatcher)); | ||
registry->registerComponentDescriptor(std::make_shared<ParagraphComponentDescriptor>(eventDispatcher, contextContainer)); | ||
registry->registerComponentDescriptor(std::make_shared<TextComponentDescriptor>(eventDispatcher)); | ||
registry->registerComponentDescriptor(std::make_shared<RawTextComponentDescriptor>(eventDispatcher)); | ||
registry->registerComponentDescriptor(std::make_shared<ActivityIndicatorViewComponentDescriptor>(eventDispatcher)); | ||
registry->registerComponentDescriptor(std::make_shared<SwitchComponentDescriptor>(eventDispatcher)); | ||
registry->registerComponentDescriptor(std::make_shared<SliderComponentDescriptor>(eventDispatcher, contextContainer)); | ||
return registry; | ||
}; | ||
} | ||
|
||
} // namespace react | ||
} // namespace facebook | ||
#endif |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this an extra alias? I don't see it used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a Default subspec, so that Folly doesn't install the fabric subspec automatically as well. It is a no-op technically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can make it so that it's not a no-op but actually controls what is built. I decided against this originally to prevent any mistakes from developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to keep default as a no-op, so user's can't accidentally forget to install Folly normally.