1. class CompUnit::Repository::Unknown does CompUnit::Repository {
  2. has $.path-spec;
  3. has $.short-name;
  4. method need(
  5. CompUnit::DependencySpecification $spec,
  6. CompUnit::PrecompilationRepository $precomp?,
  7. CompUnit::PrecompilationStore :@precomp-stores = Array[CompUnit::PrecompilationStore].new(
  8. self.repo-chain.map(*.precomp-store).grep(*.defined)
  9. ),
  10. --> CompUnit:D)
  11. {
  12. return $precomp
  13. ?? self.next-repo.need($spec, $precomp, :@precomp-stores)
  14. !! self.next-repo.need($spec, :@precomp-stores)
  15. if self.next-repo;
  16. X::CompUnit::UnsatisfiedDependency.new(:specification($spec)).throw;
  17. }
  18. method loaded() {
  19. []
  20. }
  21. method id() {
  22. $.path-spec
  23. }
  24. method Str() { self.^name ~ " $.short-name $.path-spec" }
  25. }