Skip to content

Rust: generate the extractor #17543

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

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
@aibaars aibaars force-pushed the aibaars/rust-gen-extractor branch from d34d865 to 592182c Compare September 20, 2024 17:16
@aibaars aibaars force-pushed the aibaars/rust-gen-extractor branch from 592182c to 7b4137f Compare September 20, 2024 17:25
@github github deleted a comment Sep 23, 2024
@github github deleted a comment Sep 23, 2024
@github github deleted a comment 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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