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

Make sub pointers depend on DeriveStorage. #5890

Merged
merged 1 commit into from
Jun 30, 2024
Merged

Conversation

gilbens-starkware
Copy link
Contributor

@gilbens-starkware gilbens-starkware commented Jun 25, 2024

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


corelib/src/starknet/storage.cairo line 529 at r1 (raw file):

#[feature("simple-storage-layout")]
impl u256SubPointersImpl<
    impl i: starknet::storage_access::SimpleStorageLayout<u256>

Suggestion:

    +starknet::storage_access::SimpleStorageLayout<u256>

corelib/src/starknet/storage_access.cairo line 99 at r1 (raw file):

    note: "Manually implementing `SimpleStorageLayout` is not advised. Use #[derive(Store)] instead."
)]
pub trait SimpleStorageLayout<T> {}

so that the error would actually be clear.

Suggestion:

pub trait DeriveStorage<T> {}

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 15 of 19 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @gilbens-starkware)

Copy link
Contributor Author

@gilbens-starkware gilbens-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: all files reviewed, 2 unresolved discussions (waiting on @orizi)


corelib/src/starknet/storage.cairo line 529 at r1 (raw file):

#[feature("simple-storage-layout")]
impl u256SubPointersImpl<
    impl i: starknet::storage_access::SimpleStorageLayout<u256>

Done.


corelib/src/starknet/storage_access.cairo line 99 at r1 (raw file):

Previously, orizi wrote…

so that the error would actually be clear.

Done.

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 18 of 18 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware)


crates/cairo-lang-starknet/src/plugin/consts.rs line 24 at r2 (raw file):

pub const EVENT_TRAIT: &str = "starknet::Event";
pub const STORE_TRAIT: &str = "starknet::Store";
pub const SIMPLE_STORAGE_LAYOUT_TRAIT: &str = "starknet::storage_access::DeriveStorage";

rename constant.

Copy link
Contributor Author

@gilbens-starkware gilbens-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: 18 of 19 files reviewed, 1 unresolved discussion (waiting on @orizi)


crates/cairo-lang-starknet/src/plugin/consts.rs line 24 at r2 (raw file):

Previously, orizi wrote…

rename constant.

Done.

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 @gilbens-starkware)

@gilbens-starkware gilbens-starkware force-pushed the spr/main/b6047b21 branch 2 times, most recently from 0a0606f to 6d64937 Compare June 27, 2024 09:34
@gilbens-starkware gilbens-starkware changed the base branch from spr/main/5f113450 to main June 27, 2024 10:24
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 18 of 18 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware)


-- commits line 2 at r4:
reword.

@gilbens-starkware gilbens-starkware changed the title Make sub pointers depend on SimpleStorageLayout. Make sub pointers depend on DeriveStorage. Jun 30, 2024
Copy link
Contributor Author

@gilbens-starkware gilbens-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: all files reviewed, 1 unresolved discussion (waiting on @orizi)


-- commits line 2 at r4:

Previously, orizi wrote…

reword.

Done.

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 all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @gilbens-starkware)

@gilbens-starkware gilbens-starkware added this pull request to the merge queue Jun 30, 2024
Merged via the queue into main with commit ff5d601 Jun 30, 2024
87 checks passed
@orizi orizi deleted the spr/main/b6047b21 branch July 1, 2024 10:42
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.

None yet

2 participants