Add warning to --link-mode=symlink documentation (#5387)

This commit is contained in:
Charlie Marsh 2024-07-23 18:35:56 -04:00 committed by GitHub
parent 3822a43560
commit 41b699e7ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 16 deletions

View file

@ -221,13 +221,18 @@ fn parse_scripts(
#[cfg_attr(feature = "clap", derive(clap::ValueEnum))] #[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub enum LinkMode { pub enum LinkMode {
/// Clone (i.e., copy-on-write) packages from the wheel into the site packages. /// Clone (i.e., copy-on-write) packages from the wheel into the `site-packages` directory.
Clone, Clone,
/// Copy packages from the wheel into the site packages. /// Copy packages from the wheel into the `site-packages` directory.
Copy, Copy,
/// Hard link packages from the wheel into the site packages. /// Hard link packages from the wheel into the `site-packages` directory.
Hardlink, Hardlink,
/// Symbolically link packages from the wheel into the site packages /// Symbolically link packages from the wheel into the `site-packages` directory.
///
/// WARNING: The use of symlinks is discouraged, as they create tight coupling between the
/// cache and the target environment. For example, clearing the cache (`uv cache clear`) will
/// break all installed packages by way of removing the underlying source files. Use symlinks
/// with caution.
Symlink, Symlink,
} }

View file

@ -285,10 +285,10 @@ Windows.
**Possible values**: **Possible values**:
- `"clone"`: Clone (i.e., copy-on-write) packages from the wheel into the site packages - `"clone"`: Clone (i.e., copy-on-write) packages from the wheel into the `site-packages` directory
- `"copy"`: Copy packages from the wheel into the site packages - `"copy"`: Copy packages from the wheel into the `site-packages` directory
- `"hardlink"`: Hard link packages from the wheel into the site packages - `"hardlink"`: Hard link packages from the wheel into the `site-packages` directory
- `"symlink"`: Symbolically link packages from the wheel into the site packages - `"symlink"`: Symbolically link packages from the wheel into the `site-packages` directory
**Example usage**: **Example usage**:
@ -1524,10 +1524,10 @@ Windows.
**Possible values**: **Possible values**:
- `"clone"`: Clone (i.e., copy-on-write) packages from the wheel into the site packages - `"clone"`: Clone (i.e., copy-on-write) packages from the wheel into the `site-packages` directory
- `"copy"`: Copy packages from the wheel into the site packages - `"copy"`: Copy packages from the wheel into the `site-packages` directory
- `"hardlink"`: Hard link packages from the wheel into the site packages - `"hardlink"`: Hard link packages from the wheel into the `site-packages` directory
- `"symlink"`: Symbolically link packages from the wheel into the site packages - `"symlink"`: Symbolically link packages from the wheel into the `site-packages` directory
**Example usage**: **Example usage**:

8
uv.schema.json generated
View file

@ -444,28 +444,28 @@
"LinkMode": { "LinkMode": {
"oneOf": [ "oneOf": [
{ {
"description": "Clone (i.e., copy-on-write) packages from the wheel into the site packages.", "description": "Clone (i.e., copy-on-write) packages from the wheel into the `site-packages` directory.",
"type": "string", "type": "string",
"enum": [ "enum": [
"clone" "clone"
] ]
}, },
{ {
"description": "Copy packages from the wheel into the site packages.", "description": "Copy packages from the wheel into the `site-packages` directory.",
"type": "string", "type": "string",
"enum": [ "enum": [
"copy" "copy"
] ]
}, },
{ {
"description": "Hard link packages from the wheel into the site packages.", "description": "Hard link packages from the wheel into the `site-packages` directory.",
"type": "string", "type": "string",
"enum": [ "enum": [
"hardlink" "hardlink"
] ]
}, },
{ {
"description": "Symbolically link packages from the wheel into the site packages", "description": "Symbolically link packages from the wheel into the `site-packages` directory.\n\nWARNING: The use of symlinks is discouraged, as they create tight coupling between the cache and the target environment. For example, clearing the cache (`uv cache clear`) will break all installed packages by way of removing the underlying source files. Use symlinks with caution.",
"type": "string", "type": "string",
"enum": [ "enum": [
"symlink" "symlink"