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

[Magic CLI] pixi.toml over-priortized, even when mojoproject added #219

Open
DWSimmons opened this issue Sep 5, 2024 · 3 comments
Open
Labels
magic-cli Anything related to the Magic CLI

Comments

@DWSimmons
Copy link

If a project is created without the --mojoproject or --format mojoproject, a pixi.toml will be created. [Good, as expected]
If a project then has a mojoproject then added, the project will say that it has added MAX, but then it will not show up on project list or be usable with magic run mojo or magic run max. [Not good.]

darin@home:/media/darin/M2/magic$ magic init pixi_domination
✔ Created /media/darin/M2/magic/pixi_domination/pixi.toml
darin@home:/media/darin/M2/magic$ magic init pixi_domination --format mojoproject
✔ Created /media/darin/M2/magic/pixi_domination/mojoproject.toml
✔ Added max >=24.4.0,<25
darin@home:/media/darin/M2/magic$ cd pixi_domination/
darin@home:/media/darin/M2/magic/pixi_domination$ magic shell
 . "/tmp/pixi_env_byh.sh"
darin@home:/media/darin/M2/magic/pixi_domination$  . "/tmp/pixi_env_byh.sh"
(pixi_domination) darin@home:/media/darin/M2/magic/pixi_domination$ magic run mojo --version
mojo: command not found
(pixi_domination) darin@home:/media/darin/M2/magic/pixi_domination$ magic run max --version
max: command not found
(pixi_domination) darin@home:/media/darin/M2/magic/pixi_domination$ magic list
✘ No packages found.
(pixi_domination) darin@home:/media/darin/M2/magic/pixi_domination$ magic --version
magic 0.2.3
@ehsanmok
Copy link
Member

ehsanmok commented Sep 6, 2024

There should be only one manifest and an error if a user is creating more.

@comods
Copy link

comods commented Sep 6, 2024

In the last magic version (I have not tested on the just released version), I was having issues where magic was the one creating more pixi.toml files even though there was already a mojoproject.toml file. I recommend magic init be a no-op if run twice in a row, that it should detect any existing toml project file, and reuse (auto detect --format) or ask to convert if --format doesn't match. (--environment was not supported with --mojoproject in the last magic version.)

@goldiegadde goldiegadde added the magic-cli Anything related to the Magic CLI label Sep 9, 2024 — with Linear
@DWSimmons
Copy link
Author

Verified in 0.4.0.

darin@home:~$ magic init pixi_domination
✔ Created /home/darin/pixi_domination/pixi.toml
darin@home:~$ magic init pixi_domination --format mojoproject
✔ Created /home/darin/pixi_domination/mojoproject.toml
✔ Added max >=24.5.0,<25
darin@home:~$ cd pixi_domination/
darin@home:~/pixi_domination$ ls
magic.lock  mojoproject.toml  pixi.toml
darin@home:~/pixi_domination$ magic shell
 . "/tmp/pixi_env_TWL.sh"
darin@home:~/pixi_domination$  . "/tmp/pixi_env_TWL.sh"
(pixi_domination) darin@home:~/pixi_domination$ magic --version
magic 0.4.0 - (based on pixi 0.33.0)
(pixi_domination) darin@home:~/pixi_domination$ magic run mojo
mojo: command not found
(pixi_domination) darin@home:~/pixi_domination$ magic list
✘ No packages found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
magic-cli Anything related to the Magic CLI
Projects
None yet
Development

No branches or pull requests

4 participants