commit | 26798c36fa6b89bd9fba89b163d56da6e438c041 | [log] [tgz] |
---|---|---|
author | Natalie Weizenbaum <nweiz@google.com> | Wed May 30 16:52:41 2018 -0400 |
committer | GitHub <noreply@github.com> | Wed May 30 16:52:41 2018 -0400 |
tree | bd3e942ed2781dbaebffadbb24e6229a5deec937 | |
parent | ce0f41eba9ba9e50500a7ffec373061cfc0edc76 [diff] | |
parent | 85fdeb8e9345c3d51bc34d4d650f1e09041cf554 [diff] |
Merge pull request #14 from dart-lang/dart-2 Fix Dart 2 runtime errors in tests
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.