Skip to content

Commit ec1e576

Browse files
Update dependencies from https://github.com/dotnet/arcade build 20190415.12 (#592)
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19215.12 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19215.12
1 parent 98d8e57 commit ec1e576

File tree

4 files changed

+140
-6
lines changed

4 files changed

+140
-6
lines changed

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@
6363
</Dependency>
6464
</ProductDependencies>
6565
<ToolsetDependencies>
66-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19214.2">
66+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19215.12">
6767
<Uri>https://github.com/dotnet/arcade</Uri>
68-
<Sha>bcf1186cb0db792906fd319ae49bdbc41f44f8ec</Sha>
68+
<Sha>517bf671ea342965d007aa48f5bfd4926e58d582</Sha>
6969
</Dependency>
70-
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="1.0.0-beta.19214.2">
70+
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="1.0.0-beta.19215.12">
7171
<Uri>https://github.com/dotnet/arcade</Uri>
72-
<Sha>bcf1186cb0db792906fd319ae49bdbc41f44f8ec</Sha>
72+
<Sha>517bf671ea342965d007aa48f5bfd4926e58d582</Sha>
7373
</Dependency>
7474
<Dependency Name="Microsoft.NETCore.Platforms" Version="3.0.0-preview5.19214.16" CoherentParentDependency="Microsoft.NETCore.App">
7575
<Uri>https://github.com/dotnet/corefx</Uri>

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</PropertyGroup>
3434
<!-- Packages that come from https://github.com/dotnet/arcade -->
3535
<PropertyGroup>
36-
<MicrosoftDotNetCodeAnalysisPackageVersion>1.0.0-beta.19214.2</MicrosoftDotNetCodeAnalysisPackageVersion>
36+
<MicrosoftDotNetCodeAnalysisPackageVersion>1.0.0-beta.19215.12</MicrosoftDotNetCodeAnalysisPackageVersion>
3737
</PropertyGroup>
3838
<!-- Packages that come from https://github.com/dotnet/corefxlab -->
3939
<PropertyGroup>

eng/common/CheckSymbols.ps1

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
param(
2+
[Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where NuGet packages to be checked are stored
3+
[Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation
4+
[Parameter(Mandatory=$true)][string] $SymbolToolPath # Full path to directory where dotnet symbol-tool was installed
5+
)
6+
7+
Add-Type -AssemblyName System.IO.Compression.FileSystem
8+
9+
function FirstMatchingSymbolDescriptionOrDefault {
10+
param(
11+
[string] $FullPath, # Full path to the module that has to be checked
12+
[string] $TargetServerParam # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols
13+
)
14+
15+
$FileName = [System.IO.Path]::GetFileName($FullPath)
16+
$Extension = [System.IO.Path]::GetExtension($FullPath)
17+
18+
# Those below are potential symbol files that the `dotnet symbol` might
19+
# return. Which one will be returned depend on the type of file we are
20+
# checking and which type of file was uploaded.
21+
22+
# The file itself is returned
23+
$SymbolPath = $SymbolsPath + "\" + $FileName
24+
25+
# PDB file for the module
26+
$PdbPath = $SymbolPath.Replace($Extension, ".pdb")
27+
28+
# PDB file for R2R module (created by crossgen)
29+
$NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
30+
31+
# DBG file for a .so library
32+
$SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
33+
34+
# DWARF file for a .dylib
35+
$DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
36+
37+
.\dotnet-symbol.exe --symbols --modules $TargetServerParam $FullPath -o $SymbolsPath -d | Out-Null
38+
39+
if (Test-Path $PdbPath) {
40+
return "PDB"
41+
}
42+
elseif (Test-Path $NGenPdb) {
43+
return "NGen PDB"
44+
}
45+
elseif (Test-Path $SODbg) {
46+
return "DBG for SO"
47+
}
48+
elseif (Test-Path $DylibDwarf) {
49+
return "Dwarf for Dylib"
50+
}
51+
elseif (Test-Path $SymbolPath) {
52+
return "Module"
53+
}
54+
else {
55+
return $null
56+
}
57+
}
58+
59+
function CountMissingSymbols {
60+
param(
61+
[string] $PackagePath # Path to a NuGet package
62+
)
63+
64+
# Ensure input file exist
65+
if (!(Test-Path $PackagePath)) {
66+
throw "Input file does not exist: $PackagePath"
67+
}
68+
69+
# Extensions for which we'll look for symbols
70+
$RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
71+
72+
# How many files are missing symbol information
73+
$MissingSymbols = 0
74+
75+
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
76+
$ExtractPath = $ExtractPath + $PackageId;
77+
$SymbolsPath = $ExtractPath + $PackageId + ".Symbols";
78+
79+
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
80+
81+
# Makes easier to reference `symbol tool`
82+
Push-Location $SymbolToolPath
83+
84+
Get-ChildItem -Recurse $ExtractPath |
85+
Where-Object {$RelevantExtensions -contains $_.Extension} |
86+
ForEach-Object {
87+
Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
88+
89+
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server"
90+
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server"
91+
92+
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
93+
Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
94+
}
95+
else {
96+
$MissingSymbols++
97+
98+
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
99+
Write-Host "No symbols found on MSDL or SymWeb!"
100+
}
101+
else {
102+
if ($SymbolsOnMSDL -eq $null) {
103+
Write-Host "No symbols found on MSDL!"
104+
}
105+
else {
106+
Write-Host "No symbols found on SymWeb!"
107+
}
108+
}
109+
}
110+
}
111+
112+
Pop-Location
113+
114+
return $MissingSymbols
115+
}
116+
117+
function CheckSymbolsAvailable {
118+
if (Test-Path $ExtractPath) {
119+
Remove-Item -recurse $ExtractPath
120+
}
121+
122+
Get-ChildItem "$InputPath\*.nupkg" |
123+
ForEach-Object {
124+
$FileName = $_.Name
125+
Write-Host "Validating $FileName "
126+
$Status = CountMissingSymbols "$InputPath\$FileName"
127+
128+
if ($Status -ne 0) {
129+
Write-Error "Missing symbols for $Status modules in the package $FileName"
130+
}
131+
}
132+
}
133+
134+
CheckSymbolsAvailable

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"version": "3.0.100-preview-010024"
1010
},
1111
"msbuild-sdks": {
12-
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19214.2"
12+
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19215.12"
1313
},
1414
"native-tools": {
1515
"strawberry-perl": "5.28.1.1-1",

0 commit comments

Comments
 (0)