njsmith / posy

289 stars 17 forks source link

Per-project EnvForest, or just a global one? #13

Open njsmith opened 1 year ago

njsmith commented 1 year ago

Should we have one EnvForest per project, or one per user?

Benefits of one-per-project:

Benefits of one-per-user:

Interesting side note: if we have a global per-user EnvForest, then it may not make sense to cache artifacts (the ones we have in hash_cache currently), because they're redundant: we only need the artifact once while we're installing it into the EnvForest. Maybe this even applies to locally built wheels? Though, I guess sdists are a bit more complicated... we might want to use an sdist once to get metadata and then a second time to build a wheel (but if those generally happen within a single invocation maybe it's fine?) And in some cases we might want to use an sdist several times to build for several architectures, but that might be rare enough that no-one will really care.

Prior art

I believe conda effectively shares data globally per-user? And has something of a reputation for ending up with huge caches that you have to manually conda --clean to reclaim?

IIRC there have been contentious debates about this for pipenv/poetry/etc. We should figure out why people were invested in this on each side. (Does anyone reading this happen to know?)