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

Issue 330183003: Support paths outside of "bin" for pub run. (Closed)

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

Description

Support paths outside of "bin" for pub run. BUG=https://code.google.com/p/dart/issues/detail?id=18536 R=nweiz@google.com Committed: https://code.google.com/p/dart/source/detail?r=37322

Patch Set 1 #

Total comments: 6

Patch Set 2 : Make progress play nice with pub run. #

Patch Set 3 : Revise. #

Patch Set 4 : Test that root directory is served. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -31 lines) Patch
M sdk/lib/_internal/pub/lib/src/command/run.dart View 1 2 3 3 chunks +23 lines, -7 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/progress.dart View 1 1 chunk +14 lines, -8 lines 0 comments Download
A sdk/lib/_internal/pub/test/run/includes_parent_directories_of_entrypoint_test.dart View 1 2 3 1 chunk +40 lines, -0 lines 0 comments Download
A + sdk/lib/_internal/pub/test/run/runs_app_in_directory_in_entrypoint_test.dart View 1 chunk +14 lines, -16 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Bob Nystrom
6 years, 6 months ago (2014-06-12 22:54:53 UTC) #1
nweiz
https://codereview.chromium.org/330183003/diff/1/sdk/lib/_internal/pub/lib/src/command/run.dart File sdk/lib/_internal/pub/lib/src/command/run.dart (right): https://codereview.chromium.org/330183003/diff/1/sdk/lib/_internal/pub/lib/src/command/run.dart#newcode62 sdk/lib/_internal/pub/lib/src/command/run.dart:62: if (script.contains(path.separator)) { "/" should work on windows as ...
6 years, 6 months ago (2014-06-12 23:27:08 UTC) #2
Bob Nystrom
I fixed up the progress stuff to play nice with pub run which uses a ...
6 years, 6 months ago (2014-06-13 00:42:29 UTC) #3
nweiz
lgtm https://codereview.chromium.org/330183003/diff/1/sdk/lib/_internal/pub/lib/src/command/run.dart File sdk/lib/_internal/pub/lib/src/command/run.dart (right): https://codereview.chromium.org/330183003/diff/1/sdk/lib/_internal/pub/lib/src/command/run.dart#newcode64 sdk/lib/_internal/pub/lib/src/command/run.dart:64: rootDir = path.split(script)[0]; On 2014/06/13 00:42:29, Bob Nystrom ...
6 years, 6 months ago (2014-06-13 00:43:48 UTC) #4
Bob Nystrom
Committed patchset #4 manually as r37322 (presubmit successful).
6 years, 6 months ago (2014-06-13 17:30:15 UTC) #5
Bob Nystrom
6 years, 6 months ago (2014-06-13 17:30:21 UTC) #6
Message was sent while issue was closed.
Thanks!

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

https://codereview.chromium.org/330183003/diff/1/sdk/lib/_internal/pub/lib/sr...
sdk/lib/_internal/pub/lib/src/command/run.dart:64: rootDir =
path.split(script)[0];
On 2014/06/13 00:43:48, nweiz wrote:
> On 2014/06/13 00:42:29, Bob Nystrom wrote:
> > On 2014/06/12 23:27:08, nweiz wrote:
> > > Nit: I prefer ".first" to "[0]" if it's the only element being accessed.
> > 
> > Done.
> > 
> > > Why is this serving everything beneath the first path component? Shouldn't
> it
> > > serve the directory directly containing [script] to avoid extra
> > > loading/transformation work?
> > 
> > Good question. I forgot we can serve subdirectories.
> > 
> > Do we care about other assets in the directory tree? What if I do pub run
> > tool/sub/foo.dart and it imports "../bar.dart"?
> 
> That's probably worth supporting, especially for tests. Can you add a test
case
> for it?

Done.

Powered by Google App Engine
This is Rietveld 408576698