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

False positive in lint_recipe_name when using jinja in package.name #2224

Open
1 task done
pavelzw opened this issue Jan 18, 2025 · 1 comment
Open
1 task done

False positive in lint_recipe_name when using jinja in package.name #2224

pavelzw opened this issue Jan 18, 2025 · 1 comment
Labels

Comments

@pavelzw
Copy link
Member

pavelzw commented Jan 18, 2025

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

In lint_recipe_name, you can get a false positive with the following recipe:

# recipe.yaml
context:
  version: '1.20.0'

# Note: This recipe is specifically designed to work well with the autotick bot.
# Also refer to https://github.com/conda-forge/rust-feedstock/blob/main/recipe/meta.yaml.
package:
  name: ${{ polars_variant }}
  version: ${{ version }}

# ...

You need to specify polars_variant in conda_build_config.yaml:

polars_variant:
  - polars  # [not ppc64le]
  - polars-lts-cpu
  - polars-u64-idx  # [not ppc64le]

this occurred in conda-forge/polars-feedstock#303

def lint_recipe_name(
recipe_content: RecipeWithContext,
lints: list[str],
) -> None:
name = get_recipe_name(recipe_content)
lint_msg = _lint_recipe_name(name)
if lint_msg:
lints.append(lint_msg)

Installed packages

-

Environment info

-
@pavelzw pavelzw added the bug label Jan 18, 2025
@pavelzw
Copy link
Member Author

pavelzw commented Jan 18, 2025

CC @wolfv

@pavelzw pavelzw changed the title False positive in lint_recipe_name False positive in lint_recipe_name when using jinja in name Jan 18, 2025
@pavelzw pavelzw changed the title False positive in lint_recipe_name when using jinja in name False positive in lint_recipe_name when using jinja in package.name Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant