flutter_rust_bridge
flutter_rust_bridge copied to clipboard
Implement conversion of NativeDate
Changes
Implement the feature requested in #1833.
(EDIT by @fzyzcjy to let github link automatically) Close #1833
Checklist
- [x] An issue to be fixed by this PR is listed above.
- [x] 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). - [x] 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.
Btw if that precommit command is too slow, try ./frb_internal generate-internal-frb-example-pure-dart && ./frb_internal precommit-generate which often suffices to refresh everything.
Codecov Report
Attention: Patch coverage is 60.71429% with 11 lines in your changes are missing coverage. Please review.
Project coverage is 81.08%. Comparing base (
e1f4e76) to head (f33a30f). Report is 50 commits behind head on master.
:exclamation: Current head f33a30f differs from pull request most recent head d40ac41
Please upload reports for the commit d40ac41 to get more accurate results.
| Files | Patch % | Lines |
|---|---|---|
| ...st/spec_generator/codec/cst/decoder/ty/delegate.rs | 0.00% | 6 Missing :warning: |
| ...rt/spec_generator/codec/cst/encoder/ty/delegate.rs | 0.00% | 5 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #1834 +/- ##
===========================================
- Coverage 99.22% 81.08% -18.14%
===========================================
Files 369 326 -43
Lines 15752 14022 -1730
===========================================
- Hits 15630 11370 -4260
- Misses 122 2652 +2530
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Finally the number of CI fails clearly decreases. 😅 However, I still get a couple of fails like:
diff --git a/frb_example/flutter_via_create/pubspec.lock b/frb_example/flutter_via_create/pubspec.lock
index 2663071..fb8fff4 100644
--- a/frb_example/flutter_via_create/pubspec.lock
+++ b/frb_example/flutter_via_create/pubspec.lock
@@ -61,10 +61,10 @@ packages:
dependency: "direct main"
description:
name: cupertino_icons
- sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
+ sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev/"
source: hosted
- version: "1.0.6"
+ version: "1.0.8"
fake_async:
dependency: transitive
description:
How can I fix that? I tried ./frb_internal pub-get-all.
However, I still get a couple of fails like:
I guess you need to manually modify https://github.com/fzyzcjy/flutter_rust_bridge/tree/master/frb_codegen/assets/integration_template to update things. The frb_codegen integrate command indeed just copy-paste (and slightly modify) files in that template folder.
After many failed attempts of running various commands I deleted all generation commits and started trying to use precommit --slow which seems at the end of the day what I should do. However, the command fails at a certain point and I'm unsure why.
See output.log.
Maybe we need to run that one command in CI as well in order to ensure it itself never breaks...
I use ./frb_internal generate-internal-frb-example-pure-dart && ./frb_internal precommit-generate on my computer and it runs well. May I know what error it gives? (This one may be easier to debug since it runs less things)
For your case, it says "could not compile frb_example_pure_dart", thus it would be great to firstly check compilation. In addition, those commands do parallelism to speed up, but the logs are less clear, so maybe need to nail down exact commands.
🥳
👀 What happened