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

"-"/dash/hypen character not allowed in variant keys #2988

Closed
k-dominik opened this issue Jun 27, 2018 · 3 comments
Closed

"-"/dash/hypen character not allowed in variant keys #2988

k-dominik opened this issue Jun 27, 2018 · 3 comments
Labels
locked [bot] locked due to inactivity

Comments

@k-dominik
Copy link

Hello! First of all thank you very much for the awesome work you do here!

Actual Behavior

When building using build variants, including libstdcxx-ng in the pins, an exception is raised informing one, that no - characters are allowed in variant keys. So effectively, one cannot pin libstdcxx-ng.

The error:

  File "/opt/conda/lib/python3.6/site-packages/conda_build/cli/main_render.py", line 186, in main
    return execute(sys.argv[1:])
  File "/opt/conda/lib/python3.6/site-packages/conda_build/cli/main_render.py", line 152, in execute
    variants = get_package_variants(args.recipe, config)
  File "/opt/conda/lib/python3.6/site-packages/conda_build/variants.py", line 487, in get_package_variants
    raise ValueError("Error in config {}: {}".format(f, str(e)))
ValueError: Error in config pins.yaml: Variant configuration errors: 
['"-" is a disallowed character in variant keys.  Key was: libstdcxx-ng']

Expected Behavior

Package names with hyphens/dashes should not break the pinning behaviour.

Steps to Reproduce

If you really need an example for this one, I could draft it, but here, the piece of code that causes that issue is clear. The question is, whether this behaviour is intended, and whether there are tricks to get around it.

def validate_spec(spec):
errors = []
for key in spec:
if '-' in key:
errors.append('"-" is a disallowed character in variant keys. Key was: {}'.format(key))

Output of conda info

     active environment : base
    active env location : /opt/conda
            shell level : 1
       user config file : /home/conda/.condarc
 populated config files : /home/conda/.condarc
          conda version : 4.5.4
    conda-build version : 3.7.1
         python version : 3.6.4.final.0
       base environment : /opt/conda  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/linux-64
                          https://repo.anaconda.com/pkgs/pro/noarch
          package cache : /opt/conda/pkgs
                          /home/conda/.conda/pkgs
       envs directories : /opt/conda/envs
                          /home/conda/.conda/envs
               platform : linux-64
             user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.4 Linux/4.4.0-128-generic ubuntu/16.04 glibc/2.23
                UID:GID : 30014:30014
             netrc file : None
           offline mode : False
@nehaljwani
Copy link
Contributor

Closing as duplicate of #2885

@k-dominik
Copy link
Author

@nehaljwani thank you so much - and sorry, i did a fair ammount of searching to find similar issues, but didn't find the referenced one.

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Mar 14, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants