Skip to content

Internals: IO optimization and fixes

Compare
Choose a tag to compare
@Emik03 Emik03 released this 15 Jan 22:51
· 300 commits to main since this release

Version 3

Alongside the release of the third version, wawa has also been added as a plugin in Qkrisi's modkit.

wawa.DDL, wawa.Extensions, and wawa.Unity are the assemblies without any changes, public or internal. These have been recompiled as version 3 just to keep Unity's assembly conflict problems away.

MAJOR

wawa.IO:

  • Change argument names for most exposed methods in PathFinder to give much clearer indication for what they are for. A breaking change if you used explicit arguments, e.g. PathFinder.GetModInfo(assembly: "foo").

wawa.Optionals:

  • Rename Maybe.ToMaybe to Maybe.AsMaybe.

MINOR

wawa.Optionals:

  • Add Maybe.AsNullable to now allow bi-directional conversions between System.Nullable and Maybe.

wawa.Editors:

  • Add logging function for non-wawa templates.

General:

  • Add additional JetBrains annotations for better analysis with ReSharper.

PATCH

wawa.Editors:

  • Change location for downloading wawa.Editors to be correctly in ./Assets/Editor/Plugins/Managed. It also creates the folder in the event that this directory is absent.

wawa.IO:

  • Fix previously thought unreachable edgecase where ModInfo is null in game. PathFinder.GetModInfo no longer throws ArgumentNullException for those edgecases.
  • Improve FFI library resolving for GetUnmanaged.
  • Remove logging for all methods in PathFinder, as most functions now don't require the extensive logging they used to.
  • Turn GetDirectory, GetFile, and GetModInfo into pure functions.
  • Use the faster Unity API AssetBundle.LoadFromFile to load asset bundles.

General:

  • Hide AllowNullAttribute which was mistakenly exposed into the public API. Considered a patch because AllowNullAttribute was not possible to reference properly due to each library having the same definition and namespace which would cause aliasing issues, as well as it having no definitions or metadata to play with. Use CanBeNullAttribute instead.
  • No longer throws ArgumentNullException when calling object.Equals with null for the following types:
    • Wawa.IO.Config
    • Wawa.IO.ModInfo
    • Wawa.Modules.Sound
    • Wawa.Modules.State
    • Wawa.Optionals.Maybe
    • Wawa.Optionals.Unit
    • Wawa.TwitchPlays.AliasAttribute
    • Wawa.TwitchPlays.CommandAttribute
    • Wawa.TwitchPlays.CommandInfo
    • Wawa.TwitchPlays.Instruction
    • Wawa.TwitchPlays.TwitchString
    • Wawa.TwitchPlays.YieldEventArgs