Skip to content

Conversation

konstin
Copy link
Member

@konstin konstin commented Sep 9, 2025

To help with cases such as #15655.

A question is when to show this warning. I've used sources as a proxy as URL dependencies with enabled sources are likely those controlled by the user, and they include workspace and git cloned path dependencies.

The first commit is a refactoring, the second commit the implementation.

Fixes #15740

@konstin konstin added error messages Messaging when something goes wrong build-backend labels Sep 9, 2025
@konstin konstin temporarily deployed to uv-test-registries September 9, 2025 12:26 — with GitHub Actions Inactive
"There are settings for the `uv_build` build backend defined in \
`tool.uv.build-backend`, but the project does not use the `uv_build` backend: {}",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One potential drawback is that we assume that all future versions will have build-system = "uv_build".

@konstin konstin force-pushed the konsti/warn-on-unused-build-backend-settings branch from fad531f to 0226753 Compare September 16, 2025 10:19
@konstin konstin temporarily deployed to uv-test-registries September 16, 2025 10:21 — with GitHub Actions Inactive
Copy link
Contributor

@zsol zsol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been wanting to make this refactor for a while now

nice

Comment on lines 1059 to 1061
warning: There are settings for the `uv_build` build backend defined in `tool.uv.build-backend`, but the project does not use the `uv_build` backend: [TEMP_DIR]/pyproject.toml
Building wheel from source distribution...
warning: There are settings for the `uv_build` build backend defined in `tool.uv.build-backend`, but the project does not use the `uv_build` backend: [CACHE_DIR]/sdists-v9/[TMP]/pyproject.toml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid warning multiple times here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to figure our something that works despite the different paths

----- stderr -----
Building source distribution...
warning: There are settings for the `uv_build` build backend defined in `tool.uv.build-backend`, but the project does not use the `uv_build` backend: [TEMP_DIR]/pyproject.toml
Copy link
Member

@zanieb zanieb Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to rephrase so it's clearer what we're referring to at the end, e.g., "but the uv_build backend is not used by the project at: PATH"

@konstin konstin temporarily deployed to uv-test-registries September 16, 2025 16:17 — with GitHub Actions Inactive
@konstin konstin temporarily deployed to uv-test-registries September 17, 2025 10:52 — with GitHub Actions Inactive
konstin and others added 5 commits October 9, 2025 15:35
To help with cases such as #15655.

A question is when to show this warning. I've used sources as a proxy as URL dependencies are likely those controlled by the user, and they include workspace and `git clone`d path dependencies.

Fixes #15740
@konstin konstin force-pushed the konsti/warn-on-unused-build-backend-settings branch from 44c9302 to a7d14f7 Compare October 9, 2025 13:39
@konstin konstin temporarily deployed to uv-test-registries October 9, 2025 13:42 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-backend error messages Messaging when something goes wrong

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn when tool.uv.build-backend is set but wrong [build-system] is configured

3 participants