Skip to content

Editable installs inside the deployment directory are rejected as outside it #926

Closed

Description

@tdstein

With --force-generate, a project that has its own package installed editable in its environment can't be deployed. rsconnect rejects the editable line, and the error says the package is outside the deployment directory even though it is the deployment directory.

This is the default layout for a uv packaged project: uv sync installs the project itself as an editable package, so uv pip freeze emits -e file:///path/to/project.

Repro

uv init --package myproj && cd myproj
uv add flask
uv add --dev "rsconnect-python @ git+https://github.com/posit-dev/rsconnect-python@main"
printf 'from flask import Flask\napp = Flask(__name__)\n' > app.py
uv run rsconnect write-manifest api . --force-generate -x .venv

On main, rsconnect freezes the environment it runs in, so the repro installs it into the project. With #920, a globally installed rsconnect (e.g. uv tool install) selects the project .venv and fails the same way.

Error: Error creating environment: Editable dependencies outside the deployment directory cannot be installed on Connect:
-e /path/to/myproj
Provide a requirements file that installs them from a package index, a VCS URL, or a relative path inside the deployment directory.

The same happens with an editable package in a subdirectory of the deployment directory (pip install -e ./localpkg). pip freeze and uv pip freeze write editables as absolute paths, and is_unbundleable_editable (rsconnect/subprocesses/inspect_environment.py) treats every absolute path as unbundleable without checking whether it falls inside the deployment directory.

Context

Expected

Editables inside the deployment directory are bundled with the content, so they shouldn't be rejected as unreachable. Options:

  • Rewrite editables inside the deployment directory to a relative path (. or ./localpkg), which Connect can install from the bundle.
  • Or drop the deployed project's own editable line, and still reject editables that are actually outside the directory.

At minimum, the error shouldn't say "outside the deployment directory" for a path inside it.

Found during manual QA of #920 against a local Posit Connect.

Activity

  1. self-assigned this
    on Nov 6, 2026
  2. added
    ready-for-agentFully specified, ready for an autonomous coding agent
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready-for-agentFully specified, ready for an autonomous coding agent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions