Skip to content

v4.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 31 Jan 09:23
· 5 commits to develop since this release
e206c92

New stable release! 🚀 🎉
There are new features, bug fixes but also some architecture changes and a new documentation website 🤩
The core concept of the framework is the same but there are some breaking changes in APIs and technology replacements (plugins API).

These changes have been extensively tested in the new SceneGate projects (UI tool, Ekona, Lemon) and modding projects. Releasing v4.0 is a new milestone in SceneGate that allows us to start shipping the first versions of these projects.

Summary

  • 📚 Documentation! checkout in the project site
  • 🔢 Enhancements in the IO namespace bringing compatibility with the native .NET Stream type
  • ♻️ New converters API that allows initialization via standard class constructors
  • 📋 Cloneable formats
  • 📃 New simple base class for custom encoding implementations
  • 🔌 New native and safer plugin API. No longer based on MEF.
  • 🆕 .NET 6.0 and 8.0 support with nullable annotations. .NET Framework is not supported anymore.

Breaking changes

  • Drop support of .NET Framework
  • Rename library Yarhl.Media to Yarhl.Media.Text
  • Plugin API moved to new library Yarhl.Plugins
  • Remove APIs ConvertTo, TransformTo and DataStream.ReadFormat<T>()
  • Obsolete IInitializer<T>. Use the constructor instead.
  • DataStream does NOT throw EndOfStreamException when reading bytes.
    • ReadByte returns -1 when it reaches the end instead of throwing an exception.
    • DataReader keeps the behavior and it will throw EndOfStreamException when reading any data type.
  • Move DataStream.Length setter to its own method SetLength(long).
  • Rename TextReader and TextWriter to TextDataReader and TextDataWriter.
  • Removed IStream interface in favor of Stream.
  • TextDataReader will not return null string if it starts reading from the end already. It will throw EndOfStreamException.
  • DataStream.Seek now requires a negative argument to go back positions when origin is SeekOrigin.End.
  • Binary object (de)serialization removed from DataReader and DataWriter and moved into new types BinaryDeserializer and BinarySerializer.
    • The attribute BinarySerializable is no longer required and it's removed.
    • The attribute BinaryOrder is mandatory for properties in projects running in .NET 6.0
    • The attribute property ReadAs and WriteAs is now UnderlyingType
    • The attribute for enums is optional. Its defined underlying type will be used.

As part of this release we had 49 issues closed.

What's Changed

  • Formats and converters
  • IO
    • ✨ Refactor and improvements in binary object (de)serialization by @pleonex in #208
    • ✨ Implement DataStream inheritance with Stream and support of Readers and Writers with Stream by @pleonex in #161
    • 👕 Rename TextReader and TextWriter to TextDataReader and TextDataWriter by @pleonex in #162
    • ✨🔥 Add Stream argument constructor to DataStream and remove IStream interface by @pleonex in #170
    • ✨ Implement slice for DataStream by @pleonex in #204
    • ✨ Implement factories to create DataStreams and Nodes from array and standard streams by @pleonex in #173
    • 🐎 Improve memory consumption of DataStream.WriteTo by @pleonex in #183
    • ✨ Use DataStream type in Stream properties for readers and writers and explicitly set CanTimeout to false by @pleonex in #172
    • ✨🐛 Stream overloads in BinaryFormat and NodeFactory and fix threading issue by @pleonex in #163
    • ✨ Implement constructor to create BinaryFormat from a file by @pleonex in #205
    • 🐛 Fix behavior of DataStream.Seek when SeekOrigin is End by @Kaplas80 in #177
    • 🐛 Comparing stream to itself returns false by @pleonex in #199
    • 🐛 WriteTo truncates output file by @pleonex in #203
  • FileSystem
    • ✨ Implement node renaming by @pleonex in #200
    • ✨ Implement extension methods to transform node collections by @pleonex in #201
    • ✨ ChangeFormat fluent style returning itself by @pleonex in #202
    • ✨ Advanced filter in FromDirectory by @Kaplas80 in #166
    • ✨ Support opening nodes from Windows symlinks by @pleonex in #180
    • 🐛 Set FileOpenMode at NodeFactory.FromFile by @Kaplas80 in #165
    • 🐛 Fix NodeFactory.FromDirectory by @Kaplas80 in #188
  • Media.Text
    • 👕 Rename Yarhl.Media to Yarhl.Media.Text by @pleonex in #187
    • ✨ Implement simple base class for custom encoding implementations by @pleonex in #181
    • 🐛 Fix Binary2Po converter not reading from the beginning of the stream by @Kaplas80 in #169
  • Plugins
    • ❇️ Re-implementation of plugins API by @pleonex in #206
  • Documentation
    • ✨📚 New documentation website and project name re-meaning by @pleonex in #192
    • 🐛 Fix "Yarhl in a nutshell" link by @Timo654 in #182
    • 🐛 Fixed a small error in the Docs by @priverop in #184
  • Build system
    • ✨ Annotate API reference types for nullable awareness by @pleonex in #176
    • 🔥 Deprecate .NET Framework by @pleonex in #178
    • ✨ Support .NET 8.0 by @pleonex in #198
    • ✨ Update build system to build and test for .NET 6 by @pleonex in #174
    • ✨ New build system and warning clean-up by @pleonex in #197
    • ⬆️ Bump build system and use Cake v2.1 by @pleonex in #179
    • ⬆️ Migrate to Cake 3.0 and latest .NET SDK by @pleonex in #190
    • ⬆️ Update dependencies and fix code coverage by @pleonex in #171
    • 🔧 Update build system for Ubuntu 20.04 by @pleonex in #167
    • 🔧 Disable auto-comment on release by @pleonex in #160

Full Changelog: v3.1.0...v4.0.0