-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Feat: add scripts to sync archs #2357
Conversation
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.
Left some comments. Please answer them
@@ -3,7 +3,7 @@ apply plugin: 'com.diffplug.spotless' | |||
|
|||
spotless { | |||
java { | |||
target 'src/main/java/**/*.java', 'src/paper/java/com/horcrux/svg/**/*.java' |
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.
Those files at src/paper/java/com/horcrux/svg/
are autogenerated, formatting them messes up checking consistency.
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.
LGTM
Changes moved from: software-mansion/react-native-screens#2224
Description
When changing native props on Fabric, codegen generates corresponding interfaces and delegates. To make sure both implementations are consistent, we implement those interfaces on Paper too. Currently, after generating interfaces using codegen, developer needs to copy corresponding files for paper manually. This task adds Gradle task, that automates this.
Changes
Current assumption:
Two scripts:
check-archs-consistency
andsync-archs
. The first one generates codegen interfaces and compares them with what we have for paper, the second generates and copies for paper to sync the archs.src/paper
src/paper
orandroid/src/paper/java/com/facebook/react/viewmanagers
changesTest code and steps to reproduce
Open
src/fabric/LineNativeComponent.ts
or/andsrc/fabric/NativeSvgRenderableModule.ts
and remove any proper form interface. Now:Brining back the prop and repeating up should cause the interface back and CI green.
Posting changes in other places should cause CI task to run.
You can also run those commands yourself using
yarn check-archs-consistency
andyarn sync-archs