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

Fix UseCompilerGeneratedDocXmlFile default value #106179

Merged
merged 8 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions eng/intellisense.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<Project>

<PropertyGroup>
<UseCompilerGeneratedDocXmlFile Condition="'$(UseCompilerGeneratedDocXmlFile)' == ''">true</UseCompilerGeneratedDocXmlFile>
</PropertyGroup>

<PropertyGroup Condition="'$(UseCompilerGeneratedDocXmlFile)' != 'true'">
<IntellisensePackageXmlRootFolder>$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.private.intellisense', '$(MicrosoftPrivateIntellisenseVersion)', 'IntellisenseFiles'))</IntellisensePackageXmlRootFolder>
<IntellisensePackageXmlFilePathFromNetFolder>$([MSBuild]::NormalizePath('$(IntellisensePackageXmlRootFolder)', 'net', '1033', '$(AssemblyName).xml'))</IntellisensePackageXmlFilePathFromNetFolder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
namespace System.Security.Cryptography.X509Certificates
{
[UnsupportedOSPlatform("browser")]
#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105974
public static partial class X509CertificateLoader
#pragma warning restore 1591
{
private const int MemoryMappedFileCutoff = 1_048_576;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ public static IHttpClientBuilder ConfigureAdditionalHttpMessageHandlers(this IHt
return builder;
}

#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105974
public static IHttpClientBuilder AddAsKeyed(this IHttpClientBuilder builder, ServiceLifetime lifetime = ServiceLifetime.Scoped)
{
ThrowHelper.ThrowIfNull(builder);
Expand Down Expand Up @@ -703,6 +704,7 @@ public static IHttpClientBuilder RemoveAsKeyed(this IHttpClientBuilder builder)

return builder;
}
#pragma warning restore 1591

// workaround for https://github.com/dotnet/runtime/issues/102654
private static void UpdateEmptyNameHttpClient(IServiceCollection services, HttpClientMappingRegistry registry)
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Net.Http/src/System.Net.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-linux;$(NetCoreAppCurrent)-osx;$(NetCoreAppCurrent)-freebsd;$(NetCoreAppCurrent)-maccatalyst;$(NetCoreAppCurrent)-ios;$(NetCoreAppCurrent)-tvos;$(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent)-wasi;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-solaris;$(NetCoreAppCurrent)-haiku;$(NetCoreAppCurrent)-android;$(NetCoreAppCurrent)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);HTTP_DLL</DefineConstants>
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
</PropertyGroup>

<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
Expand Down
2 changes: 2 additions & 0 deletions src/libraries/System.Numerics.Tensors/src/System/NIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ public static NIndex FromEnd(nint value)
return new NIndex(~value);
}

#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981
public Index ToIndex() => checked((Index)this);
public Index ToIndexUnchecked() => (Index)this;
#pragma warning restore 1591

/// <summary>Returns the NIndex value.</summary>
public nint Value
Expand Down
2 changes: 2 additions & 0 deletions src/libraries/System.Numerics.Tensors/src/System/NRange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,14 @@ public override string ToString()

private static void ThrowArgumentOutOfRangeException() => throw new ArgumentOutOfRangeException("length");

#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981
public static implicit operator NRange(Range range) => new NRange(range.Start, range.End);

public static explicit operator Range(NRange value) => new Range((Index)value.Start, (Index)value.End);
public static explicit operator checked Range(NRange value) => new Range(checked((Index)value.Start), checked((Index)value.End));

public Range ToRange() => new Range(checked((Index)Start), checked((Index)End));
public Range ToRangeUnchecked() => new Range((Index)Start, (Index)End);
#pragma warning restore 1591
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981

namespace System.Numerics.Tensors
{
[Experimental(Experimentals.TensorTDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
Expand Down Expand Up @@ -44,3 +46,5 @@ public interface IReadOnlyTensor<TSelf, T> : IEnumerable<T>
bool TryFlattenTo(scoped Span<T> destination);
}
}

#pragma warning restore 1591
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using System.Buffers;
using System.Diagnostics.CodeAnalysis;

#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981

namespace System.Numerics.Tensors
{
[Experimental(Experimentals.TensorTDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
Expand Down Expand Up @@ -37,3 +39,5 @@ public interface ITensor<TSelf, T>
new ref T GetPinnableReference();
}
}

#pragma warning restore 1591
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,9 @@ public bool TryCopyTo(scoped TensorSpan<T> destination)
}

//public static explicit operator TensorSpan<T>(Array? array);
#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981
public static implicit operator ReadOnlyTensorSpan<T>(T[]? array) => new ReadOnlyTensorSpan<T>(array);
#pragma warning restore 1591

/// <summary>
/// Returns a <see cref="string"/> with the name of the type and the number of elements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ public static Tensor<T> CreateUninitialized<T>(scoped ReadOnlySpan<nint> lengths
return new Tensor<T>(values, lengths, strides, pinned);
}

#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981
public static ref readonly TensorSpan<T> FillGaussianNormalDistribution<T>(in TensorSpan<T> destination, Random? random = null) where T : IFloatingPoint<T>
{
Span<T> span = MemoryMarshal.CreateSpan<T>(ref destination._reference, (int)destination._shape._memoryLength);
Expand All @@ -193,5 +194,6 @@ public static ref readonly TensorSpan<T> FillUniformDistribution<T>(in TensorSpa

return ref destination;
}
#pragma warning restore 1591
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
namespace System.Numerics.Tensors
{
[Experimental(Experimentals.TensorTDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981
public sealed class Tensor<T>
: ITensor<Tensor<T>, T>
#pragma warning restore 1591
{
/// <summary>A byref or a native ptr.</summary>
internal readonly T[] _values;
Expand Down Expand Up @@ -365,11 +367,13 @@ public Tensor<T> this[Tensor<bool> filter]
}
}

#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981
public static implicit operator Tensor<T>(T[] array) => new Tensor<T>(array, [array.Length]);

public static implicit operator TensorSpan<T>(Tensor<T> value) => new TensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(value._values), value._lengths, value._strides, value._flattenedLength);

public static implicit operator ReadOnlyTensorSpan<T>(Tensor<T> value) => new ReadOnlyTensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(value._values), value._lengths, value._strides, value.FlattenedLength);
#pragma warning restore 1591

/// <summary>
/// Converts this <see cref="Tensor{T}"/> to a <see cref="TensorSpan{T}"/> pointing to the same backing memory."/>
Expand Down Expand Up @@ -614,10 +618,12 @@ public void Dispose()
}

// REVIEW: PENDING API REVIEW TO DETERMINE IMPLEMENTATION
#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981
public override int GetHashCode()
{
throw new NotImplementedException();
}
#pragma warning restore 1591

/// <summary>
/// Get a string representation of the tensor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
namespace System.Numerics.Tensors
{
[Experimental(Experimentals.TensorTDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981
public static partial class Tensor
#pragma warning restore 1591
{
#region AsReadOnlySpan
/// <summary>
Expand Down Expand Up @@ -6587,6 +6589,7 @@ public static ref readonly TensorSpan<T> Xor<T>(scoped in ReadOnlyTensorSpan<T>
}
#endregion

#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981
public static nint[] GetSmallestBroadcastableLengths(ReadOnlySpan<nint> shape1, ReadOnlySpan<nint> shape2)
{
if (!TensorHelpers.IsBroadcastableTo(shape1, shape2))
Expand All @@ -6604,6 +6607,7 @@ public static nint[] GetSmallestBroadcastableLengths(ReadOnlySpan<nint> shape1,

return intermediateShape;
}
#pragma warning restore 1591

#region TensorPrimitivesHelpers
private delegate void PerformCalculationSpanInSpanOut<T>(ReadOnlySpan<T> input, Span<T> output);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,9 @@ public bool TryCopyTo(scoped TensorSpan<T> destination)
}

//public static explicit operator TensorSpan<T>(Array? array);
#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105981
public static implicit operator TensorSpan<T>(T[]? array) => new TensorSpan<T>(array);
#pragma warning restore 1591

/// <summary>
/// Defines an implicit conversion of a <see cref="TensorSpan{T}"/> to a <see cref="ReadOnlyTensorSpan{T}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
namespace System.Buffers.Text
{
// AVX2 and Vector128 version based on https://github.com/gfoidl/Base64/blob/5383320e28cac6c7ac6f86502fb05d23a048a21d/source/gfoidl.Base64/Internal/Encodings/Base64UrlEncoding.cs

#pragma warning disable 1591 // TODO: Document this API. https://github.com/dotnet/runtime/issues/105974
public static partial class Base64Url
#pragma warning restore 1591
{
private const int MaxStackallocThreshold = 256;

Expand Down
Loading