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

Parser is not resilient to mixed indentation #221

Open
schuylermartin45 opened this issue Oct 28, 2024 · 1 comment
Open

Parser is not resilient to mixed indentation #221

schuylermartin45 opened this issue Oct 28, 2024 · 1 comment
Labels
enhancement New feature or request source::maintainer to sort Needs additional investigation

Comments

@schuylermartin45
Copy link
Collaborator

schuylermartin45 commented Oct 28, 2024

The irony is not lost on me given we work in Python around here.

The CRM parser will crash if some sections use the wrong indentation. Note that the fields in the build section use 4 spaces (not 2) in the following example:

source:
  url: https://pypi.io/packages/source/o/olefile/olefile-{{ version }}.zip
  sha256: 133b031eaf8fd2c9399b78b8bc5b8fcbe4c31e85295749bb17a87cba8f3c3964

build:
    noarch: python
    number: 0
    script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv"

requirements:
  host:
    - python
    - pip

(from https://github.com/AnacondaRecipes/olefile-feedstock)

The parser assumes 2 spaces for indentation as the vast, vast, majority of recipe files conform to this "standard". This will likely not be easy to fix.

@schuylermartin45
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request source::maintainer to sort Needs additional investigation
Projects
Status: Backlog
Development

No branches or pull requests

1 participant