Repository navigation
Conversation
@inlined was translated into Lapply's ap_inlined, but no pass in compiler/core ever read it: the only use in lam_pass_remove_alias was commented out. So (@inlined f)(x) was accepted and ignored, (@inlined(never) f)(x) still inlined, and the natural ReScript placement @inlined f(x) already reported warning 53. Delete the attribute's translation and the ap_inlined field. Any remaining @inlined now reaches check_attribute and is reported as a misplaced attribute (warning 53) instead of being silently ignored. See #8733. Signed-off-by: Christoph Knittel <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Christoph Knittel <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
The formatter drops attributes on functor applications, so @inlined F({}) cannot appear in a formatted fixture. Cover the two expression placements only. Signed-off-by: Christoph Knittel <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8734 +/- ##
=======================================
Coverage 79.86% 79.87%
=======================================
Files 464 464
Lines 63090 63079 -11
=======================================
- Hits 50388 50383 -5
+ Misses 12702 12696 -6
🚀 New features to boost your workflow:
|
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@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-8734 |
|
@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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7393a3cfc2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
A fully applied primitive call is translated without passing its callee through transl_exp, so check_attribute never saw the callee's attributes and `(@inlined id)(1)` with an external `id` got no warning. Check them on that path too. Signed-off-by: Christoph Knittel <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Christoph Knittel <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca575448b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
The attribute check added for fully applied primitives ran outside the callee's warning scope, so `(@warning("-53") @inlined id)(1)` still reported warning 53. Run it in the same scope transl_exp uses. Signed-off-by: Christoph Knittel <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f38610c587
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
With @inlined no longer removed from a functor application's callee, it reaches check_attribute_on_module, which ran outside any warning scope: `(@warning("-53") @inlined F)(X)` still reported warning 53. Translate a module expression inside the warning scope of its attributes, like transl_exp does for expressions. Signed-off-by: Christoph Knittel <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! 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". |
Removes the call-site
@inlinedattribute, as proposed in #8733.@inlinedwas translated intoLapply.ap_inlined, but no pass incompiler/coreever read it: its only use, inlam_pass_remove_alias.ml, was commented out. Today:(@inlined f)(x)(@inlined(never) f)(x)with@inline let f@inlined f(x)(the natural ReScript placement)No code in this repository uses it.
This deletes the attribute's translation (
get_and_remove_inlined_attribute(_on_module)) and theap_inlinedfield ofLambda.ap_info, together with its Lambda printer case.check_attributealready had an"inlined"case, so any remaining@inlined, on an expression or a functor application, is now reported as a misplaced attribute (warning 53) instead of being silently ignored. Generated JavaScript doesn't change.For the warning to behave like any other attribute check:
transl_exp, so the callee's attributes are now checked there too, in the callee's warning scope.(@inlined id)(1)with an externalidwarns, and(@warning("-53") @inlined id)(1)doesn't. A misplaced@inlineon such a callee is now reported as well.(@warning("-53") @inlined F)(X)is silent.@warningon a module expression therefore also applies to other warnings reported while translating it.ap_infois now a single-field record{ap_loc}; #8736, stacked on this PR, replaces it with a plain location.Since
.cmjfiles store marshalled Lambda terms (includingLapply), their layout changes with this PR. They're rebuilt with the compiler anyway.Tests
super_errors/warning_53_inlined_attribute.res:@inlinedon a function in parentheses, on an application and on an external, each reported as warning 53, and on an external under@warning("-53"), which isn't.The functor-application case (
module M = @inlined F({})) also reports warning 53, but it can't be in a fixture: the ReScript formatter drops attributes on functor applications (it printsF()), so the format check rejects it. That printer bug is fixed in #8735; once it's merged, I'll add the functor-application cases, including the@warning("-53")one, to the fixture.🤖 Generated with Claude Code