-
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
chore: migrate to gestalt v7—fork 🅰, keep subsystems separate #4622
Merged
Merged
Changes from 78 commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
e55b7f0
feature: migrate to gestaltv7
pollend f9ce52f
bugfix: correct copy strategy
pollend 46c29ee
chore: remove copy strategy
pollend 5504449
fix formatting
pollend 9afe704
refactor(handleSwitchToGameEnvironment): these are all one copy strategy
keturn 850ee40
build: no dependency on gestalt-entity-system yet
keturn 911110a
Merge branch 'nui-gestalt-separation' into feature/migrate-gestalt-v7
keturn d9af0ba
chore(ComponentSystem): debugging logs
keturn 0a175af
chore(UISkinWithUrn): update for gestalt 7
keturn 8e26159
chore: revert move of jmh sources
keturn 7b1bd17
fixup! chore: revert move of jmh sources
keturn cba8ef5
core(EntitySystemSetup): null checking
keturn 3986c4d
refactor(ModuleManager): restore some organization from the develop b…
keturn b874418
test: reduce duplicate exception logs and wrapping
keturn bfb1a8e
test: add mockito-inline to empower mockito to do more invasive things
keturn 6412aab
test(ModuleEnvironmentTest): assert, don't `assume`!
keturn a7e2fb3
test(TerasologyTestingEnvironment): avoid NPE on tearDown (the result…
keturn f3711c3
test(InputSystemTest): do not always include TestEventButton in the r…
keturn 442d2fd
feat(ModuleManager): add method for creating an environment with reso…
keturn 31715d2
test(BindsSubsystemTest): update for gestalt-v7
keturn 1c48c86
test(TypeSerializerTest): lint
keturn 42ffb8e
chore: bump version to 4.4.1-SNAPSHOT
keturn 2f9d4af
Merge remote-tracking branch 'origin/nui-gestalt-separation' into fea…
keturn 20546f1
fix(ModuleManager): loosen auto-generated dependency version
keturn 94e1e41
Merge remote-tracking branch 'origin/develop' into feature/migrate-ge…
keturn 1a80bcf
build: upgrade build-logic to gestalt-7
keturn b787951
build: add google repo to terasology-repositories build logic
keturn d353031
fix(DiscordRPC): null check in preShutdown
keturn e3d8419
fix(ModuleManager): include subsystems in the reflections of the engi…
keturn b0afa69
fix(ModuleManager): add subsystems and NUI to engine module
keturn 26c4457
chore(NUIManager): log when widgets are not correctly registered
keturn 3220811
test: correct expected/actual argument order
keturn 9204eab
build: factor out reflections manifest `cacheReflections` task [WIP]
keturn 05bbdf5
test: more assertions for pesky deserialization tests
keturn 540161a
test(ModuleEnvironmentTest): initialize TypeRegistry list of permitte…
keturn 1c583af
test(TypeSerializerTest): add json variant of test
keturn 8c5f4bd
test: tidy
keturn afe6512
test(ModuleEnvironmentSandbox): initial sketch of test cases
keturn ff14cd1
test(ModuleEnvironmentSandbox): fix names used to request classes
keturn 1c17362
fix(ModuleManager): engine module claims sources of all active subsys…
keturn 94fa9a2
chore: use WidgetLibrary from NUI instead of internal copy
keturn 8192ad3
test: fix ExampleInterface import
keturn 3a7ab90
Merge remote-tracking branch 'origin/develop' into feature/migrate-ge…
keturn 968d226
test: always add NUI classes to engine
keturn 7d0f9ec
Merge remote-tracking branch 'origin/develop' into feature/migrate-ge…
keturn 8350ebb
revert b0afa69be334b8d8b826aaf30bf281ea3b4d750f
keturn b42a539
test(ModuleEnvironmentTest): don't always try to build an environment…
keturn d5c74cc
fix(ModuleManager): re-implement classpath modules for tests under ge…
keturn 8aef6cc
fix(ClasspathCompromisingModuleFactory): allow code from either class…
keturn 911b2bf
bugfix: remove DirectoryFileSource requirment for gameplay templates
pollend 7c9e4d6
test(TranslationFormat): re-implement with FileReference instead of Path
keturn a750f39
Merge remote-tracking branch 'origin/feature/migrate-gestalt-v7.a' in…
keturn d71124e
Merge remote-tracking branch 'origin/develop' into feature/migrate-ge…
keturn c725b45
Merge remote-tracking branch 'origin/develop' into feature/migrate-ge…
keturn 6bacddc
test(TypeSerializerTest): clean out some commented and out-of-scope code
keturn 599f71d
chore: remove commented code
keturn a3130fa
chore(ModuleDetailsScreen): switch from versionRange to more flexible…
keturn 3763ae3
Merge remote-tracking branch 'origin/develop' into feature/migrate-ge…
keturn 2705192
doc: explain how ClasspathCompromisingModuleFactory is different and …
keturn a0ab333
test(ClasspathCompromisingModuleFactoryTest): document the assumption…
keturn 5dd89ee
fix(ClientConnectionHandler): update for new ModuleManager
keturn 7f31a7b
chore(EnvironmentSwitchHandler): replace clever use of reflections wi…
keturn 30d4ac2
chore(GLSLMaterial): tidy
keturn 67db33e
chore(Audio): remove commented code
keturn f60f2a0
fix(ModuleInstaller): update for new ModuleManager
keturn f952993
chore: tidy whitespace, commented code
keturn 5026e55
fix: revert change to SubtypeLayoutBuilder
keturn 517a3d1
fix(TerasologyEngine): re-instate asset reloading
keturn 9a4312c
test: fix (expected, actual) order of assertEquals
keturn a0a4da2
test: tag ModuleEnvironmentTest as being in the "integrationTest" cat…
keturn fcd4bf4
chore: move engine-module assets under org/terasology/engine
keturn 077f288
build: upgrade to gestalt 7.1.0-SNAPSHOT from 7.0.6
keturn 2b54db5
build: disable build-time cacheReflections in a more consistent way
keturn 0bd23a7
build: remove commented-out uses of reflections-cache
keturn 7c6a679
fix(ComponentFieldMetadata): do not pass null to CopyStrategy
keturn de35020
fix(ExternalApi): remove some over-broad package entries
keturn 9cffcbb
bugfix: assetTypeManager becomes unavalible becomes of RegisterMods a…
pollend 1e9a36c
Revert "bugfix: assetTypeManager becomes unavalible becomes of Regist…
pollend f52ebb9
chore(ModuleManager): let dependency use default maxVersion
keturn 5435097
test: move to match package directory
keturn b3df7c3
test: move stub components in to org.terasology.unittest module.
keturn aae87b3
Merge remote-tracking branch 'origin/develop' into feature/migrate-ge…
keturn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
build-logic/src/main/kotlin/reflections-manifest.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2021 The Terasology Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import org.reflections.Reflections | ||
import org.reflections.scanners.SubTypesScanner | ||
import org.reflections.scanners.TypeAnnotationsScanner | ||
import org.reflections.serializers.JsonSerializer | ||
import org.reflections.util.ConfigurationBuilder | ||
import java.net.URLClassLoader | ||
|
||
tasks.register("cacheReflections") { | ||
description = "Caches reflection output to make regular startup faster. May go stale and need cleanup at times." | ||
|
||
val sourceSets = project.convention.getPlugin(JavaPluginConvention::class.java).sourceSets | ||
val mainSourceSet: SourceSet = sourceSets[SourceSet.MAIN_SOURCE_SET_NAME] | ||
|
||
inputs.files(mainSourceSet.output.classesDirs) | ||
dependsOn(tasks.named("classes")) | ||
outputs.upToDateWhen { tasks.named("classes").get().state.upToDate } | ||
|
||
// TODO: output to the task's own build directory, because putting things in the | ||
// classes directory confuses gradle caching. | ||
val manifestFile = File(mainSourceSet.output.classesDirs.first(), "manifest.json") | ||
outputs.file(manifestFile) | ||
|
||
doLast { | ||
val classPaths = mainSourceSet.compileClasspath.map { it.toURI().toURL() } | ||
val classLoader = URLClassLoader(classPaths.toTypedArray()) | ||
try { | ||
val reflections = Reflections( | ||
ConfigurationBuilder() | ||
.setSerializer(JsonSerializer()) | ||
.addClassLoader(classLoader) | ||
// .filterInputsBy(FilterBuilder.parsePackages("+org")) | ||
.addUrls(inputs.files.map { it.toURI().toURL() }) | ||
.setScanners(TypeAnnotationsScanner(), SubTypesScanner(false))) | ||
reflections.save(manifestFile.toString()) | ||
} catch (e: java.net.MalformedURLException) { | ||
logger.error("Cannot parse input to url", e) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why is this commented out / what would it do if commented in?
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.
I think that was from some attempt to reduce the amount of time this was taking by restricting which packages it considers.
Not that including all
org
packages (but notcom
, etc) makes much sense.