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

Made inline macros pluginable. #3873

Merged
merged 1 commit into from
Aug 15, 2023
Merged

Conversation

orizi
Copy link
Collaborator

@orizi orizi commented Aug 9, 2023

This change is Reviewable

mkaput
mkaput previously requested changes Aug 9, 2023
Copy link
Contributor

@mkaput mkaput 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: 0 of 11 files reviewed, 1 unresolved discussion (waiting on @orizi and @spapinistarkware)

a discussion (no related file):
How should we approach the selector! macro with this change? Will we have StarkNetInlinePlugin ?


Copy link
Collaborator

@spapinistarkware spapinistarkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 11 of 11 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @orizi)


crates/cairo-lang-semantic/src/expr/compute.rs line 280 at r1 (raw file):

    let macro_name = syntax.path(syntax_db).as_syntax_node().get_text(syntax_db).trim().to_string();
    let Some(macro_plugin) =
        ctx.db.inline_macro_plugins().into_iter().find(|plugin| plugin.name() == macro_name)

Can this be a map from name? it will be more efficinet than linear search.

@orizi orizi force-pushed the pr/orizi/orizi/inline-macro/3784e194 branch from 58d819e to 5058616 Compare August 14, 2023 10:25
@orizi orizi force-pushed the pr/orizi/orizi/inline-macro/bd6a7b1b branch from 7441aba to 86bbe83 Compare August 14, 2023 10:25
@orizi orizi force-pushed the pr/orizi/orizi/inline-macro/3784e194 branch from 5058616 to f995f5b Compare August 14, 2023 10:28
@orizi orizi changed the base branch from pr/orizi/orizi/inline-macro/bd6a7b1b to main August 14, 2023 10:39
@orizi orizi force-pushed the pr/orizi/orizi/inline-macro/3784e194 branch 2 times, most recently from 19def5e to 9d11bef Compare August 14, 2023 11:01
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: 1 of 11 files reviewed, 1 unresolved discussion (waiting on @mkaput and @spapinistarkware)

a discussion (no related file):

Previously, mkaput (Marek Kaput) wrote…

How should we approach the selector! macro with this change? Will we have StarkNetInlinePlugin ?

yes.


@orizi orizi force-pushed the pr/orizi/orizi/inline-macro/3784e194 branch from 9d11bef to fffae8d Compare August 14, 2023 11:20
@orizi orizi force-pushed the pr/orizi/orizi/inline-macro/3784e194 branch from fffae8d to 44ff562 Compare August 15, 2023 16:00
Copy link
Collaborator

@spapinistarkware spapinistarkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 9 of 10 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mkaput)

@orizi orizi enabled auto-merge August 15, 2023 17:19
@orizi orizi dismissed mkaput’s stale review August 15, 2023 18:24

answered f2f.

@orizi orizi added this pull request to the merge queue Aug 15, 2023
Merged via the queue into main with commit f42b647 Aug 15, 2023
37 of 38 checks passed
@orizi orizi deleted the pr/orizi/orizi/inline-macro/3784e194 branch August 16, 2023 04:24
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.

None yet

3 participants