Skip to content

Conversation

schuylermartin45
Copy link
Collaborator

This is the first set of changes that allows the The Recipe* classes (with the exception of RecipeParserConvert) to make variable substitutions with values found in a CbcParser instance (from a conda_build_config.yaml file).

This at least partially address #399 although I think there are a number of features we need to add to the CbcParser class to say that we have a full integration.

I'm leaving this in draft until I finish the initial set of tests.

@schuylermartin45
Copy link
Collaborator Author

I just had a sporadic failure on the pre-commit check that I did not experience locally and went away with a "re-run" of the action. We'll have to keep an eye on it, it looks like we're starting to pull-in Python 3.13.

@schuylermartin45 schuylermartin45 marked this pull request as ready for review July 24, 2025 20:45
@schuylermartin45 schuylermartin45 requested a review from a team as a code owner July 24, 2025 20:45
@schuylermartin45
Copy link
Collaborator Author

I think I have all the testing I want. This should cover the vast majority of cases with the changes. #401 tracks the TODOs left in by this PR.

for entry in cbc_entries:
selector = entry.get_selector()
if selector is None or selector.does_selector_apply(query):
# TODO: What to do if multiple selectors apply???
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please clarify this question with an example ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the CBC file has errors in it? As an example:

You want to use a value for a package against platform LINUX_64 but the CBC file has a value of 1.2.3 for [unix] and a value of 1.4.2 for [linux]. There's an overlap in the set that makes it unclear which value should be applied. Currently, the first value read (from top-to-bottom) will be applied.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible for a variable to intentionally be given multiple values (example) to generate multiple build variants for a single platform.

The current solution seems to assume a single recipe variant for a given platform/CBC file combination. Instead, I think we need a way to generate multiple variants for a given (platform, CBC file): one variant per possible combination of variable values (except for zip_keys).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been purposefully kicking the can on zip_keys. I haven't had time to think about it and didn't want this PR to get too big. You'll see a ton of TODOs around this in the code.

The other reason I've been delaying that work is I think it only ever applies to numpy. Or at least that's the only key I've ever seen zipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants