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

don't remove m2w64_ prefix in stdlib piggyback #2551

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conda_forge_tick/migrators/cstdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ def _process_section(output_index, attrs, lines):
if line_compiler_c and line_compiler_m2c:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This wouldn't fire if a recipe only uses {{ compiler("m2w64_c") }} on windows and no other compilers elsewhere. If someone has a case of such a recipe, I can add it as a test and loosen the restriction here.

# we have both compiler("c") and compiler("m2w64_c"), likely with complementary
# selectors; add a second stdlib line after m2w64_c with respective selector
selector_m2c = " " * 8 + selector_m2c if selector_m2c else ""
to_insert = indent + '- {{ stdlib("c") }}' + selector_m2c + "\n"
selector_m2c = " " + selector_m2c if selector_m2c else ""
to_insert = indent + '- {{ stdlib("m2w64_c") }}' + selector_m2c + "\n"
line_insert = line_compiler_m2c + 1 + (line_compiler_c < line_compiler_m2c)
lines = lines[:line_insert] + [to_insert] + lines[line_insert:]

Expand Down
2 changes: 1 addition & 1 deletion tests/test_yaml/stdlib_go_after_meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ outputs:
- {{ compiler('fortran') }} # [unix and cgo]

- {{ compiler('m2w64_c') }} # [win and cgo]
- {{ stdlib("c") }} # [win and cgo]
- {{ stdlib("m2w64_c") }} # [win and cgo]
- {{ compiler('m2w64_cxx') }} # [win and cgo]
- {{ compiler('m2w64_fortran') }} # [win and cgo]
run:
Expand Down