Clone this repo:
  1. e5f46f3 Enable travis, etc (#6) by Kevin Moore · 5 weeks ago master
  2. 2dc21b9 Fix a test that was broken on Mac OS X. (#2) by Natalie Weizenbaum · 10 months ago 1.0.2+1
  3. 7cbba6d Fix a crash. by Natalie Weizenbaum · 12 months ago 1.0.2
  4. 8a70d3e Fix current_isolate_info_test. by Natalie Weizenbaum · 1 year ago 1.0.1
  5. 0b63bf3 Add package implementation. by Natalie Weizenbaum · 1 year, 1 month ago 1.0.0

A package that defines a common class, PackageResolver, for defining how to resolve package: URIs. This class may be based on the current isolate's package resolution strategy, but it may also be explicitly defined by the user—for example, you could create a resolver that represents the strategy used to compile a .dart.js file.

The Dart VM provides two mutually exclusive means of resolving package: URIs: a package spec and a package root.

  • A package spec usually comes in the form of a .packages file on the filesystem. It defines an individual root URL for each package name, so that package:$name/$path resolves to $root/$path.

  • A package root is a single URL that acts as the base for all package: URIs, so that package:$name/$path resolves to $base/$name/$path.

This normalizes access to these resolution schemes, and makes it easy for code to resolve package URIs no matter where the resolution information comes from.