Skip to content

Invalidate/disabling cache for package from local output channel #2619

Description

@chawyehsu

I encountered a subtle issue while using rattler-build: I have two recipes within a project, let's call them A and B, where B depends on A. The scenario unfolds in two steps:

  1. I build recipe A locally (resulting in the artifact output/linux-64/A-he0.conda) and then build recipe B. During the build, rattler-build correctly resolves the dependency on A-he0.conda from the local output channel and sets up the build environment. Everything works as expected.

  2. I make significant changes to recipe A and rebuild it (still producing A-he0.conda at the same path). When I rebuild recipe B, rattler-build should use the latest A-he0.conda artifact to create the build environment; instead, it uses the stale version cached in .cache/rattler. This is not the behavior I want.

Currently, I am forced to increment the build number every time I modify and rebuild recipe A just to invalidate the cache. This is tedious and results in a clutter of local artifacts stored in .cache/rattler that I do not want cached. I would like rattler-build to always check if locally built artifacts in the output channel have changed, invalidating the old cache if necessary, or even to allow disabling caching for local artifacts entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions