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

Fix dashed library names #2034

Merged
merged 3 commits into from
Jun 7, 2024
Merged

Fix dashed library names #2034

merged 3 commits into from
Jun 7, 2024

Conversation

vhdirk
Copy link
Contributor

@vhdirk vhdirk commented Jun 5, 2024

Changes

Rust library names can't have dashes, while the package name can. This fixes it.

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 Jun 5, 2024

Hi! Thanks for opening this pull request! 😄

@fzyzcjy fzyzcjy changed the title fix dashed library names Fix dashed library names Jun 5, 2024
@fzyzcjy
Copy link
Owner

fzyzcjy commented Jun 5, 2024

Good fix! After CI is green, i.e. fix the lint error -

error: single-character string constant used as pattern
   --> frb_codegen/src/library/codegen/config/internal_config_parser/generator_parser.rs:165:28
    |
165 |     Ok(target.name.replace("-", "_"))
    |                            ^^^ help: try using a `char` instead: `'-'`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
    = note: `-D clippy::single-char-pattern` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::single_char_pattern)]`

I am ready to merge it :)

@fzyzcjy
Copy link
Owner

fzyzcjy commented Jun 5, 2024

Btw, for dashed library names, does the other parts of flutter_rust_bridge work?

@vhdirk
Copy link
Contributor Author

vhdirk commented Jun 5, 2024

So far, I haven't encountered any other issues using a dashed crate name ¯_(ツ)_/¯

@fzyzcjy
Copy link
Owner

fzyzcjy commented Jun 5, 2024

Then that's great!

@fzyzcjy fzyzcjy merged commit 435d0d1 into fzyzcjy:master Jun 7, 2024
Copy link

welcome bot commented Jun 7, 2024

Hi! Congrats on merging your first pull request! 🎉

@fzyzcjy
Copy link
Owner

fzyzcjy commented Jun 7, 2024

@all-contributors please add @vhdirk for code

Copy link
Contributor

@fzyzcjy

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

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