Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add candidates method as CURI recommendation manager
Add `method candidates` - All distribution searching/resolving go through this new method. This gives developers insight into how a CURI resolves a module request, which was not possible with .resolve (since it would chain to the next CUR, and only returned a single result). Many NYI s22 features will require something like this, and .candidates is indeed mentioned in s22 https://design.perl6.org/S22.html#candidates !matching-dist is now backed by .candidates, but also caches a single 'best match' so it acts similar to before. .candidates (i.e. !matching-dist) now returns a Distribution object and not ($dist-id, $dist-data). This is possible because of a role that allows our lazy distribution to avoid yet additional costly IO calls to obtain meta data. Previously this was done by passing around a hash internally, but now we dogfood our Distribution interface throughout CURI. Avoid io after setting up various directories once. Removes .script, and reverts to using just .files - .script was just a fast path of .files under certain conditions and lacked the ability to filter by name. Now .files can provide the faster path for other files automatically. Additionally this fixes an issue where .script would invoke older version bin/ scripts from ~/.perl6 Adds :$api field wherever it was missing for consistency.
- Loading branch information