-
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
Overhauled serialization system #3535
Conversation
Hooray Jenkins reported success with all tests good! |
4 similar comments
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
Uh oh, something went wrong with the build. Need to check on that |
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
3 similar comments
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
3 similar comments
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
@eviltak, is this ready to be reviewed and then subsequently merged? Or is there still outstanding work blocking this? |
@jellysnake unfortunately there is still some work to be done, potentially involving related changes in gestalt. I would say that this should be merged only after all modules have PRs fixing code that has been broken by these changes. I shall update the PR description with clear todo items so that progress can be easily gauged! |
61b49bf
to
0ae28ce
Compare
Hooray Jenkins reported success with all tests good! |
This pull request introduces 2 alerts when merging 0ae28ce into b6590b7 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
Hooray Jenkins reported success with all tests good! |
Uh oh, something went wrong with the build. Need to check on that |
1 similar comment
Uh oh, something went wrong with the build. Need to check on that |
0fb4e8d
to
f5a0caf
Compare
Uh oh, something went wrong with the build. Need to check on that |
f5a0caf
to
09ce222
Compare
Uh oh, something went wrong with the build. Need to check on that |
09ce222
to
e16914f
Compare
Uh oh, something went wrong with the build. Need to check on that |
608c2e1
to
715c929
Compare
Hooray Jenkins reported success with all tests good! |
1 similar comment
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
Testing & merge reportTried out the following modules to some degree, including their dependencies & fix PRs if ready:
I think that's the critical stuff for now. JoshariasSurvival and others need some attention in the near future as well, but there's no GSOC or TSOC impact on there, so less time sensitive. Phiew. This might be happening! /itshappeninggif |
- MovingBlocks/Terasology#3535 - new serialization - Terasology/Tasks#12 - goes with the new serialization - MovingBlocks/Terasology#3716 - updated world gen
Contents
AbstractSerializer
,GsonSerializer
andProtobufSerializer
)Closes #3490.
Review guide
This PR is finally ready to review and merge! Since there are a lot of changes to review, I'd recommend taking a look at the user-facing API introductions/changes first:
AbstractSerializer
GsonSerializer
ProtobufSerializer
TypeHandlerLibrary
(renamed fromTypeSerializationLibrary
)TypeHandler
TypeHandlerContext
TypeHandlerFactory
SerializedName
TypeInfo
ReflectionUtil
-- will probably not be used outside the engine at all, but it's still worth a look to see if I missed documenting any public methodsSerializationSandbox
-- again, not intended for use outside the engine, but still worth a lookSince there are a lot of files changed by this PR (still no conflicts, surprisingly!), I'd suggest you initially skip the ones with few (< 20) changed lines and a similar number of additions and deletions -- almost all of these files were changed by the IDE during a refactor and have no real reviewable changes.
After you finish reviewing the API changes in the files listed above, you can take a look at the logic introduced by the code in this PR: almost all of it resides in the
persistence.typeHandling
package under aTypeHandler
or aTypeHandlerFactory
, or theReflectionUtil
class. However, I am pretty confident that all these classes/methods have been tested thoroughly to ensure they work as intended, so this step can be skipped if needed.I'd then recommend looking at the tests to see how the new serialization system would be used; the main ones to look at here are
TypeSerializerTest
andTypeHandlerLibraryTest
, since these test most of the user-facing APIs.Testing
Check out branch
MovingBlocks/newSerialization
and run./gradlew tests
TODO
TypeHandler<T>
and module declaringT
).TypeHandlerLibrary.getRuntimeTypeHandler
that returns the retrieved type handler wrapped in aRuntimeDelegatingTypeHandler
to support subtype serializationModuleEnvironment
/Reflections
with moreAbstractClassLibrary
-esque resolution features (if made with aModuleEnvironment
).RuntimeDelegatingTypeHandler
serialization format by adding theclass
entry to the serialized object itself, if the serialized representation is a mapModule Fixes