mirror of
https://github.com/astral-sh/uv
synced 2026-01-21 21:40:11 -05:00
## Summary uv doesn't separate the metadata block from other blocks when adding the `script` block to a script, which results in the next block being considered part of the script block and causes errors when running. See #12499 for more details. Closes #12499 ## Test Plan I manually tested the most common scenario, but there's a few edge cases that would be good to have tests for. I would have written the tests also, but I was running into errors like this: ```bash $ cargo test --package uv-scripts Compiling uv-configuration v0.0.1 (/home/merlin/Projects/uv/crates/uv-configuration) error: cannot find attribute `value` in this scope --> crates/uv-configuration/src/project_build_backend.rs:8:38 | 8 | #[cfg_attr(feature = "schemars", value(hide = true))] | ^^^^^ error: could not compile `uv-configuration` (lib) due to 1 previous error ``` --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>