-
Notifications
You must be signed in to change notification settings - Fork 232
Use subprocess for "pub run" and allow vm options #2492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Should we do the vm-options something like this:? pub run --vm-options="--enable-experiment" test |
There is no need imo for This is already done for the So the usage would be |
Hmm --- not a bad idea. Snapshotting is also an issue. If we pass arbitrary vm arguments we probably cannot rely on a snapshot and should always run from source, but for '--enable-asserts' and some other curated subset we know that we can use a snapshot that was compiled without these flags. |
This is already exactly how --enable-asserts works though - it has to come before the binary name you want to run. The
Imo its more confusing if some flags work and some don't. A simple pass through of the args is very easy to understand. Simplicity ftw :).
You still have access to the args before you pass them on, and could still made an educated decision to run from snapshot when a known compatible set of flags is passed. |
The only downside I see is that when The logical thing is to interpret it as a VM option. But that makes |
I had no idea there was even a default... is it How does this work with |
There isn't one yet :D But as part of |
How does this work with I think we explicitly recognize Hmm, we could also pass VM options before |
I am more or less convinced :) . I'll make all args before the command pass through to the vm. And for |
Running |
@kevmoo Is this necessary for TP1? |
I think this really boils down to the same as dart-lang/sdk#41355 ? |
Agreed!
…On Fri, May 29, 2020 at 12:27 AM Michael Thomsen ***@***.***> wrote:
I think this really boils down to the same as dart-lang/sdk#41355
<dart-lang/sdk#41355> ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2492 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAEFCWHS3LKD6ML6IWS7UTRT5PX5ANCNFSM4NBCWKPQ>
.
|
Could we use a subprocess ONLY when using VM options?
I worry about startup cost here...
…On Fri, May 29, 2020 at 3:35 PM Kevin Moore ***@***.***> wrote:
Agreed!
On Fri, May 29, 2020 at 12:27 AM Michael Thomsen ***@***.***>
wrote:
> I think this really boils down to the same as dart-lang/sdk#41355
> <dart-lang/sdk#41355> ?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#2492 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAEFCWHS3LKD6ML6IWS7UTRT5PX5ANCNFSM4NBCWKPQ>
> .
>
|
Yes - we landed on doing that anyway (for now at least) mainly because of not wanting to regress on signal handling. But startup time is also a factor - we however should measure this before assuming it is a problem. |
I tried informally running Using an Isolate: ~1100 ms. (usr time) So surprisingly, starting the dart program using a subprocess seems faster. Not sure what to make of that - maybe I'm measuring the wrong thing. |
@mkustermann does it sound surprising to you that |
Yes it is surprising, I will investigate this tomorrow, did not have time to get to this today. Do you have the sample code you were using to measure the time. I wanted to know what kind of vm_options you were using. |
Did you figure out what the difference was? I noticed the issue is now closed. |
This issue was about changing pub. I opened a new issue about the vm. |
We should allow vm options, I think using a subprocess is a fine solution. Let's try it :)
The text was updated successfully, but these errors were encountered: