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

Loosen config field rust_input syntax with delimit , #2092

Merged
merged 4 commits into from
Jun 16, 2024

Conversation

dbsxdbsx
Copy link
Contributor

@dbsxdbsx dbsxdbsx commented Jun 16, 2024

Changes

Loose the strict syntax restriction for rust_input with delimit , in flutter_rust_bridge.yaml, mention here:
With this change, the below several styles of rust_input in flutter_rust_bridge.yaml are all supported with no generation error after running flutter_rust_bridge_codegen generate:

rust_input: module_b,module_a,
rust_input: module_a,
rust_input: module_a,module_b
rust_input: module_a, module_b
rust_input: module_a , module_b
rust_input: module_a ,module_b

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.

@fzyzcjy
Copy link
Owner

fzyzcjy commented Jun 16, 2024

LGTM! It would be great to add some simple unit test inside this file to test compute_rust_input_namespace_prefixes_raw, e.g.

#[cfg(test)]
mod tests {
    #[test]
    fn test_blahblah() {
        assert_eq!(compute_rust_input_namespace_prefixes_raw("one, two"), vec!["one", "two"]);
        ...
    }
}

@fzyzcjy fzyzcjy merged commit 455a88a into fzyzcjy:master Jun 16, 2024
104 checks passed
@fzyzcjy fzyzcjy changed the title Loose config field rust_input syntax with delimit , Loosen config field rust_input syntax with delimit , Jun 16, 2024
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