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

Issue 566093003: Create binstubs for executables when activating a package. (Closed)

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

Description

Create binstubs for executables when activating a package. BUG=https://code.google.com/p/dart/issues/detail?id=18539 R=nweiz@google.com Committed: https://code.google.com/p/dart/source/detail?r=40471

Patch Set 1 #

Total comments: 35

Patch Set 2 : Revise! #

Total comments: 10

Patch Set 3 : Revise! #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1708 lines, -179 lines) Patch
M sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart View 1 1 chunk +1 line, -4 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/global_activate.dart View 1 3 chunks +30 lines, -3 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/global_deactivate.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/global_packages.dart View 1 2 9 chunks +245 lines, -17 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/package.dart View 1 2 2 chunks +10 lines, -6 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/pubspec.dart View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/utils.dart View 1 1 chunk +12 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/validator.dart View 1 2 chunks +2 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/lib/src/validator/executable.dart View 1 2 1 chunk +37 lines, -0 lines 2 comments Download
M sdk/lib/_internal/pub/lib/src/validator/name.dart View 1 1 chunk +1 line, -2 lines 0 comments Download
M sdk/lib/_internal/pub/test/global/activate/bad_version_test.dart View 2 chunks +4 lines, -10 lines 0 comments Download
M sdk/lib/_internal/pub/test/global/activate/constraint_with_path_test.dart View 2 chunks +3 lines, -10 lines 0 comments Download
M sdk/lib/_internal/pub/test/global/activate/missing_package_arg_test.dart View 2 chunks +3 lines, -9 lines 0 comments Download
M sdk/lib/_internal/pub/test/global/activate/unexpected_arguments_test.dart View 2 chunks +3 lines, -9 lines 0 comments Download
A sdk/lib/_internal/pub/test/global/binstubs/creates_executables_in_pubspec_test.dart View 1 chunk +40 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/global/binstubs/explicit_and_no_executables_options_test.dart View 1 chunk +24 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/global/binstubs/explicit_executables_test.dart View 1 chunk +40 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/global/binstubs/missing_script_test.dart View 1 1 chunk +32 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/global/binstubs/name_collision_test.dart View 1 1 chunk +61 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/global/binstubs/name_collision_with_overwrite_test.dart View 1 chunk +62 lines, -0 lines 0 comments Download
A + sdk/lib/_internal/pub/test/global/binstubs/no_executables_flag_test.dart View 1 chunk +17 lines, -10 lines 0 comments Download
A + sdk/lib/_internal/pub/test/global/binstubs/path_package_test.dart View 1 chunk +14 lines, -11 lines 0 comments Download
A sdk/lib/_internal/pub/test/global/binstubs/reactivate_removes_old_executables_test.dart View 1 chunk +48 lines, -0 lines 0 comments Download
A + sdk/lib/_internal/pub/test/global/binstubs/removes_even_if_not_in_pubspec_test.dart View 1 chunk +23 lines, -9 lines 0 comments Download
A + sdk/lib/_internal/pub/test/global/binstubs/removes_when_deactivated_test.dart View 1 chunk +16 lines, -12 lines 0 comments Download
A sdk/lib/_internal/pub/test/global/binstubs/unknown_explicit_executable_test.dart View 1 chunk +35 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/test/pubspec_test.dart View 1 2 1 chunk +53 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/validator/executable_test.dart View 1 1 chunk +57 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/barback/asset_environment.dart View 1 1 chunk +1 line, -3 lines 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/command/global_activate.dart View 1 3 chunks +36 lines, -3 lines 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/command/global_deactivate.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/global_packages.dart View 1 2 8 chunks +178 lines, -15 lines 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/package.dart View 1 2 2 chunks +7 lines, -4 lines 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/pubspec.dart View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/utils.dart View 1 1 chunk +5 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/validator.dart View 1 2 chunks +2 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/lib/src/validator/executable.dart View 1 2 1 chunk +32 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub_generated/lib/src/validator/name.dart View 1 1 chunk +1 line, -2 lines 0 comments Download
M sdk/lib/_internal/pub_generated/test/global/activate/bad_version_test.dart View 1 chunk +5 lines, -10 lines 0 comments Download
M sdk/lib/_internal/pub_generated/test/global/activate/constraint_with_path_test.dart View 2 chunks +3 lines, -10 lines 0 comments Download
M sdk/lib/_internal/pub_generated/test/global/activate/missing_package_arg_test.dart View 1 chunk +4 lines, -9 lines 0 comments Download
M sdk/lib/_internal/pub_generated/test/global/activate/unexpected_arguments_test.dart View 2 chunks +2 lines, -9 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/creates_executables_in_pubspec_test.dart View 1 chunk +36 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/explicit_and_no_executables_options_test.dart View 1 chunk +22 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/explicit_executables_test.dart View 1 chunk +38 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/missing_script_test.dart View 1 1 chunk +24 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/name_collision_test.dart View 1 1 chunk +46 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/name_collision_with_overwrite_test.dart View 1 chunk +47 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/no_executables_flag_test.dart View 1 chunk +19 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/path_package_test.dart View 1 chunk +24 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/reactivate_removes_old_executables_test.dart View 1 chunk +34 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/removes_even_if_not_in_pubspec_test.dart View 1 chunk +21 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/removes_when_deactivated_test.dart View 1 chunk +27 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/global/binstubs/unknown_explicit_executable_test.dart View 1 chunk +32 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub_generated/test/pubspec_test.dart View 1 2 1 chunk +50 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub_generated/test/validator/executable_test.dart View 1 1 chunk +44 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
Bob Nystrom
6 years, 3 months ago (2014-09-13 00:36:52 UTC) #2
nweiz
Right now this doesn't really do anything helpful if the package defines an executable that ...
6 years, 3 months ago (2014-09-15 22:57:18 UTC) #3
Bob Nystrom
> Right now this doesn't really do anything helpful if the package defines an executable ...
6 years, 3 months ago (2014-09-17 21:34:35 UTC) #4
nweiz
https://codereview.chromium.org/566093003/diff/1/sdk/lib/_internal/pub/lib/src/command/global_activate.dart File sdk/lib/_internal/pub/lib/src/command/global_activate.dart (right): https://codereview.chromium.org/566093003/diff/1/sdk/lib/_internal/pub/lib/src/command/global_activate.dart#newcode33 sdk/lib/_internal/pub/lib/src/command/global_activate.dart:33: commandParser.addFlag("overwrite-executables", negatable: false, On 2014/09/17 21:34:34, Bob Nystrom wrote: ...
6 years, 3 months ago (2014-09-17 22:58:27 UTC) #5
Bob Nystrom
Thanks! https://codereview.chromium.org/566093003/diff/1/sdk/lib/_internal/pub/lib/src/command/global_activate.dart File sdk/lib/_internal/pub/lib/src/command/global_activate.dart (right): https://codereview.chromium.org/566093003/diff/1/sdk/lib/_internal/pub/lib/src/command/global_activate.dart#newcode33 sdk/lib/_internal/pub/lib/src/command/global_activate.dart:33: commandParser.addFlag("overwrite-executables", negatable: false, On 2014/09/17 22:58:26, nweiz wrote: ...
6 years, 3 months ago (2014-09-18 19:17:53 UTC) #6
nweiz
lgtm https://codereview.chromium.org/566093003/diff/1/sdk/lib/_internal/pub/lib/src/command/global_activate.dart File sdk/lib/_internal/pub/lib/src/command/global_activate.dart (right): https://codereview.chromium.org/566093003/diff/1/sdk/lib/_internal/pub/lib/src/command/global_activate.dart#newcode33 sdk/lib/_internal/pub/lib/src/command/global_activate.dart:33: commandParser.addFlag("overwrite-executables", negatable: false, On 2014/09/18 19:17:52, Bob Nystrom ...
6 years, 3 months ago (2014-09-18 20:47:46 UTC) #7
nweiz
https://codereview.chromium.org/566093003/diff/40001/sdk/lib/_internal/pub/lib/src/validator/executable.dart File sdk/lib/_internal/pub/lib/src/validator/executable.dart (right): https://codereview.chromium.org/566093003/diff/40001/sdk/lib/_internal/pub/lib/src/validator/executable.dart#newcode5 sdk/lib/_internal/pub/lib/src/validator/executable.dart:5: library pub.validator.compiled_dartdoc; One more thing: make this match the ...
6 years, 3 months ago (2014-09-18 21:51:49 UTC) #8
Bob Nystrom
Committed patchset #3 (id:40001) manually as 40471 (presubmit successful).
6 years, 3 months ago (2014-09-18 22:23:33 UTC) #9
Bob Nystrom
6 years, 3 months ago (2014-09-18 22:23:48 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/566093003/diff/1/sdk/lib/_internal/pub/lib/sr...
File sdk/lib/_internal/pub/lib/src/command/global_activate.dart (right):

https://codereview.chromium.org/566093003/diff/1/sdk/lib/_internal/pub/lib/sr...
sdk/lib/_internal/pub/lib/src/command/global_activate.dart:33:
commandParser.addFlag("overwrite-executables", negatable: false,
On 2014/09/18 20:47:46, nweiz wrote:
> On 2014/09/18 19:17:52, Bob Nystrom wrote:
> > On 2014/09/17 22:58:26, nweiz wrote:
> > > On 2014/09/17 21:34:34, Bob Nystrom wrote:
> > > > On 2014/09/15 22:57:17, nweiz wrote:
> > > > > This is a really long and unwieldy flag name. I like just "force"
here.
> > > > 
> > > > I did that at first but I felt like "force" was ambiguous. It's clear
> > "force"
> > > is
> > > > pushing past *some* error, but not what kind. (For example, should
--force
> > > > ignore errors from unknown executables?)
> > > > 
> > > > I went with this since it's explicit which errors are being ignored. I
> don't
> > > > think it will be used in practice much, so I'm OK with it being long.
> > > 
> > > What do you think about just "--overwrite"?
> > 
> > Maybe? I'm worried that that isn't clear. The command the user is running is
> > "pub global activate" which isn't itself specifically about binstubs, so
maybe
> > the user would think that overwrites the package itself (whatever that would
> > mean).
> 
> I think in practice most of the time users will be running "pub global
activate"
> specifically to get access to the executables of packages they're activating,
> and that will provide enough context.

Good point. Done.

https://codereview.chromium.org/566093003/diff/40001/sdk/lib/_internal/pub/li...
File sdk/lib/_internal/pub/lib/src/validator/executable.dart (right):

https://codereview.chromium.org/566093003/diff/40001/sdk/lib/_internal/pub/li...
sdk/lib/_internal/pub/lib/src/validator/executable.dart:5: library
pub.validator.compiled_dartdoc;
On 2014/09/18 21:51:49, nweiz wrote:
> One more thing: make this match the path.

Done.

Powered by Google App Engine
This is Rietveld 408576698