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

Add commandline option for passing features to cargo expand during codegen #2284

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

fmeef
Copy link
Contributor

@fmeef fmeef commented Sep 8, 2024

This fixes #2283

Copy link

welcome bot commented Sep 8, 2024

Hi! Thanks for opening this pull request! 😄

Copy link
Owner

@fzyzcjy fzyzcjy left a comment

Choose a reason for hiding this comment

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

(just a quick one-line nit when skimming it)

frb_codegen/src/binary/commands.rs Outdated Show resolved Hide resolved
@fzyzcjy
Copy link
Owner

fzyzcjy commented Sep 8, 2024

Looks like there is a 10k line of code diff, possibly because some cargokit folders etc are missing. One quick way to fix this error is to revert unwanted changes in those folders.

Feel free to ping me if you need any suggestions to make CI pass etc, or ping me when it is ready for review!

@fmeef
Copy link
Contributor Author

fmeef commented Sep 9, 2024

Yes, I just realized that happened when running ./frb_internal precommit --mode slow, fixing it.

Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 84.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 98.96%. Comparing base (48f02f4) to head (0fa5194).
Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
..._codegen/src/library/commands/cargo_expand/real.rs 83.33% 3 Missing ⚠️
frb_codegen/src/binary/commands.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2284      +/-   ##
==========================================
- Coverage   98.98%   98.96%   -0.02%     
==========================================
  Files         489      489              
  Lines       20231    20252      +21     
==========================================
+ Hits        20025    20042      +17     
- Misses        206      210       +4     

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

@fzyzcjy
Copy link
Owner

fzyzcjy commented Sep 9, 2024

The code LGTM, maybe we can add a test for it. For example, maybe we can

@fmeef fmeef force-pushed the cargo_features branch 5 times, most recently from f418c86 to 319e2f7 Compare September 9, 2024 10:05
@fmeef
Copy link
Contributor Author

fmeef commented Sep 9, 2024

While I have these tests added, I am trying to find a way to make linting/clippy respect the correct feature flags in a clean way. Will let you know when its fully working again

@fmeef
Copy link
Contributor Author

fmeef commented Sep 14, 2024

Appears to be fully working again with the tests

Copy link
Owner

@fzyzcjy fzyzcjy left a comment

Choose a reason for hiding this comment

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

Great job! Mainly some nits :)

frb_codegen/src/binary/commands.rs Outdated Show resolved Hide resolved
frb_codegen/src/library/codegen/parser/internal_config.rs Outdated Show resolved Hide resolved
frb_codegen/src/library/codegen/parser/mod.rs Outdated Show resolved Hide resolved
frb_codegen/src/library/commands/cargo_expand/real.rs Outdated Show resolved Hide resolved
frb_example/pure_dart/build.dart Outdated Show resolved Hide resolved
frb_utils/lib/src/simple_build_utils.dart Outdated Show resolved Hide resolved
tools/frb_internal/lib/src/makefile_dart/consts.dart Outdated Show resolved Hide resolved
tools/frb_internal/lib/src/makefile_dart/generate.dart Outdated Show resolved Hide resolved
tools/frb_internal/lib/src/makefile_dart/misc.dart Outdated Show resolved Hide resolved
tools/frb_internal/lib/src/makefile_dart/release.dart Outdated Show resolved Hide resolved
@fmeef
Copy link
Contributor Author

fmeef commented Sep 15, 2024

Do these latest changes work so far?

@fzyzcjy
Copy link
Owner

fzyzcjy commented Sep 16, 2024

Looks great! I will review again within a day. Btw next time when you are ready, feel free to use "request a review" button or tell me.

@fmeef
Copy link
Contributor Author

fmeef commented Sep 16, 2024

Oh yes sorry will use that next time

@fzyzcjy
Copy link
Owner

fzyzcjy commented Sep 16, 2024

It's OK!

@fzyzcjy
Copy link
Owner

fzyzcjy commented Sep 16, 2024

Reviewed half, and then realize it seems that the discussions in

image

are not solved. Feel free to ping me after these are handled as well!

@fzyzcjy
Copy link
Owner

fzyzcjy commented Sep 18, 2024

The progress looks good, and feel free to ping me when the things above are handled!

@fmeef
Copy link
Contributor Author

fmeef commented Sep 19, 2024

seems to be ready

@fzyzcjy
Copy link
Owner

fzyzcjy commented Sep 19, 2024

Great! I will review probably within a day

Copy link
Owner

@fzyzcjy fzyzcjy left a comment

Choose a reason for hiding this comment

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

Great! Ready to merge after nits

tools/frb_internal/lib/src/makefile_dart/consts.dart Outdated Show resolved Hide resolved
tools/frb_internal/lib/src/makefile_dart/misc.dart Outdated Show resolved Hide resolved
tools/frb_internal/lib/src/makefile_dart/lint.dart Outdated Show resolved Hide resolved
@fmeef fmeef force-pushed the cargo_features branch 3 times, most recently from 2bc411e to 26f152b Compare September 20, 2024 09:54
Copy link
Owner

@fzyzcjy fzyzcjy left a comment

Choose a reason for hiding this comment

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

Great! I am ready to merge and only one missing nit (other two can be fixed by using github's button)

frb_utils/lib/src/dart_web_test_utils/run_test.dart Outdated Show resolved Hide resolved
tools/frb_internal/lib/src/makefile_dart/lint.dart Outdated Show resolved Hide resolved
tools/frb_internal/lib/src/makefile_dart/lint.dart Outdated Show resolved Hide resolved
@fzyzcjy
Copy link
Owner

fzyzcjy commented Sep 20, 2024

@all-contributors please add @fmeef for code

Copy link
Contributor

@fzyzcjy

I've put up a pull request to add @fmeef! 🎉

@fmeef fmeef force-pushed the cargo_features branch 2 times, most recently from a466ffa to 16f57c4 Compare September 21, 2024 00:09
Copy link
Contributor Author

@fmeef fmeef left a comment

Choose a reason for hiding this comment

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

Fixed

@fzyzcjy fzyzcjy merged commit 134374e into fzyzcjy:master Sep 21, 2024
135 checks passed
Copy link

welcome bot commented Sep 21, 2024

Hi! Congrats on merging your first pull request! 🎉

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.

Passing feature flags to flutter_rust_bridge_codegen is not possible
2 participants