Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve visibility of recommendation not to use the 'latest' langversion #42400

Open
jnm2 opened this issue Aug 30, 2024 · 0 comments · May be fixed by #42639
Open

Improve visibility of recommendation not to use the 'latest' langversion #42400

jnm2 opened this issue Aug 30, 2024 · 0 comments · May be fixed by #42639
Assignees
Labels
doc-enhancement Improve the current content [org][type][category] dotnet-csharp/svc in-pr This issue will be closed (fixed) by an active pull request. lang-reference/subsvc Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@jnm2
Copy link
Contributor

jnm2 commented Aug 30, 2024

Type of issue

Other (describe below)

Description

The C# team recommends against using langversion latest. This recommendation is currently not very visible.

Goals:

Other questions:

  • Can the reasoning be even stronger than currently stated? The currently stated reasoning would also equally recommend against using explicit langversion 13 with .NET 6. But potentially, there's also rationale that says if you're going to use C# 13 with .NET 6 anyway, then <Langversion>13</LangVersion> is still better than <LangVersion>latest</LangVersion>. It makes the build more predictable between machines with different SDK versions installed, whether they're build machines or developer machines. There is no preference between the two in the rationale given in the current recommendation. The current rationale is only about mismatching with the target framework, and not about lack of predictability of a floating version between machines.

  • It's using an "important" style, but I wonder if a "warning" style would be appropriate and stand out better. E.g.:
    image

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/language?source=docs#langversion

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/compiler-options/language.md

Document Version Independent Id

19f59267-c4c1-eb0e-7e48-45ffd6e2d9d1

Article author

@BillWagner

Metadata

  • ID: e548e000-8190-b1bb-51fd-7e7b2d5bcb45
  • Service: dotnet-csharp
  • Sub-service: lang-reference

Associated WorkItem - 310945

@issues-automation issues-automation bot added dotnet-csharp/svc lang-reference/subsvc Pri1 High priority, do before Pri2 and Pri3 labels Aug 30, 2024
@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Aug 30, 2024
@BillWagner BillWagner self-assigned this Sep 3, 2024
@BillWagner BillWagner added the doc-enhancement Improve the current content [org][type][category] label Sep 3, 2024
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label Sep 3, 2024
@BillWagner BillWagner added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Sep 12, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Sep 13, 2024
BillWagner added a commit to BillWagner/docs that referenced this issue Sep 17, 2024
Fixes dotnet#42400

Add more emphasis to discourage use of `latest` as the `LangVersion` element:

- Change the style to `WARNING`
- Add that `latest` can use a different language version on different machines.
- Add that note and link from other C# docs discussing versioning.
@BillWagner BillWagner linked a pull request Sep 17, 2024 that will close this issue
@dotnet-policy-service dotnet-policy-service bot added the in-pr This issue will be closed (fixed) by an active pull request. label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Improve the current content [org][type][category] dotnet-csharp/svc in-pr This issue will be closed (fixed) by an active pull request. lang-reference/subsvc Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

3 participants