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

Properly printing panics in the cairo runner. #6333

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

orizi
Copy link
Collaborator

@orizi orizi commented Sep 2, 2024

This change is Reviewable

@orizi orizi force-pushed the orizi/runner-proper-panic-print branch from 0e6cb56 to 55d45eb Compare September 2, 2024 14:47
@orizi orizi enabled auto-merge September 2, 2024 14:47
@ilyalesokhin-starkware
Copy link
Contributor

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

        cairo_lang_runner::RunResultValue::Panic(values) => {
            print!("Run panicked with [");
            let mut felts = values.into_iter();

Aren't we supposed to parse from end to start?

Code quote:

        let mut felts = values.into_iter();

Copy link
Collaborator Author

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)


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

Previously, ilyalesokhin-starkware wrote…

Aren't we supposed to parse from end to start?

AFAIU - we should maybe read from end to start - but parse from start to end.
(as the bytearray markers appear before the data

Copy link
Contributor

@ilyalesokhin-starkware ilyalesokhin-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, all discussions resolved

@ilyalesokhin-starkware
Copy link
Contributor

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

Previously, orizi wrote…

AFAIU - we should maybe read from end to start - but parse from start to end.
(as the bytearray markers appear before the data

do we want to implement that in the code?

@ilyalesokhin-starkware
Copy link
Contributor

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

Previously, ilyalesokhin-starkware wrote…

do we want to implement that in the code?

Parse each entry from start to end but print the entries in reverse order?

Copy link
Collaborator Author

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

Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware)


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

Previously, ilyalesokhin-starkware wrote…

Parse each entry from start to end but print the entries in reverse order?

possibly - in any case - we currently don't do it anywhere else.

Copy link
Contributor

@ilyalesokhin-starkware ilyalesokhin-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 1 files reviewed, all discussions resolved

@orizi orizi added this pull request to the merge queue Sep 3, 2024
Merged via the queue into main with commit 1d81c29 Sep 3, 2024
43 of 44 checks passed
@orizi orizi deleted the orizi/runner-proper-panic-print branch September 5, 2024 11:31
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