Repository navigation
Accept a payload on @react.componentWithProps with a deprecation warning - #8944
Conversation
#8884 made a payload on @react.componentWithProps an error, breaking code that compiled before; the payload was always ignored. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GPwM4m3vhYgbdzgXvmQ7Te Signed-off-by: Christoph Knittel <[email protected]>
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8944 +/- ##
==========================================
+ Coverage 81.14% 81.16% +0.02%
==========================================
Files 456 457 +1
Lines 63760 63885 +125
==========================================
+ Hits 51738 51855 +117
- Misses 12022 12030 +8
🚀 New features to boost your workflow:
|
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8944 |
#8884 made a payload on
@react.componentWithProps/@jsx.componentWithPropsa hard error (@react.componentWithProps takes no payload.). Before, the JSX transform never looked at that payload, so code like@react.componentWithProps(: props)(copied from@react.component(: props)) compiled fine and now breaks.This restores the 12.x behavior with a deprecation warning:
componentWithPropswith a payload as the component and warns:deprecated: @react.componentWithProps takes no payload. The payload has no effect; remove it.This applies to let bindings, externals (which still get the existing "cannot be externals" error) and signature items.componentWithPropswith a payload next to another component annotation is now reported as a duplicate annotation instead of as a payload error.Tests: the
react_componentWithProps_invalid_payloadsuper_errors fixture becomesreact_componentWithProps_payload, which compiles and only warns. AsharedPropsWithPropsppx case shows that the payload form transforms the same as the bare attribute.🤖 Generated with Claude Code
https://claude.ai/code/session_01GPwM4m3vhYgbdzgXvmQ7Te