Skip to content

Conversation

@TejasSojitra12
Copy link

This PR converts AssistContributorMixin (and similar utility classes like DartAssistsMixin) from abstract classes to proper Dart mixins.

Previously, these classes were marked for use only as mixins, but the analyzer produced class_used_as_mixin errors because they weren’t declared with the mixin keyword.

This change modernizes the code, allowing clients to mix them in without warnings, while preserving the original API intent (not extending or implementing them directly).

Optionally, on AssistContributor can be added for additional type safety to restrict mixin usage to subclasses of AssistContributor.

Benefits:

Removes analyzer diagnostics for clients using these mixins.

Aligns the implementation with Dart’s current best practices.

Prepares the API for safe usage in analyzer plugins.

Related Issues:

N/A (or link a relevant issue if one exists)

@copybara-service
Copy link

Thank you for your contribution! This project uses Gerrit for code reviews. Your pull request has automatically been converted into a code review at:

https://dart-review.googlesource.com/c/sdk/+/456403

Please wait for a developer to review your code review at the above link; you can speed up the review if you sign into Gerrit and manually add a reviewer that has recently worked on the relevant code. See CONTRIBUTING.md to learn how to upload changes to Gerrit directly.

Additional commits pushed to this PR will update both the PR and the corresponding Gerrit CL. After the review is complete on the CL, your reviewer will merge the CL (automatically closing this PR).

@mraleph
Copy link
Member

mraleph commented Oct 21, 2025

This PR converts AssistContributorMixin (and similar utility classes like DartAssistsMixin) from abstract classes to proper Dart mixins.

@TejasSojitra12 that's not what your PR does. It mixes a bunch of random changes all over the place generated most likely by some sort of AI tooling. Leaving aside the original intent (maybe the change makes sense) - do not send PRs like this again. Have some respect for other engineers and at least bother to read and understand the diff... The team has no time to waste on reviewing shameless AI slop.

@TejasSojitra12 TejasSojitra12 deleted the fix/assist_contributor_mixin branch October 26, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants