Skip to content

fix: input globs normalisation and force reinstall#4931

Merged
nichmor merged 17 commits intoprefix-dev:mainfrom
nichmor:fix/pixi-global-install-path
Nov 28, 2025
Merged

fix: input globs normalisation and force reinstall#4931
nichmor merged 17 commits intoprefix-dev:mainfrom
nichmor:fix/pixi-global-install-path

Conversation

@nichmor
Copy link
Contributor

@nichmor nichmor commented Nov 17, 2025

Description

This PR contains two fixes inside (and one improvement)

  • glob path normalization. pixi-gui ( or any rattler-build) backend will report back paths recipe/.. which would be ignored. Instead, they should be normalized as "" ( current dir ) for which we will use ** glob.
  • --force-reinstall now indeed triggers entire source rebuild.
  • Instead of explicitly using a temporary directory in pixi build ( which will bypass using cache ), we now cache the result of a build. This was discovered when testing the global install

Fixes #4844

How Has This Been Tested?

  • tested on pixi-gui repository.
  • also with unit /integration tests

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.

// If a simple rename fails (e.g., across filesystems), fall back to copy+remove.
if let Err(_e) = fs_err::rename(&package_path, &dest_path) {
fs_err::copy(&package_path, &dest_path).into_diagnostic()?;
fs_err::remove_file(&package_path).into_diagnostic()?;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need to remove cached artefact

@nichmor nichmor marked this pull request as ready for review November 17, 2025 10:30
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

I didn't test it yet but, could you take a look at the tests? The error seems related.



@pytest.mark.slow
def test_install_source_package_with_force_reinstall(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you reduce the impact of this test on our CI time, this is taking 16s where only one test is slower than that.

Some ideas would be a really basic python package

Copy link
Contributor Author

Choose a reason for hiding this comment

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

only by moving this test to the pixi-integration-tests repo

@lucascolley lucascolley added the bug Something isn't working label Nov 19, 2025
const BACKEND_NAME: &str = "passthrough";

/// Events that can be emitted by the observable backend during method calls.
#[derive(Debug, Clone, PartialEq, Eq)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]

@nichmor nichmor merged commit 497a9fe into prefix-dev:main Nov 28, 2025
39 checks passed
flferretti pushed a commit to flferretti/pixi that referenced this pull request Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(global): install --path uses cached package even though source changed

4 participants