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

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

Issue 430973002: Only support the new source_span spans in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 years, 4 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 | « pkg/smoke/pubspec.yaml ('k') | sdk/lib/_internal/pub/lib/src/barback/asset_environment.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
10 import 'version.dart'; 10 import 'version.dart';
(...skipping 20 matching lines...) Expand all
31 /// because most barback features need additional serialization code to be fully 31 /// because most barback features need additional serialization code to be fully
32 /// supported in pub, even if they're otherwise backwards-compatible. 32 /// supported in pub, even if they're otherwise backwards-compatible.
33 /// 33 ///
34 /// Whenever a new minor or patch version of barback is published, this *must* 34 /// Whenever a new minor or patch version of barback is published, this *must*
35 /// be incremented to synchronize with that. See the barback [compatibility 35 /// be incremented to synchronize with that. See the barback [compatibility
36 /// documentation][compat] for details on the relationship between this 36 /// documentation][compat] for details on the relationship between this
37 /// constraint and barback's version. 37 /// constraint and barback's version.
38 /// 38 ///
39 /// [compat]: https://gist.github.com/nex3/10942218 39 /// [compat]: https://gist.github.com/nex3/10942218
40 final pubConstraints = { 40 final pubConstraints = {
41 "barback": new VersionConstraint.parse(">=0.13.0 <0.14.3"), 41 "barback": new VersionConstraint.parse(">=0.13.0 <0.15.1"),
42 "source_span": new VersionConstraint.parse(">=1.0.0 <2.0.0"), 42 "source_span": new VersionConstraint.parse(">=1.0.0 <2.0.0"),
43 "stack_trace": new VersionConstraint.parse(">=0.9.1 <2.0.0") 43 "stack_trace": new VersionConstraint.parse(">=0.9.1 <2.0.0")
44 }; 44 };
45 45
46 /// Converts [id] to a "package:" URI. 46 /// Converts [id] to a "package:" URI.
47 /// 47 ///
48 /// This will throw an [ArgumentError] if [id] doesn't represent a library in 48 /// This will throw an [ArgumentError] if [id] doesn't represent a library in
49 /// `lib/`. 49 /// `lib/`.
50 Uri idToPackageUri(AssetId id) { 50 Uri idToPackageUri(AssetId id) {
51 if (!id.path.startsWith('lib/')) { 51 if (!id.path.startsWith('lib/')) {
(...skipping 29 matching lines...) Expand all
81 if (parts.length <= index + 1) { 81 if (parts.length <= index + 1) {
82 throw new FormatException( 82 throw new FormatException(
83 'Invalid URL path "${url.path}". Expected package name ' 83 'Invalid URL path "${url.path}". Expected package name '
84 'after "packages".'); 84 'after "packages".');
85 } 85 }
86 86
87 var package = parts[index + 1]; 87 var package = parts[index + 1];
88 var assetPath = p.url.join("lib", p.url.joinAll(parts.skip(index + 2))); 88 var assetPath = p.url.join("lib", p.url.joinAll(parts.skip(index + 2)));
89 return new AssetId(package, assetPath); 89 return new AssetId(package, assetPath);
90 } 90 }
OLDNEW
« no previous file with comments | « pkg/smoke/pubspec.yaml ('k') | sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698