Skip to content

flutter_tools asset manifest logic has surprising behavior #35293

@jonahwilliams

Description

@jonahwilliams

The flutter tool defines assets an asset manifest as a key-value pair of a file URI and a File. As a part of the build process, these files are copied out of their respective directories and into a build directory where they can be packaged up into a platform specific distribution format.

To determine where the files should be copied, the tool uses the file URI as a file name, which happens to work across all three platforms. This is surprising behavior, and even though it works it is odd to have files created on windows such as assets\foo/bar.png.

We should investigate whether this was an intentional choice to work around a limitation of the tools at the time, or whether it is a bug that happened to work.

In either case, we should make an effort to simplify the logic as much as possible and document the remaining surprises in the tool

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: contributor-productivityTeam-specific productivity, code health, technical debt.toolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions