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

vec deprecated append #7167

Merged
merged 1 commit into from
Jan 28, 2025
Merged

vec deprecated append #7167

merged 1 commit into from
Jan 28, 2025

Conversation

dean-starkware
Copy link
Collaborator

No description provided.

@dean-starkware dean-starkware marked this pull request as ready for review January 27, 2025 14:45
@reviewable-StarkWare
Copy link

This change is Reviewable

@dean-starkware dean-starkware changed the base branch from main to dean/vec_improvements January 27, 2025 15:23
Copy link
Contributor

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

Fix the title.

Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @orizi)

Copy link
Collaborator Author

@dean-starkware dean-starkware left a comment

Choose a reason for hiding this comment

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

What's wrong with it?

Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @orizi)

Copy link
Contributor

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

It's the branch name, not the commit message.

Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @orizi)

Copy link
Collaborator Author

@dean-starkware dean-starkware left a comment

Choose a reason for hiding this comment

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

I don't see it...

Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @orizi)

@dean-starkware dean-starkware force-pushed the dean/vec_improvements branch 2 times, most recently from 91d7a4e to 5c9ee2a Compare January 28, 2025 06:59
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.

Reviewable status: 0 of 4 files reviewed, 3 unresolved discussions (waiting on @dean-starkware)


corelib/src/starknet/storage/vec.cairo line 327 at r2 (raw file):

        note: "Use `core::starknet::storage::Vec::MutableVecTrait::allocate` instead",
    )]
    fn append(self: T) -> StoragePath<Mutable<Self::ElementType>>;

Suggestion:

    fn append(self: T) -> StoragePath<Mutable<Self::ElementType>> {
        Self::allocate(self)
    }

corelib/src/starknet/storage/vec.cairo line 446 at r2 (raw file):

        self.as_ptr().write(vec_len + 1);
        self.update(vec_len)
    }

corelib/src/starknet/storage/vec.cairo line 505 at r2 (raw file):

    fn append(self: T) -> StoragePath<Mutable<VecTraitImpl::ElementType>> {
        self.as_path().append()
    }

@dean-starkware dean-starkware changed the base branch from dean/vec_improvements to main January 28, 2025 07:00
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.

Reviewable status: 0 of 4 files reviewed, 5 unresolved discussions (waiting on @dean-starkware)


corelib/src/starknet/storage/vec.cairo line 324 at r2 (raw file):

    /// ```
    #[deprecated(
        feature: "corelib-internal-use",

or something similar.

Suggestion:

        feature: "starknet-storage-deprecation",

corelib/src/starknet/storage/vec.cairo line 325 at r2 (raw file):

    #[deprecated(
        feature: "corelib-internal-use",
        note: "Use `core::starknet::storage::Vec::MutableVecTrait::allocate` instead",

the actual visible path.

Suggestion:

        note: "Use `core::starknet::storage::MutableVecTrait::allocate` instead",

@dean-starkware dean-starkware force-pushed the dean/vec_deprecated_append branch from b428f86 to 9642dab Compare January 28, 2025 07:34
Copy link
Collaborator Author

@dean-starkware dean-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: 0 of 4 files reviewed, 5 unresolved discussions (waiting on @orizi)


corelib/src/starknet/storage/vec.cairo line 324 at r2 (raw file):

Previously, orizi wrote…

or something similar.

Done.


corelib/src/starknet/storage/vec.cairo line 325 at r2 (raw file):

Previously, orizi wrote…

the actual visible path.

Done.


corelib/src/starknet/storage/vec.cairo line 327 at r2 (raw file):

        note: "Use `core::starknet::storage::Vec::MutableVecTrait::allocate` instead",
    )]
    fn append(self: T) -> StoragePath<Mutable<Self::ElementType>>;

Nicely done.


corelib/src/starknet/storage/vec.cairo line 446 at r2 (raw file):

        self.as_ptr().write(vec_len + 1);
        self.update(vec_len)
    }

Done.


corelib/src/starknet/storage/vec.cairo line 505 at r2 (raw file):

    fn append(self: T) -> StoragePath<Mutable<VecTraitImpl::ElementType>> {
        self.as_path().append()
    }

Done.

@dean-starkware dean-starkware changed the base branch from main to dean/vec_improvements January 28, 2025 07: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.

:lgtm:

Reviewed 3 of 3 files at r2, 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dean-starkware)

@dean-starkware dean-starkware changed the title Dean/vec deprecated append vec deprecated append Jan 28, 2025
@dean-starkware dean-starkware force-pushed the dean/vec_improvements branch 2 times, most recently from 1044009 to 604176e Compare January 28, 2025 08:25
@dean-starkware dean-starkware force-pushed the dean/vec_deprecated_append branch from 9642dab to d216d98 Compare January 28, 2025 08:55
@dean-starkware dean-starkware changed the base branch from dean/vec_improvements to main January 28, 2025 08:55
@dean-starkware dean-starkware force-pushed the dean/vec_deprecated_append branch 2 times, most recently from e6ff33b to 8ac7be5 Compare January 28, 2025 08:58
Copy link
Contributor

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

Reviewed 1 of 1 files at r4, 3 of 3 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dean-starkware)


corelib/src/starknet/storage/vec.cairo line 500 at r5 (raw file):

    fn allocate(self: T) -> StoragePath<Mutable<VecTraitImpl::ElementType>> {
        self.as_path().append()

Suggestion:

allocate()

@dean-starkware dean-starkware force-pushed the dean/vec_deprecated_append branch from 8ac7be5 to 24f3739 Compare January 28, 2025 09:23
Copy link
Collaborator Author

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


corelib/src/starknet/storage/vec.cairo line 500 at r5 (raw file):

    fn allocate(self: T) -> StoragePath<Mutable<VecTraitImpl::ElementType>> {
        self.as_path().append()

Done.

Copy link
Contributor

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

:lgtm:

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

@dean-starkware dean-starkware added this pull request to the merge queue Jan 28, 2025
Merged via the queue into main with commit 1e36b69 Jan 28, 2025
48 checks passed
@orizi orizi deleted the dean/vec_deprecated_append branch January 29, 2025 16:22
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