feat: strip attributes outside of cargo-expand
Changes
- Inject a special
#[cfg]only when running cargo-expand to preserve FRB attributes - Preserve token span information
Closes #1488
Closed #1720 (<- edited by @fzyzcjy)
Checklist
- [x] 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(orfast) is run (it internal runs code generator, does auto formatting, etc). - [ ] If this PR adds/changes features, documentations (in the
./websitefolder) are updated. - [ ] CI is passing. Please refer to this page to see how to solve a failed CI.
Remark for PR creator
-
./frb_internal --helpshows utilities for development. - If fzyzcjy does not reply for a few days, maybe he just did not see it, so please ping him.
Codecov Report
Attention: Patch coverage is 66.66667% with 10 lines in your changes are missing coverage. Please review.
Project coverage is 55.12%. Comparing base (
9fdcce2) to head (42e559d). Report is 1 commits behind head on master.
:exclamation: Current head 42e559d differs from pull request most recent head 1f30aae. Consider uploading reports for the commit 1f30aae to get more accurate results
| Files | Patch % | Lines |
|---|---|---|
| ...n/generator/api_dart/spec_generator/class/field.rs | 0.00% | 10 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #1676 +/- ##
===========================================
- Coverage 99.26% 55.12% -44.14%
===========================================
Files 358 351 -7
Lines 14948 12703 -2245
===========================================
- Hits 14838 7003 -7835
- Misses 110 5700 +5590
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I've been having difficulties running precommit as it keeps deleting everything inside flutter_via_create/integrate, wonder if it's intermittent or something more serious that needs fixing.
I've been having difficulties running precommit as it keeps deleting everything inside flutter_via_create/integrate, wonder if it's intermittent or something more serious that needs fixing.
Curently the precommit slow logic contains:
-
precommit-generateto run codegen for every package -
precommit-integrateto runflutter_rust_bridge_codegen create/integrateforflutter_via_create/integrate, which deletes the folder and copy-paste-modify the internal templates into the folder
Thus, if the template is outdated, it will be pasted and override the newly generated thing...
This is suboptimal and maybe we can improve it, what do you think?
Thus, if the template is outdated, it will be pasted and override the newly generated thing...
Interesting, will check tomorrow what might make the template be outdated.