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

Store usage in db. #6167

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Store usage in db. #6167

wants to merge 1 commit into from

Conversation

ilyalesokhin-starkware
Copy link
Contributor

@ilyalesokhin-starkware ilyalesokhin-starkware commented Aug 7, 2024

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


crates/cairo-lang-lowering/src/lower/mod.rs line 1390 at r1 (raw file):

    };

    let usage = ctx.db.function_expr_usage(ctx.semantic_function_id, loop_expr_id).unwrap();

how do we know this unwrap won't cause a panic?
same below.


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

    fn file_semantic_diagnostics(&self, file_id: FileId) -> Maybe<Diagnostics<SemanticDiagnostic>>;

    // usage.

Suggestion:

    // Usage.

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

    // ========
    #[salsa::invoke(usage::function_expr_usage)]
    fn function_expr_usage(

doc

@ilyalesokhin-starkware
Copy link
Contributor Author

crates/cairo-lang-lowering/src/lower/mod.rs line 1390 at r1 (raw file):

Previously, orizi wrote…

how do we know this unwrap won't cause a panic?
same below.

because it worked before this change

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 5 files at r1.
Reviewable status: 4 of 5 files reviewed, 3 unresolved discussions (waiting on @ilyalesokhin-starkware)


crates/cairo-lang-lowering/src/lower/mod.rs line 1390 at r1 (raw file):

Previously, ilyalesokhin-starkware wrote…

because it worked before this change

so why does the query return Maybe?

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