-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split engine to subsystems #4304
Comments
In Discord @DarkWeird mentioned the following configs that will need to be migrated to
|
Small note:
Discord: correct. Telemetry: want! Great way to send server logs and performance. There are client specific bits to the telemetry system though, like blocks broken and such. That part we could certainly skip, but then I'm not sure if that would enable by default 🤔 |
Investigation of possible to extract AutoConifg as Subsystem:
Possible bonus. if we extract saving and loading from AutoConfigManager then per-game-saves will easier.(PathManager) Think to do:
|
I was having trouble understanding #4930, but maybe re-reading the last comment here is helping. I was thinking: Why bother extracting Context? Perhaps it is so Subsystems can use it, but, no, Subsystems do depend on Engine — they must, if for no other reason than the EngineSubsystem interface is defined in Engine. That means Subsystems may use a Context class defined in Engine too. Looking at this, it seems it's because you want to extract AutoConfig as a library that has no Engine dependency? It would help me keep things straight if we use different words for Subsystems vs non-Engine libraries. If the only obstacle to calling those “libraries” or “libs” is that we currently have the I am also not totally sold on the utility of extracting libs to their own gradle sub-projects. It does carry some maintenance cost with it: for example, the recent case where we neglected to run tests on TypeHandlerLibrary for many months because we no longer invoke tests in the same way in all our sub-projects. On the other hand, it does add some constraints that help keep things more organized by preventing circular dependencies between packages. |
I don't like current TS's engine:
Then i suggest:
I think about those categories now:
P.S.
We cannot provide functionality for non-extracted subsystem and engine module... Another example: MTE example: You can provide you naming for /subsystem/ |
I think these are good categorizations. 👍 Which of them want to be their own gradle-(sub)projects? Advantages of being a separate gradle (sub)project:
Disadvantages of being separate:
(There are, of course, ways to mitigate these disadvantages, but it adds a bit of work to do so.) If an EngineSubsystem is optional or replaceable, so that a particular Facade may choose to build an application without it, I think that provides a good reason for wanting a separate jar. On the other hand, a library such as THL will necessarily be a dependency for everything; no one will ever get the engine.jar without also getting the THL.jar. Another thought, now that Terasology requires Java 11: Are Java Modules an alternative (better? worse?) way of describing the connections between these different packages and enforcing the API encapsulations we want for them? (If that is a can of worms that is too messy for now, please feel free to say so.) |
Yeah. I think about version catalog :3
Ehm. We have this?
There another reasons:
|
Using Java Modules as gestalt Modules is a whole topic in itself. For now, I was wondering about these library-ish things, whether java modules' ability to define requirements and exports would help in this… but taking another look at that now, I think jars can only contain one module, and each gradle SourceSet can make one jar/module. That means this is not an alternative we could do instead of splitting these into different source directories— it's something additional we could do after splitting them up. |
Mainly though, the "smaller engine part > easier maintenance" is what I am slow to understand. Why is You mention dependencies, and it does make it so if you're editing something there you can't just auto-import something from That is worth something, but I keep wondering if I have missed something else, because it doesn't quite sell me by itself. |
On Javadoc: We do have Javadoc published on jenkins, if nowhere else. I think the build generates javadoc for everything, but the Jenkins built-in javadoc integration only publishes one javadoc directory for the project, so we have it pointing at |
Try to locate all parts of rendering. They placed in different packages. Context required to extract for another subsystems. |
Extraction subsystems should:
Optional:
Telemetry
andDiscord
not needs for server buildReplaceable:
AudioLwjgl
andAudioNull
subsystems.Kallisti
->Jnlua
CoreRendering
->GraphicsLwjgl
Extraction subsystems shouldn't:
Module
sDraft extraction scheme:
Required Features:
Module
->Subsystem
dependency.Partial current solution for 'Library' subsystems - engine provides them as gradle's
api
dependency (formal it is engine dependency)Extractions
DiscordRPC
subsystem feature(subsystems): extract DiscordRPCSubSystem #4233TypeHandlerLibrary
feat(subsystems): extract TypeHandlerLibrary. #4255EntitySystem
. ( requires ✅ feature(subsystem-prepare): extract Network and R&R code from EventSystemImpl #4565 for pure events and ✅ feat(TypeHandlerLibrary): Add generic Serializer for TypeHandlerLibrary. #4324 for serialize components)Outdated with feat(TypeHandlerLibrary): Add generic Serializer for TypeHandlerLibrary. #4324GsonSerializer
feat(subsystems): Extract GsonSerializer #4270 - needs 2.( follow-ups - migrate engine's code from pureGson
toGsonSerializer
)TypeWidgetLibrary
-- but first needs to merge feat: Reviving of "UI for editing arbitrary types and AutoConfigs" #4244 ✅AutoConfig
.WorldStorage
to make it extendable.The text was updated successfully, but these errors were encountered: