Warn if multiple indexes include default = true#17713
Conversation
2adf829 to
8dd4307
Compare
| ----- stdout ----- | ||
|
|
||
| ----- stderr ----- | ||
| warning: Found multiple indexes with `default = true`; only one index may be marked as default. This will become an error in the future. |
There was a problem hiding this comment.
| warning: Found multiple indexes with `default = true`; only one index may be marked as default. This will become an error in the future. | |
| warning: Found multiple indexes with `default = true`; only one index may be marked as default. This will become an error in a future release. |
(just for consistency with some other warnings)
| ----- stdout ----- | ||
|
|
||
| ----- stderr ----- | ||
| warning: Found multiple indexes with `default = true`; only one index may be marked as default. This will become an error in the future. |
There was a problem hiding this comment.
Do we have coverage for the case where there are multiple default indexes in a workspace defined in the root and a member? What do we expect there?
There was a problem hiding this comment.
We currently just don't load indexes from workspace members if we're in a workspace. The only time we look at the indexes is when they're referenced as a source. So basically all indexes in a member implicitly act like they have "explicit" set.
There was a problem hiding this comment.
The logic is in here:
Lines 144 to 178 in b73f6cb
|
Default indexes can also come from user and system configuration, do we also want to ensure only one default is specified in each of those? Moreover, with these changes, it seems like the project/workspace default should replace the user default, and the user default should replace the system default. Right now we just put them into a vector in priority order. |
|
Given that went beyond what I thought would be finishing an existing item, I see two options here:
CC @charliermarsh re #17011 |
|
I think this case is fine without dealing with the global options for now. |
|
Then I'll add this as new warning as-is. |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.9.27` → `0.9.28` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>astral-sh/uv (astral-sh/uv)</summary> ### [`v0.9.28`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0928) [Compare Source](astral-sh/uv@0.9.27...0.9.28) Released on 2026-01-29. ##### Python - Update CPython to use [OpenSSL 3.5.5](https://github.com/openssl/openssl/releases/tag/openssl-3.5.5) which includes fixes for high severity CVEs ([python-build-standalone#960](astral-sh/python-build-standalone#960)) ##### Enhancements - Add support for Pyodide interpreter on Windows ([#​17658](astral-sh/uv#17658)) - Warn if multiple indexes include `default = true` ([#​17713](astral-sh/uv#17713)) - Skip uploads when validation reports 'Already uploaded' ([#​17412](astral-sh/uv#17412)) ##### Configuration - Add a reflink alias for the "clone" link mode ([#​17724](astral-sh/uv#17724)) ##### Bug fixes - Ensure `uv.exe` exits when `uvw.exe` or `uvx.exe` is killed ([#​17500](astral-sh/uv#17500)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45NC42IiwidXBkYXRlZEluVmVyIjoiNDIuOTQuNiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
Prepare for #17011 Co-authored-by: Charlie Marsh <[email protected]>
Prepare for #17011