Skip to content

Centralized LangVersion: 10#335

Merged
jskeet merged 2 commits intocloudevents:mainfrom
erwinkramer:wip/net8-only-2026-04-05
Apr 6, 2026
Merged

Centralized LangVersion: 10#335
jskeet merged 2 commits intocloudevents:mainfrom
erwinkramer:wip/net8-only-2026-04-05

Conversation

@erwinkramer
Copy link
Copy Markdown
Contributor

@erwinkramer erwinkramer commented Apr 5, 2026

This PR makes sure to:

  • Centralize langVersion to use 10 throughout the repo.

As a reference (or point for discussion), Microsoft's advice for netstandard can be found here.

Closes #333.

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Apr 6, 2026

I don't want to remove support for netstandard2.0 or netstandard2.1. It's entirely plausible that there are people using this who are targeting .NET Framework, and I'd really rather not break them. It would also break projects which are themselves are class libraries which target netstandard in order to allow their dependents to use .NET Framework. (See https://github.com/googleapis/google-cloudevents-dotnet for one such example...)

The targeting of netstandard2.1 and netstandard2.0 is (IIRC) to avoid addition dependencies for other dependents that are targeting netstandard2.1. There may be other reasons that I can't remember too...

@erwinkramer erwinkramer marked this pull request as draft April 6, 2026 11:01
@erwinkramer erwinkramer force-pushed the wip/net8-only-2026-04-05 branch from be4fd7f to 2694b2d Compare April 6, 2026 11:04
Signed-off-by: Erwin <erwinkramer@hotmail.com>
@erwinkramer erwinkramer force-pushed the wip/net8-only-2026-04-05 branch from 2694b2d to aff01e0 Compare April 6, 2026 11:10
Signed-off-by: Erwin <erwinkramer@hotmail.com>
@erwinkramer erwinkramer changed the title Target .NET 8 and follow its LangVersion Centralized LangVersion: 10 Apr 6, 2026
@erwinkramer erwinkramer marked this pull request as ready for review April 6, 2026 11:18
@erwinkramer
Copy link
Copy Markdown
Contributor Author

I don't want to remove support for netstandard2.0 or netstandard2.1. It's entirely plausible that there are people using this who are targeting .NET Framework, and I'd really rather not break them.

@jskeet Sure, a roadmap in the readme could help, stating how it will go from unsupported to supported frameworks gradually. Currently only .NET 8 and up are supported by MS, but the .NET Framework 4.x support is still there as well from Microsoft, but eventually that will get unsupported (officially) by Microsoft as well, then it might be a good time to drop support here as well? If you align official support from Microsoft with what we're doing here, we're should only be catering to consumers related to .NET Framework 4.x and .NET 8 or larger - which would mean we could drop netstandard2.1 but keep netstandard2.0 and .net8.

For now, I redid the PR and just made the LangVersion consistent throughout the project, would that work for you?

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Apr 6, 2026

but the .NET Framework 4.x support is still there as well from Microsoft, but eventually that will get unsupported (officially) by Microsoft as well, then it might be a good time to drop support here as well?

If MS ever does stop supporting .NET Framework, we should definitely revisit at that point. My gut feeling is that's many years away though. Until then, targeting netstandard 2.0 is the way to support both, so I'd rather keep it until then.

(But just to clarify, if it ever gets to the point where only .NET is supported, I'd be happy to remove support for netstandard at the same time as .NET Framework)

For now, I redid the PR and just made the LangVersion consistent throughout the project, would that work for you?

Yup, absolutely - will review now.

Copy link
Copy Markdown
Contributor

@jskeet jskeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, this looks fine - thanks for reworking.

@jskeet jskeet merged commit 76963a1 into cloudevents:main Apr 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LangVersion streamlining

2 participants