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

Install does not error #1709

Open
2 tasks done
abkfenris opened this issue Jul 31, 2024 · 3 comments
Open
2 tasks done

Install does not error #1709

abkfenris opened this issue Jul 31, 2024 · 3 comments
Labels
🐞 bug Something isn't working needs-design Needs a design so it can be implemented

Comments

@abkfenris
Copy link
Contributor

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

pixi init
pixi project platform remove (your platform)
pixi add python
pixi install

Issue description

When pixi install is called, but the current platform isn't included in the platforms list, it emits a warning, but it doesn't exit non-0, so it can be hard to catch with automated system (such as Docker builds).

Expected behavior

I would expect pixi install and similar commands that are run against a platform that is not configured to error out.

@abkfenris abkfenris added the 🐞 bug Something isn't working label Jul 31, 2024
@ruben-arts
Copy link
Contributor

This was done by design because users want to update the lock file through this for platforms they're not running on.

That said I see the issue you experience. I could see a few options:

  • Make it error in CI by default for these automated experiences, with the ability to some how enable the default behavior again.
  • An extra sub command for just solving. e.g. pixi solve or pixi lock ... . Then removing this behavior from pixi install.
  • Make pixi install interactive with the dialog if you meant to just solve as there is no platform available for the current machine. Which automatically fails in non interactive shells.
  • Any other idea?

@abkfenris
Copy link
Contributor Author

abkfenris commented Aug 1, 2024

That makes sense.

I think an interactive dialog could be the best experience, especially if one of the prompts could be 'add this platform and solve/install'.

pixi install
 WARN Not installing dependency on current platform: (osx-arm64) as it is not part of this project's supported platforms.
-  Solve only for existing platforms [list of platforms]
-> Add this platform and install
-  Exit with error

The wording could use some work, but that's what I've got before running out the door and heading out of service for a week or so.

I think erroring only in CI is more surprising, and leads down the path of 'what is CI', and makes things harder to debug.

I've also seen other conversations (at least #1131 ) that makes me think a pixi solve/lock command would be also appreciated, and maybe useful for workflows where they are locking on CI for other platforms.

@ruben-arts
Copy link
Contributor

The "Do you want me to add the platform" dialog is something that was also on my mind. So this could possibly solve multiple issues.

@ruben-arts ruben-arts added the needs-design Needs a design so it can be implemented label Aug 5, 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 needs-design Needs a design so it can be implemented
Projects
None yet
Development

No branches or pull requests

2 participants