From 5eb5a762aae2ca71b90719ce7b8720f840ef04c9 Mon Sep 17 00:00:00 2001 From: crabbit-git <98990717+crabbit-git@users.noreply.github.com> Date: Tue, 26 May 2026 10:24:58 +0100 Subject: [PATCH] commit changes to workspace member pyproject.toml This is necessary to avoid conflicts between uv.lock requires-dist and pyproject.toml. --- uv/lib/dependabot/uv/file_updater/lock_file_updater.rb | 7 ++++++- .../dependabot/uv/file_updater/lock_file_updater_spec.rb | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/uv/lib/dependabot/uv/file_updater/lock_file_updater.rb b/uv/lib/dependabot/uv/file_updater/lock_file_updater.rb index 0dc0a47d7e9..5f2bf647cec 100644 --- a/uv/lib/dependabot/uv/file_updater/lock_file_updater.rb +++ b/uv/lib/dependabot/uv/file_updater/lock_file_updater.rb @@ -96,10 +96,15 @@ def fetch_updated_dependency_files updated_files = pyproject_files.filter_map do |file| next unless file_changed?(file) - updated_file( + updated = updated_file( file: file, content: T.must(updated_pyproject_content_for(file)) ) + # support_file must be false to prevent DependencyChangeBuilder from discarding the inner TOML, + # since doing so causes a conflict between the updated lock file and the committed TOML + # and breaks `uv sync --locked` in CI. + updated.support_file = false + updated end if lockfile && !build_system_only_dependency? diff --git a/uv/spec/dependabot/uv/file_updater/lock_file_updater_spec.rb b/uv/spec/dependabot/uv/file_updater/lock_file_updater_spec.rb index 3df6e0c7d23..270bd79ecb2 100644 --- a/uv/spec/dependabot/uv/file_updater/lock_file_updater_spec.rb +++ b/uv/spec/dependabot/uv/file_updater/lock_file_updater_spec.rb @@ -479,6 +479,7 @@ member_pyproject = updated_dependency_files.find { |f| f.name == "packages/my-package/pyproject.toml" } expect(member_pyproject.content).to include('"click>=8.2.0"') + expect(member_pyproject.support_file).to be(false) updated_lock = updated_dependency_files.find { |f| f.name == "uv.lock" } expect(updated_lock.content).to include('version = "8.2.0"')