Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Updating corefx to use new roslyn compiler #24076

Merged
merged 3 commits into from
Sep 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion BuildToolsVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0-prerelease-02014-02
2.0.0-prerelease-02018-01
4 changes: 2 additions & 2 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,6 @@
</PropertyGroup>

<!-- Use Roslyn Compilers to build -->
<Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" />
<Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)')" />
<Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false' and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
<Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)') and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
</Project>
1 change: 1 addition & 0 deletions src/System.Collections.Immutable/src/PEVerifyCompat.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/features:peverify-compat
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<FileAlignment>512</FileAlignment>
<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
<GenerateAppxPackageOnBuild>False</GenerateAppxPackageOnBuild>
<CompilerResponseFile>$(MSBuildThisFileDirectory)PEVerifyCompat.rsp;$(CompilerResponseFile)</CompilerResponseFile>
<PackageTargetFramework Condition="'$(TargetGroup)' == 'netstandard1.0'">netstandard1.0;portable-net45+win8+wp8+wpa81</PackageTargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public void PinnedAndUnpinnedLocals()

// Compiler can generate temporaries or re-order so just check the ones we expect are there.
// (They could get optimized away too. If that happens in practice, change this test to use hard-coded signatures.)
Assert.Contains("uint8& pinned", localTypes);
Assert.Contains("uint8[] pinned", localTypes);
Assert.Contains("uint8[]", localTypes);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ public static IEnumerable<object[]> GetUninitializedObject_ByRefLikeType_NetCore
}

#pragma warning disable 0169 // The private field 'class member' is never used
[System.Runtime.CompilerServices.IsByRefLike]
private struct StructWithSpanField
private ref struct StructWithSpanField
{
Span<byte> _bytes;
int _position;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<PropertyGroup>
<ProjectGuid>{13CE5E71-D373-4EA6-B3CB-166FF089A42A}</ProjectGuid>
<SkipIncludeNewtonsoftJson>true</SkipIncludeNewtonsoftJson>
<LangVersion>7.2</LangVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quesiton: Would we need to update the csproj of other assemblies (like System.Memory) to include LangVersion 7.2 if we want to use the ref keyword i.e. here: https://github.com/dotnet/corefx/pull/23908/files?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, at least that was required for ref structs so for now I only did it in places where we used it. If we think we will want to use it everywhere, then we can set this property at the dir.props level later on so that it is not replicated on every project.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be added to the top level props file instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes lets try and move that to dir.props.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joperezr are you planning to move this to dir.props in a followup?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, please also remove it from some of the places where I added it recently:
https://github.com/dotnet/corefx/pull/23908/files#diff-718e92a9d68dbfe993253e67ac1863f6R9

</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netfx-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netfx-Release|AnyCPU'" />
Expand Down
1 change: 1 addition & 0 deletions src/System.Runtime/tests/System.Runtime.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<NoWarn>1718</NoWarn>
<DefineConstants Condition="'$(TargetGroup)'=='netcoreapp'">$(DefineConstants);netcoreapp</DefineConstants>
<DefineConstants Condition="'$(TargetGroup)'=='uapaot'">$(DefineConstants);uapaot</DefineConstants>
<LangVersion>7.2</LangVersion>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
Expand Down
3 changes: 1 addition & 2 deletions src/System.Runtime/tests/System/TypeTests.netcoreapp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ public static IEnumerable<object[]> IsByRefLikeTestData
}
}

[IsByRefLike]
private struct ByRefLikeStruct
private ref struct ByRefLikeStruct
{
public ByRefLikeStruct(int dummy)
{
Expand Down