movingblocks / gestalt Goto Github PK
View Code? Open in Web Editor NEWA family of libraries providing a variety of core capabilities for use by games and game engines.
License: Apache License 2.0
A family of libraries providing a variety of core capabilities for use by games and game engines.
License: Apache License 2.0
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Currently, the ResolutionResult
class returns false
when the resolutions fails. I would find it helpful to get more information on why that happened.
This could include the modules (version ranges) in the DAG that were missing or the dependency links (as modeled by the Constraint
class).
minVersion
, should we allow module metadata to define its own expression?
Follow-up from #101.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Apparently ModuleMetadata.getDependencies
can return a list with a null
element when module.txt contains an extra trailing comma, as in the example below.
Could catch the null here, but probably better to fix it so that list can't contain null elements at all, even if the JSON is invalid.
module.txt:
{
"id": "BlockDetector",
"version": "1.4.0-SNAPSHOT",
"author": "rzats",
"displayName": "BlockDetector",
"description": "Adds a detector item that indicates the location of arbitrary blocks.",
"dependencies": [
{
"id": "CoreAssets",
"minVersion": "2.0.0"
},
{
"id": "Inventory",
"minVersion": "1.1.0"
},
],
"serverSideOnly": false,
"isAsset": true,
"isLibrary": true
}
As far as I understand it, the minimum version of Android that gestalt supports is API 24 (Android 7.0). This is because gestalt uses certain Java 8 APIs, such as Optional, which are not available under any earlier versions.
gestalt/gestalt-android/build.gradle
Lines 23 to 25 in 4894aad
java.lang.ThreadLocal.withInitial
(see the Android documentation). This causes the following runtime error to occur:
java.lang.NoSuchMethodError: No static method withInitial(Ljava/util/function/Supplier;)Ljava/lang/ThreadLocal; in class Ljava/lang/ThreadLocal; or its super classes (declaration of 'java.lang.ThreadLocal' appears in /system/framework/core-oj.jar)
at org.terasology.gestalt.assets.management.ContextManager.<clinit>(ContextManager.java:36)
at org.terasology.gestalt.assets.management.ContextManager.getCurrentContext(ContextManager.java:45)
at org.terasology.gestalt.assets.management.AssetManager.resolve(AssetManager.java:151)
The only use of this method that I could find was in ContextManager.java
:
PrefabJsonFormat
:The Java implementation of this (from the OpenJDK source) behaves equivalently:
https://github.com/openjdk/jdk/blob/f613d43f269edd6f213629f45f643d0ae620b8ee/src/java.base/share/classes/java/lang/ThreadLocal.java#L142-L144
https://github.com/openjdk/jdk/blob/f613d43f269edd6f213629f45f643d0ae620b8ee/src/java.base/share/classes/java/lang/ThreadLocal.java#L291-L307
Would it be possible to change the usage in ContextManager
to the form used in PrefabJsonFormat
?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Now that IntelliJ checks dependencies against a vulnerability database, we see gestalt pulling in some dependencies with known CVEs. Either directly or transitively through things like Reflections.
We should update the dependencies or add constraints to the transitive dependencies, as appropriate.
Related to MovingBlocks/Terasology#5021
Gradle 7 has some features Terasology is interested in (e.g. version catalogs). Since the MovingBlocks/โณ libraries are often used in composite builds with Terasology, it seems like a good idea to keep their gradle versions from drifting too far apart.
I propose upgrading all the libraries to the latest in the 6.x line (currently 6.9.0) and fixing whatever deprecation warnings crop up there. That should give us a smooth path to then adopting Gradle 7.
Investigate the possibility of triggering disposal of assets not referenced outside of the asset system.
Instance assets should be disposed when no longer referenced, as there is no way to reobtain them (as opposed to non-instance assets which can always be reobtained by urn).
We've decided to change version comparison to be more consistent with Semantic Versioning.
Currently a dependency declared as 2.0.0
may be satisfied by a module implementing 2.0.0-SNAPSHOT
. This should not be true under semantic versioning.
Requires a change to the VersionRange class and tests, as well as documentation. (Check both Terasology and gestalt wikis.)
When a module has a dependency on another module with minVersion 0.x.y, and the maxVersion is not specified, it should default to 0.x+1.0. This reflects that the API is not considered stable until version 1.0.0 is reached, so each minor version is likely a breaking change.
Currently, only module names can be used to resolve modules. When multiple versions of a module are available, it might be useful to resolve a particular version (or a range?) of a module.
For example, someone might want to play v0.9 even if v1.0 is already available.
The master-server uses a workaround based on a fake module to resolve a specified version of a module:
ModuleMetadata meta = new ModuleMetadata();
Name fakeName = new Name("fake");
meta.setId(fakeName);
meta.setVersion(new Version(1, 0, 0));
DependencyInfo di = new DependencyInfo();
di.setId(name);
di.setMinVersion(version);
di.setMaxVersion(version.getNextPatchVersion());
meta.getDependencies().add(di);
DummyModule fakeMod = new DummyModule(meta);
moduleRegistry.add(fakeMod);
ResolutionResult result = dependencyResolver.resolve(fakeName);
moduleRegistry.remove(fakeMod);
I would find it useful if this was supported by DependencyResolver.
org.terasology.gestalt.assets.module.autoreload.ModuleEnvironmentWatcherTest.test()
It sometimes passes, and sometimes on CI it does not
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:35)
at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:162)
at org.terasology.gestalt.assets.module.autoreload.ModuleEnvironmentWatcherTest.test(ModuleEnvironmentWatcherTest.java:91)
The class PrefabDeltaFormat in terasology is annotated with this annotation and is currently using a static way to get data (CoreRegistry). There should be a way to get data to RegisterAssetDeltaFileFormat classes.
The tricky part about adding dependency injection will be the documentation with javadoc: If the annotation is defined in gestal core it can't obviously explain how the dependency injection is done in terasology.
Currently gestalt depends on a custom snapshot of what was org.reflections:0.9.12
, re-named to org.terasology:reflections:0.9.12-MB
. I do not know the exact reasons for the fork but MovingBlocks/reflections only contains a single unique commit with minor code changes. The README claims that the project is unsupported but things appear to have changed since then, with several upstream org.reflections
releases being made, up to the most recent org.reflections:0.10.2
. It might be worth upgrading to the upstream source to benefit from any bugfixes that might have occurred since then.
This is mostly an obsolete issue with gestalt 8 (develop
branch), since it doesn't rely on reflections anymore. Terasology and Destination Sol could still be relying on gestalt 7 for some time to come though.
With a working Android agent in Jenkins that's successfully building DestSol we should be able to apply the same approach to Gestalt to finally have its Android component built in CI and published to Artifactory. So far that's been done via local publish by a dev with a working Android Studio and a credential for Artifactory.
BenjaminAmos/DestinationSol#1 held the initial effort for Android in DS, since then merged into the mainline repo, the Android facade, and our infra repo
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.