Skip to content

Require analyzer ^8.1.1 and migrate off deprecated APIs #4086

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

fshcheglov
Copy link

No description provided.

@scheglov scheglov requested a review from srawlins August 16, 2025 01:55
Copy link
Member

@srawlins srawlins left a comment

Choose a reason for hiding this comment

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

Thanks for the migration! I reviewed this all, and it looks great. But I'll let the Pub team approve and land.

Mostly a simple migration. Anything around Annotatable is simplified.

@fshcheglov , I see all of the migrations from "Member" to "Substituted...", and these are all private Impl classes. It would be great it dartdoc did not depend on so much private analyzer impl. While this is perhaps fresh in your mind, can you say perhaps whether you think the dartdoc is unnecessarily reliant on these Substituted classes, or whether it is reasonable, and the Substituted classes should be made part of analyzer's public API?

@@ -179,6 +179,17 @@ abstract class InheritingContainer extends Container {
elements.firstWhereOrNull((e) => e is GetterElement);
final setterElement =
elements.firstWhereOrNull((e) => e is SetterElement);

final isNullOrTopMergeGetter = getterElement == null ||
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for breaking this down into pieces; much easier to understand.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I took a look and it was simple to replace members with API classes.

Thank you for the code review.

Copy link
Member

Choose a reason for hiding this comment

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

Wow... I did not realize all of the Member classes were being used totally unnecessarily :/

@scheglov scheglov requested a review from sigurdm August 16, 2025 03:57
@fshcheglov
Copy link
Author

Sorry for churn in 9965645 and a868964. I accidentally sorted model_element.dart in the first commit, and then reverted and re-did it without sorting. Unfortunately it looks that GitHub does not allow seeing changes between two commit points, only individual commits. But changes look cleaner in the whole PR changes.

@srawlins
Copy link
Member

No worries. Thanks for the cleanup!

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