Files
uv/crates/uv-trampoline/Cargo.toml
T
Denizhan Dakılır 7e7f1656ca fix: add Win32_Storage_FileSystem feature and improve handle closing logic (#17374)
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

fix https://github.com/astral-sh/uv/issues/17174 mentioned the invalid
issues here:

results of diagnostics:

before:
```
--- TRAMPOLINE DIAGNOSTICS: STARTUP ---
  STDIN: Handle=184
    -> Console Mode: 503
  STDOUT: Handle=536
    -> Console Mode: 7
  STDERR: Handle=540
    -> Console Mode: 7
-------------------------------------------
--- TRAMPOLINE DIAGNOSTICS: AFTER CLOSE_HANDLES ---
  STDIN: INVALID
  STDOUT: INVALID
  STDERR: Handle=540
    -> Console Mode: 7
```

after:
```
--- TRAMPOLINE DIAGNOSTICS: STARTUP ---
  STDIN: Handle=716
    -> Console Mode: 503
  STDOUT: Handle=580
    -> Console Mode: 7
  STDERR: Handle=604
    -> Console Mode: 7
-------------------------------------------
--- TRAMPOLINE DIAGNOSTICS: AFTER CLOSE_HANDLES ---
  STDIN: Handle=716
    -> Console Mode: 503
  STDOUT: Handle=580
    -> Console Mode: 7
  STDERR: Handle=604
    -> Console Mode: 7
```

the problem was we were closing the handlers whatever they were from
pipes (byte streams) or consoles, this will make sure we close only the
handlers from pipes by using `FILE_TYPE_PIPE`

## Test Plan

<!-- How was it tested? -->
completely manual by adding debug statements and running a simple script
to open the pdb.
2026-01-10 12:11:13 -06:00

60 lines
1.2 KiB
TOML

[package]
name = "uv-trampoline"
version = "0.1.0"
authors = ["Nathaniel J. Smith <njs@pobox.com>"]
license = "MIT OR Apache-2.0"
edition = "2024"
[lib]
doctest = false
# Need to optimize etc. or else build fails
[profile.dev]
lto = true
opt-level = 1
panic = "abort"
debug = true
[profile.test]
inherits = "dev"
codegen-units = 1
[profile.release]
# Enable Link Time Optimization.
lto = true
# Reduce number of codegen units to increase optimizations.
codegen-units = 1
# Optimize for size.
opt-level = "z"
# Abort on panic.
panic = "abort"
# Automatically strip symbols from the binary.
strip = true
debug = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
uv-static = { path = "../uv-static" }
windows = { version = "0.61.0", features = [
"std",
"Win32_Foundation",
"Win32_Security",
"Win32_System_Console",
"Win32_System_Environment",
"Win32_System_JobObjects",
"Win32_System_LibraryLoader",
"Win32_System_Threading",
"Win32_UI_WindowsAndMessaging",
"Win32_Storage_FileSystem",
] }
ufmt-write = "0.1.0"
ufmt = { version = "0.2.0", features = ["std"] }
dunce = { version = "1.0.5" }
[build-dependencies]
uv-static = { path = "../uv-static" }
embed-manifest = "1.4.0"