Skip to content
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

Generate methods of Default trait ; Automatically rename function names to avoid keyword conflict ; Improve parsing trait impl in third party crates #2150

Merged
merged 29 commits into from
Jun 24, 2024

Conversation

fzyzcjy
Copy link
Owner

@fzyzcjy fzyzcjy commented Jun 24, 2024

Changes

Close #2136

Checklist

  • An issue to be fixed by this PR is listed above.
  • New tests are added to ensure new features are working. Please refer to this page to see how to add a test.
  • ./frb_internal precommit --mode slow (or fast) is run (it internal runs code generator, does auto formatting, etc).
  • If this PR adds/changes features, documentations (in the ./website folder) are updated.
  • CI is passing. Please refer to this page to see how to solve a failed CI.

Remark for PR creator

  • ./frb_internal --help shows utilities for development.
  • If fzyzcjy does not reply for a few days, maybe he just did not see it, so please ping him.

@fzyzcjy fzyzcjy changed the title Generate methods of Default trait ; Automatically rename function names to avoid keyword conflict Generate methods of Default trait ; Automatically rename function names to avoid keyword conflict ; Improve parsing trait impl in third party crates Jun 24, 2024
@fzyzcjy fzyzcjy marked this pull request as ready for review June 24, 2024 04:44
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.10%. Comparing base (c1fb239) to head (1c487bd).
Report is 1 commits behind head on master.

Current head 1c487bd differs from pull request most recent head 3eca0ea

Please upload reports for the commit 3eca0ea to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2150      +/-   ##
==========================================
- Coverage   99.10%   99.10%   -0.01%     
==========================================
  Files         486      486              
  Lines       19990    19987       -3     
==========================================
- Hits        19812    19809       -3     
  Misses        178      178              

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

@fzyzcjy fzyzcjy merged commit df698b2 into master Jun 24, 2024
@erdemyerebasmaz
Copy link

@fzyzcjy Re: Automatically rename function names to avoid keyword conflict

We had a method named sync, which didn't cause any keyword issues so far, and with this new change, it's generated as sync_.

Force renaming it as sync via #[frb(name = "...")] macro isn't applied as well.

#[frb(name = "sync")]
pub fn sync(&self) {
    ...
}

Can we add an option to ignore this check or apply the macro as last step?
Thanks

erdemyerebasmaz added a commit to breez/breez-sdk-liquid that referenced this pull request Jul 8, 2024
and generate Dart bindings.

* 2.1.0 has introduced a regression: fzyzcjy/flutter_rust_bridge#2150 (comment)
@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Jul 8, 2024

@erdemyerebasmaz Hi could you please create a separate issue, thus it is easier to check

erdemyerebasmaz added a commit to breez/breez-sdk-liquid that referenced this pull request Jul 8, 2024
and generate Dart bindings.

* 2.1.0 has introduced a regression: fzyzcjy/flutter_rust_bridge#2150 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generation of default struct
2 participants