conda-forge / conda-smithy

The tool for managing conda-forge feedstocks.
https://conda-forge.org/
BSD 3-Clause "New" or "Revised" License
152 stars 183 forks source link

Add additional information to linter for noarch packages can't have skips with selectors #2149

Open matthewfeickert opened 6 days ago

matthewfeickert commented 6 days ago

In https://github.com/conda-forge/staged-recipes/pull/28268#discussion_r1850146875 @ocefpaf gave a very useful short summary of the conditions for a noarch: python build to be allowed to fail on Windows in conda-forge/staged-recipes when I forgot the workflow (which is don't leave in a skip: true # [win] but remove any skip and let it fail on Windows with an explanation, given that noarch: python build on feedstock are just Linux x86 jobs).

Copying the summary from the post:

Noarch don't need to be built for all archs, we save resources that way. If this is a noarch that really needs to skip Windows we need to know:

  1. If the reason for the skip is a missing dependency, then remove this, let it fail, and the package won't be installable on Windows until that dependency is available.
  2. If the reason is b/c the package will get built but won't work on Windows, then you need to do a OS-noarch. Check our docs on how to do that.
  3. If the reason is some other failure, then you may be creating a broken package by using noarch and we need to fix that failure first.

I think this would be very useful to add to the linter output beyond the existing

https://github.com/conda-forge/conda-smithy/blob/2b18d8dd41de178e30506e420022b2a5590a4acf/conda_smithy/linter/lints.py#L358-L360

noarch packages can't have skips with selectors. If the selectors are necessary, please remove noarch: python.

as I think without this information most people assume that the linter is telling them they can't have a noarch package because they assume that they can't have any failures, which results in extra builds that aren't needed.