Skip to content

[resource_identifiers] Rename to recorded_uses. #55808

@dcharkes

Description

@dcharkes

After some discussion with @mosuem we feel like resource identifier is not a great name. Resource is kind of a synonym for asset.

Some options:

  • Naming linked to the language constructs: (We might want other treeshaking info than just calls to static methods)
    • @RecordReference(Object? metadata)
    • recorded_references.json
    • package:record_references which lives in the SDK in pkg/record_references and is imported by dart2js and pkg/vm and published unlisted
    • gen_kernel --record_references=recorded_references.json ...
  • Naming linked to tree shaking:
    • @RecordReference(Object? metadata)
    • treeshake_info.json
    • package:treeshaking_info which lives in the SDK in pkg/record_references and is imported by dart2js and pkg/vm and published unlisted
    • gen_kernel --record_treeshaking_info=treeshaking_info.json ...
  • Naming linked to assets: (The link hook take the tree shaking info and know what assets it is related to.)
    • @AssetReference(String? assetId, Object? metadata)
    • asset_references.json
    • Package:asset_references (in the SDK, and unlisted)

The downside of the last option is that it is linked to the assets concept but that the compiler itself is just recording references so that's a bit weird. With it being possible to implement RecordReference (#55568), then AssetReference can be a subtype of RecordReference.

With all cases package:native_assets_cli would not expose the types of the package but extension types around the package, because we'd only expose a subset of all the fields of the resource indentifiers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-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