Skip to content

Potential library path conflicts #3881

Open
@srawlins

Description

@srawlins

The code that determines the path of the HTML file for a library is mostly contained in Library.dirName, which quickly branches on whether a library is anonymous. The Flutter SDK uses library directives with names, so they end up with pretty paths at api.flutter.dev:

However, all of the other package docs that are also located at api.flutter.dev have much longer paths, seeming to use the route for anonymous libraries:

And then some other paths that are more like the Flutter SDK libraries:

Anyways, since Flutter just bundles together a few dozen dependencies at api.flutter.dev, whose library names are not controlled by Flutter, there is real potential for collisions. And the names that are preferred for api.flutter.dev are the ones with potential collisions, e.g. "animation/animation-library.html". I can easily imagine two libraries from different packages choosing the name, "async" or "element" or "testing" for a library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requesttype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions