JasperFx / marten

.NET Transactional Document DB and Event Store on PostgreSQL
https://martendb.io
MIT License
2.79k stars 441 forks source link

Curious why drop netstandard #3338

Closed mwpowellhtx closed 1 month ago

mwpowellhtx commented 1 month ago

I am evaluating paths forward for data and serialization layers, and Marten is among my choices, but I am curious, why did you _drop netstandard circa 5.0.0, since 6.0.0 it seems.

As a subscriber, consumer of such packages, I do not generally like to up-lift such components from API surface areas to specific runtimes until the very last possibly moment when it should become more opinionated, such as toward the more user facing layers, UI, web, and so on.

I consider netstandard2.0 to be the bare minimum these days, depending on the API required. Or if slightly more advanced features are desperately needed, then perhaps even netstandard2.1. Although sadly admitedly, that is end of life (a mistake I think, but whatever).

Hawxy commented 1 month ago

.NET Standard was dropped as Marten already didn't run on .NET Framework in v5.0 so there was no benefit in supporting it (.NET Framework support was dropped with v4). There's no point spamming the codebase with preprocessor directives and an extra build/test matrix to "support" .NET Standard if the library doesn't run on anything apart from modern .NET targets.

In the same way, you as a user should not be writing libraries that target .NET Standard if they're not going to be shared across .NET Framework/Core, it's shooting yourself in the foot for no benefit.

Our support policy is whatever version of (Modern) .NET Microsoft supports and the target framework enforces that. This is also in alignment with Microsoft's own advice:

If you don't need to support .NET Framework, you could target .NET Standard 2.1 or .NET 8. We recommend you skip .NET Standard 2.1 and go straight to .NET 8.

Use netstandard2.0 to share code between .NET Framework and all other implementations of .NET. Use netstandard2.1 to share code between Mono, Xamarin, and .NET Core 3.x.