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

Use @generated in files to follow rustfmt #2263

Merged
merged 4 commits into from
Aug 30, 2024

Conversation

atezet
Copy link
Contributor

@atezet atezet commented Aug 29, 2024

Changes

Generated Rust files should include @generated in the first few lines. See https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#format_generated_files

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.

Copy link

welcome bot commented Aug 29, 2024

Hi! Thanks for opening this pull request! 😄

@fzyzcjy
Copy link
Owner

fzyzcjy commented Aug 29, 2024

Good job! Ready to merge after CI is green :)

For this simple PR, you can also manually copy and apply the CI failures.
Also, you may want to change things in the template https://github.com/fzyzcjy/flutter_rust_bridge/tree/master/frb_codegen/assets/integration_template

@atezet atezet force-pushed the use-at-generated branch 2 times, most recently from 8d5a139 to 49baa4d Compare August 29, 2024 20:24
@fzyzcjy
Copy link
Owner

fzyzcjy commented Aug 30, 2024

(For the last errors, I guess also just copy-paste and execute that patch. Looks like a spacing error)

@atezet
Copy link
Contributor Author

atezet commented Aug 30, 2024

Thanks! My editor removed some trailing whitespace. I'm not sure exactly why the trailing whitespace is generated, otherwise I'd prevent that instead, but I couldn't figure it out.

@fzyzcjy
Copy link
Owner

fzyzcjy commented Aug 30, 2024

You are welcome!

I'm not sure exactly why the trailing whitespace is generated

I guess it is because rust formatter does not auto remove it (kind of shortcoming I guess)...

@atezet
Copy link
Contributor Author

atezet commented Aug 30, 2024

Oops, reverted a bit too much!

@fzyzcjy fzyzcjy changed the title Use @generated in files created by Use @generated in files to follow rustfmt Aug 30, 2024
@fzyzcjy fzyzcjy merged commit c28852a into fzyzcjy:master Aug 30, 2024
20 of 21 checks passed
Copy link

welcome bot commented Aug 30, 2024

Hi! Congrats on merging your first pull request! 🎉

@fzyzcjy
Copy link
Owner

fzyzcjy commented Aug 30, 2024

@all-contributors please add @atezet for code

Copy link
Contributor

@fzyzcjy

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

This pull request was closed.
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.

2 participants