kakarot-ssj icon indicating copy to clipboard operation
kakarot-ssj copied to clipboard

dev: update edition to 2024_07

Open enitrat opened this issue 1 year ago • 4 comments

and leverage visibility attributes properly

enitrat avatar Apr 12 '24 13:04 enitrat

@enitrat there is a an issue with the corelib that makes it impossible for now to update to 2023_11 : the nullable_from_box function currently has a pub(crate) visibility, hence its not possible to use it in any other crate.

https://github.com/starkware-libs/cairo/blob/ad6aeb70ac0ab6c6c129eb088df682705d4f1853/corelib/src/nullable.cairo#L14

Everything else in nullable.cairo is pub , and nullable_from_box is not used eniwhere in the corelib so the pub(crate) attribute doesn't make sense.

Currently, for example in vec.cairo file in alexandria data structre:

    fn push(ref self: NullableVec<T>, value: T) -> () {
        self.items.insert(self.len.into(), core::nullable::nullable_from_box(BoxTrait::new(value)));
        self.len = core::integer::u32_wrapping_add(self.len, 1_usize);
    }
    ```
Item `core::nullable_from_box` is not visible in this context.

TAdev0 avatar Apr 12 '24 15:04 TAdev0

is not used eniwhere

lol

enitrat avatar Apr 12 '24 15:04 enitrat

@enitrat i'm working on it , i can be assigned to it

TAdev0 avatar Apr 12 '24 17:04 TAdev0

I think you're going to have a hard time for now, it's best to do it later. Especially if we change test runner, we will need to write unit tests in the same modules, make a lot of modifications to the structure, etc

enitrat avatar Apr 12 '24 17:04 enitrat