Skip to content

[record_use] Dart API: Loading units as object/class #2979

Closed

Description

@dcharkes

We should consider making loading units an object in the Dart API, that way in the future we could potentially add extra fields such as a fully qualified file name.

Reasoning: Some use case you use the record-use not from the context of a link hook, but because you wrapped the Dart compiler. E.g. dart compile js --resources-file. If the Dart compiler outputted multiple loading units, and you want to put the assets with the right loading units, simply knowing the name of the loading unit might be unpractical.

(We might not need extra fields in the loading unit, but it would be unfortunate if we paint ourselves into a corner.)

Corresponding JSON encoding issue:

Activity

  1. moved this from Todo to In Progress in Native Assetson Feb 17, 2026
  2. self-assigned this
    on Feb 17, 2026
  3. dcharkes commented on Feb 17, 2026

    @dcharkes
    CollaboratorAuthor

    (One reason to have loading units be objects is if we want to encode the graph of loading units.)

  4. moved this from In Progress to Done in Native Assetson Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions