Skip to content

Commit

Permalink
Merge pull request #1815 from mbargull/fix-squished-zip_key-ordering
Browse files Browse the repository at this point in the history
Fix squished zip key ordering
  • Loading branch information
beckermr authored Jan 16, 2024
2 parents 30d4485 + 85482fd commit f1456a3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
10 changes: 10 additions & 0 deletions conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,16 @@ def _collapse_subpackage_variants(

for k, v in squished_used_variants.items():
if k in all_used_vars:
input_variant = squished_input_variants.get(k)
if input_variant and isinstance(input_variant, (tuple, list)):
# Ensure we retain the input order to avoid mismatched entries
# with the preserve_top_level_loops overrides below.
# NOTE: "pin_run_as_build" (dict of dict) order is not handled.
# "tuple" below only used for uniform list/tuple/str comparison.
v_set = set(map(tuple, v))
v = type(input_variant)(
v_i for v_i in input_variant if tuple(v_i) in v_set
)
used_key_values[k] = v

for k in preserve_top_level_loops:
Expand Down
23 changes: 23 additions & 0 deletions news/fix-squished-zip_key-ordering.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* Fix randomly mismatched zipped variant keys. (#1459 and #1782 via #1815)

**Security:**

* <news item>

0 comments on commit f1456a3

Please sign in to comment.