Skip to content

Conversation

@KTibow
Copy link

@KTibow KTibow commented Oct 25, 2025

Summary

old hint wording is like

hint: This error likely indicates that `[email protected]` depends on `pybind11`, but doesn't declare it as a build
dependency. If `pufferlib` is a first-party package, consider adding `pybind11` to its `build-system.requires`.
Otherwise, either add it to your `pyproject.toml` under:

[tool.uv.extra-build-dependencies]
pufferlib = ["pybind11"]

or `uv pip install pybind11` into the environment and re-run with `--no-build-isolation`.

which, in the case where it's a first-party package, is a little vague and deemphasized.

this pr uses wording that treats both cases as equals:

hint: This error likely indicates that `[email protected]` depends on `pybind11`, but doesn't declare it as a build
dependency. You likely should tweak your `pyproject.toml`:
# if pufferlib is first-party
[build-system]
requires = ["pybind11"]
# otherwise
[tool.uv.extra-build-dependencies]
pufferlib = ["pybind11"]

or `uv pip install pybind11` into the environment and re-run with `--no-build-isolation`.

@KTibow KTibow marked this pull request as draft October 25, 2025 01:32
@KTibow KTibow marked this pull request as ready for review October 25, 2025 02:24
@zanieb
Copy link
Member

zanieb commented Oct 28, 2025

I think we need to consider how we want to do multiline code formatting in hints like this. I believe that's why we have different instructions for the first-party case (it's also less common, and I think it's probably fair to de-emphasize?)

@KTibow
Copy link
Author

KTibow commented Oct 28, 2025

If this change doesn't make sense, an alternative is to automatically detect whether the package seems first-party (not necessarily with rigor). Then this deemphasis would be very logical.

@zanieb
Copy link
Member

zanieb commented Oct 29, 2025

First-party in this case could just be that you own the package. There's no way easy to detect that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants