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

Special serialization rules for 'type' in Rust #2598

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

jmcphers
Copy link
Collaborator

@jmcphers jmcphers commented Apr 2, 2024

This is a small fix for the comm generator that allows it to emit Rust structs with fields that serialize as type, which is a reserved keyword in Rust.

@@ -1345,7 +1350,7 @@ async function createCommInterface() {
// Use black to format the Python file; the lint tests for the
// Python extension require that the Python files have exactly the
// format that black produces.
execSync(`python -m black ${pythonOutputFile}`, { stdio: 'ignore' });
execSync(`python3 -m black ${pythonOutputFile}`, { stdio: 'ignore' });
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Matches python3 usage elsewhere in this file and fixes an issue on recent macOS which has no Python on the $PATH.

@jmcphers jmcphers requested a review from wesm April 2, 2024 00:31
Copy link
Contributor

@wesm wesm left a comment

Choose a reason for hiding this comment

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

+1

@wesm wesm merged commit 352a541 into main Apr 2, 2024
1 check passed
@wesm wesm deleted the feature/rust-type-renaming branch April 2, 2024 16:03
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