From 7fa61b7950fa86f66ce78e45be4f4b0364573227 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 17 Apr 2019 12:35:59 +0000 Subject: [PATCH 1/3] [master] Update dependencies from dotnet/arcade (#6510) * Update dependencies from https://github.com/dotnet/arcade build 20190411.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19211.2 * Update dependencies from https://github.com/dotnet/arcade build 20190412.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19212.2 * Update dependencies from https://github.com/dotnet/arcade build 20190413.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19213.2 * Update dependencies from https://github.com/dotnet/arcade build 20190414.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19214.2 * Update dependencies from https://github.com/dotnet/arcade build 20190415.12 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19215.12 --- eng/Version.Details.xml | 4 +- eng/common/CheckSymbols.ps1 | 134 +++++++++++++++++++++++++++++++ eng/common/internal/Tools.csproj | 8 +- global.json | 2 +- 4 files changed, 143 insertions(+), 5 deletions(-) create mode 100644 eng/common/CheckSymbols.ps1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5b6886348af..a0cf73a0fc8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - 4f645e4a5385eb96cad3f72f5ded239761c7d075 + 517bf671ea342965d007aa48f5bfd4926e58d582 diff --git a/eng/common/CheckSymbols.ps1 b/eng/common/CheckSymbols.ps1 new file mode 100644 index 00000000000..074b423245c --- /dev/null +++ b/eng/common/CheckSymbols.ps1 @@ -0,0 +1,134 @@ +param( + [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where NuGet packages to be checked are stored + [Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation + [Parameter(Mandatory=$true)][string] $SymbolToolPath # Full path to directory where dotnet symbol-tool was installed +) + +Add-Type -AssemblyName System.IO.Compression.FileSystem + +function FirstMatchingSymbolDescriptionOrDefault { + param( + [string] $FullPath, # Full path to the module that has to be checked + [string] $TargetServerParam # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols + ) + + $FileName = [System.IO.Path]::GetFileName($FullPath) + $Extension = [System.IO.Path]::GetExtension($FullPath) + + # Those below are potential symbol files that the `dotnet symbol` might + # return. Which one will be returned depend on the type of file we are + # checking and which type of file was uploaded. + + # The file itself is returned + $SymbolPath = $SymbolsPath + "\" + $FileName + + # PDB file for the module + $PdbPath = $SymbolPath.Replace($Extension, ".pdb") + + # PDB file for R2R module (created by crossgen) + $NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb") + + # DBG file for a .so library + $SODbg = $SymbolPath.Replace($Extension, ".so.dbg") + + # DWARF file for a .dylib + $DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf") + + .\dotnet-symbol.exe --symbols --modules $TargetServerParam $FullPath -o $SymbolsPath -d | Out-Null + + if (Test-Path $PdbPath) { + return "PDB" + } + elseif (Test-Path $NGenPdb) { + return "NGen PDB" + } + elseif (Test-Path $SODbg) { + return "DBG for SO" + } + elseif (Test-Path $DylibDwarf) { + return "Dwarf for Dylib" + } + elseif (Test-Path $SymbolPath) { + return "Module" + } + else { + return $null + } +} + +function CountMissingSymbols { + param( + [string] $PackagePath # Path to a NuGet package + ) + + # Ensure input file exist + if (!(Test-Path $PackagePath)) { + throw "Input file does not exist: $PackagePath" + } + + # Extensions for which we'll look for symbols + $RelevantExtensions = @(".dll", ".exe", ".so", ".dylib") + + # How many files are missing symbol information + $MissingSymbols = 0 + + $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) + $ExtractPath = $ExtractPath + $PackageId; + $SymbolsPath = $ExtractPath + $PackageId + ".Symbols"; + + [System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath) + + # Makes easier to reference `symbol tool` + Push-Location $SymbolToolPath + + Get-ChildItem -Recurse $ExtractPath | + Where-Object {$RelevantExtensions -contains $_.Extension} | + ForEach-Object { + Write-Host -NoNewLine "`t Checking file" $_.FullName "... " + + $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" + $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" + + if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) { + Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")" + } + else { + $MissingSymbols++ + + if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) { + Write-Host "No symbols found on MSDL or SymWeb!" + } + else { + if ($SymbolsOnMSDL -eq $null) { + Write-Host "No symbols found on MSDL!" + } + else { + Write-Host "No symbols found on SymWeb!" + } + } + } + } + + Pop-Location + + return $MissingSymbols +} + +function CheckSymbolsAvailable { + if (Test-Path $ExtractPath) { + Remove-Item -recurse $ExtractPath + } + + Get-ChildItem "$InputPath\*.nupkg" | + ForEach-Object { + $FileName = $_.Name + Write-Host "Validating $FileName " + $Status = CountMissingSymbols "$InputPath\$FileName" + + if ($Status -ne 0) { + Write-Error "Missing symbols for $Status modules in the package $FileName" + } + } +} + +CheckSymbolsAvailable diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj index 1a81ff906f6..1a39a7ef3f6 100644 --- a/eng/common/internal/Tools.csproj +++ b/eng/common/internal/Tools.csproj @@ -12,8 +12,12 @@ - - https://devdiv.pkgs.visualstudio.com/_packaging/8f470c7e-ac49-4afe-a6ee-cf784e438b93/nuget/v3/index.json; + + + https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json; + + + $(RestoreSources); https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json; diff --git a/global.json b/global.json index 1cee890932f..a246404283e 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19210.7", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19215.12", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } From e130d25e186b7e41b49debe7c093f1a46a44637a Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Wed, 17 Apr 2019 14:59:39 -0700 Subject: [PATCH 2/3] fix vsix dependency version calculations (#6565) --- vsintegration/Vsix/Directory.Build.targets | 8 ++++++++ .../Vsix/VisualFSharpFull/Source.extension.vsixmanifest | 2 +- .../Vsix/VisualFSharpFull/VisualFSharpFull.csproj | 2 -- .../VisualFSharpTemplates/Source.extension.vsixmanifest | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 vsintegration/Vsix/Directory.Build.targets diff --git a/vsintegration/Vsix/Directory.Build.targets b/vsintegration/Vsix/Directory.Build.targets new file mode 100644 index 00000000000..1e484fa50ea --- /dev/null +++ b/vsintegration/Vsix/Directory.Build.targets @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest b/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest index e0ef01b0061..075855a0614 100644 --- a/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest +++ b/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest @@ -9,7 +9,7 @@ https://docs.microsoft.com/en-us/dotnet/articles/fsharp/ - + diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj index 38b286c8c45..f5aad374baa 100644 --- a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj +++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj @@ -263,6 +263,4 @@ - - diff --git a/vsintegration/Vsix/VisualFSharpTemplates/Source.extension.vsixmanifest b/vsintegration/Vsix/VisualFSharpTemplates/Source.extension.vsixmanifest index 628e678cdcd..4b0a45a6e94 100644 --- a/vsintegration/Vsix/VisualFSharpTemplates/Source.extension.vsixmanifest +++ b/vsintegration/Vsix/VisualFSharpTemplates/Source.extension.vsixmanifest @@ -10,7 +10,7 @@ https://docs.microsoft.com/en-us/dotnet/articles/fsharp/ - + @@ -21,7 +21,7 @@ - + From 290fd3cef088d21c52ad2e7f1ccd7e27f7dc0bc3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 17 Apr 2019 22:00:03 +0000 Subject: [PATCH 3/3] Update dependencies from https://github.com/dotnet/arcade build 20190417.1 (#6564) - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19217.1 --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a0cf73a0fc8..f7bc5720dee 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - 517bf671ea342965d007aa48f5bfd4926e58d582 + 4e21d52dabbb9f5705a90f097acb1465a0354c0d diff --git a/global.json b/global.json index a246404283e..fec974408a0 100644 --- a/global.json +++ b/global.json @@ -10,7 +10,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19215.12", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19217.1", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } }