Skip to content

Conversation

fshcheglov
Copy link

Also deleted

    if (element case final Annotatable annotatable) {
      final annotations = annotatable.metadata2.annotations;
      if (annotations.isEmpty) {
        return null;
      }
    }

from source_gen/lib/src/type_checker.dart because it repeated a check that was done a few lines later.

@fshcheglov fshcheglov changed the title Bring up to dart 8.1.1, get rid of deprecated classes and methods. Bring up to analyzer 8.1.1, get rid of deprecated classes and methods. Aug 18, 2025
@davidmorgan
Copy link
Contributor

Thanks! Also, hi, Konstantin mentioned you have started contributing to Dart :)

I'm not sure if we want to drop support for analyzer 7 quite yet, but there should not be many code changes so we can use this when we do.

The reason I am not sure is that for #775 we want to do a breaking change / major version release of source_gen: remove all mirrors use then bump to 4.0.0. It might make sense to do that before dropping support for analyzer 7. It's an easy change so maybe we should just do that ... on the other hand maybe we can think of something else we should do before either of the two :)

@kevmoo any thoughts?

@scheglov
Copy link
Contributor

I'd like to remove deprecated APIs from the analyzer, and for this there should be no clients of these deprecated APIs in google3. For clients that are developed outside of google3, the ideal path is to land changes externally, and then roll into google3. But if you are hesitant to make external changes, and OK with applying the same changes directly in google3, this would work for me too.

@kevmoo
Copy link
Member

kevmoo commented Aug 25, 2025

If functionality is not being changed, I'm fine bumping a minor version to require the latest pkg:analyzer.

@davidmorgan
Copy link
Contributor

davidmorgan commented Aug 26, 2025

I'd like to remove deprecated APIs from the analyzer, and for this there should be no clients of these deprecated APIs in google3. For clients that are developed outside of google3, the ideal path is to land changes externally, and then roll into google3. But if you are hesitant to make external changes, and OK with applying the same changes directly in google3, this would work for me too.

source_gen is not currently synced into google3, so landing here won't help you directly. It's okay with me if you want to land the changes directly in google3, I think it's on me to untangle that whole thing and get the packages syncing again.

If functionality is not being changed, I'm fine bumping a minor version to require the latest pkg:analyzer.

The ecosystem is not yet fully on analyzer 8, we need to fix up and release all our generators and let others do the same. In parallel to that we want users of source_gen to remove their use of mirrors. So I'm suggesting we should do the mirrors-removing release before the analyzer-7-removing release in order to give them an easier/smoother time.

Let me actually send the PR removing use of mirrors, then we can release and get that started and then land this one :)

@davidmorgan
Copy link
Contributor

Okay, sent remove mirrors

#783

let's land+release that then land+release this as 4.1.0.

google3 will need more work because it needs to migrate onto the API without mirrors, I will aim take a look at that in the next week.

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