mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 02:48:17 +00:00
Respect named --index
and --default-index
values in tool.uv.sources
(#7910)
## Summary If you pass a named index via the CLI, you can now reference it as a named source. This required some surprisingly large refactors, since we now need to be able to track whether a given index was provided on the CLI vs. elsewhere (since, e.g., we don't want users to be able to reference named indexes defined in global configuration). Closes https://github.com/astral-sh/uv/issues/7899.
This commit is contained in:
parent
a034a8b83b
commit
2153c6ac0d
23 changed files with 370 additions and 133 deletions
|
@ -156,7 +156,7 @@ impl<'a> BuildContext for BuildDispatch<'a> {
|
|||
self.sources
|
||||
}
|
||||
|
||||
fn index_locations(&self) -> &IndexLocations {
|
||||
fn locations(&self) -> &IndexLocations {
|
||||
self.index_locations
|
||||
}
|
||||
|
||||
|
@ -350,6 +350,7 @@ impl<'a> BuildContext for BuildDispatch<'a> {
|
|||
self,
|
||||
self.source_build_context.clone(),
|
||||
version_id,
|
||||
self.index_locations,
|
||||
sources,
|
||||
self.config_settings.clone(),
|
||||
self.build_isolation,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue