txt: ## repository.md
  role CompUnit::Repository
  
  CompUnit::Repository
  
  The `CompUnit::Repository` role defines the interface of the implementation of CompUnit::Repositories such as [`CompUnit::Repository::Installation`](/type/CompUnit/Repository/Installation) and [`CompUnit::Repository::FileSystem`](/type/CompUnit/Repository/FileSystem).
  
  # [Methods](#role_CompUnit::Repository "go to top of document")[§](#Methods "direct link")
  
  ## [method resolve](#role_CompUnit::Repository "go to top of document")[§](#method_resolve "direct link")
  
  ```raku
  method resolve(CompUnit::DependencySpecification $spec --> CompUnit:D)
  ```
  
  Returns a [`CompUnit`](/type/CompUnit) mapped to the highest version distribution matching `$spec` from the first repository in the repository chain that contains any version of a distribution matching `$spec`.
  
  ## [method need](#role_CompUnit::Repository "go to top of document")[§](#method_need "direct link")
  
  Loads and returns a [`CompUnit`](/type/CompUnit) which is mapped to the highest version distribution matching `$spec` from the first repository in the repository chain that contains any version of a distribution matching `$spec`.
  
  ## [method load](#role_CompUnit::Repository "go to top of document")[§](#method_load "direct link")
  
  ```raku
  method load(IO::Path:D $file --> CompUnit:D)
  ```
  
  Load the `$file` and return a [`CompUnit`](/type/CompUnit) object representing it.
  
  ## [method loaded](#role_CompUnit::Repository "go to top of document")[§](#method_loaded "direct link")
  
  ```raku
  method loaded(--> Iterable:D)
  ```
  
  Returns all [`CompUnit`](/type/CompUnit)s this repository has loaded.
  