-
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
feat(extract-subsystems): extract Context
, @In
, InjectionHelper
and @Share
to Subsystem
#4930
base: develop
Are you sure you want to change the base?
Conversation
… and `@Share` to Subsystem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI did not run any org.terasology.engine.registry
tests: https://jenkins.terasology.io/teraorg/job/Terasology/job/engine/job/PR-4930/lastCompletedBuild/testReport/
@@ -31,7 +26,7 @@ public void setup() { | |||
@Test | |||
public void testContextChange() { | |||
CoreRegistry.setContext(new ContextImplementation()); | |||
assertNotEquals(CoreRegistry.get(Context.class), context); | |||
Assertions.assertNotEquals(CoreRegistry.get(Context.class), context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this intentional? (Adding the Assertions.
qualifier back in, instead of a static import of the assertNotEquals method.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just personal prefer to avoid static imports
Nice catch! Our pipeline ignores
This affects all |
about |
@DarkWeird In today's contributor meeting the question came up, whether it makes sense to invest into this when the "proper" way to do this seems to be gestalt v8...? |
see description:
this pr is trying to split injections before gestalt v8 usage |
@DarkWeird Hehe okay, let me rephrase my question: What's the benefit ofextracting these things into a subsystem before using gestalt v8? |
Path to extract another things (to subsystems) before then gestalt v8 will be integrated. |
From my pov, if this makes it easier to get rid of it after migrating to gestalt v8, I'm fine with reviewing and merging it (provided you resolve the conflicts first 😅 ) |
Contains
Part of #4304.
Provide possible to Injectable classes(
@Share
,@In
andContext
usage) with another subsystems.Should be replaced with gestalt v8 (di)
How to test
1.Run your favorite game (hint: Terasology)
2. Check it don't fail whit null pointer exception at
@In
field.Outstanding before merging