Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master to features/readonly-members #33554

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b26e16d
Don't accidentally share a named semaphore between test processes
jasonmalinowski Feb 15, 2019
1b87cb1
Remove some vestigates of WpfTestSharedData being [Serializable]
jasonmalinowski Feb 15, 2019
6d0ac93
Move open/closed document checks under the _serializationLock
jasonmalinowski Feb 15, 2019
162ab02
Increase diagnostics in determinism job
jaredpar Feb 16, 2019
9538ef4
Add (failing) unit test for issue #33242:
tiesmaster Feb 17, 2019
953c081
Fix #33242 by teaching
tiesmaster Feb 17, 2019
e790ac2
Do not offer to convert object initializers to a compound assignment.
CyrusNajmabadi Feb 18, 2019
9bed5d7
Also fix #33242 for the scenario of finalizers.
tiesmaster Feb 18, 2019
cb84901
Ensure pipename argument quoted
jaredpar Feb 18, 2019
5f1828a
Merge pull request #33475 from jaredpar/fix-space-p3
jaredpar Feb 19, 2019
86b6125
Merge pull request #33483 from dotnet/merges/dev16.0-preview3-to-dev16.0
Feb 19, 2019
a0a3605
Merge pull request #33454 from jaredpar/fix-det
jaredpar Feb 19, 2019
77ae17c
Correct TFM for EE assemblies (#33389) (#33408)
tmat Feb 19, 2019
fb6b898
Document ref enumerator disposal compat break (#33367)
chsienki Feb 19, 2019
d078184
Merge pull request #33467 from CyrusNajmabadi/compoundAssignment
mavasani Feb 19, 2019
25feb76
Assert the file is open in Workspace.OnAdditionalDocumentClosed
jasonmalinowski Feb 19, 2019
8ee2bba
Read IBC and VS bootstrapper info from PublishData.json (#33410)
tmat Feb 19, 2019
571827e
Merge pull request #33409 from jasonmalinowski/fix-accidental-semapho…
jasonmalinowski Feb 19, 2019
04be188
Bootstrap builds should use ExitingTraceListener
jaredpar Feb 19, 2019
c4bb224
Merge pull request #33462 from tiesmaster/33242/fix-invalidcast-in-ex…
ryzngard Feb 20, 2019
94efa89
Avoid trying to write log files longer than max path
sharwell Feb 20, 2019
4a94aec
Replace slot watermark (#33455)
cston Feb 20, 2019
67d18b3
Merge pull request #33509 from sharwell/shorter-paths
sharwell Feb 20, 2019
001ac68
Add FixReturnType fixer (#33457)
jcouv Feb 20, 2019
ecdcd95
pool incrementalHash so that we don't create one unnecessarily (#33496)
heejaechang Feb 20, 2019
264e9ee
Include RunTests.exe and xunit.console.x86.exe in .NET event collection
sharwell Feb 19, 2019
1f82f4b
Timestamp screenshots with UtcNow to match event log entries
sharwell Feb 20, 2019
e8bb766
Disable broken checksum validation
sharwell Feb 18, 2019
0de30f3
Fix failure to print test results
sharwell Feb 19, 2019
a66722f
Do not skip editorconfig integration tests
sharwell Feb 20, 2019
35c8818
Merge pull request #33513 from sharwell/print-test-results
sharwell Feb 20, 2019
8c746ca
Include the hidden NUL in max path length calculation
sharwell Feb 20, 2019
a3fcaa7
Use CriticalWpfFactAttribute and CriticalWpfTheoryAttribute for essen…
sharwell Feb 20, 2019
f95a73f
Merge pull request #33435 from jasonmalinowski/move-checks-inside-ser…
jasonmalinowski Feb 20, 2019
cc1fc4f
Merge pull request #33501 from jaredpar/fix-det
jaredpar Feb 20, 2019
bbeeaab
Merge pull request #33516 from sharwell/shorter-paths
sharwell Feb 20, 2019
2f9c5f5
Merge pull request #33517 from sharwell/critical-tests
sharwell Feb 20, 2019
e9b3a75
Merge pull request #33512 from sharwell/log-more-processes
sharwell Feb 20, 2019
131e074
Adjust process logging for applicability to current builds
sharwell Feb 20, 2019
32a475a
Document nullable disable for generated code (#33432)
chsienki Feb 20, 2019
613b5e9
Merge remote-tracking branch 'upstream/dev16.0' into merges/dev16.0-t…
agocke Feb 20, 2019
2b85e55
Merge pull request #33487 from dotnet/merges/dev16.0-to-master
Feb 21, 2019
8a5b8e8
Merge pull request #33520 from sharwell/log-more-processes
sharwell Feb 21, 2019
f32205e
Merge pull request #33514 from sharwell/broken-validation
sharwell Feb 21, 2019
2750f63
set no activation context on provisional tab when navigate to (#33400)
heejaechang Feb 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ variables:
SignType: real
SkipTests: false
SkipApplyOptimizationData: false
IbcSourceBranchName: 'master-vs-deps'
IbcDropId: '75e3797e1105a4da4c10dddda76c3b9398f7725a/223453/935479/1'

jobs:
- job: OfficialBuild
Expand All @@ -19,8 +21,6 @@ jobs:
timeoutInMinutes: 360

variables:
VisualStudio.MajorVersion: 16
VisualStudio.ChannelName: 'int.d16.0stg'
VisualStudio.DropName: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)

steps:
Expand Down Expand Up @@ -59,8 +59,10 @@ jobs:
-officialBuildId $(Build.BuildNumber)
-officialSkipTests $(SkipTests)
-officialSkipApplyOptimizationData $(SkipApplyOptimizationData)
-officialSourceBranchName $(Build.SourceBranchName)
-officialIbcSourceBranchName $(IbcSourceBranchName)
-officialIbcDropId $(IbcDropId)
/p:RepositoryName=$(Build.Repository.Name)
/p:VisualStudioIbcSourceBranchName="master-vs-deps"
/p:VisualStudioDropAccessToken=$(System.AccessToken)
/p:VisualStudioDropName=$(VisualStudio.DropName)
/p:DotNetSignType=$(SignType)
Expand All @@ -70,8 +72,6 @@ jobs:
/p:PublishToSymbolServer=true
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
/p:IbcOptimizationDataDir=$(Build.SourcesDirectory)\.o\\
/p:VisualStudioIbcDropId=75e3797e1105a4da4c10dddda76c3b9398f7725a/223453/935479/1
displayName: Build
condition: succeeded()

Expand Down
23 changes: 23 additions & 0 deletions docs/compilers/CSharp/Compiler Breaking Changes - VS2019.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,26 @@ Each entry should include a short description of the break, followed by either a

10. Previously, reference assemblies were emitted including embedded resources. In Visual Studio 2019, embedded resources are no longer emitted into ref assemblies.
See https://github.com/dotnet/roslyn/issues/31197

11. Ref structs now support disposal via pattern. A ref struct enumerator with an accessible `void Dispose()` instance method will now have it invoked at the end of enumeration, regardless of whether the struct type implements IDisposable:
``` c#
public class C
{
public ref struct RefEnumerator
{
public int Current => 0;
public bool MoveNext() => false;
public void Dispose() => Console.WriteLine("Called in C# 8.0 only");
}

public RefEnumerator GetEnumerator() => new RefEnumerator();

public static void Main()
{
foreach(var x in new C())
{
}
// RefEnumerator.Dispose() will be called here in C# 8.0
}
}
```
21 changes: 21 additions & 0 deletions docs/features/nullable-reference-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,27 @@ new C?(); // error
new List<C?>(); // ok
```

## Generated code
Older code generation strategies may not be nullable aware.
Setting the project-level nullable context to "enable" could result in many warnings that a user is unable to fix.
To support this scenario any syntax tree that is determined to be generated will have its nullable state implicitly set to "disable", regardless of the overall project state.

A syntax tree is determined to be generated if meets one or more of the following criteria:
- File name begins with:
- TemporaryGeneratedFile_
- File name ends with:
- .designer.cs
- .generated.cs
- .g.cs
- .g.i.cs
- Contains a top level comment that contains
- `<autogenerated`
- `<auto-generateed`

Newer, nullable-aware generators, may then opt-in to nullable analysis by including a generated `#nullable enable` at the beginning of the generated code.

Within the context of a generated syntax tree `#nullable restore` will always set the state to "disable".

## Public APIs
There are a few questions that an API consumer would want to answer:
1. should I print a `?` after the type?
Expand Down
32 changes: 32 additions & 0 deletions eng/build-utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $ErrorActionPreference="Stop"

$VSSetupDir = Join-Path $ArtifactsDir "VSSetup\$configuration"
$PackagesDir = Join-Path $ArtifactsDir "packages\$configuration"
$PublishDataUrl = "https://raw.githubusercontent.com/dotnet/roslyn/master/eng/config/PublishData.json"

$binaryLog = if (Test-Path variable:binaryLog) { $binaryLog } else { $false }
$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { $false }
Expand All @@ -22,6 +23,37 @@ function GetProjectOutputBinary([string]$fileName, [string]$projectName = "", [s
return Join-Path $ArtifactsDir "bin\$projectName\$configuration\$tfm\$ridDir$publishDir$fileName"
}

function GetPublishData() {
if (Test-Path variable:global:_PublishData) {
return $global:_PublishData
}

Write-Host "Downloading $PublishDataUrl"
$content = (Invoke-WebRequest -Uri $PublishDataUrl -UseBasicParsing).Content

return $global:_PublishData = ConvertFrom-Json $content
}

function GetBranchPublishData([string]$branchName) {
$data = GetPublishData

if (Get-Member -InputObject $data.branches -Name $branchName) {
return $data.branches.$branchName
} else {
return $null
}
}

function GetReleasePublishData([string]$releaseName) {
$data = GetPublishData

if (Get-Member -InputObject $data.releases -Name $releaseName) {
return $data.releases.$releaseName
} else {
return $null
}
}

# Handy function for executing a command in powershell and throwing if it
# fails.
#
Expand Down
74 changes: 69 additions & 5 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ param (
[string]$officialBuildId = "",
[string]$officialSkipApplyOptimizationData = "",
[string]$officialSkipTests = "",
[string]$officialSourceBranchName = "",
[string]$officialIbcSourceBranchName = "",
[string]$officialIbcDropId = "",

# Test actions
[switch]$test32,
Expand Down Expand Up @@ -100,6 +103,11 @@ function Print-Usage() {
Write-Host " -officialBuildId An official build id, e.g. 20190102.3"
Write-Host " -officialSkipTests <bool> Pass 'true' to not run tests"
Write-Host " -officialSkipApplyOptimizationData <bool> Pass 'true' to not apply optimization data"
Write-Host " -officialSourceBranchName <string> The source branch name"
Write-Host " -officialIbcDropId <string> IBC data drop to use (e.g. '20190210.1/935479/1')."
Write-Host " 'default' for the most recent available for the branch."
Write-Host " -officialIbcSourceBranchName <string> IBC source branch (e.g. 'master-vs-deps')"
Write-Host " 'default' to select branch based on eng/config/PublishData.json."
Write-Host ""
Write-Host "Command line arguments starting with '/p:' are passed through to MSBuild."
}
Expand Down Expand Up @@ -133,6 +141,9 @@ function Process-Arguments() {

OfficialBuildOnly "officialSkipTests"
OfficialBuildOnly "officialSkipApplyOptimizationData"
OfficialBuildOnly "officialSourceBranchName"
OfficialBuildOnly "officialIbcDropId"
OfficialBuildOnly "officialIbcSourceBranchName"

if ($officialBuildId) {
$script:useGlobalNuGetCache = $false
Expand Down Expand Up @@ -192,10 +203,14 @@ function BuildSolution() {
$toolsetBuildProj = InitializeToolset
$quietRestore = !$ci
$testTargetFrameworks = if ($testCoreClr) { "netcoreapp2.1" } else { "" }
$ibcSourceBranchName = GetIbcSourceBranchName
$ibcDropId = if ($officialIbcDropId -ne "default") { $officialIbcDropId } else { "" }

# Do not set these properties to true explicitly, since that would override values set in projects.
# Do not set this property to true explicitly, since that would override values set in projects.
$suppressExtensionDeployment = if (!$deployExtensions) { "/p:DeployExtension=false" } else { "" }
$suppressPartialNgenOptimization = if (!$applyOptimizationData) { "/p:ApplyPartialNgenOptimization=false" } else { "" }

# Workaround for some machines in the AzDO pool not allowing long paths (%5c is msbuild escaped backslash)
$ibcDir = Join-Path $RepoRoot ".o%5c"

# Setting /p:TreatWarningsAsErrors=true is a workaround for https://github.com/Microsoft/msbuild/issues/3062.
# We don't pass /warnaserror to msbuild ($warnAsError is set to $false by default above), but set
Expand All @@ -221,13 +236,62 @@ function BuildSolution() {
/p:QuietRestoreBinaryLog=$binaryLog `
/p:TestTargetFrameworks=$testTargetFrameworks `
/p:TreatWarningsAsErrors=true `
$suppressPartialNgenOptimization `
/p:VisualStudioIbcSourceBranchName=$ibcSourceBranchName `
/p:VisualStudioIbcDropId=$ibcDropId `
/p:EnablePartialNgenOptimization=$applyOptimizationData `
/p:IbcOptimizationDataDir=$ibcDir `
$suppressExtensionDeployment `
@properties
}


# Get the branch that produced the IBC data this build is going to consume.
# IBC data are only merged in official built, but we want to test some of the logic in CI builds as well.
function GetIbcSourceBranchName() {
if (Test-Path variable:global:_IbcSourceBranchName) {
return $global:_IbcSourceBranchName
}

function calculate {
$fallback = "master-vs-deps"

if (!$officialIbcSourceBranchName) {
return $fallback
}

if ($officialIbcSourceBranchName -ne "default") {
return $officialIbcSourceBranchName
}

$branchData = GetBranchPublishData $officialSourceBranchName
if ($branchData -eq $null) {
Write-Host "Warning: Branch $officialSourceBranchName is not listed in PublishData.json. Using IBC data from '$fallback'. " + `
"Override by setting IbcSourceBranchName build variable." -ForegroundColor Yellow
return $fallback
}

if (Test-Member $branchData "ibcSourceBranch") {
return $branchData.ibcSourceBranch
}

return $officialSourceBranchName
}

return $global:_IbcSourceBranchName = calculate
}

# Set VSO variables used by MicroBuildBuildVSBootstrapper pipeline task
function Set-OptProfVariables() {
function SetVisualStudioBootstrapperBuildArgs() {
$branchData = GetBranchPublishData (GetIbcSourceBranchName)

# VS branch name is e.g. "lab/d16.0stg", "rel/d15.9", "lab/ml", etc.
$vsBranchSimpleName = $branchData.vsBranch.Split('/')[-1]
$vsMajorVersion = $branchData.vsMajorVersion
$vsChannel = "int.$vsBranchSimpleName"

Write-Host "##vso[task.setvariable variable=VisualStudio.MajorVersion;]$vsMajorVersion"
Write-Host "##vso[task.setvariable variable=VisualStudio.ChannelName;]$vsChannel"

$insertionDir = Join-Path $VSSetupDir "Insertion"
$manifestList = [string]::Join(',', (Get-ChildItem "$insertionDir\*.vsman"))
Write-Host "##vso[task.setvariable variable=VisualStudio.SetupManifestList;]$manifestList"
Expand Down Expand Up @@ -444,7 +508,7 @@ try {
}

if ($ci -and $build -and $msbuildEngine -eq "vs") {
Set-OptProfVariables
SetVisualStudioBootstrapperBuildArgs
}

if ($testDesktop -or $testVsi -or $testIOperation) {
Expand Down
30 changes: 12 additions & 18 deletions eng/publish-assets.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,6 @@ function Publish-Entry($publishData, [switch]$isBranch) {
exit 0
}

function Test-Member($obj, [string]$name) {
$value = Get-Member -Name $name -InputObject $obj
return $value -ne $null
}

try {
if ($configuration -eq "") {
Write-Host "Must provide the build configuration with -configuration"
Expand All @@ -141,29 +136,28 @@ try {

$dotnet = Ensure-DotnetSdk

Write-Host "Downloading PublishData.json"
$publishFileContent = (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/dotnet/roslyn/master/eng/config/PublishData.json" -UseBasicParsing).Content
$data = ConvertFrom-Json $publishFileContent

if ($branchName -ne "" -and $releaseName -ne "") {
Write-Host "Can only specify -branchName or -releaseName, not both"
exit 1
}
elseif ($branchName -ne "") {
if (-not (Test-Member $data.branches $branchName)) {
Write-Host "$branchName is not listed for publishing"

if ($branchName -ne "") {
$data = GetBranchPublishData $branchName
if ($data -eq $null) {
Write-Host "Branch $branchName not listed for publishing."
exit 0
}

Publish-Entry $data.branches.$branchName -isBranch:$true
Publish-Entry $data -isBranch:$true
}
elseif ($releaseName -ne "") {
if (-not (Test-Member $data.releases $releaseName)) {
Write-Host "$releaseName is not a valid release"
exit 1
elseif ($releaseName -ne "") {
$data = GetReleasePublishData $releaseName
if ($data -eq $null) {
Write-Host "Release $releaseName not listed for publishing."
exit 1
}

Publish-Entry $data.releases.$releaseName -isBranch:$false
Publish-Entry $data -isBranch:$false
}
else {
Write-Host "Need to specify -branchName or -releaseName"
Expand Down
10 changes: 10 additions & 0 deletions eng/test-determinism.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ $script:skipList = @()
function Run-Build([string]$rootDir, [string]$logFileName) {
# Clean out the previous run
Write-Host "Cleaning binaries"
$stopWatch = [System.Diagnostics.StopWatch]::StartNew()
Remove-Item -Recurse (Get-BinDir $rootDir)
Remove-Item -Recurse (Get-ObjDir $rootDir)
$stopWatch.Stop()
Write-Host "Cleaning took $($stopWatch.Elapsed)"

$solution = Join-Path $rootDir "Roslyn.sln"

Expand Down Expand Up @@ -90,13 +93,16 @@ function Get-FilesToProcess([string]$rootDir) {

# This will build up the map of all of the binaries and their respective hashes.
function Record-Binaries([string]$rootDir) {
$stopWatch = [System.Diagnostics.StopWatch]::StartNew()
Write-Host "Recording file hashes"

$map = @{ }
foreach ($fileData in Get-FilesToProcess $rootDir) {
Write-Host "`t$($fileData.FileName) = $($fileData.Hash)"
$map[$fileData.FileId] = $fileData
}
$stopWatch.Stop()
Write-Host "Recording took $($stopWatch.Elapsed)"
return $map
}

Expand Down Expand Up @@ -140,6 +146,7 @@ function Test-Build([string]$rootDir, $dataMap, [string]$logFileName) {
$allGood = $true

Write-Host "Testing the binaries"
$stopWatch = [System.Diagnostics.StopWatch]::StartNew()
foreach ($fileData in Get-FilesToProcess $rootDir) {
$fileId = $fileData.FileId
$fileName = $fileData.FileName
Expand Down Expand Up @@ -188,6 +195,9 @@ function Test-Build([string]$rootDir, $dataMap, [string]$logFileName) {
Write-Host "Please send $zipFile to compiler team for analysis"
exit 1
}

$stopWatch.Stop()
Write-Host "Testing took $($stopWatch.Elapsed)"
}

function Run-Test() {
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"xcopy-msbuild": "15.9.0-alpha"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19104.18"
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19113.4"
}
}
Loading