Skip to content

Commit

Permalink
Merge branch 'main' into no-ndk-lib-stubs
Browse files Browse the repository at this point in the history
* main:
  [tests] Bump NUnit versions to latest (dotnet#7802)
  [Microsoft.Android.Sdk.ILLink] target `net7.0` temporarily (dotnet#7803)
  [tests] `InstallAndroidDependenciesTest` can use `platform-tools` 34.0.0 (dotnet#7800)
  Bump to xamarin/Java.Interop/main@9e0a469 (dotnet#7797)
  [Xamarin.Android.Build.Tasks] FileWrites&libraryprojectimports.cache (dotnet#7780)
  Bump to dotnet/installer@d25a3bb 8.0.100-preview.2.23105.6 (dotnet#7769)
  [lgtm] Fix LGTM-reported issues (dotnet#1074)
  [ci] Report issues in the API docs build log (dotnet#7784)
  • Loading branch information
grendello committed Feb 17, 2023
2 parents 5be3d8b + 3a2e629 commit 2b53bd8
Show file tree
Hide file tree
Showing 23 changed files with 587 additions and 657 deletions.
2 changes: 2 additions & 0 deletions .lgtm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
queries:
- exclude: cs/campaign/constantine
22 changes: 22 additions & 0 deletions build-tools/automation/azure-pipelines-apidocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,25 @@ stages:
inputs:
artifactName: Api Docs Diff
targetPath: $(Build.StagingDirectory)/api-doc-diff

- powershell: |
$docsUpdateBinlog = Get-ChildItem -Path "$(Build.SourcesDirectory)/bin/Build$(XA.Build.Configuration)" -Filter *UpdateApiDocs-*.binlog | Select-Object -First 1
$buildLog = "$(Build.SourcesDirectory)/bin/Build$(XA.Build.Configuration)/temp-build.log"
& "$(Build.SourcesDirectory)/bin/$(XA.Build.Configuration)/dotnet/dotnet" build $docsUpdateBinlog > $buildLog
$issueContent = & {
Get-Content -Path $buildLog | Select-String "## Exception translating remarks"
Get-Content -Path $buildLog | Select-String "## Unable to translate remarks"
Get-Content -Path $buildLog | Select-String "JavadocImport-"
}
if ($issueContent) {
Write-Host "The following issues were found, review the build log for more details:"
Write-Host ""
foreach ($line in $issueContent) {
Write-Host $line
Write-Host ""
}
exit 1
}
displayName: Report issues in docs generation
4 changes: 2 additions & 2 deletions build-tools/scripts/NUnitReferences.projitems
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>
<!-- This file assumes Configuration.props has been imported -->
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit.ConsoleRunner" Version="$(NUnitConsoleVersion)" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
</ItemGroup>
<!-- Required packages for .NET Core -->
<ItemGroup Condition=" '$(TargetFramework)' != 'net472' and '$(TargetFramework)' != 'netstandard2.0' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,17 @@ public override bool Execute ()

var source = cancellationTokenSource = new CancellationTokenSource ();
var tasks = new Task<ITaskItem> [SourceUris.Length];
using (var client = new HttpClient ()) {

// LGTM recommendation
//
// Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler) where the CheckCertificateRevocationList property is set
// to true, will allow revoked certificates to be accepted by the HttpClient as valid.
//
var handler = new HttpClientHandler {
CheckCertificateRevocationList = true,
};

using (var client = new HttpClient (handler)) {
client.Timeout = TimeSpan.FromHours (3);
for (int i = 0; i < SourceUris.Length; ++i) {
tasks [i] = DownloadFile (client, source, SourceUris [i], DestinationFiles [i]);
Expand Down
15 changes: 12 additions & 3 deletions build-tools/xaprepare/xaprepare/Application/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,21 @@ static decimal SignificantDigits (decimal number, int maxDigitCount)
return (success, size);
}

public static HttpClient CreateHttpClient ()
{
var handler = new HttpClientHandler {
CheckCertificateRevocationList = true,
};

return new HttpClient (handler);
}

public static async Task<(bool success, ulong size, HttpStatusCode status)> GetDownloadSizeWithStatus (Uri url)
{
TimeSpan delay = ExceptionRetryInitialDelay;
for (int i = 0; i < ExceptionRetries; i++) {
try {
using (var httpClient = new HttpClient ()) {
using (HttpClient httpClient = CreateHttpClient ()) {
httpClient.Timeout = WebRequestTimeout;
var req = new HttpRequestMessage (HttpMethod.Head, url);
req.Headers.ConnectionClose = true;
Expand Down Expand Up @@ -524,7 +533,7 @@ public static async Task<bool> Download (Uri url, string targetFile, DownloadSta

static async Task DoDownload (Uri url, string targetFile, DownloadStatus status)
{
using (var httpClient = new HttpClient ()) {
using (HttpClient httpClient = CreateHttpClient ()) {
httpClient.Timeout = WebRequestTimeout;
Log.DebugLine ("Calling GetAsync");
HttpResponseMessage resp = await httpClient.GetAsync (url, HttpCompletionOption.ResponseHeadersRead);
Expand Down Expand Up @@ -820,7 +829,7 @@ public static string GetStringFromStdout (ProcessRunner runner, bool throwOnErro
LogError ($"failed with exit code {runner.ExitCode}");
return String.Empty;
}

string ret = sw.ToString ();
if (trimTrailingWhitespace)
return ret.TrimEnd ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ string GetStampFile (string file, string destinationDirectory, string ndkVersion
async Task<bool> FetchFiles (Dictionary<string, string> neededFiles, string destinationDirectory, Uri url)
{
Utilities.CreateDirectory (destinationDirectory);
using (var httpClient = new HttpClient ()) {
using (HttpClient httpClient = Utilities.CreateHttpClient ()) {
bool success;
long size;

Expand Down
18 changes: 9 additions & 9 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="8.0.100-alpha.1.23080.11">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="8.0.100-preview.2.23107.13">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>dec120944450abb58bc07a2fcdae2f4383bfd6bf</Sha>
<Sha>f05478ba9a4026e95306d3f8de59c70cfc0e60ce</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="8.0.100-1.23067.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/linker</Uri>
<Sha>c790896f128957acd2999208f44f09ae1e826c8c</Sha>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="8.0.0-preview.2.23106.6" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>fe4760cf04dee615948848955978e6d7430982a7</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="8.0.0-alpha.1.23080.2" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="8.0.0-preview.2.23106.6" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>9529803ae29c2804880c6bd8ca710b8c037cb498</Sha>
<Sha>fe4760cf04dee615948848955978e6d7430982a7</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-alpha.1" Version="8.0.0-alpha.1.23077.4" CoherentParentDependency="Microsoft.NETCore.App.Ref">
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.2" Version="8.0.0-preview.2.23081.1" CoherentParentDependency="Microsoft.NETCore.App.Ref">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>0fe864fc71191ff4ee18e59ef0af2929ca367a11</Sha>
<Sha>fd5a0d1b19bf0a96f6b4423150921542b0b9a90d</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
10 changes: 5 additions & 5 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>8.0.100-alpha.1.23080.11</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>8.0.100-1.23067.1</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>8.0.0-alpha.1.23080.2</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>8.0.100-preview.2.23107.13</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>8.0.0-preview.2.23106.6</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>8.0.0-preview.2.23106.6</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftDotNetApiCompatPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftNETWorkloadEmscriptenCurrentManifest80100alpha1Version>8.0.0-alpha.1.23077.4</MicrosoftNETWorkloadEmscriptenCurrentManifest80100alpha1Version>
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest80100alpha1Version)</MicrosoftNETWorkloadEmscriptenPackageVersion>
<MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version>8.0.0-preview.2.23081.1</MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version>
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version)</MicrosoftNETWorkloadEmscriptenPackageVersion>
<MicrosoftTemplateEngineTasksPackageVersion>7.0.100-rc.1.22410.7</MicrosoftTemplateEngineTasksPackageVersion>
</PropertyGroup>
<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion external/Java.Interop
104 changes: 0 additions & 104 deletions src-ThirdParty/NUnitLite/Constraints/BinarySerializableConstraint.cs

This file was deleted.

14 changes: 0 additions & 14 deletions src-ThirdParty/NUnitLite/Constraints/ConstraintExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -350,20 +350,6 @@ public UniqueItemsConstraint Unique

#endregion

#region BinarySerializable

#if !NETCF && !SILVERLIGHT
/// <summary>
/// Returns a constraint that tests whether an object graph is serializable in binary format.
/// </summary>
public BinarySerializableConstraint BinarySerializable
{
get { return (BinarySerializableConstraint)this.Append(new BinarySerializableConstraint()); }
}
#endif

#endregion

#region XmlSerializable

#if !SILVERLIGHT
Expand Down
14 changes: 0 additions & 14 deletions src-ThirdParty/NUnitLite/Constraints/ConstraintFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,20 +297,6 @@ public UniqueItemsConstraint Unique

#endregion

#region BinarySerializable

#if !NETCF && !SILVERLIGHT
/// <summary>
/// Returns a constraint that tests whether an object graph is serializable in binary format.
/// </summary>
public BinarySerializableConstraint BinarySerializable
{
get { return new BinarySerializableConstraint(); }
}
#endif

#endregion

#region XmlSerializable

#if !SILVERLIGHT
Expand Down
14 changes: 0 additions & 14 deletions src-ThirdParty/NUnitLite/Is.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,20 +157,6 @@ public static UniqueItemsConstraint Unique

#endregion

#region BinarySerializable

#if !NETCF && !SILVERLIGHT
/// <summary>
/// Returns a constraint that tests whether an object graph is serializable in binary format.
/// </summary>
public static BinarySerializableConstraint BinarySerializable
{
get { return new BinarySerializableConstraint(); }
}
#endif

#endregion

#region XmlSerializable

#if !SILVERLIGHT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Configuration.props" />
<PropertyGroup>
<TargetFramework>$(DotNetTargetFramework)</TargetFramework>
<TargetFramework>$(DotNetStableTargetFramework)</TargetFramework>
<DefineConstants>ILLINK</DefineConstants>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>$(MicrosoftAndroidSdkOutDir)</OutputPath>
Expand Down
Loading

0 comments on commit 2b53bd8

Please sign in to comment.