Skip to content

Use consistent target frameworks across Langly. #334

Description

@teo-tsirpanis

When I tried to install the Stringier metapackage on a .NET 6 project I was informed by Visual Studio that it's going to install all these packages:

93 packages
FastEnum.1.6.1
Microsoft.NETCore.Platforms.1.1.0
Microsoft.NETCore.Targets.1.1.0
Microsoft.Win32.Primitives.4.3.0
NETStandard.Library.1.6.1
Numbersome.IndexRange.5.0.0-beta.8
Numbersome.Sets.5.0.0-beta.8
Philosoft.BehavioralAttributes.5.0.0-beta.8
Philosoft.CodeAnalysisAttributes.5.0.0-beta.8
Philosoft.Concepts.5.0.0-beta.8
Philosoft.Providers.5.0.0-beta.8
Philosoft.Traits.5.0.0-beta.8
runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl.4.3.0
runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl.4.3.0
runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl.4.3.0
runtime.native.System.4.3.0
runtime.native.System.IO.Compression.4.3.0
runtime.native.System.Net.Http.4.3.0
runtime.native.System.Security.Cryptography.Apple.4.3.0
runtime.native.System.Security.Cryptography.OpenSsl.4.3.0
runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl.4.3.0
runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl.4.3.0
runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple.4.3.0
runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl.4.3.0
runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl.4.3.0
runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl.4.3.0
runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl.4.3.0
runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl.4.3.0
Stringier.5.0.0-beta.8
Stringier.Categories.5.0.0-beta.8
Stringier.Encodings.5.0.0-beta.8
Stringier.Metrics.5.0.0-beta.8
Stringier.Patterns.5.0.0-beta.8
Stringier.Rope.5.0.0-beta.8
Stringier.Search.5.0.0-beta.8
Stringier.Text.5.0.0-beta.8
System.AppContext.4.3.0
System.Buffers.4.3.0
System.Collections.4.3.0
System.Collections.Concurrent.4.3.0
System.ComponentModel.Annotations.4.5.0
System.Console.4.3.0
System.Diagnostics.Debug.4.3.0
System.Diagnostics.DiagnosticSource.4.3.0
System.Diagnostics.Tools.4.3.0
System.Diagnostics.Tracing.4.3.0
System.Globalization.4.3.0
System.Globalization.Calendars.4.3.0
System.Globalization.Extensions.4.3.0
System.IO.4.3.0
System.IO.Compression.4.3.0
System.IO.Compression.ZipFile.4.3.0
System.IO.FileSystem.4.3.0
System.IO.FileSystem.Primitives.4.3.0
System.Linq.4.3.0
System.Linq.Expressions.4.3.0
System.Memory.4.5.4
System.Net.Http.4.3.0
System.Net.Primitives.4.3.0
System.Net.Sockets.4.3.0
System.ObjectModel.4.3.0
System.Reflection.4.3.0
System.Reflection.Emit.4.3.0
System.Reflection.Emit.ILGeneration.4.3.0
System.Reflection.Emit.Lightweight.4.3.0
System.Reflection.Extensions.4.3.0
System.Reflection.Primitives.4.3.0
System.Reflection.TypeExtensions.4.3.0
System.Resources.ResourceManager.4.3.0
System.Runtime.4.3.0
System.Runtime.Extensions.4.3.0
System.Runtime.Handles.4.3.0
System.Runtime.InteropServices.4.3.0
System.Runtime.InteropServices.RuntimeInformation.4.3.0
System.Runtime.Numerics.4.3.0
System.Security.Cryptography.Algorithms.4.3.0
System.Security.Cryptography.Cng.4.3.0
System.Security.Cryptography.Csp.4.3.0
System.Security.Cryptography.Encoding.4.3.0
System.Security.Cryptography.OpenSsl.4.3.0
System.Security.Cryptography.Primitives.4.3.0
System.Security.Cryptography.X509Certificates.4.3.0
System.Text.Encoding.4.3.0
System.Text.Encoding.Extensions.4.3.0
System.Text.RegularExpressions.4.3.0
System.Threading.4.3.0
System.Threading.Tasks.4.3.0
System.Threading.Tasks.Extensions.4.3.0
System.Threading.Timer.4.3.0
System.ValueTuple.4.5.0
System.Xml.ReaderWriter.4.3.0
System.Xml.XDocument.4.3.0
UnicodeInformation.2.5.1

A significant majority of them are legacy .NET Standard 1.x artifacts and completely unnecessary.

To minimize the amount of packages they depend on, Langly projects have to:

  • Consistently target .NET Standard 2.0 as recommended by Microsoft: Some packages like Numbersome.Sets and Philosoft.BehavioralAttributes target earlier .NET Standard versions only, while others like Stringier.Rope and Collectathon.Arrays target earlier .NET Standard versions.
  • Conditionally reference compatibility packages: Some Langly projects unnecessarily reference compatibility packages that provide missing functionality for earlier frameworks, in newer frameworks:
    • System.Memory should be conditionally referenced only in .NET Standard 2.0 or earlier. Projects that use spans and don't target any later framework should multi-target to either .NET Standard 2.1 or .NET Core, and not reference this package there.
    • The System.ValueTuple package should be removed. Value tuples already exist in all frameworks Langly targets, even on .NET Standard 1.3.

I would have made these changes myself and submit them in a PR, but cannot since Langly's development stopped being public.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions