commit | 7f1a0f392af2254fde243fdccec0048f604c180d | [log] [tgz] |
---|---|---|
author | Kevin Moore <kevmoo@google.com> | Wed Jan 15 12:32:29 2020 -0800 |
committer | Kevin Moore <kevmoo@google.com> | Wed Jan 15 12:32:29 2020 -0800 |
tree | ad57a8b499e238622f2071152c13e937c83e2fb3 | |
parent | ffa2305f2085bf5fb400dcfd800e07e207339ace [diff] |
fix new pedantic lints
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.