Skip to content

v6.2.0: Deprecation cleanup, change in FormatterSink, new `LogLevel`

Latest
Compare
Choose a tag to compare
@Geod24 Geod24 released this 12 Dec 09:47
· 28 commits to v6.x.x since this release

Notable changes

Fixes for forward compatibility with new DMD releases

  • ocean.net.server.connection.IConnectionHandler, ocean.text.entities.model.MarkupEntityCodec,
    ocean.io.Stdout, ocean.core.SmartUnion

Those modules have been changed to clean up errors with new releases,
namely pokemon-style catch which is now an error,
working around a visibility bug (public alias to private template instance doesn't work),
and an upcoming improvement to DMD about discarding without side effect.

Two extra levels are now available to the Logger: Debug and Verbose

  • ocean.util.log.ILogger, ocean.util.log.Logger

Those new levels should help developers to have more fine-grained log messages.
Previously, only Trace was available for development output, the next level, Info,
being for informative messages to the users.
Debug itself is the lowest (most verbose) level, followed by the pre-existing Trace level,
followed by Verbose. The other log levels (Info, Warn, Error, Fatal) follow,
and are unchanged.

In addition to the enum values, convenience function were added to Logger:
Logger.dbg and Logger.verbose. The former name is an abbreviation,
as debug is a keyword in D.

FormatterSink now takes its char[] argument as in, not const

  • ocean.text.convert.Formatter, ocean.util.log.Appender

This change shouldn't have any effect for users that do not use -preview=in.
For -preview=in users, it allows a more consistent usage of delegates,
as void delegate(const char[]) is not covariant with void delegate(in char[]),
notably when Throwable.toString is involved.

Deprecations

creal / ireal functions in ocean.math are deprecated

  • ocean.math.IEEE, ocean.math.Math, ocean.meta.traits.Basic

Upstream deprecated support for creal and ireal types in v2.097.0.
Functions in ocean.math.{IEEE,Math} that used them are now deprecated.
Templates isComplexType / isImaginaryType used for introspection are deprecated as well.