Skip to content

[native_assets_builder] Build result is half-fed into link result #2149

Closed
@dcharkes

Description

@dcharkes

I found this weird code in Flutter tools:

    dependencies.addAll(buildResult.dependencies);
    if (!linkingEnabled) {
      assets.addAll(buildResult.encodedAssets);
    } else {
      // invoke link
      assets.addAll(linkResult.encodedAssets);
      dependencies.addAll(linkResult.dependencies);

It turns out the dependencies for the build and link hook must be combined by the caller but the encodedAssets from the build result are added to the link result, this isn't symmetric.

var hookResult = HookResult(encodedAssets: buildResult.encodedAssets);

This line should be removed to make it symmetric, or the dependencies should be added there to make it symmetric.

This will need a manual roll into Dart & Flutter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestpackage:hooks_runnertype-code-healthInternal changes to our tools and workflows to make them cleaner, simpler, or more maintainable

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions