<#20246 Django `manage.py` files should infer depe...
# github-notifications
c
#20246 Django `manage.py` files should infer dependencies on migrations from `INSTALLED_APPS` Issue created by chrisjrn Currently, running any Django management command that depends on migrations requires running
manage.py
outside the sandbox, or (apparently) explicitly declaring migrations packages as dependencies of
manage.py
.
manage.py
knows which migrations to run by way of the apps declared in the
INSTALLED_APPS
value in a Django settings file. With the experimental Django plugin, it appears that Django migrations are able to infer dependencies on other migrations by way of understanding the
AppConfig.name
value in the
apps.py
file for those other migrations. It appears that the leaf migrations still need to be declared automatically to be picked up as a dependency. With that in mind, it looks like
INSTALLED_APPS
values can be inspected -- they either declare a package spec, or an
AppConfig
class, with a name that consists of a package spec. That should be enough information to infer dependencies on those migrations. Pants should do that :) UPDATE: It looks like management commands are in the same boat, and should also get picked up. pantsbuild/pants