Skip to content

Option to generate run_exports.json file #102

@jaimergp

Description

@jaimergp

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

In this issue I am asking for a CLI flag / option to generate a run_exports.json file, next to repodata.json and friends, much like channeldata.json is handled.

Once available, this flag could be enabled on Anaconda.org (at least for some channels).

Why is this needed?

Building infrastructure (such as some conda-forge bots) use run_exports to calculate which packages need rebuilding as part of an upgrade. Right now, conda-forge needs to maintain their own JSON database, which involves downloading and extracting the new artifacts as available.

What should happen?

When invoked with the new flag (e.g. --run-exports), conda-index would also generate a
run_exports.json file, which would be placed next to repodata.json, containing the run_exports metadata from each artifact:

{
  "info": {
    "subdir": "osx-64"
  },
  "packages": {
    ...
    "assimp-5.2.5-h276577b_0.tar.bz2": {
      "run_exports": {
        "weak": ["assimp >=5.2.5,<5.2.6.0a0"],
        "strong": [],
      }
    },
    ...
  }
}

To be discussed: run_exports is not a very common field (most packages do not have it), so it might make sense to only generate entries for those artifacts whose run_exports are populated.

Additional Context

channeldata.json already offers some run_exports metadata. However, this is insufficient because for some reason it is flatted on a per-version basis, which doesn't cover build updates.

Having a separate file for run_exports would also allow conda-forge to patch it like it is done with repodata.json, saving the hassle (and CI resources) of rebuilding a package just to amend some metadata.

Note: adding this field to repodata.json is also an option, but conda clients do not really use this at install time. It would only be used by conda-build and the surrounding infrastructure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked[bot] locked due to inactivitytype::featurerequest for a new feature or capability

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions