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

Add 2024_07 edition. #5923

Merged
merged 1 commit into from
Jul 1, 2024
Merged

Add 2024_07 edition. #5923

merged 1 commit into from
Jul 1, 2024

Conversation

gilbens-starkware
Copy link
Contributor

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

Stack:

⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.


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


corelib/src/prelude/v2024_07.cairo line 65 at r1 (raw file):

pub use core::traits::IndexView;
pub use core::zeroable::NonZero;
pub use core::ops::Deref;

Suggestion:

pub use core::{assert, bool, felt252, usize};

pub use core::array::{Array, ArrayTrait, Span, SpanTrait, ToSpanTrait};
pub use core::box::{Box, BoxTrait};
pub use core::bytes_31::{Bytes31Trait, bytes31};
pub use core::byte_array::{ByteArray, ByteArrayTrait};
pub use core::clone::Clone;
pub use core::dict::Felt252DictTrait;
pub use core::integer::{i128, i16, i32, i64, i8, u128, u16, u256, u32, u64, u8};
pub use core::nullable::{Nullable, NullableTrait};
pub use core::option::{Option, OptionTrait};
pub use core::panics::{Panic, PanicResult, panic};
pub use core::result::{Result, ResultTrait};
pub use core::serde::Serde;
pub use core::{starknet, starknet::System};
pub use core::traits::{
    Add, Copy, Default, Destruct, Div, DivRem, Drop,
    Felt252DictValue, Into, Mul, Neg, Not, PanicDestruct, PartialEq, PartialOrd, Rem, Sub, TryInto
};

pub use core::zeroable::NonZero;
pub use core::ops::Deref;

crates/cairo-lang-filesystem/src/db.rs line 54 at r1 (raw file):

/// editions. Editions may be added to provide features that are not backwards compatible, while
/// allowing user to opt-in to them, and be ready for later compiler updates.
#[derive(Clone, Copy, Debug, Default, Hash, PartialEq, Eq, Serialize, Deserialize, PartialOrd)]

Suggestion:

#[derive(Clone, Copy, Debug, Default, Hash, PartialEq, Eq, Serialize, Deserialize)]

crates/cairo-lang-filesystem/src/db.rs line 92 at r1 (raw file):

    pub fn backwards_compatible_storage(&self) -> bool {
        self <= &Self::V2023_11
    }

Full match instead for the time being.

Code quote:

    /// Whether to ignore visibility modifiers.
    pub fn ignore_visibility(&self) -> bool {
        self <= &Self::V2023_10
    }

    pub fn backwards_compatible_storage(&self) -> bool {
        self <= &Self::V2023_11
    }

@gilbens-starkware gilbens-starkware changed the base branch from spr/main/8bfb01bd to main July 1, 2024 09:12
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: 1 of 3 files reviewed, 3 unresolved discussions (waiting on @orizi)


corelib/src/prelude/v2024_07.cairo line 65 at r1 (raw file):

pub use core::traits::IndexView;
pub use core::zeroable::NonZero;
pub use core::ops::Deref;

Done.


crates/cairo-lang-filesystem/src/db.rs line 54 at r1 (raw file):

/// editions. Editions may be added to provide features that are not backwards compatible, while
/// allowing user to opt-in to them, and be ready for later compiler updates.
#[derive(Clone, Copy, Debug, Default, Hash, PartialEq, Eq, Serialize, Deserialize, PartialOrd)]

Done.


crates/cairo-lang-filesystem/src/db.rs line 92 at r1 (raw file):

Previously, orizi wrote…

Full match instead for the time being.

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


crates/cairo-lang-filesystem/src/db.rs line 98 at r2 (raw file):

            Self::V2024_07 => false,
        }
    }

remove this from here - add it as a function in the starknet area (as this code area isn't starknet relevant.)

Code quote:

    pub fn backwards_compatible_storage(&self) -> bool {
        match self {
            Self::V2023_01 | Self::V2023_10 | Self::V2023_11 => true,
            Self::V2024_07 => false,
        }
    }

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

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:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @gilbens-starkware)

commit-id:8e9758d5
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 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 added this pull request to the merge queue Jul 1, 2024
Merged via the queue into main with commit eb81867 Jul 1, 2024
44 checks passed
@orizi orizi deleted the spr/main/8e9758d5 branch July 3, 2024 12:25
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