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

Issue 74013007: Hook up dependency overrides to the rest of pub. (Closed)

Created:
7 years, 1 month ago by Bob Nystrom
Modified:
7 years, 1 month ago
Reviewers:
nweiz
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Hook up dependency overrides to the rest of pub. - Parse them in pubspec. - Pass them to solver. - Warn when they are used. - Error on publish. BUG=https://code.google.com/p/dart/issues/detail?id=8566 R=nweiz@google.com Committed: https://code.google.com/p/dart/source/detail?r=30376

Patch Set 1 #

Total comments: 6

Patch Set 2 : Revise. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -29 lines) Patch
M sdk/lib/_internal/pub/lib/src/entrypoint.dart View 1 2 chunks +11 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/package.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/pubspec.dart View 2 chunks +14 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart View 1 4 chunks +8 lines, -4 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/solver/version_solver.dart View 1 3 chunks +7 lines, -5 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/validator.dart View 2 chunks +2 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/lib/src/validator/dependency_override.dart View 1 1 chunk +28 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/dependency_override_test.dart View 1 chunk +113 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/test/pubspec_test.dart View 2 chunks +32 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/validator/dependency_override_test.dart View 1 chunk +30 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/test/version_solver_test.dart View 5 chunks +18 lines, -18 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Bob Nystrom
Aside from docs, they should be pretty good to go after this.
7 years, 1 month ago (2013-11-16 00:47:28 UTC) #1
nweiz
lgtm https://codereview.chromium.org/74013007/diff/1/sdk/lib/_internal/pub/lib/src/entrypoint.dart File sdk/lib/_internal/pub/lib/src/entrypoint.dart (right): https://codereview.chromium.org/74013007/diff/1/sdk/lib/_internal/pub/lib/src/entrypoint.dart#newcode150 sdk/lib/_internal/pub/lib/src/entrypoint.dart:150: log.warning("- $override"); --verbose/--trace logs look better if a ...
7 years, 1 month ago (2013-11-16 01:04:00 UTC) #2
Bob Nystrom
Committed patchset #2 manually as r30376 (presubmit successful).
7 years, 1 month ago (2013-11-18 21:51:54 UTC) #3
Bob Nystrom
7 years, 1 month ago (2013-11-18 21:53:45 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/74013007/diff/1/sdk/lib/_internal/pub/lib/src...
File sdk/lib/_internal/pub/lib/src/entrypoint.dart (right):

https://codereview.chromium.org/74013007/diff/1/sdk/lib/_internal/pub/lib/src...
sdk/lib/_internal/pub/lib/src/entrypoint.dart:150: log.warning("- $override");
On 2013/11/16 01:04:00, nweiz wrote:
> --verbose/--trace logs look better if a single log entry is passed as a single
> newline-separated argument to [warning].

Done.

https://codereview.chromium.org/74013007/diff/1/sdk/lib/_internal/pub/lib/src...
File sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart (right):

https://codereview.chromium.org/74013007/diff/1/sdk/lib/_internal/pub/lib/src...
sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart:93:
Iterable<PackageDep> overrides, List<String> useLatest)
On 2013/11/16 01:04:00, nweiz wrote:
> [overrides] should no longer be passed in here, right?

Right. Merge bug. :( Fixed.

https://codereview.chromium.org/74013007/diff/1/sdk/lib/_internal/pub/lib/src...
File sdk/lib/_internal/pub/lib/src/validator/dependency_override.dart (right):

https://codereview.chromium.org/74013007/diff/1/sdk/lib/_internal/pub/lib/src...
sdk/lib/_internal/pub/lib/src/validator/dependency_override.dart:23: 'its
dependencies\nthat users will have when they use it.');
On 2013/11/16 01:04:00, nweiz wrote:
> Style nit: I'd format this like so:
> 
>     'Your pubspec.yaml must not have a "dependency_overrides" field.\n'
>     'This ensures you test your package against the same versions of '
>         'its dependencies\n'
>     'that users will have when they use it.'

Done.

Powered by Google App Engine
This is Rietveld 408576698