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

Side by Side Diff: sdk/lib/_internal/pub/lib/src/barback.dart

Issue 602253002: Use pub_semver package in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/cached_package.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pub.barback; 5 library pub.barback;
6 6
7 import 'package:barback/barback.dart'; 7 import 'package:barback/barback.dart';
8 import 'package:path/path.dart' as p; 8 import 'package:path/path.dart' as p;
9 9 import 'package:pub_semver/pub_semver.dart';
10 import 'version.dart';
11 10
12 /// The currently supported versions of packages that this version of pub works 11 /// The currently supported versions of packages that this version of pub works
13 /// with. 12 /// with.
14 /// 13 ///
15 /// Pub implicitly constrains these packages to these versions as long as 14 /// Pub implicitly constrains these packages to these versions as long as
16 /// barback is a dependency. 15 /// barback is a dependency.
17 /// 16 ///
18 /// Users' transformers are loaded in an isolate that uses the entrypoint 17 /// Users' transformers are loaded in an isolate that uses the entrypoint
19 /// package's dependency versions. However, that isolate also loads code 18 /// package's dependency versions. However, that isolate also loads code
20 /// provided by pub (`asset/dart/transformer_isolate.dart` and associated 19 /// provided by pub (`asset/dart/transformer_isolate.dart` and associated
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (parts.length <= index + 1) { 80 if (parts.length <= index + 1) {
82 throw new FormatException( 81 throw new FormatException(
83 'Invalid URL path "${url.path}". Expected package name ' 82 'Invalid URL path "${url.path}". Expected package name '
84 'after "packages".'); 83 'after "packages".');
85 } 84 }
86 85
87 var package = parts[index + 1]; 86 var package = parts[index + 1];
88 var assetPath = p.url.join("lib", p.url.joinAll(parts.skip(index + 2))); 87 var assetPath = p.url.join("lib", p.url.joinAll(parts.skip(index + 2)));
89 return new AssetId(package, assetPath); 88 return new AssetId(package, assetPath);
90 } 89 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/cached_package.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698