Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Issue 586173002: Make binstubs run snapshots directly when possible. (Closed)

Created:
6 years, 3 months ago by Bob Nystrom
Modified:
6 years, 2 months ago
Reviewers:
nweiz
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make binstubs run snapshots directly when possible. R=nweiz@google.com Committed: https://code.google.com/p/dart/source/detail?r=40598

Patch Set 1 #

Total comments: 10

Patch Set 2 : Revise! #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+630 lines, -234 lines) Patch
M sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart View 1 1 chunk +30 lines, -23 lines 2 comments Download
M sdk/lib/_internal/pub/lib/src/entrypoint.dart View 1 2 chunks +30 lines, -33 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/global_packages.dart View 1 10 chunks +46 lines, -30 lines 0 comments Download
A sdk/lib/_internal/pub/test/global/binstubs/binstub_runs_executable_test.dart View 1 chunk +57 lines, -0 lines 0 comments Download
A + sdk/lib/_internal/pub/test/global/binstubs/binstub_runs_global_run_if_no_snapshot_test.dart View 1 chunk +6 lines, -5 lines 0 comments Download
A + sdk/lib/_internal/pub/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart View 1 chunk +4 lines, -8 lines 0 comments Download
M sdk/lib/_internal/pub/test/global/binstubs/creates_executables_in_pubspec_test.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M sdk/lib/_internal/pub/test/test_pub.dart View 1 3 chunks +26 lines, -17 lines 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/barback/asset_environment.dart View 1 1 chunk +100 lines, -26 lines 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/entrypoint.dart View 1 1 chunk +152 lines, -40 lines 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/global_packages.dart View 1 11 chunks +62 lines, -32 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/binstub_runs_executable_test.dart View 1 chunk +42 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/binstub_runs_global_run_if_no_snapshot_test.dart View 1 chunk +27 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart View 1 chunk +24 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub_generated/test/global/binstubs/creates_executables_in_pubspec_test.dart View 3 chunks +4 lines, -4 lines 0 comments Download
M sdk/lib/_internal/pub_generated/test/test_pub.dart View 1 3 chunks +16 lines, -12 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
Bob Nystrom
6 years, 3 months ago (2014-09-19 21:40:33 UTC) #2
nweiz
https://codereview.chromium.org/586173002/diff/1/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart File sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart (right): https://codereview.chromium.org/586173002/diff/1/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart#newcode241 sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart:241: /// Returns the paths of the snapshots that were ...
6 years, 3 months ago (2014-09-22 20:01:42 UTC) #3
Bob Nystrom
Thanks! https://codereview.chromium.org/586173002/diff/1/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart File sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart (right): https://codereview.chromium.org/586173002/diff/1/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart#newcode241 sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart:241: /// Returns the paths of the snapshots that ...
6 years, 3 months ago (2014-09-22 22:55:28 UTC) #4
nweiz
lgtm https://codereview.chromium.org/586173002/diff/1/sdk/lib/_internal/pub/lib/src/global_packages.dart File sdk/lib/_internal/pub/lib/src/global_packages.dart (right): https://codereview.chromium.org/586173002/diff/1/sdk/lib/_internal/pub/lib/src/global_packages.dart#newcode556 sdk/lib/_internal/pub/lib/src/global_packages.dart:556: invocation = "dart $snapshot"; On 2014/09/22 22:55:28, Bob ...
6 years, 3 months ago (2014-09-23 00:15:45 UTC) #5
Bob Nystrom
Committed patchset #2 (id:20001) manually as 40598 (presubmit successful).
6 years, 2 months ago (2014-09-23 18:22:36 UTC) #6
Bob Nystrom
6 years, 2 months ago (2014-09-23 18:23:27 UTC) #7
Message was sent while issue was closed.
Thanks!

https://codereview.chromium.org/586173002/diff/1/sdk/lib/_internal/pub/lib/sr...
File sdk/lib/_internal/pub/lib/src/global_packages.dart (right):

https://codereview.chromium.org/586173002/diff/1/sdk/lib/_internal/pub/lib/sr...
sdk/lib/_internal/pub/lib/src/global_packages.dart:556: invocation = "dart
$snapshot";
On 2014/09/23 00:15:44, nweiz wrote:
> On 2014/09/22 22:55:28, Bob Nystrom wrote:
> > On 2014/09/22 20:01:42, nweiz wrote:
> > > If you use a path that's relative to [binStubPath] here, that'll make this
> > work
> > > even if [snapshot] is relative to the working directory. It'll also ensure
> > that
> > > this won't break if the path to the user's pub cache contains spaces or if
> > they
> > > move their pub cache later.
> > 
> > If I just make it a relative path, The Dart VM interprets it relative to the
> > cwd, not the bash script path (naturally), so that doesn't work. I looked
into
> > putting a relative path in here and doing some bash magic to expand it
> correctly
> > before handing it to Dart, but all the docs I read made me feel like that
was
> > strictly more hairy than just using an absolute path.
> > 
> > I did quote it to handle spaces.
> 
> In that case, call [p.absolute] to ensure that the executable still works if
> [snapshot] is passed to this method as a relative path.

The paths we get are absolute now, so I just added an assert() that requires
that.

https://codereview.chromium.org/586173002/diff/20001/sdk/lib/_internal/pub/li...
File sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart (right):

https://codereview.chromium.org/586173002/diff/20001/sdk/lib/_internal/pub/li...
sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart:241: /// Returns a
map from executable ID to path for the snapshots that were
On 2014/09/23 00:15:44, nweiz wrote:
> This says "executable ID" but actually returns the executable name.

Done.

Powered by Google App Engine
This is Rietveld 408576698