Skip to content

Split between Type and Codec#46

Merged
RainWarrior merged 96 commits into
masterfrom
codecs
May 13, 2020
Merged

Split between Type and Codec#46
RainWarrior merged 96 commits into
masterfrom
codecs

Conversation

@RainWarrior
Copy link
Copy Markdown
Contributor

  • Split off types and codecs
  • Replaced Optional with DataResult to better track errors and allow recovery
  • Moved serialization-related classes to s separate package
  • Bunch of helpers for Applicative syntax
  • Applicative codec builder for named fields

…taResult for keeping track of serialization errors and to allow partial recovery; made Type.write use it.
@RainWarrior
Copy link
Copy Markdown
Contributor Author

That's expected since EMPTY is a MapCodec (returns a map); on decoding JsonOps.INSTANCE.empty() will get expanded to empty map too iirc since the typing is not that strict

@RainWarrior RainWarrior requested a review from boq May 12, 2020 08:01
Copy link
Copy Markdown
Member

@boq boq left a comment

Choose a reason for hiding this comment

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

More review

Comment thread src/main/java/com/mojang/datafixers/kinds/Applicative.java
Comment thread src/main/java/com/mojang/serialization/RecordBuilder.java Outdated
Comment thread src/main/java/com/mojang/serialization/codecs/ListCodec.java Outdated
Comment thread src/main/java/com/mojang/serialization/MapCodec.java
slicedlime
slicedlime previously approved these changes May 12, 2020
Copy link
Copy Markdown
Member

@slicedlime slicedlime left a comment

Choose a reason for hiding this comment

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

Nitpicks about code ordering.

Also really missing tests for this like we discussed, but leaving that for later.

Comment thread src/main/java/com/mojang/serialization/Codec.java Outdated
boq
boq previously approved these changes May 12, 2020
Comment thread src/main/java/com/mojang/serialization/DynamicOps.java Outdated
@RainWarrior RainWarrior dismissed stale reviews from boq and slicedlime via aef2853 May 12, 2020 15:00
Comment thread src/main/java/com/mojang/serialization/codecs/EitherMapCodec.java Outdated
@RainWarrior RainWarrior merged commit 41d097a into master May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants