Skip to content

fix: allow deriving both TryFromJs and TryIntoJs with custom converters#5403

Open
mansiverma897993 wants to merge 2 commits into
boa-dev:mainfrom
mansiverma897993:fix/derive-conflict-5361
Open

fix: allow deriving both TryFromJs and TryIntoJs with custom converters#5403
mansiverma897993 wants to merge 2 commits into
boa-dev:mainfrom
mansiverma897993:fix/derive-conflict-5361

Conversation

@mansiverma897993

Copy link
Copy Markdown
Contributor

Closes #5361

@mansiverma897993 mansiverma897993 requested a review from a team as a code owner June 19, 2026 07:32
@github-actions github-actions Bot added the Waiting On Review Waiting on reviews from the maintainers label Jun 19, 2026
@github-actions github-actions Bot added this to the v1.0.0 milestone Jun 19, 2026
@github-actions github-actions Bot added the C-Tests Issues and PRs related to the tests. label Jun 19, 2026
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 53,125 53,125 0
Passed 51,072 51,072 0
Ignored 1,482 1,482 0
Failed 571 571 0
Panics 0 0 0
Conformance 96.14% 96.14% 0.00%

Tested main commit: 7ce9cae84ac9bf54fe528bb05b997ac24af808a4
Tested PR commit: 6be840340d15d25f64cde808b7304d1e16034924
Compare commits: 7ce9cae...6be8403

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.23%. Comparing base (6ddc2b4) to head (6be8403).
⚠️ Report is 989 commits behind head on main.

Files with missing lines Patch % Lines
core/macros/src/lib.rs 0.00% 17 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5403       +/-   ##
===========================================
+ Coverage   47.24%   60.23%   +12.98%     
===========================================
  Files         476      567       +91     
  Lines       46892    63160    +16268     
===========================================
+ Hits        22154    38042    +15888     
- Misses      24738    25118      +380     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jedel1043 jedel1043 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the best thing we can do right now. We might want to change syntax a bit to be something like boa_try_from_js(with = "function") to avoid code duplication, but that's just a future enhancement IMO. Thanks!

@mansiverma897993

Copy link
Copy Markdown
Contributor Author

@jedel1043
Thanks for the suggestion! I've updated the syntax to use #[boa_try_from_js(with = "...")] and #[boa_try_into_js(with = "...")] helper attributes respectively. This eliminates the need to parse and ignore each other's custom attributes, keeping the two macro derivations decoupled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Tests Issues and PRs related to the tests. Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't use #[boa(from_js_with = "...")] or #[boa(into_js_with = "...")] when deriving both TryFromJs and TryIntoJs

2 participants