Coding 2022-04-11

By Max Woerner Chase

After considering my options from last night, I want to break apart the Installer protocol. I was trying to do this all in my head for some reason, and the problem I was running into there was, I wasn't sure what to call the protocols and instances that would get spun out from that. So, let's try and think things through a bit.

The python version is consumed by virtualenv. The packages are consumed by pip.

The path to pip doesn't exist until virtualenv runs.

In the event that I support other kinds of environment/installers, it's possible that there could be a scenario like "here is a conda env that needs both conda and pip run against it, or something". All the same, the means of locking in the packages is predicated on having an executable.

So, the constant information is which packages are installed and which scripts we expect to get as a result.

The environments can be thought of as providing scripts to the installer args. So, I think, to implement that, the Environment protocol needs to provide some kind of callback-ish method that takes an InstallerArgs class and returns the corresponding path to the executable, modulo that it would actually return a Requirements[Input[Path]].

I'm going to try writing that down for later, because I want to wrap things up early-ish.

Hm, writing things down, I think those initial ideas about the interface aren't quite right. I'll have to take some time to refine them.

Well, I'm not ready to go yet, but I'm confident things will go more easily once I get past this. We'll see if that confidence is warranted. Anyway, I'm done for tonight.

Good night.