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

micromamba 2.0 gives '!__mamba_name!' at a CI on Windows #3475

Open
certik opened this issue Sep 26, 2024 · 4 comments
Open

micromamba 2.0 gives '!__mamba_name!' at a CI on Windows #3475

certik opened this issue Sep 26, 2024 · 4 comments
Assignees

Comments

@certik
Copy link

certik commented Sep 26, 2024

lfortran/lfortran#4919

I can reproduce it locally by installing micromamba and trying to activate it:

~$ cmd /c 'C:\Users\ondrejcertik\AppData\Roaming\mamba\Scripts\activate.bat'

C:\Users\ondrejcertik>set "__mamba_filename=micromamba.exe"

C:\Users\ondrejcertik>set "__mamba_filename=micromamba.exe"

C:\Users\ondrejcertik>!__mamba_name! activate
'!__mamba_name!' is not recognized as an internal or external command,
operable program or batch file.

For the above I was using:

~$ micromamba --version
2.0.0

This seems like a regression, since it wasn't doing it before at the CI. However, we have the micromamba setup pinned in GitHub actions:

https://github.com/lfortran/lfortran/blob/27c7a8284036d4d00bf3385c10cb0bb44809d515/.github/workflows/CI.yml#L30

So it should not be using micromamba 2.0, but 1.8. I don't understand the problem yet.

Either way, the above looks like a bug.

Update: so there are two bugs here. One bug is that micromamba was upgraded to 2.0 even though it is pinned at 1.8 at the CI (mamba-org/setup-micromamba#226):

https://github.com/lfortran/lfortran/actions/runs/11048843229/job/30693104865?pr=4912

image

And the second bug is that micromamba 2.0 gives the '!__mamba_name!' is not recognized error, that's this issue.

As a quick workaround, is there a way to pin micromamba to version 1.8?

Update: to pin micromamba, one can just use micromamba-version: '1.5.10-0', I was pinning it incorrectly. So there is just one bug, that micromamba 2.0 gives '!__mamba_name!' and a workaround is to downgrade to micromamba 1.5.10-0.

@certik certik changed the title micromamba gives '!__mamba_name!' at a CI on Windows micromamba 2.0 gives '!__mamba_name!' at a CI on Windows Sep 26, 2024
@JohanMabille
Copy link
Member

JohanMabille commented Sep 27, 2024

The versions of setup-micromamba and micromamba are orthogonal. setup-micromamba will always download the latest available release of micromamba except if you explicitly tell it to use a specific version of micromamba:

- uses: mamba-org/setup-micromamba@v1
  with:
    micromamba-version: '1.5.10-0'

The shell init command of micromamba 2 is indeed broken on Windows, we are currently investigating it.

@certik
Copy link
Author

certik commented Sep 27, 2024

@JohanMabille yes, I figured this version thing out after I posted and updated my comments above yesterday. Sorry about that.

@JohanMabille
Copy link
Member

JohanMabille commented Sep 27, 2024

No worries, I just wanted to be sure you had the workaround to fix your CI, I missed your edit. I should have answered faster, sorry for that.

@JohanMabille
Copy link
Member

This has been fixed in micromamba 2.0.2.

Regarding the CI, setup-microamba@v1 has been updated to NOT pull micromamba 2 if you don't specify any version, it will pull the latest 1.x of micromamba.

setup-micromamba@v2 pulls the latest micromamba (i.e. 2.0.2 as of today), this should make the migration easier.

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

No branches or pull requests

2 participants