I think there’s another aspect here, that I (for one) have been missing. I’ve been thinking of a lockfile as an independent object, that you can hand to someone on its own and say “install from that”. That’s the situation when replicating an environment, distributing something like a webapp, or specifying how to build a standalone application.
But Hynek seems to be describing a different scenario[1], where the lockfile is merely one component of a project, and is used as part of the workflow to “sync”[2] a project’s workspace. In that context, there is clearly a distinguished “current project”, but the lockfile isn’t really being used as an interoperability tool.
I think this is an important distinction, precisely because the “part of the project workflow” lockfile is directly tied to the workflow, and hence the workflow tool that the project uses. As such, this type of lockfile isn’t actually used for interoperability (except in the very broad sense of “make it easier to switch workflow tools”).
Maybe we actually need to take “project workflow lockfiles” out of scope here, and limit the standard to only being about lockfiles for the purpose of reproducing an environment? That could leave us in a situation where tools retain their own proprietary extensions to the lockfile format (whether via the [tool]
namespace, or by having their own custom format extensions that aren’t intended to be interoperable) and simply allow exporting a standard-format environment definition lockfile. I know this feels like a significant step backward, as we seem very close to a universal format here, but at the same time, a significant part of the complexity in the spec seems related to “project workflow” aspects of lockfiles (and it appears we’re not done with that case yet…), whereas the “environment reproduction” scenario has been (as far as I can see) covered and stable for a long while now.
On a related but separate note, I’ve been thinking about how I’d accept this PEP once it’s finished, and I’m pretty sure that as things stand I’d want to defer acceptance until all of uv, poetry and PDM have switched to using the new spec as their internal lockfile format, before formally accepting it as a standard. That in itself says to me that there’s a lot of this spec that isn’t actually related to interoperability.