uv sync --no-dev --no-install-workspace --locked doesn't work when only the root pyproject.toml and uv.lock are present. We should allow installing the entire workspace with --no-install-workspace --locked when only the top level uv.lock is present.
Reproducer failing:
FROM ubuntu AS builder
RUN mkdir /app
WORKDIR /app
ENV UV_PYTHON_INSTALL_DIR=/app/python
COPY --from=ghcr.io/astral-sh/uv /uv /bin/uv
# Install the dependencies
ADD pyproject.toml uv.lock /app/
RUN uv sync --no-dev --no-install-workspace --locked
# Install the project itself
ADD src /app/src
ADD packages /app/packages
RUN uv sync --no-dev --locked
Passing:
FROM ubuntu AS builder
RUN mkdir /app
WORKDIR /app
ENV UV_PYTHON_INSTALL_DIR=/app/python
COPY --from=ghcr.io/astral-sh/uv /uv /bin/uv
# Install the dependencies
ADD pyproject.toml uv.lock /app/
ADD packages/bird-feeder/pyproject.toml /app/packages/bird-feeder/pyproject.toml
ADD packages/seeds/pyproject.toml /app/packages/seeds/pyproject.toml
RUN uv sync --no-dev --no-install-workspace --locked
# Install the project itself
ADD src /app/src
ADD packages /app/packages
RUN uv sync --no-dev --locked
uv sync --no-dev --no-install-workspace --locked
doesn't work when only the rootpyproject.toml
anduv.lock
are present. We should allow installing the entire workspace with--no-install-workspace --locked
when only the top leveluv.lock
is present.Reproducer failing:
Passing: