Using the project
table or not
Isn’t the problem here that we’re confusing structural similarity with behavioural similarity? This is more commonly seen with methods - you draw a picture, and you draw a gun, but the two actions have nothing in common. But it’s still a problem with data. In this case, we’re thinking about the data needed to run a project, and because it looks like the [project]
data used to build a wheel, we’re assuming a semantic similarity. But that similarity is an illusion, and keeps getting broken:
- Name and version are mandatory when building a wheel, but optional when running a project.
- Dependencies can be dynamic when building a wheel, but not when running a project.
- In fact, “dynamic” data makes no sense in any context when running a project.
Using a different key acknowledges that this is semantically different data. There’s a certain amount of overlap, which in an object oriented context would be refactored out into a base class, but I don’t think we’re likely to do that here for a number of reasons, not least of which is the backward compatibility issues such a change to [project]
would cause.
Also, use cases
On a related note, I think the discussion here is made more difficult because the motivation was originally framed negatively, as “projects that aren’t meant to generate a wheel”. By putting it like that, we both risk confusing multiple use cases, and at the same time not having a specific use case in mind at all.
Most of the discussion around “running a project” sounds to me like the use case of “projects that build an application”. In reality, people tend to just run such projects, rather than building a standalone application. But that’s only like doing pip install .
rather than building a wheel and installing it. It’s just that there is no real solution within the packaging ecosystem for “build an application” and so the “build and run in one step” workflow is what people here think of.
For building an application, dependencies are typically the input into a locking process, and the lockfile is the output data (or maybe the actual locked dependencies if building a standalone app). But of course, we don’t have a lockfile standard yet, so we end up trying to make the dependency input do double duty, as the abstract requirements that are the input to the locker, and the resolved requirements that are what the runtime needs to make available to execute the application.
Maybe rather than [run]
as a key for running a project, the key should be [application]
, for application metadata. Then, one of the things you can do with an application (maybe the only one, for now) is run it from source, and we have the “run my project” workflow.
For extra clarity, we could rename [project]
as [library]
. But the backward compatibility impact makes that almost certainly impossible.