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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GPwM4m3vhYgbdzgXvmQ7Te Signed-off-by: Christoph Knittel <ck@cca.io>
|
@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 |
Why:
Recent removals left definitions without callers, which no warning
reports because they are exported or in a module without an interface:
Cmi_format.output_cmi, the always-None cmt_interface_digest, the read of
a cmt after an embedded cmi (unreachable since the magic bumps of #8805
and #8928), Oprint.out_type_extension, Ext_namespace.try_split_module_name
and Ast_untagged_variants.block_type_can_be_undefined. Comments that
promised older .cmt layouts, a JSX transform rejection that #8944 made a
deprecation, and a TODO for a removed warning are corrected, and the
empty rescript_compiler_main.mli and three unused test inputs removed.
Review: Why does the cmt magic number change? Removing cmt_interface_digest changes the marshalled cmt_infos record, so .cmt files of the previous layout must be rejected rather than misread: T047 becomes T048.
Claude-Session: https://claude.ai/code/session_01Xk6AeCYpCK4SZRtHYKHGoe
Signed-off-by: Christoph Knittel <ck@cca.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
#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