Skip to content

pixi task list should warn if user is running on platform not in platforms #3441

@lithomas1

Description

@lithomas1

Problem description

Hi,
I was just testing out pixi for the first time using the tooling in array-api-extra. Since I was on an Intel Mac(osx-64), which had been omitted from the array-api-extra project.platforms mistakenly, I wasn't able to run any of the tasks, and got confusing warning messages when I tried to do so.

e.g.

I would get

thomasli@x86_64-apple-darwin13 array-api-extra % pixi task list
No tasks found

and for running a task called coverage

thomasli@x86_64-apple-darwin13 array-api-extra % pixi run coverage
Traceback (most recent call last):
  File "/Users/thomasli/opt/miniconda3/envs/scikit-learn/bin/coverage", line 5, in <module>
    from coverage.cmdline import main
ModuleNotFoundError: No module named 'coverage'

(From my understanding, when pixi can't find a task it just tries to execute an executable under bin. I don't think this is the correct behavior though, as it made me go down the rabbit hole try to install dependencies myself - which I shouldn't be doing, instead of checking the pixi config.)

It makes sense that tasks shouldn't be runnable on an unsupported platform, however, I would expect a better error message.

e.g.

Found task <xxx> that is only supported on platforms [a,b,c]. You are on platform <yyy>

(Thanks for pixi btw, it seems to work great other than this snag)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions