Skip to content

Commit cf0e09c

Browse files
committed
commit changes to workspace member pyproject.toml
This is necessary to avoid conflicts between uv.lock requires-dist and pyproject.toml.
1 parent 10db257 commit cf0e09c

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

uv/lib/dependabot/uv/file_updater/lock_file_updater.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,15 @@ def fetch_updated_dependency_files
9696
updated_files = pyproject_files.filter_map do |file|
9797
next unless file_changed?(file)
9898

99-
updated_file(
99+
updated = updated_file(
100100
file: file,
101101
content: T.must(updated_pyproject_content_for(file))
102102
)
103+
# support_file must be false to prevent DependencyChangeBuilder from discarding the inner TOML,
104+
# since doing so causes a conflict between the updated lock file and the committed TOML
105+
# and breaks `uv sync --locked` in CI.
106+
updated.support_file = false
107+
updated
103108
end
104109

105110
if lockfile && !build_system_only_dependency?

uv/spec/dependabot/uv/file_updater/lock_file_updater_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@
479479

480480
member_pyproject = updated_dependency_files.find { |f| f.name == "packages/my-package/pyproject.toml" }
481481
expect(member_pyproject.content).to include('"click>=8.2.0"')
482+
expect(member_pyproject.support_file).to be(false)
482483

483484
updated_lock = updated_dependency_files.find { |f| f.name == "uv.lock" }
484485
expect(updated_lock.content).to include('version = "8.2.0"')

0 commit comments

Comments
 (0)