fix(task): correct task list runnability and show every task - #6367
Conversation
|
@ruben-arts: I would appreciate feedback on the output itself. This is what the output looks like now, so you do not have to built it for a first impression: The It will always list all task, but classify whether those can be run. no dependency run in an empty environment. Those are host only, so they should work on any host in theory. Note: You can always |
|
The tests fail as I introduced a small behavior change: If there are no dependencies, I always assume a test can run, as it is by necessity entirely based on host binaries. This breaks the tests introduced to validate that we fail fast on an unsupported platform. I am unsure whether I should change the test to depend on some small binary, thus getting marked as unsupported or remove the "no dependency" special case I introduced here. I added it since I found it confusing to have a lot of tasks going "unsupported", just because I forgot to add a dependency. If we leave the "no dependency" case, then we should probably not fail trying to install an empty environment as unsupported though. That feels like going a bit for for this change... we would need to reach consensus first on what should actually happen in this corner-case. |
5ebfdb4 to
43f609c
Compare
|
The no-dependency case is now assumed to always work: It is by definition using the host-provided binaries and we assume those will run on the host. |
|
We had quiete a few stability fixes, so this change is stable now. |
|
The status column is gone now as requested, too :-) |
Hofer-Julian
left a comment
There was a problem hiding this comment.
From my side this is ready to go as soon as the merge conflicts are fixed.
Maybe you also quickly test it locally to be sure @hunger :)
Show every task in `pixi task list` and dim the ones whose environment cannot run on the current machine. Fixes the runnability check so tasks are no longer wrongly omitted.
Three fixes on top of the `task list` runnability work: - `print_tasks` aligned a plain table and then coloured whole lines by zipping rows against the table's lines. A description containing a newline produced two lines for one row, so every task sorted after it fell off the end of the zip and vanished. Collapse descriptions to a single line. - Count `[dev]` dependencies when deciding whether an environment has dependencies: their transitive packages land in the prefix, so a dev-only environment must not classify as `NoDependencies` and skip its prefix build. - The "platform not supported, run `pixi workspace platform add`" hint fired whenever no declared platform matched, including for dependency-less environments that run here perfectly well. Gate it on the environment actually classifying as unsupported.
69c1855 to
1e8c65e
Compare
|
Merge conflicts are fixed now, I tested it locally and will squash this once CI is green. Thanks @Hofer-Julian for the review. |
pixi task listderived an environment's runnability from theconda-meta/pixiinstall marker, which records the platform a previous install resolved for and goes stale when the manifest changes -- so tasks were reported runnable "by design" for an environment the current manifest can no longer install. It also dropped environments it deemed unsupported and had no way to represent an environment with no dependencies at all.Classification now ignores the install marker and works from the manifest and lock file:
task listnow prints every task in one table with a Status column, dimming tasks whose environment cannot run here instead of hiding them.Fixes: #1347
How Has This Been Tested?
By experimenting with a test project (and a new test)
AI Disclosure
Tools: Claude
Checklist:
schema/model.py.