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

derive subcomponentinput #260

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

ohad-starkware
Copy link
Contributor

@ohad-starkware ohad-starkware commented Dec 17, 2024

This change is Reviewable

Copy link
Contributor Author

ohad-starkware commented Dec 17, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ohad-starkware ohad-starkware self-assigned this Dec 17, 2024
@ohad-starkware ohad-starkware force-pushed the ohad/derive_sub_component_inputs branch 2 times, most recently from 50df822 to baffd30 Compare December 17, 2024 11:02
@ilyalesokhin-starkware
Copy link
Collaborator

stwo_cairo_prover/crates/air_structs_derive/src/lib.rs line 99 at r1 (raw file):

            quote! {
                #field_name: [(); #array_length].map(|_| Vec::with_capacity(capacity))

Merge loops.

Suggestion:

let v = Vec::with_capacity(capacity);
v.set_len(capacity);
v

@ilyalesokhin-starkware
Copy link
Collaborator

stwo_cairo_prover/crates/air_structs_derive/src/lib.rs line 36 at r1 (raw file):

    let mut vec_array_fields = Vec::new();

    if let Data::Struct(data_struct) = &input.data {

in the compiler repo we are using
https://docs.rs/syn/latest/syn/

https://github.com/starkware-libs/cairo/blob/932767340c4b8a762140bf9eba305f437587ac1b/crates/cairo-lang-proc-macros/src/rewriter.rs#L10

Code quote:

if let Data::Struct(data_struct) = &input.data {

Copy link
Collaborator

@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 35 of 38 files at r1, all commit messages.
Reviewable status: 35 of 38 files reviewed, 2 unresolved discussions (waiting on @ohad-starkware)


stwo_cairo_prover/crates/air_structs_derive/src/lib.rs line 36 at r1 (raw file):

Previously, ilyalesokhin-starkware wrote…

in the compiler repo we are using
https://docs.rs/syn/latest/syn/

https://github.com/starkware-libs/cairo/blob/932767340c4b8a762140bf9eba305f437587ac1b/crates/cairo-lang-proc-macros/src/rewriter.rs#L10

my main worry is that you have silent parsing errors here.

Copy link
Contributor Author

@ohad-starkware ohad-starkware 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: 35 of 38 files reviewed, 2 unresolved discussions (waiting on @ilyalesokhin-starkware)


stwo_cairo_prover/crates/air_structs_derive/src/lib.rs line 99 at r1 (raw file):

Previously, ilyalesokhin-starkware wrote…

Merge loops.

Done.

@ohad-starkware ohad-starkware force-pushed the ohad/derive_sub_component_inputs branch 2 times, most recently from 9a12c17 to 5b7c782 Compare December 17, 2024 13:54
@ohad-starkware ohad-starkware force-pushed the ohad/derive_sub_component_inputs branch from 5b7c782 to cee8b86 Compare December 17, 2024 13:56
Copy link
Collaborator

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

Reviewable status: 33 of 38 files reviewed, 1 unresolved discussion (waiting on @ohad-starkware)


stwo_cairo_prover/crates/air_structs_derive/src/lib.rs line 99 at r1 (raw file):

Previously, ohad-starkware (Ohad) wrote…

Done.

I don't see it.

@ohad-starkware ohad-starkware force-pushed the ohad/derive_sub_component_inputs branch from cee8b86 to 0adc6bd Compare December 17, 2024 14:06
Copy link
Contributor Author

@ohad-starkware ohad-starkware 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: 33 of 38 files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware and @ohad-starkware)


stwo_cairo_prover/crates/air_structs_derive/src/lib.rs line 99 at r1 (raw file):

Previously, ilyalesokhin-starkware wrote…

I don't see it.

oh the expanded function right

Copy link
Collaborator

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

Reviewed 2 of 38 files at r1, 2 of 3 files at r2, 1 of 1 files at r5.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @ohad-starkware)

Copy link
Contributor Author

@ohad-starkware ohad-starkware left a comment

Choose a reason for hiding this comment

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

@Alon-Ti ptal

Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @ohad-starkware)

Copy link
Contributor

@Alon-Ti Alon-Ti 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 35 of 38 files at r1, 2 of 3 files at r2, 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ohad-starkware)

@ohad-starkware ohad-starkware merged commit 3833267 into main Dec 17, 2024
6 checks passed
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.

3 participants