Skip to content

[smpy][scaffold] dev-api cd host && uvicorn main:app --reload only watches host/, so edits to modules/ don't hot-reload #202

Description

@antosubash

Summary

The generated dev-api target runs cd host && uv run uvicorn main:app --reload --port 8000. uvicorn's reloader only watches the working dir (host/), so changes to in-repo module packages under modules/* (installed editable) do not trigger a reload — new routes, endpoints, and locale changes silently don't take effect until a manual restart.

Environment

  • Framework checkout: v0.0.17-5-g2b079c9; smpy / published simple_module_* / @simple-module-py/*: 0.0.17
  • Python 3.12.3, uv 0.11.7, node v24.15.0, Linux (Ubuntu)

Found while building a real consumer app (Invoice Manager) on the framework.

Repro

With make dev running, add a new route to a modules/<name>/.../endpoints/api.py; it does not appear (/openapi.json lacks it, requests 404) until the server is restarted. Confirmed in this build (a new PDF endpoint wasn't served until restart).

Impact / suggestion

Hurts the core dev loop for the framework's main use case (authoring modules). Suggest the scaffold pass --reload-dir ../modules --reload-dir . (or run uv run --project host uvicorn host.main:app --reload --reload-dir modules) so module edits reload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions