Repository navigation
uv: fetch uv.toml as a support file so uv sees its settings - #16873
Draft
v-abhishekbhaskar with Copilot wants to merge 3 commits into
Draft
v-abhishekbhaskar with Copilot wants to merge 3 commits into
v-abhishekbhaskar with Copilot wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.
Co-authored-by: v-abhishekbhaskar <22154418+v-abhishekbhaskar@users.noreply.github.com>
| # workspace root's configuration, so members' uv.toml files are not fetched. | ||
| sig { returns(T::Array[Dependabot::DependencyFile]) } | ||
| def uv_config_files | ||
| [fetch_support_file("uv.toml")].compact |
Comment on lines
+238
to
+239
| it "uses the uv.toml settings in place of [tool.uv]" do | ||
| expect(updated_files.map(&:name)).to eq(["uv.lock"]) |
Co-authored-by: v-abhishekbhaskar <22154418+v-abhishekbhaskar@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix fetching of uv.toml so settings are respected
uv: fetch uv.toml as a support file so uv sees its settings
Nov 10, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What are you trying to accomplish?
Uv::FileFetchernever fetcheduv.toml. The uv sandboxes (CompileFileUpdater,PipCompileVersionResolver, andLockFileUpdaterwhen the repo isn't cloned) are built from fetched files only, so settings that exist only inuv.tomlwere ignored, such asrequired-version,indexandsources. When both files set a value, Dependabot used[tool.uv], while uv itself givesuv.tomlprecedence and ignores[tool.uv].uv.tomlin the project directory is now fetched as a support file. All three updaters already write every dependency file into the sandbox, so none of them needed changes.uv.tomlis fetched. uv starts config discovery at the workspace root and ignores members' config.Anything you want to highlight for special attention from reviewers?
uv.tomlsetting now applies to every uv project that has one. This is the intended fix (Run the uv version that [tool.uv] required-version names #16847 deliberately avoided it). Repos whoseuv.tomlDependabot previously ignored may now resolve differently.uv.tomlin a directory above the configured one, e.g. a workspace root above a member configured as the Dependabot directory. Dependabot doesn't fetch parent workspace roots today. Placing a parentuv.tomlin the sandbox correctly would also mean reproducing uv's ancestor-walk rules (a closer[tool.uv]wins).required-versionpin from uv's own error, so with this change it picks upuv.tomlprecedence automatically.How will you know you've accomplished your goal?
file_fetcher_spec.rbchecks thatuv.tomlis fetched as a support file, thatpyproject.tomlstays the only primary file, and that nothing is fetched whenuv.tomlis absent.file_updater_spec.rbadds a regression spec through the publicUv::FileUpdater#updated_dependency_files. It runs a realuv lock, so it needs the uv Docker image, and it has not been run yet:uv.tomlpresent, the update should succeed and bumprequestsfrom 2.32.3 to 2.32.4.ToolVersionNotSupportedwithdetected_version<0.1.0.The same scenario was checked by hand with standalone uv 0.13.7. Without
uv.toml,uv lockfails on the version pin; with it, uv warns that[tool.uv]required-versionis ignored and updates the lock.Checklist