Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting from pixi-0.21.0 pixi task list will fail if system-requirements do not comply, but without saying so #1347

Open
2 tasks done
anjos opened this issue May 7, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@anjos
Copy link

anjos commented May 7, 2024

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

In an empty directory, create pixi.toml with the following contents:

[project]
name = "test"
channels = ["conda-forge"]
platforms = ["linux-64"]

[system-requirements]
linux = "7.0.0"

[tasks]
task1 = "echo task1"
task2 = "echo task2"

Start a container for the target platform (N.B.: I'm on a macOS with Apple Silicon machine), such that pixi info reports a value smaller than the system-requirements set above:

$ docker run --platform linux/amd64 -v $PWD:/work --rm -ti ghcr.io/prefix-dev/pixi:0.21.0 /bin/bash
$ cd work
$ pixi task list
No tasks found

(N.B.: Same holds for 0.21.1).

If you lower the system-requirements, then the task list works again.

If you execute the same on 0.20.1, you get, however:

$ docker run --platform linux/amd64 -v $PWD:/work --rm -ti ghcr.io/prefix-dev/pixi:0.20.1 /bin/bash
$ cd work
$ pixi task list
* task1
* task2

Issue description

N/A

Expected behavior

I'm not sure what to expect, however, it would be great to get a message that is more consistent with the actual problem than No tasks found.

@anjos anjos added the bug Something isn't working label May 7, 2024
@ruben-arts
Copy link
Contributor

He @anjos, this is indeed the expected behavior based on the change we did in v0.21.0. the task list only list the tasks that can run on the current machine. That said I think you are correct that we should improve the message!

@ruben-arts ruben-arts added the good first issue Good for newcomers label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants