Skip to content

Comments

Move static feature out of perf features#13265

Merged
zanieb merged 5 commits intomainfrom
konsti/split-perf-and-static-features
May 2, 2025
Merged

Move static feature out of perf features#13265
zanieb merged 5 commits intomainfrom
konsti/split-perf-and-static-features

Conversation

@konstin
Copy link
Member

@konstin konstin commented May 2, 2025

#5577 fixed a bug on macos due to dynamically linking lzma/xz through static linking. In #7686, this feature was moved to the performance category.

This PR moves the xz2/static back to the general default features, and, inspired by Homebrew/homebrew-core#222211, it structures and documents the feature flags cleaner.

We need to take care that this feature does not accidentally disable features we want.

#5577 fixed a bug on macos due to dynamically linking lzma/xz through static linking. In #7686, this feature was moved to the performance category.

This PR moves the `xz2/static` back to the general default features, and, inspired by Homebrew/homebrew-core#222211, it structures and documents the feature flags cleaner
@konstin konstin added the internal A refactor or improvement that is not user-facing label May 2, 2025
@konstin konstin requested a review from charliermarsh May 2, 2025 13:59
@charliermarsh
Copy link
Member

I feel like I'm misremembering how this all work. I thought this (and performance) was intentionally not enabled by default to speed up development?

We don't use xz in the benchmarks at all
@konstin konstin temporarily deployed to uv-test-publish May 2, 2025 14:14 — with GitHub Actions Inactive
@konstin
Copy link
Member Author

konstin commented May 2, 2025

I don't remember how exactly this came to be, but afaik we always used the allocator. This is fine from my POV, since we generally have builds with cached dependencies.

@charliermarsh
Copy link
Member

Why is this a feature at all?

@charliermarsh
Copy link
Member

On review, I guess this is correct given the state of the setup! We could probably just remove this feature, alternatively. Otherwise, we might want to add the static features for all the other compression types?

@konstin
Copy link
Member Author

konstin commented May 2, 2025

The static feature for lzma/xz is special: Without it, we have a non-manylinux dependency:

$ cargo build
$ ldd target/debug/uv
        linux-vdso.so.1 (0x00007fffcca65000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007265aa01c000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007265a5117000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007265a4e00000)
        /lib64/ld-linux-x86-64.so.2 (0x00007265aa06d000)
$ cargo build --no-default-features
$ ldd target/debug/uv
        linux-vdso.so.1 (0x00007ffc1e95d000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x000077fd6b5c8000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000077fd6b59a000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000077fd6b4b1000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000077fd66800000)
        /lib64/ld-linux-x86-64.so.2 (0x000077fd6b61d000)

We keep it as a feature so that redistributors (such as linux distros) can deactivate it.

@konstin konstin had a problem deploying to uv-test-publish May 2, 2025 15:28 — with GitHub Actions Failure
Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3 thank you for cleaning things up here!

@konstin konstin enabled auto-merge (squash) May 2, 2025 15:42
@zanieb zanieb disabled auto-merge May 2, 2025 15:45
@zanieb
Copy link
Member

zanieb commented May 2, 2025

Sorry, asking for that change on all those comments

@zanieb zanieb enabled auto-merge (squash) May 2, 2025 15:46
@zanieb zanieb temporarily deployed to uv-test-publish May 2, 2025 15:48 — with GitHub Actions Inactive
@zanieb zanieb merged commit 96cfca1 into main May 2, 2025
85 checks passed
@zanieb zanieb deleted the konsti/split-perf-and-static-features branch May 2, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants