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

feat: allow installing multiple envs at once #1413

Merged
merged 14 commits into from
May 22, 2024

Conversation

tdejager
Copy link
Contributor

Allow installation of multiple envs at the same time. Eg:

pixi install -e default -e other

@Glatzel
Copy link

Glatzel commented May 19, 2024

Can you also add an option like pixi install --all to allow installing all environments at once?
It will be useful when initializing a project.

@tdejager
Copy link
Contributor Author

Can you also add an option like pixi install --all to allow installing all environments at once? It will be useful when initializing a project.

Yes for sure! Was thinking I'll wait till someone asks for it, which was pretty soon 😄

@tdejager tdejager requested a review from ruben-arts May 19, 2024 14:29
@tdejager
Copy link
Contributor Author

Can you also add an option like pixi install --all to allow installing all environments at once? It will be useful when initializing a project.

Ok, added this!

@tdejager
Copy link
Contributor Author

tdejager commented May 19, 2024

I've also added a message, what environments are installed, install is the only CLI command doing this currently. But when I was testing it out with multiple envs, it got a bit weird not having this. @ruben-arts @Glatzel wdyt?

Edit (eg):

> Installed environment: test!
✔ Project in /Users/tdejager/development/prefix/pixi/examples/flask-hello-world-pyproject is ready to use!

@Glatzel
Copy link

Glatzel commented May 19, 2024

I've also added a message, what environments are installed, install is the only CLI command doing this currently. But when I was testing it out with multiple envs, it got a bit weird not having this. @ruben-arts @Glatzel wdyt?

Edit (eg):

> Installed environment: test!
✔ Project in /Users/tdejager/development/prefix/pixi/examples/flask-hello-world-pyproject is ready to use!

Hi, tdejager.
I got a thread 'main' has overflowed its stack in win pc. Maybe envs should be installed in order instead of parallel?

@tdejager
Copy link
Contributor Author

I've also added a message, what environments are installed, install is the only CLI command doing this currently. But when I was testing it out with multiple envs, it got a bit weird not having this. @ruben-arts @Glatzel wdyt?
Edit (eg):

> Installed environment: test!
✔ Project in /Users/tdejager/development/prefix/pixi/examples/flask-hello-world-pyproject is ready to use!

Hi, tdejager. I got a thread 'main' has overflowed its stack in win pc. Maybe envs should be installed in order instead of parallel?

That's weird, they are installed concurrently not in parallel. Could you share your pixi.toml?

@tdejager
Copy link
Contributor Author

I've also added a message, what environments are installed, install is the only CLI command doing this currently. But when I was testing it out with multiple envs, it got a bit weird not having this. @ruben-arts @Glatzel wdyt?
Edit (eg):

> Installed environment: test!
✔ Project in /Users/tdejager/development/prefix/pixi/examples/flask-hello-world-pyproject is ready to use!

Hi, tdejager. I got a thread 'main' has overflowed its stack in win pc. Maybe envs should be installed in order instead of parallel?

That's weird, they are installed concurrently not in parallel. Could you share your pixi.toml?

And does it also happen if you specify one or two environment e.g: -e a -e b.

@Glatzel
Copy link

Glatzel commented May 19, 2024

Here is my pixi.toml.
Both pixi install --all and pixi install -e py311 raise thread 'main' has overflowed its stack. I also tried examples/flask-hello-world-pyproject, and got the same problem.
If move numpy to [dependencies], it works fine.

[project]
name = "Install-Multi-Envs"
platforms = ["win-64"]
channels = ["conda-forge"]

[dependencies]
python = ">=3.10"
[pypi-dependencies]
numpy = ">=1.23"
[feature.py311.dependencies]
python = "3.11.*"
[feature.py312.dependencies]
python = "3.12.*"

[environments]
py312 = ["py312"]
py311 = ["py311"]

@Glatzel
Copy link

Glatzel commented May 19, 2024

I've also added a message, what environments are installed, install is the only CLI command doing this currently. But when I was testing it out with multiple envs, it got a bit weird not having this. @ruben-arts @Glatzel wdyt?

Edit (eg):

> Installed environment: test!
✔ Project in /Users/tdejager/development/prefix/pixi/examples/flask-hello-world-pyproject is ready to use!

I think this installed environments message is a good hint for me. Besides, maybe we can have a cli command for getting this message, like pixi list --installed-environments. But I am worried that users will confuse this command with the existed pixi list --environment command.

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the changes, just a few points

src/cli/install.rs Outdated Show resolved Hide resolved
src/cli/install.rs Outdated Show resolved Hide resolved
src/cli/install.rs Outdated Show resolved Hide resolved
@tdejager
Copy link
Contributor Author

@Glatzel does this happen with 'main' as well? I can't really imagine these changes causing this..🤔

@Glatzel
Copy link

Glatzel commented May 19, 2024

@Glatzel does this happen with 'main' as well? I can't really imagine these changes causing this..🤔

Well, I tried the pixi install command and raised the thread 'main' has overflowed its stack problem, seems there are some bugs in the current main branch.

Also tested in version 0.22.0, did not find this problem.

@tdejager
Copy link
Contributor Author

@Glatzel does this happen with 'main' as well? I can't really imagine these changes causing this..🤔

Well, I tried the pixi install command and raised the thread 'main' has overflowed its stack problem, seems there are some bugs in the current main branch.

Also tested in version 0.22.0, did not find this problem.

Okay, so it will not block this PR but a serious bug nonetheless, could you make an issue? Thanks for helping with the initial debug!

@Glatzel
Copy link

Glatzel commented May 19, 2024

@Glatzel does this happen with 'main' as well? I can't really imagine these changes causing this..🤔

Well, I tried the pixi install command and raised the thread 'main' has overflowed its stack problem, seems there are some bugs in the current main branch.
Also tested in version 0.22.0, did not find this problem.

Okay, so it will not block this PR but a serious bug nonetheless, could you make an issue? Thanks for helping with the initial debug!

No problem. I have created this issue in #1414.

@ruben-arts
Copy link
Contributor

Cleaned up the output:

image

src/cli/install.rs Outdated Show resolved Hide resolved
src/cli/install.rs Outdated Show resolved Hide resolved
Co-authored-by: Olivier Lacroix <[email protected]>
@ruben-arts ruben-arts enabled auto-merge (squash) May 22, 2024 07:43
@ruben-arts ruben-arts merged commit 3a7c3ee into prefix-dev:main May 22, 2024
24 checks passed
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.

5 participants