Skip to content

Conversation

@Yoni-Starkware
Copy link
Collaborator

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@github-actions
Copy link

github-actions bot commented Jan 22, 2026

@Yoni-Starkware Yoni-Starkware force-pushed the yoni/apollo_infra_utils/check-unused-imports branch 2 times, most recently from 6c5587f to 42bb427 Compare January 22, 2026 19:56
Copy link
Collaborator Author

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

@Yoni-Starkware made 1 comment.
Reviewable status: 0 of 29 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware).


crates/apollo_infra_utils/src/cairo0_compiler.rs line 213 at r1 (raw file):

/// Returns the content with unused imports removed.
#[cfg(any(test, feature = "testing"))]
pub fn remove_unused_cairo0_imports(content: &str) -> String {

PLZ accept the magic and don't review this function @dorimedini-starkware

@Yoni-Starkware Yoni-Starkware force-pushed the yoni/apollo_infra_utils/check-unused-imports branch from 3e4f2ed to 466efc1 Compare January 22, 2026 20:29
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 28 files and all commit messages, and made 4 comments.
Reviewable status: 28 of 29 files reviewed, 5 unresolved discussions (waiting on @Yoni-Starkware).


crates/apollo_infra_utils/src/cairo0_compiler.rs line 0 at r2 (raw file):
can you (in a separate PR) split into cairo0_compiler.rs and cairo0_compiler_test_utils.rs? I see a lot of cfgs


crates/apollo_infra_utils/src/cairo0_compiler.rs line 214 at r2 (raw file):

#[cfg(any(test, feature = "testing"))]
pub fn remove_unused_cairo0_imports(content: &str) -> String {
    use regex::Regex;

move to top

Code quote:

use regex::Regex;

crates/apollo_infra_utils/src/cairo0_compiler.rs line 321 at r2 (raw file):

#[cfg(any(test, feature = "testing"))]
fn is_import_used(import_item: &str, code: &str) -> bool {
    use regex::Regex;

move to top

Code quote:

use regex::Regex;

crates/apollo_infra_utils/src/cairo0_compiler.rs line 380 at r2 (raw file):

    // Remove unused imports after formatting and sorting.
    remove_unused_cairo0_imports(&isort_content)

don't you want to run this before formatting? it can effect line breaks

Code quote:

    // Remove unused imports after formatting and sorting.
    remove_unused_cairo0_imports(&isort_content)

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