Skip to content

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

use ra_ap_syntax::ast::SourceFile;
use ra_ap_syntax::AstNode;

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
@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.

3 participants