Skip to content

chore: Better errors, more logging - #6491

Merged
hunger merged 3 commits into
prefix-dev:mainfrom
hunger:push-vtyyyvqmuqzz
Jul 9, 2026
Merged

chore: Better errors, more logging#6491
hunger merged 3 commits into
prefix-dev:mainfrom
hunger:push-vtyyyvqmuqzz

Conversation

@hunger

@hunger hunger commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

Improve error message and logging related to rich platform selection

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

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

@hunger
hunger requested a review from wolfv July 1, 2026 14:32
@Hofer-Julian Hofer-Julian changed the title chore: Better erros, more logging chore: Better errors, more logging Jul 1, 2026
@wolfv

wolfv commented Jul 2, 2026

Copy link
Copy Markdown
Member

I am wondering if we should not just print a better error message by default?

The current error message is:

Error:   × Cannot install environment 'isaaclab': no platform supported by it matches the current system

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 pixi workspace platform list but maybe a little bit trimmed down?

@hunger
hunger force-pushed the push-vtyyyvqmuqzz branch 6 times, most recently from 7c0f0fa to 14ca2e1 Compare July 8, 2026 14:41

hunger commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

This is what this looks like now:

image.png

hunger added 3 commits July 9, 2026 11:23
…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.
@hunger
hunger force-pushed the push-vtyyyvqmuqzz branch from 14ca2e1 to a5fed6b Compare July 9, 2026 09:23
@hunger
hunger merged commit 53ed648 into prefix-dev:main Jul 9, 2026
65 of 66 checks passed
@hunger
hunger deleted the push-vtyyyvqmuqzz branch July 9, 2026 12:28
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