-
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
Make CompleteType contain module and component reserved names #48477
Open
elicwhite
wants to merge
1
commit into
facebook:main
Choose a base branch
from
elicwhite:export-D67806808
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Summary: Over the years of copying and moving and renaming types through CodegenSchema, this type ended up in the Command params, although the Command parser doesn't allow it. I made this change to a fixture: {F1974104959} and got this error ``` FAIL xplat/js/react-native-github/packages/react-native-codegen/src/parsers/flow/components/__tests__/component-parser-test.js ● RN Codegen Flow Parser › can generate fixture COMMANDS_DEFINED_WITH_ALL_TYPES Unsupported param type for method "scrollTo", param "speed". Found UnionTypeAnnotation 127 | default: 128 | (type: empty); > 129 | throw new Error( | ^ 130 | `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, 131 | ); 132 | } ``` Also, a default value for enum an argument of a Command doesn't make sense anyways. Commands should probably have support for enums and string literal unions, but that's out of scope here. Still need to add to this vec\concat on www: https://www.internalfb.com/code/www/[ebfa58f888a6064e17879934d447f59bcc2b6951]/flib/intern/sandcastle/react_native/ota_steps/SandcastleOTACompatibilityCheckReportingStep.php?lines=62 Changelog: [internal] Differential Revision: D67806808
facebook-github-bot
added
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
p: Facebook
Partner: Facebook
Partner
labels
Jan 3, 2025
This pull request was exported from Phabricator. Differential Revision: D67806808 |
elicwhite
added a commit
to elicwhite/react-native
that referenced
this pull request
Jan 3, 2025
…ok#48477) Summary: Over the years of copying and moving and renaming types through CodegenSchema, this type ended up in the Command params, although the Command parser doesn't allow it. I made this change to a fixture: {F1974104959} and got this error ``` FAIL xplat/js/react-native-github/packages/react-native-codegen/src/parsers/flow/components/__tests__/component-parser-test.js ● RN Codegen Flow Parser › can generate fixture COMMANDS_DEFINED_WITH_ALL_TYPES Unsupported param type for method "scrollTo", param "speed". Found UnionTypeAnnotation 127 | default: 128 | (type: empty); > 129 | throw new Error( | ^ 130 | `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, 131 | ); 132 | } ``` Also, a default value for enum an argument of a Command doesn't make sense anyways. Commands should probably have support for enums and string literal unions, but that's out of scope here. Still need to add to this vec\concat on www: https://www.internalfb.com/code/www/[ebfa58f888a6064e17879934d447f59bcc2b6951]/flib/intern/sandcastle/react_native/ota_steps/SandcastleOTACompatibilityCheckReportingStep.php?lines=62 Changelog: [internal] Differential Revision: D67806808
elicwhite
added a commit
to elicwhite/react-native
that referenced
this pull request
Jan 3, 2025
…ok#48477) Summary: Over the years of copying and moving and renaming types through CodegenSchema, this type ended up in the Command params, although the Command parser doesn't allow it. I made this change to a fixture: {F1974104959} and got this error ``` FAIL xplat/js/react-native-github/packages/react-native-codegen/src/parsers/flow/components/__tests__/component-parser-test.js ● RN Codegen Flow Parser › can generate fixture COMMANDS_DEFINED_WITH_ALL_TYPES Unsupported param type for method "scrollTo", param "speed". Found UnionTypeAnnotation 127 | default: 128 | (type: empty); > 129 | throw new Error( | ^ 130 | `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, 131 | ); 132 | } ``` Also, a default value for enum an argument of a Command doesn't make sense anyways. Commands should probably have support for enums and string literal unions, but that's out of scope here. Still need to add to this vec\concat on www: https://www.internalfb.com/code/www/[ebfa58f888a6064e17879934d447f59bcc2b6951]/flib/intern/sandcastle/react_native/ota_steps/SandcastleOTACompatibilityCheckReportingStep.php?lines=62 Changelog: [internal] Differential Revision: D67806808
elicwhite
added a commit
to elicwhite/react-native
that referenced
this pull request
Jan 4, 2025
…es (facebook#48477) Summary: Over the years of copying and moving and renaming types through CodegenSchema, this type ended up in the Command params, although the Command parser doesn't allow it. I made this change to a fixture: {F1974104959} and got this error ``` FAIL xplat/js/react-native-github/packages/react-native-codegen/src/parsers/flow/components/__tests__/component-parser-test.js ● RN Codegen Flow Parser › can generate fixture COMMANDS_DEFINED_WITH_ALL_TYPES Unsupported param type for method "scrollTo", param "speed". Found UnionTypeAnnotation 127 | default: 128 | (type: empty); > 129 | throw new Error( | ^ 130 | `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`, 131 | ); 132 | } ``` Also, a default value for enum an argument of a Command doesn't make sense anyways. Commands should probably have support for enums and string literal unions, but that's out of scope here. Still need to add to this vec\concat on www: https://www.internalfb.com/code/www/[ebfa58f888a6064e17879934d447f59bcc2b6951]/flib/intern/sandcastle/react_native/ota_steps/SandcastleOTACompatibilityCheckReportingStep.php?lines=62 Changelog: [internal] Differential Revision: D67806808
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
p: Facebook
Partner: Facebook
Partner
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.
Summary:
Over the years of copying and moving and renaming types through CodegenSchema, this type ended up in the Command params, although the Command parser doesn't allow it.
I made this change to a fixture:
{F1974104959}
and got this error
Also, a default value for enum an argument of a Command doesn't make sense anyways.
Commands should probably have support for enums and string literal unions, but that's out of scope here.
Still need to add to this vec\concat on www: https://www.internalfb.com/code/www/[ebfa58f888a6064e17879934d447f59bcc2b6951]/flib/intern/sandcastle/react_native/ota_steps/SandcastleOTACompatibilityCheckReportingStep.php?lines=62
Changelog: [internal]
Differential Revision: D67806808