Skip to content

Add dart run --find_entrypoint or similar #1811

Open
@natebosch

Description

@natebosch

With webdev and build_runner we're starting to investigate new use cases for tools which want to run binaries from other packages. We're looking at ways to avoid the cost of spinning up multiple VMs and have found some nice patterns using isolates - but when there are multiple packages involved we can't avoid the second VM because we need to use pub run package_name.

One way we've gotten around this with build_runner is to leverage an existing detail of it's design - that it puts a dart file on disk and runs it in an isolate anyway. We therefore have the cost of a second vm during pub run build_runner generateBuildScript, but only for a short time. That command prints out the location of the generated Dart file which can then be run in an isolate.

If we can do something similar with pub - run a quick command which prints the location of the binary - then we could set up new patterns of interactions between binaries in different packages, including those at the top level.

Forked from #1807

cc @nshahan @jakemac53

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions