Skip to content

Faster skip when annotation is not imported #4083

Open
@davidmorgan

Description

@davidmorgan

If you apply an annotation-triggered builder using source_gen to a codebase that mostly doesn't use it, every file gets analyzed to check for the annotation. Edit: correction; files with no annotations are skipped in some circumstances, see this comment.

It seems like a good idea to bail out earlier based on a faster check. For example: check if the package that contains the annotation is imported.

Metadata

Metadata

Assignees

Labels

type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions