All notable changes to PolyKit will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
3.0.9 (2023-11-26)
This release updates some dependencies to their post-.NET 8.0 versions. No other modifications were made.
3.0.4 (2023-11-20)
- .NET 8 was added as a target platform.
- All polyfills were updated with modifications (if any) made to BCL types up to the release of .NET 8.0.0.
- The polyfill for
ExperimentalAttribute
has been added; however, this attribute is only polyfilled by PolyKit.Embedded when compiling with .NET SDK 8.0. This avoids giving the user the false impression that the attribute is supported, when the compiler doesn't actually support it. DateOnly
andTimeOnly
polyfills now supportdeconstruction
.
- BREAKING CHANGE: Extension classes that were previously in
PolyKit.*
namespaces have been moved toSystem.*
namespaces, in order for their members to be more easily discoverable (e.g. by Intellisense) and usable without additionalusing
statements.
This change may seem to go against best practices, as it places PolyKit types in namespaces usually reserved for the BCL; however, it makes sense if you consider that one of the purposes of polyfills is to minimize the amount of code changes necessary to backport code.
Affected extension classes include:PolyKitEnumerable
, moved fromPolyKit.Linq
toSystem.Linq
;PolyKitExceptionExtensions
, moved fromPolyKit.Diagnostics
toSystem
;PolyKitStackTraceExtensions
, moved fromPolyKit.Diagnostics
toSystem.Diagnostics
.
2.0.30 (2022-11-24)
- The polyfill for
DateOnly
could generate aCS8602
warning (possible dereference of a null reference). - The polyfill for
TimeOnly
, when compiled without span support, generated twoCS1503
errors because of a missing preprocessor conditional.
2.0.26 (2022-11-24)
- The polyfills for
DateOnly
andTimeOnly
only worked when either the target platform supported spans, or theSystem.Memory
package was referenced.
2.0.24 (2022-11-23)
- .NET 7 was added as a target platform.
- Features that were introduced with .NET 7 are not polyfilled by PolyKit.Embedded when compiling with .NET SDK 6.0. This avoids giving the user the false impression that, for example,
UnscopedRefAttribute
is supported, when the compiler doesn't actually support it. - PolyKit now provides a quasi-polyfill for
Enumerable.TryGetNonEnumeratedCount<TSource>
. Since extending theEnumerable
class is not possible, PolyKit adds (in thePolyKit.Linq
namespace) aTryGetCountWithoutEnumerating<TSource>
extension method that callsTryGetNonEnumeratedCount<TSource>
on .NET6.0+ and polyfills as much functionality as possible on older frameworks. - Polyfills for the following features were added:
- required members;
scoped
modifier (including theUnscopedRef
attribute);AsyncMethodBuilder
attribute;ModuleInitializer
attribute;- trimming incompatibility attributes;
UnconditionalSuppressMessage
attribute;CompilerFeatureRequired
attribute;RequiresPreviewFeatures
attribute;UnmanagedCallersOnly
attribute;ConstantExpected
attribute;StringSyntax
attribute;ISpanFormattable
interface (note that the polyfill does NOT addISpanFormattable
support to .NET Runtime types);DateOnly
andTimeOnly
structs (not that the polyfills do NOT implementIParsable
andISpanParsable<TSelf>
, although the methods are there and can be used as public methods of the individual types).
- BREAKING CHANGE: Following .NET's Library support for older frameworks policy, support for .NET Core 3.1 has been removed.
- All types provideed by PolyKit are now flagged with the necessary attributes to be ignored by code analyzers, debuggers, code coverage tools, code metrics, etc. See this blog post for more information about the attributes added to types and the rationale behind each of them.
1.0.16 (2022-11-01)
Initial release.