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

Issue 397843005: Lazily load the entrypoint. (Closed)

Created:
6 years, 5 months ago by Bob Nystrom
Modified:
6 years, 5 months ago
Reviewers:
nweiz
CC:
reviews_dartlang.org, Paul Berry, Brian Wilkerson
Visibility:
Public.

Description

Lazily load the entrypoint. This means commands don't have to declare that they need. It also ensures the pubspec isn't parsed until JSON output has been selected. BUG=http://dartbug.com/20066, http://dartbug.com/20065 R=nweiz@google.com Committed: https://code.google.com/p/dart/source/detail?r=38291

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -36 lines) Patch
M sdk/lib/_internal/pub/lib/src/command.dart View 3 chunks +11 lines, -14 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/cache_add.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/cache_list.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/cache_repair.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/global_activate.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/global_deactivate.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/global_run.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/help.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart View 1 chunk +5 lines, -2 lines 2 comments Download
M sdk/lib/_internal/pub/lib/src/command/uploader.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/version.dart View 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/entrypoint.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/test/list_package_dirs/ignores_updated_pubspec_test.dart View 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/test/list_package_dirs/includes_dev_dependencies_test.dart View 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/test/list_package_dirs/lists_dependency_directories_test.dart View 1 chunk +2 lines, -1 line 0 comments Download
A + sdk/lib/_internal/pub/test/list_package_dirs/missing_pubspec_test.dart View 1 chunk +9 lines, -7 lines 0 comments Download
M sdk/lib/_internal/pub/test/list_package_dirs/no_lockfile_test.dart View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Bob Nystrom
6 years, 5 months ago (2014-07-16 00:17:47 UTC) #1
nweiz
https://codereview.chromium.org/397843005/diff/1/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart File sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart (right): https://codereview.chromium.org/397843005/diff/1/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart#newcode55 sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart:55: entrypoint.pubspecPath This doesn't actually read the pubspec anymore, does ...
6 years, 5 months ago (2014-07-16 00:33:30 UTC) #2
nweiz
lgtm
6 years, 5 months ago (2014-07-16 00:33:36 UTC) #3
Bob Nystrom
Committed patchset #1 manually as r38291 (presubmit successful).
6 years, 5 months ago (2014-07-16 17:01:32 UTC) #4
Bob Nystrom
6 years, 5 months ago (2014-07-16 17:33:24 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/397843005/diff/1/sdk/lib/_internal/pub/lib/sr...
File sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart (right):

https://codereview.chromium.org/397843005/diff/1/sdk/lib/_internal/pub/lib/sr...
sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart:55:
entrypoint.pubspecPath
On 2014/07/16 00:33:29, nweiz wrote:
> This doesn't actually read the pubspec anymore, does it?

It does, since we are touching "entrypoint" the root package's pubspec gets
read. I could make that lazy within Entrypoint, but I didn't think it was worth
doing.

> Seems weird to have the editor re-run it when the pubspec changes if that
won't do anything.

Yeah, I guess so. I think in practice it doesn't get touched that often.

Powered by Google App Engine
This is Rietveld 408576698