Module Name Resolver
A ModuleNameResolver resolves fully-qualified references to Avail modules to absolutefile references.
Assuming that the Avail module path comprises four module roots listed in the order S, P,Q, R, then the following algorithm is used for resolution of a fully-qualified reference R/X/Y/Z/M:
Obtain the canonical name /R'/A/B/C/M' by applying an existing renaming rule for /R/X/Y/Z/M.
If package /R'/A/B/C contains a module M', then capture its file reference F.
If package /R'/A/B contains a module M', then capture its file reference F.
If package /R'/A contains a module M', then capture its file reference F.
If module root /R contains a module M', then capture its file reference F.
If module root /S contains a module M', then capture its file reference F.
If module root /P contains a module M', then capture its file reference F.
If module root /Q contains a module M', then capture its file reference F.
If the resolution succeeded and F specifies a directory, then replace the resolution with F/M'.avail. Verify that the resolution specifies an existing regular file.
Otherwise, resolution failed.
An instance is obtained via RenamesFileParser.parse.
Author
Todd L Smith
Leslie Schultz
Richard Arriaga
Parameters
The Avail module roots.
Constructors
Types
This class was created so that, upon an UnresolvedDependencyException, the ModuleNameResolver could bundle information about the different paths checked for the missing file into the exception itself.
Functions
Add a rule to translate the specified fully-qualified module name.
Clear all cached module resolutions. Also release all file locks on repositories and close them.
Remove all rename rules.
Commit all dirty repositories.
Resolve a fully-qualified module name (as a reference to the local name made from within the package).
Properties
An immutable Map of all the module path renames.