isshoni-soft / winry

Isshoni Bootstrapper, uses introspection & code generation to streamline bootstrapping & general development
0 stars 0 forks source link

Rewrite BootstrappedElement hierarchy & re-evaluate bootstrapping process #46

Closed Dragovorn closed 1 year ago

Dragovorn commented 2 years ago

This sounds pretty easy in theory, but in practice it is redesigning and rewriting the core internals of Winry. The problem with how it is currently written is that it is extremely rigidly singleton, as other parts of the codebase evolve to be more dynamic this part of the codebase feels more and more outdated & clunky to work around.

Generally, this will probably change how the simple bootstrapper organizes and runs winry applications, but I think this is necessary to achieving more fluid functionality, this is one of the last relics from the prototype and I think it shows.

Keep in mind that these are metadata storage classes and should not expand past that scope much, try to avoid making them directly reference methods / classes because those become rather fluid in this environment. Keep in mind that a BootstrappedMethod should be able to move between classes of that same type instead of being kinda pigeon-holed to singletons. All in all try and move a lot of the structure away from singleton managed classes & move to something that's a little more fluid.

This is all in service to being able to make instanced listeners.

Dragovorn commented 1 year ago

I had a good idea on how this could pan out, move away from the "bootstrappedxyz" convention & move it to purely "classmeta" "methodmeta" etc. then this can be used for more than discovery, then the element bootstrapper can be retooled into a meta registry that can be used to construct classes / execute methods / inject fields etc.

This would effectively turn a sloppily made spine into something that's more fluid with the current design.

Dragovorn commented 1 year ago

This has been implemented and merged.