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

Issue 417043005: Add publishTo to pubspec and use it in pub lish. (Closed)

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

Description

Add publishTo to pubspec and use it in pub lish. RELNOTE=Pubspecs can have a "publishTo" field which is either a URL to specify the default server that publishing should use or "none" to specify that the package is private and cannot be published. BUG=https://code.google.com/p/dart/issues/detail?id=20046 R=nweiz@google.com Committed: https://code.google.com/p/dart/source/detail?r=38880

Patch Set 1 #

Total comments: 11

Patch Set 2 : Revise. #

Messages

Total messages: 4 (0 generated)
Bob Nystrom
6 years, 4 months ago (2014-07-31 22:57:31 UTC) #1
nweiz
lgtm https://codereview.chromium.org/417043005/diff/1/sdk/lib/_internal/pub/lib/src/command/lish.dart File sdk/lib/_internal/pub/lib/src/command/lish.dart (right): https://codereview.chromium.org/417043005/diff/1/sdk/lib/_internal/pub/lib/src/command/lish.dart#newcode115 sdk/lib/_internal/pub/lib/src/command/lish.dart:115: dataError("A private package cannot be published."); Consider associating ...
6 years, 4 months ago (2014-08-01 01:12:13 UTC) #2
Bob Nystrom
Committed patchset #2 manually as 38880 (presubmit successful).
6 years, 4 months ago (2014-08-04 21:16:10 UTC) #3
Bob Nystrom
6 years, 4 months ago (2014-08-04 21:16:44 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/417043005/diff/1/sdk/lib/_internal/pub/lib/sr...
File sdk/lib/_internal/pub/lib/src/command/lish.dart (right):

https://codereview.chromium.org/417043005/diff/1/sdk/lib/_internal/pub/lib/sr...
sdk/lib/_internal/pub/lib/src/command/lish.dart:115: dataError("A private
package cannot be published.");
On 2014/08/01 01:12:13, nweiz wrote:
> Consider associating this with the "publishTo" span from the pubspec to make
it
> clear to users what constitutes a private package.

Didn't add the span, but did mention "publishTo" in the error message.

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

https://codereview.chromium.org/417043005/diff/1/sdk/lib/_internal/pub/lib/sr...
sdk/lib/_internal/pub/lib/src/pubspec.dart:214: /// be published to the default
server.
On 2014/08/01 01:12:13, nweiz wrote:
> Document that if this returns a URL, it's guaranteed to be valid.

Done.

https://codereview.chromium.org/417043005/diff/1/sdk/lib/_internal/pub/lib/sr...
sdk/lib/_internal/pub/lib/src/pubspec.dart:223: _error ('"publishTo" field must
be a string.', span);
On 2014/08/01 01:12:13, nweiz wrote:
> Nit: no space after _error.

Done.

https://codereview.chromium.org/417043005/diff/1/sdk/lib/_internal/pub/test/l...
File sdk/lib/_internal/pub/test/lish/force_does_not_publish_if_private_test.dart
(right):

https://codereview.chromium.org/417043005/diff/1/sdk/lib/_internal/pub/test/l...
sdk/lib/_internal/pub/test/lish/force_does_not_publish_if_private_test.dart:14:
integration('does not publish if the package is private', () {
On 2014/08/01 01:12:13, nweiz wrote:
> How is this different than the other test with the same name?

This one does "--force". Well, it does *now*, at least. :-b

https://codereview.chromium.org/417043005/diff/1/sdk/lib/_internal/pub/test/l...
File
sdk/lib/_internal/pub/test/lish/server_arg_overrides_publish_to_url_test.dart
(right):

https://codereview.chromium.org/417043005/diff/1/sdk/lib/_internal/pub/test/l...
sdk/lib/_internal/pub/test/lish/server_arg_overrides_publish_to_url_test.dart:12:
integration('preview shows an error if the package is private', () {
On 2014/08/01 01:12:13, nweiz wrote:
> Wrong description.

Done.

Powered by Google App Engine
This is Rietveld 408576698