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

Fix output formatting in cairo-run #6911

Merged
merged 4 commits into from
Jan 4, 2025
Merged

Conversation

Hopium21
Copy link
Contributor

File changed: crates/bin/cairo-run/src/main.rs

Before: first = false; // After print!(", ")
After: first = false; // Before print!(", ")

This PR fixes the output formatting of panic messages in the Cairo runner by moving the first = false assignment before printing the comma separator. This ensures proper comma separation between panic values without an unnecessary leading comma.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @Hopium21)


crates/bin/cairo-run/src/main.rs line 127 at r1 (raw file):

                    print!(", ");
                   }
                first = false;

run ./scripts/rust_fmt.sh

Copy link
Contributor Author

@Hopium21 Hopium21 left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Hopium21)

@Hopium21 Hopium21 requested a review from orizi January 3, 2025 07:09
@Hopium21
Copy link
Contributor Author

Hopium21 commented Jan 3, 2025

@orizi I've tested the changes and verified that the output formatting works correctly now. Ready to be merged.

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Your ci is still broken, run ./scripts/rust_fmt.sh

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Hopium21)

@Hopium21 Hopium21 requested a review from orizi January 4, 2025 10:35
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

please do not do actions in this PR if you don't fix all issues at https://reviewable.io/reviews/starkware-libs/cairo/6911

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Hopium21)

@Hopium21
Copy link
Contributor Author

Hopium21 commented Jan 4, 2025

@orizi done

@Hopium21 Hopium21 requested a review from orizi January 4, 2025 11:33
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Hopium21)

@orizi orizi enabled auto-merge January 4, 2025 11:51
@orizi orizi added this pull request to the merge queue Jan 4, 2025
Merged via the queue into starkware-libs:main with commit 1593eb2 Jan 4, 2025
47 checks passed
orizi pushed a commit that referenced this pull request Feb 13, 2025
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.

4 participants