Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 30, 2025

uv build fails with "No such file or directory" when building generated clients because the pyproject.toml references a CHANGELOG.md file that is never created.

Changes

  • UV template: Removed data = ["CHANGELOG.md"] from [tool.uv.build-backend] section
  • Poetry template: Removed "CHANGELOG.md" from include array
  • Test fixtures: Updated 6 snapshot and golden-record files to match new template output

Example

Generated clients now produce clean pyproject.toml files:

# UV
[tool.uv.build-backend]
module-name = "my_client"
module-root = ""

# Poetry
include = ["my_client/py.typed"]

Previously, these would include data = ["CHANGELOG.md"] and include = ["CHANGELOG.md", "my_client/py.typed"] respectively, causing build failures.

Original prompt

This section details on the original issue you should resolve

<issue_title>Unable to build generated client using uv</issue_title>
<issue_description>Describe the bug
uv build crashes:

Building source distribution (uv build backend)...
Building wheel from source distribution (uv build backend)...
  × Failed to build `/path/to/client`
  ├─▶ Failed to walk source tree: `/Users/emil/.cache/uv/sdists-v9/.tmphKI5f2/client-2.64.0/CHANGELOG.md`
  ├─▶ IO error for operation on /Users/emil/.cache/uv/sdists-v9/.tmphKI5f2/client-2.64.0/CHANGELOG.md: No such file or directory (os error 2)
  ╰─▶ No such file or directory (os error 2)

Probably related to this part in pyproject.toml:

[tool.uv.build-backend]
module-name = "arboair_microservice"
module-root = ""
data = [
    "CHANGELOG.md",
]

But there is no changelog.md generated.

OpenAPI Spec File
N/A

Desktop (please complete the following information):

  • OS: macOS 15.7.1
  • Python Version: 3.12
  • openapi-python-client version 0.27.0

Additional context
Add any other context about the problem here.

</issue_description>

Comments on the Issue (you are @copilot in this section)

@dbanty Weird, don't know why that's in there 😅. Looks like it's in the Poetry template too. We should remove it from both.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix crash when building generated client using uv Remove non-existent CHANGELOG.md references from UV and Poetry templates Oct 30, 2025
Copilot AI requested a review from dbanty October 30, 2025 16:00
Copilot finished work on behalf of dbanty October 30, 2025 16:00
@dbanty dbanty marked this pull request as ready for review October 30, 2025 17:09
@dbanty dbanty changed the title Remove non-existent CHANGELOG.md references from UV and Poetry templates fix: Remove non-existent CHANGELOG.md references from UV and Poetry templates Oct 30, 2025
@dbanty dbanty enabled auto-merge October 30, 2025 19:23
@dbanty dbanty merged commit a6a636c into main Oct 30, 2025
43 checks passed
@dbanty dbanty deleted the copilot/fix-uv-build-crash branch October 30, 2025 19:23
@knope-bot knope-bot bot mentioned this pull request Oct 30, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 3, 2025
> [!IMPORTANT]
> Merging this pull request will create this release

## Fixes

- Remove non-existent CHANGELOG.md references from UV and Poetry
templates (#1344)
- Initialize optional lists as UNSET, not [] (#1346)
- Correct docstring typos in client template (#1347)
- Replace bare except blocks with specific exception types (#1348)

### Update `uv_build` to 0.9

#1352 by @johnthagen

`uv` has been in the `0.9.x` release cycle for a while, so update
templates to use the corresponding `uv_build` range.

Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
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.

Unable to build generated client using uv

2 participants