Rely on "run exports" to install zlib at runtime #18
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.
I recently had a colleague get confused about "run exports" after reading the documentation page on migrating to conda build v3. I think the explanation of how to handle the
zlib
requirement is confusing.Currently the text contains this explanation:
bioconda-docs/source/contributor/cb3.rst
Lines 203 to 209 in 6366416
The first thing I noticed is that
zlib
shouldn't be added tobuild
, since it doesn't have "strong run exports". Instead it should be added tohost
.Then in the example recipe,
zlib
is still added inrun
, which contradicts the paragraph about run exportsbioconda-docs/source/contributor/cb3.rst
Lines 246 to 251 in 6366416
I suspect that part of the confusion is that
zlib
is itself a complex example of "run exports", which I will explain below. For documentation purposes, it might be better to simply include a more straight-forward example, and then tacklezlib
since it is such a common requirement for bioconda recipes.Here is why I think
zlib
is a complex example to demonstrate the concept of "run exports"zlib
should not have appeared in therun
requirements in this example (https://github.com/conda-forge/zlib-feedstock/blob/b8a90e7d70a09d6672b559ac3bd027cc1f3019fa/recipe/meta.yaml#L17)libzlib
(https://github.com/conda-forge/zlib-feedstock/blob/649df646085a23f9f580418c1ca01249e151857b/recipe/meta.yaml#L77)libzlib
should be sufficient for software that properly links againstlibzlib
. However, some software out in the wild still requires the files provided byzlib
at runtime. Therefore, there are some cases where you would need to putzlib
in bothhost
andrun
. See this Issue for the details: Something broken with zlib vs. libzlib files (or run-export) conda-forge/zlib-feedstock#65Lastly, I'd note that there are many existing bioconda recipes that include
zlib
in therun
requirements (https://github.com/search?q=repo%3Abioconda%2Fbioconda-recipes+zlib+language%3AYAML&type=code&l=YAML). If it's a bioconda convention to includezlib
inrun
(perhaps to avoid the complexity I noted above), then I definitely think a different example should be chosen to demonstrate the concept of "run exports"