Skip to content

Commit

Permalink
try to be more precise with parser hints (#2190)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
  • Loading branch information
minrk and beckermr authored Dec 17, 2024
1 parent 013102d commit b2075e6
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
21 changes: 17 additions & 4 deletions conda_smithy/linter/lints.py
Original file line number Diff line number Diff line change
Expand Up @@ -1102,9 +1102,22 @@ def lint_recipe_is_parsable(
)
for parser_name, pv in parse_results.items():
if pv is False:
if parser_name == "conda-souschef (grayskull)":
msg = (
"This parser is not currently used by conda-forge, but may be in the future. "
"We are collecting information to see which recipes are compatible with grayskull."
)
elif parser_name == "conda-recipe-manager":
msg = (
"The recipe can only be automatically migrated to the new v1 format "
"if it is parseable by conda-recipe-manager."
)
else:
msg = (
"Your recipe may not receive automatic updates and/or may not be compatible "
"with conda-forge's infrastructure. Please check the logs for "
"more information and ensure your recipe can be parsed."
)
hints.append(
f"The recipe is not parsable by parser `{parser_name}`. Your recipe "
"may not receive automatic updates and/or may not be compatible "
"with conda-forge's infrastructure. Please check the logs for "
"more information and ensure your recipe can be parsed."
f"The recipe is not parsable by parser `{parser_name}`. {msg}"
)
23 changes: 23 additions & 0 deletions news/2190-hints.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* Try to be more specific in hints when different parsers fail (#2190)

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>

0 comments on commit b2075e6

Please sign in to comment.