Skip to content

Commit 4c3324c

Browse files
committed
Nuget.config url fix for roslyn compilers (#5584)
* fixed nuget url, versions, and failing tests * changes from pr comments and MacOS changes * MacOS homebrew bug workaround * removed unnused nuget url
1 parent 0fca56c commit 4c3324c

File tree

4 files changed

+16
-20
lines changed

4 files changed

+16
-20
lines changed

NuGet.config

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
1111
<add key="vs-buildservices" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json" />
1212
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
13-
<add key="myget-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
14-
<add key="myget-roslyn" value="https://dotnet.myget.org/F/roslyn-analyzers/api/v3/index.json" />
13+
<add key="dotnet5-roslyn" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
1514
<add key="mlnet-daily" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json" />
1615
<add key="mlnet-testdata" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/machinelearning-testdata/nuget/v3/index.json" />
1716
</packageSources>

build/ci/job-template.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,15 @@ jobs:
5555
container: ${{ parameters.container }}
5656

5757
steps:
58-
# Work around MacOS Homebrew image/environment bug: https://github.com/actions/virtual-environments/issues/1811
58+
# Work around MacOS Homebrew image/environment bug: https://github.com/actions/virtual-environments/issues/2322#issuecomment-749211076
5959
- ${{ if eq(parameters.pool.name, 'Hosted macOS') }}:
6060
- script: |
61-
brew uninstall [email protected] |
62-
brew uninstall [email protected] |
63-
brew untap local/openssl |
64-
brew untap local/python2
61+
rm -rf /usr/local/bin/2to3
6562
displayName: MacOS Homebrew bug Workaround
6663
continueOnError: true
6764
# Extra MacOS step required to install OS-specific dependencies
6865
- ${{ if eq(parameters.pool.name, 'Hosted macOS') }}:
69-
- script: brew update && brew unlink [email protected] && brew install mono-libgdiplus && brew install $(Build.SourcesDirectory)/build/libomp.rb && brew link libomp --force
66+
- script: brew update && brew install mono-libgdiplus && brew install $(Build.SourcesDirectory)/build/libomp.rb && brew link libomp --force
7067
displayName: Install MacOS build dependencies
7168
- ${{ if and( eq(parameters.nightlyBuild, 'true'), eq(parameters.pool.name, 'Hosted Ubuntu 1604')) }}:
7269
- bash: echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]$(nightlyBuildRunPath):$LD_LIBRARY_PATH"
@@ -156,7 +153,7 @@ jobs:
156153
testRunner: 'xUnit'
157154
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults'
158155
# Upload all test results except performance test project. On CI by default performance tests
159-
# will not run and test result files will still be generate without details. Avoid uploading
156+
# will not run and test result files will still be generate without details. Avoid uploading
160157
# performance test result to avoid warnings on publish test result stage.
161158
testResultsFiles: |
162159
**/*.xml

eng/Versions.props

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project>
33
<PropertyGroup>
44
<!-- This repo version -->
5-
<!--
5+
<!--
66
Arcade automatically changes the version of assemblies to 42.42.42.42 unless DotNetUseShippingVersions
77
is set to true.
88
Details in Arcade documentation:
@@ -48,10 +48,10 @@
4848

4949
<!-- Test-only Dependencies -->
5050
<BenchmarkDotNetVersion>0.12.0</BenchmarkDotNetVersion>
51-
<MicrosoftCodeAnalysisTestingVersion>1.0.1-beta1.20080.1</MicrosoftCodeAnalysisTestingVersion>
51+
<MicrosoftCodeAnalysisTestingVersion>1.0.1-beta1.20374.2</MicrosoftCodeAnalysisTestingVersion>
5252
<MicrosoftExtensionsTestPackageVersion>3.0.1</MicrosoftExtensionsTestPackageVersion>
5353
<MicrosoftMLTestDatabasesPackageVersion>0.0.6-test</MicrosoftMLTestDatabasesPackageVersion>
54-
<MicrosoftMLTestModelsPackageVersion>0.0.6-test</MicrosoftMLTestModelsPackageVersion>
54+
<MicrosoftMLTestModelsPackageVersion>0.0.7-test</MicrosoftMLTestModelsPackageVersion>
5555
<MicrosoftMLTensorFlowTestModelsVersion>0.0.13-test</MicrosoftMLTensorFlowTestModelsVersion>
5656
<MicrosoftMLOnnxTestModelsVersion>0.0.6-test</MicrosoftMLOnnxTestModelsVersion>
5757
<SystemDataSqlClientVersion>4.6.1</SystemDataSqlClientVersion>

test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public async Task ContractsCheck()
3939
VerifyCS.Diagnostic(ContractsCheckAnalyzer.SimpleMessageDiagnostic.Rule).WithLocation(basis + 32, 35).WithArguments("Check", "\"Less fine: \" + env.GetType().Name"),
4040
VerifyCS.Diagnostic(ContractsCheckAnalyzer.NameofDiagnostic.Rule).WithLocation(basis + 34, 17).WithArguments("CheckUserArg", "name", "\"p\""),
4141
VerifyCS.Diagnostic(ContractsCheckAnalyzer.DecodeMessageWithLoadContextDiagnostic.Rule).WithLocation(basis + 39, 41).WithArguments("CheckDecode", "\"This message is suspicious\""),
42-
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 24).WithMessage("'ICancelable' is inaccessible due to its protection level"),
43-
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 67).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"),
42+
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 24, 752, 35).WithMessage("'ICancelable' is inaccessible due to its protection level"),
43+
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 67, 752, 77).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"),
4444
};
4545

4646
var test = new VerifyCS.Test
@@ -126,9 +126,9 @@ public async Task ContractsCheckFix()
126126
VerifyCS.Diagnostic(ContractsCheckAnalyzer.NameofDiagnostic.Rule).WithLocation(23, 39).WithArguments("CheckValue", "paramName", "\"noMatch\""),
127127
VerifyCS.Diagnostic(ContractsCheckAnalyzer.NameofDiagnostic.Rule).WithLocation(24, 53).WithArguments("CheckUserArg", "name", "\"chumble\""),
128128
VerifyCS.Diagnostic(ContractsCheckAnalyzer.NameofDiagnostic.Rule).WithLocation(25, 53).WithArguments("CheckUserArg", "name", "\"sp\""),
129-
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 24).WithMessage("'ICancelable' is inaccessible due to its protection level"),
130-
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 67).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"),
131-
new DiagnosticResult("CS1503", DiagnosticSeverity.Error).WithLocation("Test1.cs", 753, 90).WithMessage("Argument 2: cannot convert from 'Microsoft.ML.Runtime.IHostEnvironment' to 'Microsoft.ML.Runtime.IExceptionContext'"),
129+
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 24, 752, 35).WithMessage("'ICancelable' is inaccessible due to its protection level"),
130+
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 67, 752, 77).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"),
131+
new DiagnosticResult("CS1503", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 753, 90, 753, 93).WithMessage("Argument 2: cannot convert from 'Microsoft.ML.Runtime.IHostEnvironment' to 'Microsoft.ML.Runtime.IExceptionContext'"),
132132
},
133133
},
134134
FixedState =
@@ -146,9 +146,9 @@ public async Task ContractsCheckFix()
146146
{
147147
VerifyCS.Diagnostic(ContractsCheckAnalyzer.ExceptionDiagnostic.Rule).WithLocation(9, 43).WithArguments("ExceptParam"),
148148
VerifyCS.Diagnostic(ContractsCheckAnalyzer.NameofDiagnostic.Rule).WithLocation(23, 39).WithArguments("CheckValue", "paramName", "\"noMatch\""),
149-
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 24).WithMessage("'ICancelable' is inaccessible due to its protection level"),
150-
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 67).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"),
151-
new DiagnosticResult("CS1503", DiagnosticSeverity.Error).WithLocation("Test1.cs", 753, 90).WithMessage("Argument 2: cannot convert from 'Microsoft.ML.Runtime.IHostEnvironment' to 'Microsoft.ML.Runtime.IExceptionContext'"),
149+
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 24, 752, 35).WithMessage("'ICancelable' is inaccessible due to its protection level"),
150+
new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 67, 752, 77).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"),
151+
new DiagnosticResult("CS1503", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 753, 90, 753, 93).WithMessage("Argument 2: cannot convert from 'Microsoft.ML.Runtime.IHostEnvironment' to 'Microsoft.ML.Runtime.IExceptionContext'"),
152152
},
153153
},
154154
};

0 commit comments

Comments
 (0)