Refactor serialization system#702
Merged
Merged
Conversation
Still needs to be fine tuned to match original implementation Many things are left in a broken state like website features/api endpoints/lbp3 categories
Many things are still broken but progress is steadily being made
Fix recursive PrepareSerialization when recursive item is set during root item's PrepareSerialization, items, should be properly indexed in order but it's only tested to 1 level of recursion
…w serializer tests
…pshot.cs back to DatabaseModelSnapshot.cs
…amed result instead of StatusCode(403) everything is now in the form of Forbid()
W0lf4llo
reviewed
Mar 16, 2023
Contributor
W0lf4llo
left a comment
There was a problem hiding this comment.
I just quickly skimmed over most of the changes and from what I can see there doesn’t seem to be anything gamebreaking.
TL;DR
LGTM
sudokoko
approved these changes
Mar 16, 2023
Member
sudokoko
left a comment
There was a problem hiding this comment.
Not seeing anything production-breaking, though might be worth testing on staging.slendy.pw if not already.
LGTM.
# Conflicts: # ProjectLighthouse.Servers.GameServer/Controllers/MessageController.cs # ProjectLighthouse.Servers.GameServer/Types/Categories/CategoryWithUser.cs # ProjectLighthouse.Servers.GameServer/Types/Categories/CustomCategory.cs # ProjectLighthouse.Servers.GameServer/Types/Categories/HeartedCategory.cs # ProjectLighthouse.Servers.GameServer/Types/Categories/LuckyDipCategory.cs # ProjectLighthouse.Servers.GameServer/Types/Categories/MostPlayedCategory.cs # ProjectLighthouse.Servers.GameServer/Types/Categories/NewestLevelsCategory.cs # ProjectLighthouse.Servers.GameServer/Types/Categories/QueueCategory.cs # ProjectLighthouse.Servers.GameServer/Types/Categories/TeamPicksCategory.cs # ProjectLighthouse/Types/Entities/Level/Slot.cs
Contributor
|
i declare this pr yolo'd |
Oo1Toyo1oO
added a commit
to Oo1Toyo1oO/ProjectLighthouse
that referenced
this pull request
May 31, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR does away with the whole LbpSerializer string concatenation serialization system and moves to a modified version of the C# XML serializer. It had to be changed because LBP doesn't exactly follow XML specifications, so things like namespaces and type-identifying attributes aren't used and must be removed from the normal output. There are some potential performance benefits to this PR because data for an object needed for serialization is now loaded separately rather than having to inner join an entire user with a slot just to get their username.
The main takeaway from this PR is that all database entities have been renamed to follow the Entity naming convention to differentiate them from other types. They have also been stripped of all serialization-related types, attributes, and methods so that they are strictly for storing data. Then there are objects that implement ILbpSerializable that have methods to take an Entity and convert it to a serializable class. For deserializing objects, there are methods in the serialization classes to convert an ILbpSerializable to its Entity counterpart.