Skip to content

Commit

Permalink
Merge pull request #34077 from dotnet/merges/master-to-master-vs-deps
Browse files Browse the repository at this point in the history
Merge master to master-vs-deps
  • Loading branch information
dotnet-automerge-bot committed Mar 13, 2019
2 parents 9a43d13 + c4c3e1a commit c9c3d05
Show file tree
Hide file tree
Showing 28 changed files with 1,080 additions and 187 deletions.
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Expand Up @@ -2,9 +2,9 @@
<Dependencies>
<ProductDependencies></ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19157.23">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19161.14">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>a0d951e12a53401c3da812b581e39feb4a5bb4ab</Sha>
<Sha>2ca74c76adc84f0459b4a0352034db463d0b910f</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
6 changes: 5 additions & 1 deletion eng/build.ps1
Expand Up @@ -208,7 +208,11 @@ function BuildSolution() {
$projects = Join-Path $RepoRoot $solution
$enableAnalyzers = !$skipAnalyzers
$toolsetBuildProj = InitializeToolset
$quietRestore = !$ci

# Have to disable quiet restore during bootstrap builds to work around
# an arcade bug
# https://github.com/dotnet/arcade/issues/2220
$quietRestore = !($ci -or ($bootstrapDir -ne ""))
$testTargetFrameworks = if ($testCoreClr) { "netcoreapp2.1" } else { "" }
$ibcSourceBranchName = GetIbcSourceBranchName
$ibcDropId = if ($officialIbcDropId -ne "default") { $officialIbcDropId } else { "" }
Expand Down
1 change: 0 additions & 1 deletion eng/common/PublishToPackageFeed.proj
Expand Up @@ -11,7 +11,6 @@
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)DefaultVersions.props" Condition="Exists('$(MSBuildThisFileDirectory)DefaultVersions.props')" />
<Import Project="$(MSBuildThisFileDirectory)Versions.props" Condition="Exists('$(MSBuildThisFileDirectory)Versions.props')" />

<Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" />

Expand Down
2 changes: 1 addition & 1 deletion eng/common/generate-graph-files.ps1
Expand Up @@ -42,7 +42,7 @@ try {
}

Write-Host "Generating dependency graph..."
$darc = Invoke-Expression "& `"$darcExe`" $options"
Invoke-Expression "& `"$darcExe`" $options"
CheckExitCode "Generating dependency graph"

$graph = Get-Content $graphVizFilePath
Expand Down
48 changes: 48 additions & 0 deletions eng/common/templates/job/generate-graph-files.yml
@@ -0,0 +1,48 @@
parameters:
# Optional: dependencies of the job
dependsOn: ''

# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
pool: {}

# Optional: Include toolset dependencies in the generated graph files
includeToolset: false

jobs:
- job: Generate_Graph_Files

dependsOn: ${{ parameters.dependsOn }}

displayName: Generate Graph Files

pool: ${{ parameters.pool }}

variables:
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
# DotNet-AllOrgs-Darc-Pats provides: dn-bot-devdiv-dnceng-rw-code-pat
- group: Publish-Build-Assets
- group: DotNet-AllOrgs-Darc-Pats
- name: _GraphArguments
value: -gitHubPat $(BotAccount-dotnet-maestro-bot-PAT)
-azdoPat $(dn-bot-devdiv-dnceng-rw-code-pat)
-barToken $(MaestroAccessToken)
-outputFolder '$(Build.StagingDirectory)/GraphFiles/'
- ${{ if ne(parameters.includeToolset, 'false') }}:
- name: _GraphArguments
value: ${{ variables._GraphArguments }} -includeToolset

steps:
- task: PowerShell@2
displayName: Generate Graph Files
inputs:
filePath: eng\common\generate-graph-files.ps1
arguments: $(_GraphArguments)
continueOnError: true
- task: PublishBuildArtifacts@1
displayName: Publish Graph to Artifacts
inputs:
PathtoPublish: '$(Build.StagingDirectory)/GraphFiles'
PublishLocation: Container
ArtifactName: GraphFiles
continueOnError: true
condition: always()
19 changes: 17 additions & 2 deletions eng/common/templates/jobs/jobs.yml
Expand Up @@ -13,7 +13,13 @@ parameters:

# Optional: Enable publishing to the build asset registry
enablePublishBuildAssets: false


graphFileGeneration:
# Optional: Enable generating the graph files at the end of the build
enabled: false
# Optional: Include toolset dependencies in the generated graph files
includeToolset: false

# Optional: Include PublishTestResults task
enablePublishTestResults: false

Expand Down Expand Up @@ -68,4 +74,13 @@ jobs:
vmImage: vs2017-win2016
runAsPublic: ${{ parameters.runAsPublic }}
enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}


- ${{ if and(eq(parameters.graphFileGeneration.enabled, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: ../job/generate-graph-files.yml
parameters:
continueOnError: ${{ parameters.continueOnError }}
includeToolset: ${{ parameters.graphFileGeneration.includeToolset }}
dependsOn:
- Asset_Registry_Publish
pool:
vmImage: vs2017-win2016
2 changes: 1 addition & 1 deletion global.json
Expand Up @@ -7,6 +7,6 @@
"xcopy-msbuild": "15.9.0-alpha"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19157.23"
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19161.14"
}
}
Expand Up @@ -30,7 +30,8 @@ private void VisitSwitchBlock(BoundSwitchStatement node)
{
foreach (var label in section.SwitchLabels)
{
if (reachableLabels.Contains(label.Label) || label.HasErrors)
if (reachableLabels.Contains(label.Label) || label.HasErrors ||
label == node.DefaultLabel && node.Expression.ConstantValue == null && IsTraditionalSwitch(node))
{
SetState(initialState.Clone());
}
Expand Down

0 comments on commit c9c3d05

Please sign in to comment.