-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Mark the new tensor APIs as experimental for .NET 9 #105268
Changes from 6 commits
7e9e36b
85c2c9a
6a66f6e
754ba62
2abdd18
b4baee9
5bb1e6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace System | ||
{ | ||
internal static class Experimentals | ||
{ | ||
internal const string SharedUrlFormat = "https://aka.ms/dotnet-warnings/{0}"; | ||
|
||
// Please see docs\project\list-of-diagnostics.md for instructions on the steps required | ||
// to introduce an experimental API, claim a diagnostic id, and ensure the | ||
// "aka.ms/dotnet-warnings/{0}" URL points to documentation for the API. | ||
// The diagnostic IDs reserved for experimental APIs are SYSLIB5### (SYSLIB5001 - SYSLIB5999). | ||
|
||
// When an API is no longer marked as experimental, the diagnostic ID should be removed from this file | ||
// but retained in the table in docs\project\list-of-diagnostics.md to prevent reuse. Be sure to remove | ||
// suppressions from the codebase as well. | ||
|
||
// Tensor<T> and related APIs are marked as [Experimental] in .NET 9 | ||
internal const string TensorTDiagId = "SYSLIB5001"; | ||
|
||
// When adding a new diagnostic ID, add it to the table in docs\project\list-of-diagnostics.md as well. | ||
// Keep new const identifiers above this comment. | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,13 @@ | |
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace System.Numerics.Tensors | ||
{ | ||
[Experimental(Experimentals.TensorTDiagId, UrlFormat = Experimentals.SharedUrlFormat)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need to mark internal types? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's just the way the analyzer currently works. Presumably to ensure that consumers of those internal types are also aware that its using experimental features |
||
internal static class TensorHelpers | ||
{ | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're using the markdown file as the source of truth for claiming new diagnostic IDs, what's the need for also consolidating them in source? IIRC we don't do this for other diagnostics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do this with Obsoletions as well. I assert that it has helped keep the process discoverable and consistent.