Skip to content
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: upgrade to Gestalt 8 #5267

Merged
merged 3 commits into from
Jul 29, 2024
Merged

feat: upgrade to Gestalt 8 #5267

merged 3 commits into from
Jul 29, 2024

Conversation

BenjaminAmos
Copy link
Contributor

@BenjaminAmos BenjaminAmos commented Jul 27, 2024

Contains

This pull request upgrades the version of Gestalt used by Terasology to 8.0.0-SNAPSHOT. It only contains the changes needed to get the game running again. Further improvements, such as the integration of gestalt-di, may be made in the future.

How to test

Essentials

  • Run the game and ensure it reaches the main menu screen
  • Ensure that the main menu UI renders fully without missing textures or text

Gameplay

  • Start a new game, using the Core Gameplay preset
  • Ensure that the new game loads fully without crashing
  • Ensure that all the default starter items are present and functional
  • Exit to the main menu and ensure it returns successfully
  • Start another new game, following the steps above, but going through the Advanced Gameplay Screen flow
  • Ensure that your can load an existing save game without crashing

Outstanding before merging

This depends on MovingBlocks/gestalt#144 and MovingBlocks/TeraNUI#75.

Additional Notes

The following module-space changes also depend on this pull request:

@soloturn soloturn assigned soloturn and unassigned soloturn Jul 27, 2024
@soloturn soloturn requested review from soloturn and jdrueckert and removed request for jdrueckert July 27, 2024 12:00
@soloturn
Copy link
Contributor

for me on java-21, linux, this fails:

> Configure project :engine-tests
Scanning for version in module.txt for engine-tests
Version for project ':engine-tests'.name loaded as 5.4.0-SNAPSHOT for group org.terasology.engine

FAILURE: Build failed with an exception.

* What went wrong:
'int com.github.zafarkhaja.semver.Version.getMajorVersion()'

@jdrueckert
Copy link
Member

@soloturn I believe that this is because the Jenkins job on merging MovingBlocks/gestalt#141 failed, so I guess a new gestalt artifact with that change was never published to artifactory.
I triggered a new jenkins run of gestalt's develop: https://jenkins.terasology.io/job/Libraries/job/Gestalt/job/develop/2
Let's see if that works and if it does and publishes the artifact, maybe you can retry.

@soloturn
Copy link
Contributor

@soloturn I believe that this is because the Jenkins job on merging MovingBlocks/gestalt#141 failed, so I guess a new gestalt artifact with that change was never published to artifactory. I triggered a new jenkins run of gestalt's develop: https://jenkins.terasology.io/job/Libraries/job/Gestalt/job/develop/2 Let's see if that works and if it does and publishes the artifact, maybe you can retry.

created MovingBlocks/gestalt#145 to change artifactory url to new one for gestalt.

@soloturn
Copy link
Contributor

soloturn commented Jul 28, 2024

gestalt now got published, as snapshot, still same error here:

gradle --console=plain clean extractConfig extractNatives distForLauncher testDist

  • What went wrong:
    'int com.github.zafarkhaja.semver.Version.getMajorVersion()'

soloturn
soloturn previously approved these changes Jul 28, 2024
Copy link
Contributor

@soloturn soloturn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

such a huge upgrade, maybe we just forward fix if something goes wrong, or take it out again if it fails.

@jdrueckert jdrueckert dismissed soloturn’s stale review July 28, 2024 18:08

let's not just trial-and-error this... that's one of the reasons why the code base got to the state it is in in the first place...

@jdrueckert
Copy link
Member

@soloturn I cannot reproduce the issue you're seeing locally on my machine.
Can you please check if your workspace is out of date or there are any other caching effects?
If unsure, can you please test in a fresh workspace?

@soloturn
Copy link
Contributor

soloturn commented Jul 28, 2024

@soloturn I cannot reproduce the issue you're seeing locally on my machine. Can you please check if your workspace is out of date or there are any other caching effects? If unsure, can you please test in a fresh workspace?

@jdrueckert what does this error message mean, and which part of the code calls what and why? when using --stacktrace one sees that this seems to be in gestalt. when i switch to develop branch the error is gone, switching to this pr branch it is there again. i deleted the gradle cache, did a git clean -xfd .

java.lang.NoSuchMethodError: 'int com.github.zafarkhaja.semver.Version.getMajorVersion()'
	at org.terasology.gestalt.naming.Version.getMajor(Version.java:90)
	at org.terasology.gestalt.module.dependencyresolution.DependencyInfo.getMaxVersion(DependencyInfo.java:86)
	at org.terasology.gestalt.module.dependencyresolution.DependencyInfo.versionRange(DependencyInfo.java:126)
	at org.terasology.gradology.ModuleMetadataForGradle.versionStringFromGestaltDependency(module_build.kt:69)
	at org.terasology.gradology.ModuleMetadataForGradle.gradleModule(module_build.kt:80)
	at org.terasology.gradology.ModuleMetadataForGradle.moduleDependencies(module_build.kt:65)
	at Terasology_module_gradle$4.invoke(terasology-module.gradle.kts:59)
	at Terasology_module_gradle$4.invoke(terasology-module.gradle.kts:53)
	at org.gradle.kotlin.dsl.ProjectExtensionsKt.dependencies(ProjectExtensions.kt:237)
	at Terasology_module_gradle.<init>(terasology-module.gradle.kts:53)
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
	at TerasologyModulePlugin.apply(TerasologyModulePlugin.kt:13)
	at TerasologyModulePlugin.apply(TerasologyModulePlugin.kt:6)
	at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.java:43)

@soloturn soloturn merged commit 7f47891 into develop Jul 29, 2024
10 checks passed
@soloturn
Copy link
Contributor

soloturn commented Jul 29, 2024

after merging andi switching over modules "inventory" and "furnishings" to feat/gestalt-8-upgrade for me the game compiles again, and gradle game exeuctes. when libs/teraNUI is present it crashes with the following exceptions:

21:12:59.449 [main] INFO  o.t.gestalt.module.ModulePathScanner - Discovered module: ModuleTestingEnvironment-0.3.3-SNAPSHOT
21:12:59.531 [main] WARN  o.t.g.module.sandbox.APIScanner - Class not found

java.lang.ClassNotFoundException: org.terasology.engine.rendering.assets.mesh.MeshBuilder.TextureMapper
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
        at org.terasology.gestalt.module.sandbox.APIScanner.scan(APIScanner.java:54)
        at org.terasology.engine.core.module.ModuleManager.setupSandbox(ModuleManager.java:264)
        at org.terasology.engine.core.module.ModuleManager.<init>(ModuleManager.java:95)


21:12:59.652 [main] WARN  o.t.g.module.sandbox.APIScanner - Class not found
java.lang.ClassNotFoundException: org.terasology.furnishings.logic.trunk.package-info
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
        at org.terasology.gestalt.module.sandbox.APIScanner.scan(APIScanner.java:54)
        at org.terasology.engine.core.module.ModuleManager.setupSandbox(ModuleManager.java:264)


21:12:59.653 [main] WARN  o.t.g.module.sandbox.APIScanner - Class not found
java.lang.ClassNotFoundException: org.terasology.furnishings.logic.door.package-info
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
        at org.terasology.gestalt.module.sandbox.APIScanner.scan(APIScanner.java:54)
        at org.terasology.engine.core.module.ModuleManager.setupSandbox(ModuleManager.java:264)
        at org.terasology.engine.core.module.ModuleManager.<init>(ModuleManager.java:95)


21:13:03.145 [main] ERROR o.t.e.core.ComponentSystemManager - Failed to initialise system org.terasology.engine.logic.console.ConsoleSystem@3a13f663
java.lang.NullPointerException: Cannot invoke "org.terasology.nui.UIWidget.getClass()" because "root" is null
        at org.terasology.engine.rendering.nui.internal.NUIManagerInternal.addOverlay(NUIManagerInternal.java:496)
        at org.terasology.engine.logic.console.ConsoleSystem.initialise(ConsoleSystem.java:35)
        at org.terasology.engine.core.ComponentSystemManager.initialiseSystem(ComponentSystemManager.java:211)
        at org.terasology.engine.core.ComponentSystemManager.initialise(ComponentSystemManager.java:194)
        at org.terasology.engine.core.modes.StateMainMenu.init(StateMainMenu.java:67)
        at org.terasology.engine.core.TerasologyEngine.switchState(TerasologyEngine.java:606)
        at org.terasology.engine.core.TerasologyEngine.changeState(TerasologyEngine.java:588)
        at org.terasology.engine.core.TerasologyEngine.initializeRun(TerasologyEngine.java:427)
        at org.terasology.engine.core.TerasologyEngine.run(TerasologyEngine.java:414)


21:13:03.301 [main] ERROR o.t.engine.core.TerasologyEngine - Uncaught exception, attempting clean game shutdown
java.lang.NullPointerException: Cannot invoke "org.terasology.nui.UIWidget.getClass()" because "root" is null
        at org.terasology.engine.rendering.nui.internal.NUIManagerInternal.createScreen(NUIManagerInternal.java:371)
        at org.terasology.engine.rendering.nui.internal.NUIManagerInternal.createScreen(NUIManagerInternal.java:347)
        at org.terasology.engine.rendering.nui.internal.NUIManagerInternal.pushScreen(NUIManagerInternal.java:398)
        at org.terasology.engine.rendering.nui.internal.NUIManagerInternal.pushScreen(NUIManagerInternal.java:393)
        at org.terasology.engine.rendering.nui.internal.NUIManagerInternal.pushScreen(NUIManagerInternal.java:89)
        at org.terasology.engine.core.modes.StateMainMenu.init(StateMainMenu.java:74)


# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000078

@soloturn
Copy link
Contributor

when libs/TeraNUI is not present it starts up, JoshariasSurvival gets the following error:

21:32:31.052 [main] INFO  o.t.e.c.m.loadProcesses.RegisterMods - Activating module: WorldlyTooltip:1.3.0-SNAPSHOT
21:32:31.052 [main] INFO  o.t.e.c.m.loadProcesses.RegisterMods - Activating module: JoshariasSurvival:1.1.0-SNAPSHOT
21:32:31.083 [Thread-2] ERROR o.t.g.m.s.JavaModuleClassLoader - Denied access to class (not allowed with this module's permissions): org.terasology.gestalt.entitysystem.prefab.GeneratedFromRecipeComponent
21:32:32.712 [main] ERROR o.t.g.m.s.JavaModuleClassLoader - Denied access to class (not allowed with this module's permissions): org.terasology.gestalt.entitysystem.prefab.GeneratedFromRecipeComponent
21:32:32.728 [main] ERROR o.t.g.m.s.JavaModuleClassLoader - Denied access to class (not allowed with this module's permissions): org.terasology.gestalt.entitysystem.event.lifecycle.OnRemoved
21:32:32.729 [main] ERROR o.t.g.m.s.JavaModuleClassLoader - Denied access to class (not allowed with this module's permissions): org.terasology.gestalt.entitysystem.event.lifecycle.OnChanged
21:32:32.729 [main] ERROR o.t.g.m.s.JavaModuleClassLoader - Denied access to class (not allowed with this module's permissions): org.terasology.gestalt.entitysystem.event.lifecycle.OnAdded
21:32:35.861 [main] WARN  o.t.engine.core.internal.TimeBase - Delta too great (3096), capping to 1000
21:32:35.952 [main] WARN  o.t.e.p.serializers.PrefabSerializer - Prefab 'EdibleFlora:SeedCraftingRecipes' contains unknown component 'ListRecipes'
21:32:35.980 [main] WARN  o.t.e.p.serializers.PrefabSerializer - Prefab 'Behaviors:jobBuildBlock' contains unknown component 'Work'
21:32:36.122 [main] ERROR o.t.engine.core.modes.StateLoading - Error while loading org.terasology.engine.core.modes.loadProcesses.LoadPrefabs@66c58c03
java.lang.IllegalArgumentException: Unknown behavior node type set_speed
        at org.terasology.engine.logic.behavior.core.BehaviorTreeBuilder.createNode(BehaviorTreeBuilder.java:274)
        at org.terasology.engine.logic.behavior.core.BehaviorTreeBuilder.getCompositeNode(BehaviorTreeBuilder.java:224)
        at org.terasology.engine.logic.behavior.core.BehaviorTreeBuilder.deserialize(BehaviorTreeBuilder.java:146)
        at org.terasology.engine.logic.behavior.core.BehaviorTreeBuilder.deserialize(BehaviorTreeBuilder.java:48)

@soloturn
Copy link
Contributor

with core gameplay, it shows lines of blocks

image

@soloturn
Copy link
Contributor

soloturn commented Jul 29, 2024

core gameplay hammering looks like this

image

@soloturn
Copy link
Contributor

the lines of blocks seem to be no regression, there before, also hammering was the same before, no regression. this screenshot is before the merge of gestalt-8.

image

@soloturn
Copy link
Contributor

also flying trees were possible before, screenshot from before gestalt-8 merge.

image

@jdrueckert
Copy link
Member

@soloturn as mentioned on Discord, next time please check back with us before just merging something - there might be reasons why we didn't merge yet.

  • NUI issues: I believe @BenjaminAmos is aware of that and was working on updating NUI (one of the reasons to not merge this yet)
  • JS issue Unknown behavior node type set_speed: could be either a previous issue (sporadic or not) or an issue with loading that behavior node due to the gestalt migration - needs to be investigated

for the rest you already noticed that it existed before-hand, I'll comment on them anyway

  • line of blocks are intentionally this kind of foliage
  • hitting blocks seems normal to me, what irritates you about that?
  • "flying" trees aka some tree blocks not being created properly is some kind of sporadic world generation issue that we didn't figure out yet

jdrueckert added a commit that referenced this pull request Aug 3, 2024
jdrueckert added a commit that referenced this pull request Aug 3, 2024
jdrueckert added a commit that referenced this pull request Aug 3, 2024
jdrueckert added a commit that referenced this pull request Aug 4, 2024
@jdrueckert jdrueckert deleted the feat/gestalt-8-upgrade branch August 4, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement Request for or addition/enhancement of a feature
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants