Skip to content

Stop using dart:mirrors to allow AOT compilation #775

@davidmorgan

Description

@davidmorgan

For performance we'd like to compile builders with AOT, but this doesn't work with mirrors.

I suggest to deprecated TypeChecker.fromRuntime and add the closest replacement we can do without mirrors: TypeChecker.typeNamed(Type type, {String? inPackage}). It takes the type name from Type and optionally a package name. If you want full URL then use fromUrl instead.

Release with deprecated+suggested replacements then remove with a major version bump.

Note that AOT support in build itself needs some work, but I plan on tackling that soon :) so it'd be good to get the source_gen change underway.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions