Skip to content

test: replace viser-based setuptools override repro with minimal fixture#5954

Merged
baszalmstra merged 1 commit intoprefix-dev:mainfrom
baszalmstra:bz/minimal-setuptools-override-test
Apr 24, 2026
Merged

test: replace viser-based setuptools override repro with minimal fixture#5954
baszalmstra merged 1 commit intoprefix-dev:mainfrom
baszalmstra:bz/minimal-setuptools-override-test

Conversation

@baszalmstra
Copy link
Copy Markdown
Contributor

@baszalmstra baszalmstra commented Apr 24, 2026

Description

test_setuptools_override_failure has been using viser==0.2.7 as its reproducer since #1969, purely because that package's 52-distribution transitive graph happened to trigger the bug from #1686 (the resolver's in-memory index leaking into build-dispatch). That graph is expensive: ~42-50 s wall on Windows, and pulls cmake, ninja, xatlas, and assorted unrelated dependencies solely as side effects.

This PR replaces the fixture with a trivial local path-based pypi package that uses setuptools.build_meta as its build backend. No production code changes. The test keeps the same name and still fails if the #1969 fix is reverted.

Why the replacement still reproduces #1686:

  • setuptools is listed as a conda dependency, so the resolver emits its "assumed to be installed by conda" override for it (log confirms: the following python packages are assumed to be installed by conda: wheel ..., pip ..., packaging ..., setuptools ...).
  • The local package's PEP 517 build triggers build-dispatch, which must install setuptools>=60 from PyPI.
  • Before fix: use two in memory indexes, for resolve and builds #1969, build-dispatch shared the resolver's in-memory index and would have seen the conda override instead of a real PyPI wheel. Current code forks shared_state so build-dispatch has its own index and succeeds.

Measured on Windows, warm cache, PIXI_CACHE_DIR=<fresh tmpdir> (same isolation pattern as before):

Fixture Wall time
viser (before) 42-50 s
minimal (after) ~17 s

How Has This Been Tested?

Ran the replaced test locally on Windows with the slow_integration_tests + online_tests features, on a fresh PIXI_CACHE_DIR tempdir:

cargo nextest run -p pixi --test integration_rust \
  --features slow_integration_tests,online_tests \
  -E 'test(install_tests::test_setuptools_override_failure)'

Passes in ~17 s. Logs confirm the setuptools override is emitted by the resolver and that the PEP 517 build runs through build_dispatch without failure.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude Code (Opus 4.7)

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added sufficient tests to cover my changes.

@baszalmstra baszalmstra force-pushed the bz/minimal-setuptools-override-test branch from fb299f2 to 866bb49 Compare April 24, 2026 10:09
@baszalmstra baszalmstra changed the title test: minimal reproducer for #1686 setuptools override test: replace viser-based setuptools override repro with minimal fixture Apr 24, 2026
Comment thread crates/pixi/tests/integration_rust/install_tests.rs Outdated
Comment thread crates/pixi/tests/integration_rust/install_tests.rs Outdated
The original test_setuptools_override_failure used viser==0.2.7 purely
because its 52-distribution transitive graph happened to reproduce the
bug from prefix-dev#1686 (resolver's in-memory index leaking into build-dispatch,
fixed in prefix-dev#1969). That graph is expensive: ~42-50 s wall on Windows,
and pulls cmake, ninja, xatlas, and unrelated baggage solely as side
effects.

This replaces it with a trivial local path-based pypi package using
setuptools.build_meta. The same code path is exercised: setuptools
is listed as a conda dep, so the resolver emits its 'assumed to be
installed by conda' override for it; the local package's PEP 517 build
then triggers build-dispatch, which must install setuptools>=60 from
PyPI independently. Before prefix-dev#1969 build-dispatch shared the resolver's
in-memory index and this build would fail.

Test wall time drops from ~42-50 s to ~17 s on Windows with a warm
user cache.
@baszalmstra baszalmstra force-pushed the bz/minimal-setuptools-override-test branch from 866bb49 to feb42b9 Compare April 24, 2026 13:06
@baszalmstra baszalmstra enabled auto-merge (squash) April 24, 2026 13:12
@baszalmstra baszalmstra merged commit 52f4a3b into prefix-dev:main Apr 24, 2026
37 checks passed
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.

2 participants