Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rust: generate the extractor #17543

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Rust: generate the extractor #17543

merged 2 commits into from
Sep 24, 2024

Conversation

aibaars
Copy link
Contributor

@aibaars aibaars commented Sep 20, 2024

This pull request splits the translate.rs file of the extractor in two parts, the non-generated part (base.rs) and the generated code generated.rs.

The extractor can be regenerated by running cargo run in rust/generate-schema .

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Sep 20, 2024
@github github deleted a comment from Safay99 Sep 23, 2024
@github github deleted a comment from Safay99 Sep 23, 2024
@github github deleted a comment from Safay99 Sep 23, 2024
@aibaars aibaars marked this pull request as ready for review September 23, 2024 14:45
@aibaars aibaars added the no-change-note-required This PR does not need a change note label Sep 23, 2024
@@ -0,0 +1,2185 @@
use super::base::{TextValue, Translator};
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's nice when generated code starts with a comment like generated code, do not edit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, good idea; I also added some linguist-generated entries to .gitattributes


pub fn extract(
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it can be private.

@aibaars aibaars merged commit 4795333 into main Sep 24, 2024
12 checks passed
@aibaars aibaars deleted the aibaars/rust-gen-extractor branch September 24, 2024 13:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants