mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.57k stars 343 forks source link

[micromamba] empty lines / comments fail in text spec file #3289

Open skwde opened 2 months ago

skwde commented 2 months ago

Troubleshooting docs

Anaconda default channels

How did you install Mamba?

Micromamba

Search tried in issue tracker

spec file

Latest version of Mamba

Tried in Conda?

Not applicable

Describe your issue

This is a followup to #2372 which supposedly added support for empty lines.

However I still get errors on empty lines / comments or both combined.

numpy

matplotlib

or

numpy
matplotlib

# 

both fail while

numpy
matplotlib

where I added a single to show the newline at the end, or

numpy
matplotlib
 #

work.

Note, I run

micromamba install --name test "python=${PYTHON_VERSION}" -f test.txt -v --dry-run

and before that I created an empty env

micromamba create --name test

mamba info / micromamba info

libmamba version : 1.5.8
     micromamba version : 1.5.8
           curl version : libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.58.0
     libarchive version : libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8
       envs directories : ~/.conda/envs
          package cache : ~/.conda/pkgs
            environment : None (not found)
           env location : -
      user config files : ~/.mambarc
 populated config files : ~/.condarc
       virtual packages : __unix=0=0
                          __osx=14.4.1=0
                          __archspec=1=x86_64-v3
               channels : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/nodefaults/osx-64
                          https://conda.anaconda.org/nodefaults/noarch
       base environment : ~/.conda
               platform : osx-64

Logs

########### first failing spec

info     libmamba Parsing MatchSpec python=3
info     libmamba Parsing MatchSpec numpy
info     libmamba Parsing MatchSpec
critical libmamba Invalid spec, no package name found:

########### second failing spec

info     libmamba Parsing MatchSpec python=3
info     libmamba Parsing MatchSpec numpy
info     libmamba Parsing MatchSpec matplotlib
info     libmamba Parsing MatchSpec
critical libmamba Invalid spec, no package name found:

environment.yml

No response

~/.condarc

---
channel_priority: strict

channels:
  - conda-forge
  - nodefaults

env_prompt: '({default_env}) '

auto_activate_base: false

pkgs_dirs:
  - "${HOME}/.conda/pkgs"

envs_dirs:
  - "${HOME}/.conda/envs"