Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into port-cs-symbol-te…
Browse files Browse the repository at this point in the history
…st-to-portable
  • Loading branch information
agocke committed Apr 12, 2017
2 parents fce3879 + 3bd010e commit ffd5ac8
Show file tree
Hide file tree
Showing 160 changed files with 3,532 additions and 3,852 deletions.
19 changes: 1 addition & 18 deletions Roslyn.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
VisualStudioVersion = 15.0.26228.9
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysisTest", "src\Compilers\Core\CodeAnalysisTest\CodeAnalysisTest.csproj", "{A4C99B85-765C-4C65-9C2A-BB609AAB09E6}"
EndProject
Expand Down Expand Up @@ -59,8 +59,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workspaces", "Workspaces",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Workspaces", "src\Workspaces\Core\Portable\Workspaces.csproj", "{5F8D2414-064A-4B3A-9B42-8E2A04246BE5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizers", "Visualizers", "{64BDF58B-41BA-A19E-0D34-B5FA598403B6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{FD0FAF5F-1DED-485C-99FA-84B97F3A8EEC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompilersBoundTreeGenerator", "src\Tools\Source\CompilerGeneratorTools\Source\BoundTreeGenerator\CompilersBoundTreeGenerator.csproj", "{02459936-CD2C-4F61-B671-5C518F2A3DDC}"
Expand Down Expand Up @@ -183,8 +181,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BasicResultProviderTest", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExpressionCompilerTestUtilities", "src\ExpressionEvaluator\Core\Test\ExpressionCompiler\ExpressionCompilerTestUtilities.csproj", "{21B80A31-8FF9-4E3A-8403-AABD635AEED9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Concord", "src\ExpressionEvaluator\Core\Source\Concord\Concord.csproj", "{5002636A-FE8D-40BF-8818-AB513A2194FA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResultProviderTestUtilities", "src\ExpressionEvaluator\Core\Test\ResultProvider\ResultProviderTestUtilities.csproj", "{ABDBAC1E-350E-4DC3-BB45-3504404545EE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EditorFeatures", "EditorFeatures", "{EE97CB90-33BB-4F3A-9B3D-69375DEC6AC6}"
Expand All @@ -199,8 +195,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripting", "Scripting", "{
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VisualStudio", "VisualStudio", "{8DBA5174-B0AA-4561-82B1-A46607697753}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetadataVisualizer", "src\Tools\Source\MetadataVisualizer\MetadataVisualizer.csproj", "{4C7847DB-C412-4D5E-B573-F12FA0A76127}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CSharp", "CSharp", "{913A4C08-898E-49C7-9692-0EF9DC56CF6E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VisualBasic", "VisualBasic", "{151F6994-AEB3-4B12-B746-2ACFF26C7BBB}"
Expand Down Expand Up @@ -762,18 +756,10 @@ Global
{21B80A31-8FF9-4E3A-8403-AABD635AEED9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21B80A31-8FF9-4E3A-8403-AABD635AEED9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21B80A31-8FF9-4E3A-8403-AABD635AEED9}.Release|Any CPU.Build.0 = Release|Any CPU
{5002636A-FE8D-40BF-8818-AB513A2194FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5002636A-FE8D-40BF-8818-AB513A2194FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5002636A-FE8D-40BF-8818-AB513A2194FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5002636A-FE8D-40BF-8818-AB513A2194FA}.Release|Any CPU.Build.0 = Release|Any CPU
{ABDBAC1E-350E-4DC3-BB45-3504404545EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ABDBAC1E-350E-4DC3-BB45-3504404545EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ABDBAC1E-350E-4DC3-BB45-3504404545EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ABDBAC1E-350E-4DC3-BB45-3504404545EE}.Release|Any CPU.Build.0 = Release|Any CPU
{4C7847DB-C412-4D5E-B573-F12FA0A76127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C7847DB-C412-4D5E-B573-F12FA0A76127}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C7847DB-C412-4D5E-B573-F12FA0A76127}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C7847DB-C412-4D5E-B573-F12FA0A76127}.Release|Any CPU.Build.0 = Release|Any CPU
{FCFA8808-A1B6-48CC-A1EA-0B8CA8AEDA8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FCFA8808-A1B6-48CC-A1EA-0B8CA8AEDA8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCFA8808-A1B6-48CC-A1EA-0B8CA8AEDA8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -1065,7 +1051,6 @@ Global
{AFDE6BEA-5038-4A4A-A88E-DBD2E4088EED} = {A41D1B99-F489-4C43-BBDF-96D61B19A6B9}
{76C6F005-C89D-4348-BB4A-391898DBEB52} = {CAD2965A-19AB-489F-BE2E-7649957F914A}
{5F8D2414-064A-4B3A-9B42-8E2A04246BE5} = {55A62CFA-1155-46F1-ADF3-BEEE51B58AB5}
{64BDF58B-41BA-A19E-0D34-B5FA598403B6} = {FD0FAF5F-1DED-485C-99FA-84B97F3A8EEC}
{02459936-CD2C-4F61-B671-5C518F2A3DDC} = {FD0FAF5F-1DED-485C-99FA-84B97F3A8EEC}
{288089C5-8721-458E-BE3E-78990DAB5E2E} = {FD0FAF5F-1DED-485C-99FA-84B97F3A8EEC}
{288089C5-8721-458E-BE3E-78990DAB5E2D} = {FD0FAF5F-1DED-485C-99FA-84B97F3A8EEC}
Expand Down Expand Up @@ -1126,9 +1111,7 @@ Global
{B8DA3A90-A60C-42E3-9D8E-6C67B800C395} = {998CAFE8-06E4-4683-A151-0F6AA4BFF6C6}
{ACE53515-482C-4C6A-E2D2-4242A687DFEE} = {151F6994-AEB3-4B12-B746-2ACFF26C7BBB}
{21B80A31-8FF9-4E3A-8403-AABD635AEED9} = {998CAFE8-06E4-4683-A151-0F6AA4BFF6C6}
{5002636A-FE8D-40BF-8818-AB513A2194FA} = {998CAFE8-06E4-4683-A151-0F6AA4BFF6C6}
{ABDBAC1E-350E-4DC3-BB45-3504404545EE} = {998CAFE8-06E4-4683-A151-0F6AA4BFF6C6}
{4C7847DB-C412-4D5E-B573-F12FA0A76127} = {64BDF58B-41BA-A19E-0D34-B5FA598403B6}
{913A4C08-898E-49C7-9692-0EF9DC56CF6E} = {235A3418-A3B0-4844-BCEB-F1CF45069232}
{151F6994-AEB3-4B12-B746-2ACFF26C7BBB} = {235A3418-A3B0-4844-BCEB-F1CF45069232}
{4C81EBB2-82E1-4C81-80C4-84CC40FA281B} = {235A3418-A3B0-4844-BCEB-F1CF45069232}
Expand Down
5 changes: 3 additions & 2 deletions build/Targets/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
<MicrosoftDiaSymReaderConverterXmlVersion>1.0.0-beta1-61518-02</MicrosoftDiaSymReaderConverterXmlVersion>
<MicrosoftDiaSymReaderNativeVersion>1.5.0</MicrosoftDiaSymReaderNativeVersion>
<MicrosoftDiaSymReaderPortablePdbVersion>1.2.0</MicrosoftDiaSymReaderPortablePdbVersion>
<MicrosoftMetadataVisualizerVersion>1.0.0-beta1-61531-03</MicrosoftMetadataVisualizerVersion>
<MicrosoftNETCoreRuntimeCoreCLRVersion>1.1.0</MicrosoftNETCoreRuntimeCoreCLRVersion>
<MicrosoftVisualBasicVersion>10.1.0</MicrosoftVisualBasicVersion>
<MicrosoftVisualStudioDebuggerEngineVersion>15.0.26201-alpha</MicrosoftVisualStudioDebuggerEngineVersion>
<MicrosoftVisualStudioDebuggerMetadataVersion>15.0.26201-alpha</MicrosoftVisualStudioDebuggerMetadataVersion>
<MicrosoftVisualStudioDebuggerEngineVersion>15.0.26201-gamma</MicrosoftVisualStudioDebuggerEngineVersion>
<MicrosoftVisualStudioDebuggerMetadataVersion>15.0.26201-gamma</MicrosoftVisualStudioDebuggerMetadataVersion>
<MicrosoftVisualStudioInteractiveWindowVersion>2.0.0-rc3-61304-01</MicrosoftVisualStudioInteractiveWindowVersion>
<MicrosoftVisualStudioVsInteractiveWindowVersion>2.0.0-rc3-61304-01</MicrosoftVisualStudioVsInteractiveWindowVersion>
<MicrosoftVSSDKBuildToolsVersion>15.0.26124-RC3</MicrosoftVSSDKBuildToolsVersion>
Expand Down
1 change: 1 addition & 0 deletions build/config/RepoUtilData.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"path": "build\\Targets\\Dependencies.props",
"values": [
"Microsoft.Dia.*",
"Microsoft.Metadata.*",
"System.*",
"Microsoft.CodeAnalysis.Analyzers",
"Microsoft.VisualBasic",
Expand Down
15 changes: 13 additions & 2 deletions build/scripts/cibuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ function Terminate-BuildProcesses() {
Get-Process vbcscompiler -ErrorAction SilentlyContinue | kill
}

# The Jenkins images used to execute our tests can live for a very long time. Over the course
# of hundreds of runs this can cause the %TEMP% folder to fill up. To avoid this we redirect
# %TEMP% into the binaries folder which is deleted at the end of every run as a part of cleaning
# up the workspace.
function Redirect-Temp() {
$temp = Join-Path $binariesDir "Temp"
Create-Directory $temp
${env:TEMP} = $temp
${env:TMP} = $temp
}

try {
. (Join-Path $PSScriptRoot "build-utils.ps1")
Push-Location $repoDir
Expand Down Expand Up @@ -73,6 +84,7 @@ try {

# Ensure the binaries directory exists because msbuild can fail when part of the path to LogFile isn't present.
Create-Directory $binariesDir
Redirect-Temp

if ($testBuildCorrectness) {
Exec { & ".\build\scripts\test-build-correctness.ps1" $repoDir $configDir }
Expand Down Expand Up @@ -142,11 +154,10 @@ try {
$target = if ($skipTest) { "Build" } else { "BuildAndTest" }
$test64Arg = if ($test64) { "true" } else { "false" }
$testVsiArg = if ($testVsi) { "true" } else { "false" }
$testVsiArg = if ($testVsiNetCore) { "true" } else { "false" }
$buildLog = Join-Path $binariesdir "Build.log"

if ($testVsiNetCore) {
Run-MSBuild /p:BootstrapBuildPath="$bootstrapDir" BuildAndTest.proj /t:$target /p:Configuration=$buildConfiguration /p:Test64=$test64Arg /p:TestVsi=$testVsiArg /p:Trait="Feature=NetCore" /p:PathMap="$($repoDir)=q:\roslyn" /p:Feature=pdb-path-determinism /fileloggerparameters:LogFile="$buildLog"`;verbosity=diagnostic /p:DeployExtension=false
Run-MSBuild /p:BootstrapBuildPath="$bootstrapDir" BuildAndTest.proj /t:$target /p:Configuration=$buildConfiguration /p:Test64=$test64Arg /p:TestVsi=true /p:Trait="Feature=NetCore" /p:PathMap="$($repoDir)=q:\roslyn" /p:Feature=pdb-path-determinism /fileloggerparameters:LogFile="$buildLog"`;verbosity=diagnostic /p:DeployExtension=false
}
else {
Run-MSBuild /p:BootstrapBuildPath="$bootstrapDir" BuildAndTest.proj /t:$target /p:Configuration=$buildConfiguration /p:Test64=$test64Arg /p:TestVsi=$testVsiArg /p:PathMap="$($repoDir)=q:\roslyn" /p:Feature=pdb-path-determinism /fileloggerparameters:LogFile="$buildLog"`;verbosity=diagnostic /p:DeployExtension=false
Expand Down
13 changes: 9 additions & 4 deletions docs/contributing/Building, Debugging, and Testing on Windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,28 @@ will start a new Visual Studio instance using those VSIX which override our inst
binaries. This means trying out a change to the languge, IDE or debugger is as
simple as hitting F5.

The startup project needs to be set to VisualStudioSetup. This should be the default
but in same cases will need to be set explicitly.
The startup project needs to be set to VisualStudioSetup.Next. This should be
the default but in same cases will need to be set explicitly.

Here are what is deployed with each extension, by project that builds it. If
you're working on a particular area, you probably want to set the appropriate
project as your startup project to ensure the right things are built and
deployed.

- **VisualStudioSetup.Next**: this project can be found inside the VisualStudio
folder from the Solution Explorer, and builds Roslyn.VisualStudio.Setup.vsix.
In theory, it contains code to light up features for the next version of VS
(Dev16), but currently hasn't been updated for that since Dev15/VS2017 shipped.
If you're working on fixing an IDE bug, this is the project you want to use.
- **VisualStudioSetup**: this project can be found inside the VisualStudio folder
from the Solution Explorer, and builds Roslyn.VisualStudio.Setup.vsix. It
contains the core language services that provide C# and VB editing. It also
contains the copy of the compiler that is used to drive IntelliSense and
semantic analysis in Visual Studio. Although this is the copy of the compiler
that's used to generate squiggles and other information, it's not the
compiler used to actually produce your final .exe or .dll when you do a
build. If you're working on fixing an IDE bug, this is the project you want
to use.
build. If you're working on fixing an IDE bug, this is *NOT* the project you want
to use right now - use VisualStudioSetup.Next instead.
- **CompilerExtension**: this project can be found inside the Compilers folder
from the Solution Explorer, and builds Roslyn.Compilers.Extension.vsix.
This deploys a copy of the command line compilers that are used to do actual
Expand Down
46 changes: 25 additions & 21 deletions docs/contributing/Compiler Test Plan.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This document provides guidance for thinking about language interactions and testing compiler changes.
This document provides guidance for thinking about language interactions and testing compiler changes.

# General concerns:
- Completeness of the specification as a guide for testing (is the spec complete enough to suggest what the compiler should do in each scenario?)
Expand Down Expand Up @@ -61,9 +61,11 @@ This document provides guidance for thinking about language interactions and tes
- Target typing (var, lambdas, integrals)
- Conversions (boxing/unboxing)
- Nullable (wrapping, unwrapping)
- Overload resolution, override/inherits/implementation (OHI)
- Overload resolution, override/hide/implement (OHI)
- Inheritance (virtual, override, abstract, new)
- Anonymous types
- Tuples
- Local functions
- Unsafe code
- LINQ
- Constructors, properties, indexers, events, operators, and destructors.
Expand All @@ -72,33 +74,37 @@ This document provides guidance for thinking about language interactions and tes
- Ref / out parameters
- Compound operators (+=, /=, etc ..)
- Assignment exprs
- Ref returns


# Misc
- reserved keywords (sometimes contextual)
- pre-processing directives
- COM interop
- modopt and modreq
- ref assemblies


# Testing in interaction with other components
Interaction with IDE, Debugger, and EnC should be worked out with relevant teams. A few highlights:
- IDE
1. Colorization
2. Typing experience and dealing with incomplete code
3. Intellisense (squiggles, dot completion)
4. "go to" and renaming
5. More: https://github.com/dotnet/roslyn/issues/8389
- Colorization
- Typing experience and dealing with incomplete code
- Intellisense (squiggles, dot completion)
- "go to" and renaming
- More: [IDE Test Plan](https://github.com/dotnet/roslyn/blob/master/docs/contributing/IDE%20Test%20Plan.md)

- Debugger
1. Stepping, setting breakpoints
2. Displaying Locals (that also covers Autos)
3. Typing in immediate/watch window (that also covers hovering over a variable)
- Debugger / EE
- Stepping, setting breakpoints
- Displaying Locals/Autos windows
- Type and Value display
- Expanding instance members
- Locals/parameters/this in closure classes
- Attributes on locals and expressions (e.g.: [Dynamic], [TupleElementNames])
- Compiling expressions in Immediate/Watch windows or hovering over an expression
- Compiling expressions in [DebuggerDisplay("...")]
- Assigning values in Locals/Autos/Watch windows

- Edit-and-continue


# Eric's cheatsheet

## Statements
Expand All @@ -114,15 +120,15 @@ x++;
x--;
new C();
if (…) … else …
switch(…) { … }
switch(…) { … case (…) when (…): … }
while(…) …
do … while(…);
for( … ; … ; … ) …
foreach(…) …
goto … ;
throw … ;
return … ;
try  { … } catch (…) { … } finally { … }
try  { … } catch (…) when (…) { … } finally { … }
checked { … }
unchecked { … }
lock(…) …
Expand Down Expand Up @@ -151,7 +157,6 @@ Every expression can be classified as exactly one of these:
- Array initializer (\*)
- __arglist (\*)


(\*) Technically not an expression according to the spec.

Note that only values, variables, properties, indexers and events have a type.
Expand All @@ -170,15 +175,14 @@ A variable is a storage location. These are all the different ways to refer to a
- Pointer dereference
- __refvalue


## Operators

```
x.y
f( )
a[ ]
x++
x--
x--
new X()
typeof( )
default( )
Expand Down Expand Up @@ -230,6 +234,7 @@ sizeof( )
*x
& x
x->y
e is pattern
await x
__arglist( )
__refvalue( x, X )
Expand Down Expand Up @@ -274,7 +279,6 @@ __makeref( x )
- Tuple literal
- Tuple


## Types

- Class
Expand All @@ -286,7 +290,7 @@ __makeref( x )
- Pointer
- Type parameter

Things that can be members of another thing
## Members

- Class
- Struct
Expand Down
19 changes: 18 additions & 1 deletion docs/features/deconstruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,24 @@ foreach_variable_statement // new

**References**

[C# Design Notes for Apr 12-22, 2016](https://github.com/dotnet/roslyn/issues/11031)
[C# Design NOtes for Oct 25-26, 2016](https://github.com/dotnet/csharplang/blob/master/meetings/2016/LDM-2016-10-25-26.md)

[C# Design Notes for Sep 6, 2016](https://github.com/dotnet/csharplang/blob/master/meetings/2016/LDM-2016-09-06.md)

[C# Design Notes for July 13, 2016](https://github.com/dotnet/csharplang/blob/master/meetings/2016/LDM-2016-07-13.md)

[C# Design Notes for May 3-4, 2016](https://github.com/dotnet/csharplang/blob/master/meetings/2016/LDM-2016-05-03-04.md)

[C# Design Notes for Apr 12-22, 2016](https://github.com/dotnet/csharplang/blob/master/meetings/2016/LDM-2016-04-12-22.md)

[Design for declaration expressions](https://github.com/dotnet/csharplang/issues/365)

The [What's new in C# 7.0](https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0) post has a section on deconstructions.

**Possible future expansions**
- deconstruction in [let and from clause](https://github.com/dotnet/csharplang/issues/189)
- deconstruction in [lambda argument lists](https://github.com/dotnet/csharplang/issues/258)
- [deconstruction patterns](https://github.com/dotnet/csharplang/issues/277)
- allowing deconstructions with [mix of assignment and declaration](https://github.com/dotnet/csharplang/issues/125), thus also allowing deconstruction-declarations in expression contexts

See [C# Lang](https://github.com/dotnet/csharplang) repo for more up-to-date proposals and discussions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private BoundExpression SelectField(SimpleNameSyntax node, BoundExpression recei
node,
LookupResultKind.Empty,
ImmutableArray.Create<Symbol>(receiver.ExpressionSymbol),
ImmutableArray.Create<BoundNode>(receiver),
ImmutableArray.Create(receiver),
new ExtendedErrorTypeSymbol(this.Compilation, "", 0, info));
}

Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/Binder/Binder_Deconstruct.cs
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ private BoundExpression MakeDeconstructInvocationExpression(
}

private BoundBadExpression MissingDeconstruct(BoundExpression receiver, SyntaxNode rightSyntax, int numParameters, DiagnosticBag diagnostics,
out ImmutableArray<BoundDeconstructValuePlaceholder> outPlaceholders, BoundNode childNode)
out ImmutableArray<BoundDeconstructValuePlaceholder> outPlaceholders, BoundExpression childNode)
{
Error(diagnostics, ErrorCode.ERR_MissingDeconstruct, rightSyntax, receiver.Type, numParameters);
outPlaceholders = default(ImmutableArray<BoundDeconstructValuePlaceholder>);
Expand Down
Loading

0 comments on commit ffd5ac8

Please sign in to comment.