Skip to content

prohibit access to members that are not marked as entry points through Dart VM C API #35369

@mraleph

Description

@mraleph

Flutter would like to have a way to test that all members which are accessed by name from native side are correctly annotated with @pragma('vm:entry-point') annotation.

Currently we print an error to the console, but this is not discoverable and can't be used for testing.

We should introduce a VM flag --verify-entry-points which turns on strict checking of @pragma('vm:entry-point') annotations. When this flag is turned on any attempt to access a member by name via C API should result in an error.

Then we should turn on this flag for Flutter so that we catch any issues with missing annotations as early as possible.

/cc @goderbauer

Metadata

Metadata

Labels

P1A high priority bug; for example, a single project is unusable or has many test failuresarea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions