Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorKrolic committed Jul 10, 2024
2 parents a04c05a + 28f0ccf commit 44d8009
Show file tree
Hide file tree
Showing 624 changed files with 7,454 additions and 4,871 deletions.
3 changes: 2 additions & 1 deletion Directory.Build.rsp
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# This file intentionally left blank to avoid accidental import during build.
# Workaround for https://github.com/dotnet/sdk/issues/41791
-p:_IsDisjointMSBuildVersion=false
4 changes: 2 additions & 2 deletions docs/wiki/Roslyn-Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Each phase of this pipeline is now a separate component. First the parse phase,

![compiler pipeline api](images/compiler-pipeline-api.png)

Corresponding to each of those phases, an object model is surfaced that allows access to the information at that phase. The parsing phase is exposed as a syntax tree, the declaration phase as a hierarchical symbol table, the binding phase as a model that exposes the result of the compiler’s semantic analysis and the emit phase as an API that produces IL byte codes.
Corresponding to each of those phases, an object model that allows access to the information at that phase is surfaced. The parsing phase is exposed as a syntax tree, the declaration phase as a hierarchical symbol table, the binding phase as a model that exposes the result of the compiler’s semantic analysis and the emit phase as an API that produces IL byte codes.

![compiler api lang service](images/compiler-pipeline-lang-svc.png)

Expand All @@ -69,7 +69,7 @@ The compiler layer contains the object models that correspond with information e

#### Diagnostic APIs

As part of their analysis the compiler may produce a set of diagnostics covering everything from syntax, semantic, and definite assignment errors to various warnings and informational diagnostics. The Compiler API layer exposes diagnostics through an extensible API allowing for user-defined analyzers to be plugged into a Compilation and user-defined diagnostics, such as those produced by tools like StyleCop or FxCop, to be produced alongside compiler-defined diagnostics. Producing diagnostics in this way has the benefit of integrating naturally with tools such as MSBuild and Visual Studio which depend on diagnostics for experiences such as halting a build based on policy and showing live squiggles in the editor and suggesting code fixes.
As part of their analysis the compiler may produce a set of diagnostics covering everything from syntax, semantic, and definite assignment errors to various warnings and informational diagnostics. The Compiler API layer exposes diagnostics through an extensible API allowing for user-defined analyzers to be plugged into a Compilation and user-defined diagnostics, such as those produced by tools like StyleCop or FxCop, to be produced alongside compiler-defined diagnostics. Producing diagnostics in this way has the benefit of integrating naturally with tools such as MSBuild and Visual Studio which depend on diagnostics for experiences such as halting a build based on policy, showing live squiggles in the editor and suggesting code fixes.

#### Scripting APIs

Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24327.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24352.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ede13bd35571c0c8b0c01edcb057031904c5c955</Sha>
<Sha>4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24327.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24352.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ede13bd35571c0c8b0c01edcb057031904c5c955</Sha>
<Sha>4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23475.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
Expand All @@ -156,9 +156,9 @@
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5d10d428050c0d6afef30a072c4ae68776621877</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24327.1">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24352.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ede13bd35571c0c8b0c01edcb057031904c5c955</Sha>
<Sha>4a7d983f833d6b86365ea1b2b4d6ee72fbdbf944</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0-preview.23468.1">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
Expand Down
24 changes: 3 additions & 21 deletions eng/common/core-templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ parameters:
enablePublishTestResults: false
enablePublishUsingPipelines: false
enableBuildRetry: false
disableComponentGovernance: ''
componentGovernanceIgnoreDirectories: ''
mergeTestResults: false
testRunTitle: ''
testResultsFormat: ''
name: ''
componentGovernanceSteps: []
preSteps: []
artifactPublishSteps: []
runAsPublic: false
Expand Down Expand Up @@ -170,17 +169,8 @@ jobs:
uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }}
continueOnError: true

- template: /eng/common/core-templates/steps/component-governance.yml
parameters:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
${{ if eq(parameters.disableComponentGovernance, '') }}:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
disableComponentGovernance: false
${{ else }}:
disableComponentGovernance: true
${{ else }}:
disableComponentGovernance: ${{ parameters.disableComponentGovernance }}
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
- ${{ each step in parameters.componentGovernanceSteps }}:
- ${{ step }}

- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
Expand All @@ -190,14 +180,6 @@ jobs:
continueOnError: ${{ parameters.continueOnError }}
env:
TeamName: $(_TeamName)
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}:
- template: /eng/common/core-templates/steps/generate-sbom.yml
parameters:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
PackageVersion: ${{ parameters.packageVersion}}
BuildDropPath: ${{ parameters.buildDropPath }}
IgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
publishArtifacts: false

# Publish test results
- ${{ if or(and(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, '')), eq(parameters.testResultsFormat, 'xunit')) }}:
Expand Down
16 changes: 2 additions & 14 deletions eng/common/core-templates/job/source-index-stage1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,11 @@ jobs:

- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: AzureCLI@2
displayName: Get stage 1 auth token
displayName: Log in to Azure and upload stage1 artifacts to source index
inputs:
azureSubscription: 'SourceDotNet Stage1 Publish'
addSpnToEnvironment: true
scriptType: 'ps'
scriptLocation: 'inlineScript'
inlineScript: |
echo "##vso[task.setvariable variable=ARM_CLIENT_ID]$env:servicePrincipalId"
echo "##vso[task.setvariable variable=ARM_ID_TOKEN]$env:idToken"
echo "##vso[task.setvariable variable=ARM_TENANT_ID]$env:tenantId"
- script: |
echo "Client ID: $(ARM_CLIENT_ID)"
echo "ID Token: $(ARM_ID_TOKEN)"
echo "Tenant ID: $(ARM_TENANT_ID)"
az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN)
displayName: "Login to Azure"
- script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1
displayName: Upload stage1 artifacts to source index
$(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name) -s netsourceindexstage1 -b stage1
2 changes: 1 addition & 1 deletion eng/common/core-templates/steps/component-governance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ steps:
continueOnError: true
displayName: ${{ parameters.displayName }}
inputs:
ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
26 changes: 26 additions & 0 deletions eng/common/templates/job/job.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
parameters:
enablePublishBuildArtifacts: false
disableComponentGovernance: ''
componentGovernanceIgnoreDirectories: ''
# Sbom related params
enableSbom: true
PackageVersion: 9.0.0
BuildDropPath: '$(Build.SourcesDirectory)/artifacts'

jobs:
- template: /eng/common/core-templates/job/job.yml
Expand All @@ -13,6 +19,26 @@ jobs:
steps:
- ${{ each step in parameters.steps }}:
- ${{ step }}

componentGovernanceSteps:
- template: /eng/common/templates/steps/component-governance.yml
parameters:
${{ if eq(parameters.disableComponentGovernance, '') }}:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
disableComponentGovernance: false
${{ else }}:
disableComponentGovernance: true
${{ else }}:
disableComponentGovernance: ${{ parameters.disableComponentGovernance }}
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}

- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}:
- template: /eng/common/templates/steps/generate-sbom.yml
parameters:
PackageVersion: ${{ parameters.packageVersion }}
BuildDropPath: ${{ parameters.buildDropPath }}
publishArtifacts: false


artifactPublishSteps:
- ${{ if ne(parameters.artifacts.publish, '') }}:
Expand Down
6 changes: 6 additions & 0 deletions eng/targets/Settings.props
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@

<!-- TODO -->
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>

<!--
Needed to avoid error NU1010: The PackageReference items Microsoft.Net.Compilers.Toolset.Framework do not have corresponding PackageVersion.
Related to https://github.com/dotnet/sdk/issues/41791.
-->
<BuildWithNetFrameworkHostedCompiler>false</BuildWithNetFrameworkHostedCompiler>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)TargetFrameworks.props" />
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24327.1",
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24327.1",
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24352.2",
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24352.2",
"Microsoft.Build.Traversal": "3.4.0"
}
}
Loading

0 comments on commit 44d8009

Please sign in to comment.