Feels like the conversation about environment management can be left as tool specific behaviour? I don’t think the PEP mentions environments or really needs to take a position on them? Installers and workflow tools can?
Many tools have existing concepts of install vs sync.
install: take lockfile and install into target environment (optional tool UX can be used to check environment, check that lockfile is up to date, check venv exists, which dep group to install and various things)
sync: bring environment into sync with lockfile (optional tool UX can be used to control how aggressively the target environment gets cleaned to match lockfile, which dep groups etc)
A lot of the time a person will want sync behaviour, but sometimes a person will want to shoot their feet off and install without checks. I think it’s fine to let them.
Indeed, a naive version of sync can be implemented by:
- delete everything in environment
- run install from lockfile
But as before, I think all this is tool and project specific UX. A lockfile doesn’t necessarily need to take a position here.