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

Introduced DynEq + DynHash bounds for MacroPlugin, InlineMacroExprPlugin and AnalyzerPlugin traits #6839

Closed
wants to merge 1 commit into from

Conversation

…prPlugin` and `AnalyzerPlugin` traits

commit-id:57b41a03
@reviewable-StarkWare
Copy link

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 31 of 31 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @integraledelebesgue)


-- commits line 2 at r1:
please elaborate as to why you need this.

Copy link
Collaborator

@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: all files reviewed, 1 unresolved discussion (waiting on @orizi)


-- commits line 2 at r1:

Previously, orizi wrote…

please elaborate as to why you need this.

I don't think we want to go this route. Have you considered just hashing and comparing pointers that are underlying to Arc<MacroPlugin> at all?

Copy link
Member Author

@integraledelebesgue integraledelebesgue 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: all files reviewed, 1 unresolved discussion (waiting on @Draggu)


-- commits line 2 at r1:

Previously, mkaput (Marek Kaput) wrote…

I don't think we want to go this route. Have you considered just hashing and comparing pointers that are underlying to Arc<MacroPlugin> at all?

That was my first idea :) Such an approach is fine for plugins being unit structs, but is it safe to generalize it for non-unit plugins, especially the Scarb plugin? cc: @Draggu

Copy link
Collaborator

@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.

Reviewed 31 of 31 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Draggu)


-- commits line 2 at r1:

Previously, integraledelebesgue (Jan Smółka) wrote…

That was my first idea :) Such an approach is fine for plugins being unit structs, but is it safe to generalize it for non-unit plugins, especially the Scarb plugin? cc: @Draggu

wdym by Scarb plugin?

no plugin known to me has any state (and having one is pretty hardcore idea) so we can afford having duplicate instances of a plugin in worst case

Copy link
Member Author

@integraledelebesgue integraledelebesgue 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: all files reviewed, 1 unresolved discussion (waiting on @Draggu)


-- commits line 2 at r1:

Previously, mkaput (Marek Kaput) wrote…

wdym by Scarb plugin?

no plugin known to me has any state (and having one is pretty hardcore idea) so we can afford having duplicate instances of a plugin in worst case

I'm talking about plugins like, for example, ProcMacroHostPlugin from Scarb. It's not a unit struct. At the same time, it becomes a part of a plugin suite loaded into a RootDatabase during Scarb compilation here.

Copy link
Member Author

@integraledelebesgue integraledelebesgue 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: all files reviewed, 1 unresolved discussion (waiting on @Draggu)


-- commits line 2 at r1:

Previously, integraledelebesgue (Jan Smółka) wrote…

I'm talking about plugins like, for example, ProcMacroHostPlugin from Scarb. It's not a unit struct. At the same time, it becomes a part of a plugin suite loaded into a RootDatabase during Scarb compilation here.

I'm not saying we cannot compare pointers here, just wonder if that's a good approach for all possible forms of plugins.

Copy link
Collaborator

@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: all files reviewed, 1 unresolved discussion (waiting on @Draggu)


-- commits line 2 at r1:

Previously, integraledelebesgue (Jan Smółka) wrote…

I'm not saying we cannot compare pointers here, just wonder if that's a good approach for all possible forms of plugins.

discussed offline -> let's go with pointer comparisons

@integraledelebesgue
Copy link
Member Author

Closing pull request: commit has gone away

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