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

Mamba doesn't handle new-style lockfiles #1884

Closed
maresb opened this issue Aug 27, 2022 · 4 comments
Closed

Mamba doesn't handle new-style lockfiles #1884

maresb opened this issue Aug 27, 2022 · 4 comments
Labels
type::feature-request New feature proposal

Comments

@maresb
Copy link
Contributor

maresb commented Aug 27, 2022

Micromamba does, but Mamba seems to simply pass the job onto Conda, which fails to parse.

The following works upon replacing mambamicromamba:

$ mamba install --yes --name base --file conda-lock.yml 
                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.25.0) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████

could not parse '- url: conda-forge' in: conda-lock.yml

CondaValueError: could not parse '- url: conda-forge' in: conda-lock.yml
@maresb
Copy link
Contributor Author

maresb commented Sep 7, 2022

@jvansanten, I haven't taken a look yet at how to solve this, but I'd hope it'd be easy to intercept this call when the extension is .y[a]ml and pass it along to libmamba? If so, that may be within my abilities, if I manage to find the time.

@jvansanten
Copy link
Contributor

This appears to be because mamba simply kicks down to the install machinery from conda

mamba/mamba/mamba/mamba.py

Lines 353 to 372 in 94c179d

if args.file:
file_specs = []
for fpath in args.file:
try:
file_specs += specs_from_url(fpath, json=context.json)
except UnicodeError:
raise CondaValueError(
"Error reading file, file should be a text file containing"
" packages \nconda create --help for details"
)
if "@EXPLICIT" in file_specs:
explicit(
file_specs,
prefix,
verbose=not (context.quiet or context.json),
index_args=index_args,
)
return
specs.extend(MatchSpec(s) for s in file_specs)
which has no idea what lock files are.

If

long_description="A (hopefully faster) reimplementation of the slow bits of conda.",
is to be taken at face value, I don't think mamba should gain features that mainline conda doesn't have. Maybe a maintainer can comment, though.

@maresb
Copy link
Contributor Author

maresb commented Sep 13, 2022

Ya, very good point. On the other hand, it's awkward that micromamba contains functionality which mamba lacks. I'm curious to know what the maintainers think.

@jonashaag
Copy link
Contributor

No new features for Mamba

@jonashaag jonashaag closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature-request New feature proposal
Projects
None yet
Development

No branches or pull requests

3 participants