Coding 2021-12-04

By Max Woerner Chase

I figured out the type errors. Basically, because the Input and Output types are simple wrappers around an underlying value, which is immutable, the type should be covariant with respect to its argument, but I didn't do that to start with.

The practical effect of changing from Input[T] to Input[T_co] is that now, Input[A] can be passed for Input[Union[A, B]] (I mean, I'm pretty sure), and also Input[Impl] can be passed for Input[Proto].

There's some further cleanup and messing-around I want to do as a result of all this, but the thing I think I should focus on right now (after having done some other miscellaneous cleanup) is setting up the infrastructure for building packages. That's going to take a little consideration to make sure everything fits together. Basically, I want to start by scanning the repository layout to build a Packages object, that contains some number of Package objects. Each one has an associated name and path, and the following layout is needed in the ObjectRegistry: one key with the common root information, and one key with all Package data, including name, packed into a PVector.

I think it goes something like:

Okay, that's kind of conflating the build-time and run-time actions. Actually building the packages comes at run-time, but all of the metadata can be calculated ahead of time. Because the ObjectRegistry entries require the metadata, that means that the build-time logic can't use the Builder functionality. So, fundamentally, we need a function that takes the Packages data, possibly an initial ObjectRegistry, and returns... probably a Requirements[ObjectRegistry]. Or maybe it could just return the raw data, and the calling code is responsible for packing them into a registry.

Okay, I think this is enough to start drafting code.

...

And, things are starting to come together. What I really need to do is to focus on copying and updating code from the motrfile, and making sure everything makes sense.

For now, I'm going to wrap up, because it got late. It does that.

Good night.