Fix v1 stdlib lint not firing for double-quoted compiler() calls - #2615
Merged
Conversation
mgorny
pushed a commit
to mgorny/conda-smithy
that referenced
this pull request
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
newsentry with any new deprecations added to theDeprecatedsection.python -m conda_smithy.schema)python -m conda_smithy.linter.messages)Fixes #2572
Problem
The
lint_stdlibcheck is supposed to flag a v1 recipe that uses a compiler (e.g.${{ compiler("c") }}) without also declaring the matching C stdlib (${{ stdlib("c") }}). It detects compiler usage via thepat_compiler_stubregex, which for v1 recipes was:r"^\${{ compiler\('(m2w64_)?(c|cxx|fortran|rust|go-cgo)"This only matches a single-quoted argument (
compiler('c')). Recipes that use double quotes (compiler("c")) - a perfectly valid and common style, e.g. openimageio-feedstock#138 - were never detected as using a compiler at all, so the stdlib check was silently skipped. This let a recipe merge without${{ stdlib("c") }}, which in turn caused openimageio-feedstock#150.The sibling
stdlib_regexa few lines below already handled both quote styles (['\"]) - the compiler-detection regex was just never updated to match.Fix
Update
pat_compiler_stubto accept either quote character:r"^\${{ compiler\(['\"](m2w64_)?(c|cxx|fortran|rust|go-cgo)"Testing
Parametrized
test_v1_stdlib_hintover both'and"quote styles. Confirmed the new double-quote cases fail against the old regex and pass with the fix; the full stdlib/compiler test suite (29 tests) passes.In addition to this the recipe from openimageio-feedstock#138 now fails with this PR (which is the expectation),