chore: Better errors, more logging - #6491
Merged
Merged
Conversation
Member
|
I am wondering if we should not just print a better error message by default? The current error message is: If we would list all the available platforms for the particular OS (and why they don't match) that might be quite helpful? - similar to the output of |
hunger
force-pushed
the
push-vtyyyvqmuqzz
branch
6 times, most recently
from
July 8, 2026 14:41
7c0f0fa to
14ca2e1
Compare
Contributor
Author
…g interpreter error When an environment's only declared platform requires a virtual package the host does not provide (e.g. a `__cuda`-requiring platform on a host without CUDA), pypi resolution failed with `there is no compatible Python interpreter for 'linux-64'` -- naming the bare host subdir picked as a fallback rather than the real cause: no declared platform is runnable here. `make_unsupported_pypi_platform_error` now returns the `UnsupportedPlatformError` in that case, which names the unsatisfied requirements and suggests the matching `CONDA_OVERRIDE_*` mocks. Its help is carried across the build-dispatch panic path in a separate field so miette renders it as its own help section.
Add a debug log recording, per environment, the host subdir and detected virtual packages, the platforms the environment declares, the host-runnable candidates, and the final selection (or why none matched). This surfaces why a rich platform is or isn't chosen without having to reconstruct it from the manifest.
When an environment supports no platform on the current machine, list every platform it declares together with the reason it does not run: an unrunnable subdir or the virtual packages the host fails to provide, similar to a trimmed-down `pixi workspace platform list`. The breakdown comes from the new `Workspace::platform_match_diagnostics`, which is now also the single source of truth for `unsatisfied_platform_requirements`. The lock-file-based verification reuses the same diagnosis and swaps in the resolution-derived unmet requirements.
wolfv
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improve error message and logging related to rich platform selection
AI Disclosure
Tools: Claude
Checklist:
schema/model.py.