Skip to content

[tfa] After TFA a library.dependencies may contain many dependencies that are unused #62111

@mkustermann

Description

@mkustermann

Currently TFA's tree shaker seems to do do something like this: If a library A used to import library B but B was tree shaken, then it will inject into A the library imports from transitive closure of B that were not tree shaken. By doing that it maintains something like this not-tree-shaken-libraries(transitive(A(before-TFA))) == transitive(A(after-TFA)).

Now the issue is that this makes a library have dependencies/imports that are unused by the library.

Some backends (e.g. VM) use that resulting Library.dependencies for computing deferred loading units. So by having these extra dependencies it may produce suboptimal deferred loading units splitting.

See also more broad discussion #62112

/cc @alexmarkov

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