-
Notifications
You must be signed in to change notification settings - Fork 529
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 the formatter sort imports by default. #6855
Conversation
There was a problem hiding this 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 9 files reviewed, 1 unresolved discussion (waiting on @dean-starkware, @gilbens-starkware, and @orizi)
a discussion (no related file):
This is kind of a breaking change, isn't it? Upgrading Cairo will make CIs fail suddenly. In Rust this would mandate edition change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 9 of 9 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dean-starkware and @mkaput)
a discussion (no related file):
Previously, mkaput (Marek Kaput) wrote…
This is kind of a breaking change, isn't it? Upgrading Cairo will make CIs fail suddenly. In Rust this would mandate edition change.
i think this is ok in this case - as the update itself is still version by version, and part of the "update PR" will be the fixed formatting.
otherwise any formatting update is considered a breaking change.
There was a problem hiding this 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 @dean-starkware and @orizi)
a discussion (no related file):
Previously, orizi wrote…
i think this is ok in this case - as the update itself is still version by version, and part of the "update PR" will be the fixed formatting.
otherwise any formatting update is considered a breaking change.
on the other hand: if you make this on-by-default then why give users an option to disable it after all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 9 of 9 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dean-starkware and @orizi)
There was a problem hiding this 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 @dean-starkware and @mkaput)
a discussion (no related file):
Previously, mkaput (Marek Kaput) wrote…
on the other hand: if you make this on-by-default then why give users an option to disable it after all?
for backwards compatibility in more specific cases.
There was a problem hiding this 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 @dean-starkware and @orizi)
a discussion (no related file):
Previously, orizi wrote…
for backwards compatibility in more specific cases.
unblocking, I don't have a strong opinion on this
There was a problem hiding this 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)
f085fb5
to
ab159ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 7 of 7 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware)
a discussion (no related file):
make the fmt binary affect this in a previous PR first.
ab159ff
to
d591dad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 11 of 121 files reviewed, 1 unresolved discussion (waiting on @mkaput and @orizi)
a discussion (no related file):
Previously, orizi wrote…
make the fmt binary affect this in a previous PR first.
Done.
d591dad
to
a0d9b1d
Compare
e5cdb8c
to
56cea62
Compare
a0d9b1d
to
e652489
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: 11 of 128 files reviewed, 2 unresolved discussions (waiting on @gilbens-starkware and @mkaput)
corelib/src/array.cairo
line 66 at r5 (raw file):
#[feature("deprecated-index-traits")] use crate::traits::IndexView; use crate::{RangeCheck, box::BoxTrait, iter::Iterator, metaprogramming::TypeEqual, serde::Serde};
should probably additionally improve this before.
Code quote:
use crate::{RangeCheck, box::BoxTrait, iter::Iterator, metaprogramming::TypeEqual, serde::Serde};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 11 of 128 files reviewed, 2 unresolved discussions (waiting on @mkaput and @orizi)
corelib/src/array.cairo
line 66 at r5 (raw file):
Previously, orizi wrote…
should probably additionally improve this before.
You mean special handling of crate
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 11 of 128 files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware and @mkaput)
corelib/src/array.cairo
line 66 at r5 (raw file):
Previously, gilbens-starkware (Gil Ben-Shachar) wrote…
You mean special handling of
crate
?
yes.
probably super
as well.
e652489
to
fe03c36
Compare
070e6d9
to
6d44287
Compare
fe03c36
to
ad21034
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 8 files at r5, 8 of 55 files at r6, all commit messages.
Reviewable status: 12 of 129 files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware and @mkaput)
corelib/src/bytes_31.cairo
line 37 at r6 (raw file):
extern fn bytes31_to_felt252(value: bytes31) -> felt252 nopanic; /// A trait for accessing a specific byte of ampl CollectionsBreakingBeha `bytes31` type.
revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 17 of 110 files at r3, 15 of 55 files at r6.
Reviewable status: 44 of 129 files reviewed, 2 unresolved discussions (waiting on @gilbens-starkware and @mkaput)
corelib/src/starknet.cairo
line 74 at r6 (raw file):
pub use info::v2::{ ExecutionInfo as ExecutionInfo, ResourceBounds as ResourcesBounds, TxInfo as TxInfo, };
Suggestion:
pub use info::v2::{
ExecutionInfo, ResourceBounds, TxInfo,
};
ad21034
to
9951895
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 43 of 129 files reviewed, 2 unresolved discussions (waiting on @mkaput and @orizi)
corelib/src/bytes_31.cairo
line 37 at r6 (raw file):
Previously, orizi wrote…
revert
Done.
corelib/src/starknet.cairo
line 74 at r6 (raw file):
pub use info::v2::{ ExecutionInfo as ExecutionInfo, ResourceBounds as ResourcesBounds, TxInfo as TxInfo, };
Done.
Notice that for ResourceBounds
it's singular and plural, so I kept it as is.
9951895
to
9c90a0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: 41 of 132 files reviewed, 3 unresolved discussions (waiting on @gilbens-starkware and @mkaput)
corelib/src/array.cairo
line 148 at r8 (raw file):
/// ``` fn append_span<+Clone<T>, +Drop<T>>(ref self: Array<T>, mut span: Span<T>) { // let x = Some(5);
.
Code quote:
use crate::traits::IndexView;
use Option::{None, Some};
/// A collection of elements of the same type continuous in memory.
#[derive(Drop)]
pub extern type Array<T>;
/// assert!(arr == array![1, 2, 3]);
/// ```
fn append_span<+Clone<T>, +Drop<T>>(ref self: Array<T>, mut span: Span<T>) {
// let x = Some(5);
9c90a0d
to
ab30acc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 110 files at r3, 1 of 55 files at r6, 1 of 1 files at r7, 1 of 5 files at r8, 1 of 4 files at r9, all commit messages.
Reviewable status: 47 of 132 files reviewed, all discussions resolved (waiting on @mkaput)
ab30acc
to
e7764dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 47 of 132 files reviewed, all discussions resolved (waiting on @mkaput and @orizi)
corelib/src/array.cairo
line 148 at r8 (raw file):
Previously, orizi wrote…
.
Done.
commit-id:2e64ce0b
e7764dc
to
0c1350c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 28 of 110 files at r3, 1 of 1 files at r4, 9 of 55 files at r6, 1 of 4 files at r9, 80 of 80 files at r10, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @gilbens-starkware)
No description provided.