Skip to content

--upgrade --all recompiles constrained environments twice due to compilation order #104

@panakouris

Description

@panakouris

Problem

When using pip-compile-constraint = "default" in child environments, running hatch-pip-compile --upgrade --all causes constrained environments to be compiled twice:

First execution: Child environments (e.g., acceptance_tests) compile first (before default), then default compiles
Second execution of the same command: Child environments recompile because they now see that default lock file has changed

Expected Behavior

hatch-pip-compile --upgrade --all should automatically detect constraint dependencies and compile the default environment before any environments that constrain against it, completing all compilations in a single run.

Environment

hatch version: 1.15.1
hatch-pip-compile version: 1.11.6
Python version: 3.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions