Skip to content

uv reads and validates uv_build options #14323

@konstin

Description

@konstin

It seems that currently, the uv frontend reads BuildBackendSettings, which would mean that uv would start complaining if we ever made a breaking change to BuildBackendSettings and a user was working with a project with a mismatching uv_build/uv version. We should detangle them in a way that we generate the json schema for it, but not validate it when loading it.

[project]
name = "built-by-uv"
version = "0.1.0"
requires-python = ">=3.12"

[tool.uv.build-backend]
source-include = "data/build-script.py"

[build-system]
requires = ["uv_build>=10000,<10001"]
build-backend = "uv_build"
$ uv lock
error: Failed to parse: `pyproject.toml`
  Caused by: TOML parse error at line 7, column 18
  |
7 | source-include = "data/build-script.py"
  |                  ^^^^^^^^^^^^^^^^^^^^^^
invalid type: string "data/build-script.py", expected a sequence

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions