Closed devoncarew closed 10 years ago
I have a serious suspicion that close to a 100% of preflight operations will map 1:1 onto explicit actions that we already have (like "Pub Upgrade"). So maybe this new concept should be somehow mixed into Action
? For those operations that don't need to be surfaced in the UI (context menu), it's trivial to do using existing Action
's means. So something like:
abstract class Action {
...
bool isPreflightActionFor(Object object);
...
}
@keerti, I'm re-assigning this to myself. I'm doing some re-factoring of the launch code to support deploying web apps. Part of that work will overlap with this issue. I'll assign back to cover the pub pre-flight stuff.
Could we make "Run" just show a warning instead of making "Run" slower every time we want to run it?
Either way we'll need a way to hook into a pre-launch of applications. And you'll only pay a price for running pub at launch when you've modified the pubspec.yaml.
Oh ok. Sounds good.
We should probably make this ~generic, so that people can hook into and perform preflight operation when running an application. So, given something like the resource that's run, and the type of run (local run? mobile deploy?), a participant can optionally perform some action before the run.
A straw-man:
Where
launchType
is some well-known list of types (run
,deploy
). So, a dart web app that's running might need to check and run pub. A dart chrome app that's deploying might need to check and run pub, then compile the app to Javascript.