Skip to content

Conversation

@nichmor
Copy link
Contributor

@nichmor nichmor commented Nov 6, 2025

fixes: #4831

how to test it:

you can use dockerfile

FROM ubuntu:22.04

# Install build dependencies but NOT git - this is intentional to reproduce the issue
RUN apt-get update && \
    apt-get install -y curl build-essential && \
    rm -rf /var/lib/apt/lists/*

# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:$PATH"

# Copy the pixi source code from repository root
# Note: Build this with: docker build -f examples/panic-panic/Dockerfile .
COPY . /pixi-source
WORKDIR /pixi-source

# Build pixi from source
RUN cargo build

# Add pixi to PATH
ENV PATH="/pixi-source/target/debug:$PATH"

WORKDIR /app

# Copy the test configuration
COPY examples/panic-panic/pixi.toml pixi.toml

# Try to install - this should fail with a clear error about git being missing
# We don't use RUN here so the container build doesn't fail
CMD ["sh", "-c", "pixi install 2>&1 || true"]

and this

[workspace]
channels = ["conda-forge"]
name = "test-git-error"
platforms = ["linux-64"]
version = "0.1.0"

[dependencies]
python = "3.9"

[pypi-dependencies]
# This requires git to clone - will fail if git is not installed
chumpy = { git = "https://github.com/mattloper/chumpy" }

.into_diagnostic()
.map_err(|e| SolveError::GeneralPanic {
message: format!("Failed to do lookahead resolution: {e}"),
message: format!("Failed to do lookahead resolution: {e:?}"),
Copy link
Contributor

Choose a reason for hiding this comment

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

This will format it as debug can we do a better job :)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we can do it without
and it looks pretty nice here:
image

@tdejager
Copy link
Contributor

tdejager commented Nov 6, 2025

@nichmor Now added a proper error wrapper:

image

@nichmor nichmor merged commit 09d6092 into prefix-dev:main Nov 6, 2025
38 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.

Unclear Error like: A Tokio 1.x context was found, but it is being shutdown

2 participants