Skip to content

Conversation

orizi
Copy link
Collaborator

@orizi orizi commented Sep 11, 2025

Additionally making all things that can now not be pub not pub.

@reviewable-StarkWare
Copy link

This change is Reviewable

@orizi orizi marked this pull request as ready for review September 11, 2025 15:15
@orizi orizi force-pushed the gt/orizi/09-11-refactor_semantic_split_semanticgroup_into_traits_per_item branch from 7e60308 to f98277e Compare September 11, 2025 15:41
Copy link
Contributor

@eytan-starkware eytan-starkware left a comment

Choose a reason for hiding this comment

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

@eytan-starkware reviewed 50 of 85 files at r1, 16 of 22 files at r2, all commit messages.
Reviewable status: 66 of 85 files reviewed, 8 unresolved discussions (waiting on @TomerStarkware)


crates/cairo-lang-semantic/src/items/enm.rs line 404 at r2 (raw file):

// TODO(spapini): Consider making these queries.
pub trait SemanticEnumEx: Database {

Can we combine SemanticEnumEx with EnumSemantic?


crates/cairo-lang-semantic/src/items/free_function.rs line 99 at r2 (raw file):

}

/// Query implementation of [SemanticGroup::free_function_declaration_implicit_precedence]

Update SemanticGroup referene


crates/cairo-lang-semantic/src/expr/inference/solver.rs line 892 at r2 (raw file):

/// Trait for solver-related semantic queries.
pub trait SemanticSolver<'db>: Database {

We can skip the trait for a single function and call the function directly, or merge this with another trait


crates/cairo-lang-semantic/src/items/implization.rs line 41 at r2 (raw file):

/// Trait for implization-related semantic queries.
pub trait ImplizationSemantic<'db>: Database {
    /// Returns the impl type for the given trait type, by implization by the given impl context, if

For a single function we can skip defining the trait


crates/cairo-lang-semantic/src/items/imp.rs line 5116 at r2 (raw file):

    false
}

Comment on trait


crates/cairo-lang-semantic/src/items/imp.rs line 5124 at r2 (raw file):

    ) -> Diagnostics<'db, SemanticDiagnostic<'db>> {
        impl_semantic_declaration_diagnostics_tracked(self.as_dyn_database(), impl_def_id)
    }

Either format with a line between functions, or no line between functions in the trait


crates/cairo-lang-semantic/src/items/generics.rs line 845 at r2 (raw file):

}

/// Trait for generics-related semantic queries.

GenericParam semantics, not Generics


crates/cairo-lang-semantic/src/items/functions.rs line 1106 at r2 (raw file):

/// Trait for functions-related semantic queries.
pub trait FunctionsSemantic<'db>: Database {

FunctionSignatureSemantics?

@orizi orizi force-pushed the gt/orizi/09-11-refactor_semantic_split_semanticgroup_into_traits_per_item branch from f98277e to cb8148c Compare September 11, 2025 21:55
Copy link
Collaborator Author

@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: 66 of 85 files reviewed, 8 unresolved discussions (waiting on @eytan-starkware and @TomerStarkware)


crates/cairo-lang-semantic/src/expr/inference/solver.rs line 892 at r2 (raw file):

Previously, eytan-starkware wrote…

We can skip the trait for a single function and call the function directly, or merge this with another trait

we can - but i'd rather be consistent for now.


crates/cairo-lang-semantic/src/items/enm.rs line 404 at r2 (raw file):

Previously, eytan-starkware wrote…

Can we combine SemanticEnumEx with EnumSemantic?

we can - but not as part of this PR.


crates/cairo-lang-semantic/src/items/free_function.rs line 99 at r2 (raw file):

Previously, eytan-starkware wrote…

Update SemanticGroup referene

Done.


crates/cairo-lang-semantic/src/items/functions.rs line 1106 at r2 (raw file):

Previously, eytan-starkware wrote…

FunctionSignatureSemantics?

maybe - but it isn't really just about the signature - so i'm ok with sticking to the file name.


crates/cairo-lang-semantic/src/items/generics.rs line 845 at r2 (raw file):

Previously, eytan-starkware wrote…

GenericParam semantics, not Generics

Done.


crates/cairo-lang-semantic/src/items/imp.rs line 5116 at r2 (raw file):

Previously, eytan-starkware wrote…

Comment on trait

Done.


crates/cairo-lang-semantic/src/items/imp.rs line 5124 at r2 (raw file):

Previously, eytan-starkware wrote…

Either format with a line between functions, or no line between functions in the trait

Done.


crates/cairo-lang-semantic/src/items/implization.rs line 41 at r2 (raw file):

Previously, eytan-starkware wrote…

For a single function we can skip defining the trait

it extends the methods of db - so i'd rather do it.

Copy link
Contributor

@eytan-starkware eytan-starkware left a comment

Choose a reason for hiding this comment

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

@eytan-starkware reviewed 13 of 85 files at r1, 2 of 22 files at r2, 14 of 14 files at r3, 2 of 3 files at r4, all commit messages.
Reviewable status: 84 of 85 files reviewed, all discussions resolved (waiting on @TomerStarkware)


crates/cairo-lang-semantic/src/items/generics.rs line 845 at r2 (raw file):

Previously, orizi wrote…

Done.

Also for the trait name

Additionally making all things that can now not be `pub` not `pub`.
@orizi orizi force-pushed the gt/orizi/09-11-refactor_semantic_split_semanticgroup_into_traits_per_item branch from e3d6aba to 569cd9c Compare September 14, 2025 07:09
Copy link
Contributor

@eytan-starkware eytan-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:

@eytan-starkware reviewed 1 of 3 files at r4, 8 of 8 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@orizi orizi added this pull request to the merge queue Sep 14, 2025
Merged via the queue into main with commit 2b9c280 Sep 14, 2025
51 checks passed
@orizi orizi deleted the gt/orizi/09-11-refactor_semantic_split_semanticgroup_into_traits_per_item branch September 14, 2025 13:04
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.

3 participants