Skip to content

Commit 12313b2

Browse files
author
dotnet-automerge-bot
authored
Merge pull request #6787 from dotnet/merges/master-to-release/dev16.2
Merge master to release/dev16.2
2 parents 0b12961 + afe77d7 commit 12313b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+342
-207
lines changed

.vsts-signed.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ variables:
55
- name: VisualStudioDropName
66
value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)
77

8+
# Variables defined in yml cannot be overridden at queue time; instead overridable variables must be defined in the web UI.
9+
# Commenting out until something like this is supported: https://github.com/Microsoft/azure-pipelines-yaml/pull/129
10+
#variables:
11+
#- name: SkipTests
12+
# defaultValue: false
13+
814
jobs:
915
- job: Full_Signed
1016
pool:
@@ -26,6 +32,7 @@ jobs:
2632
- script: eng\CIBuild.cmd
2733
-configuration $(BuildConfiguration)
2834
-testAll
35+
-officialSkipTests $(SkipTests)
2936
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
3037
/p:VisualStudioDropName=$(VisualStudioDropName)
3138
/p:DotNetSignType=$(SignType)
@@ -55,7 +62,7 @@ jobs:
5562
ArtifactName: 'Test Results'
5663
publishLocation: Container
5764
continueOnError: true
58-
condition: succeededOrFailed()
65+
condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true'))
5966

6067
# Upload VSTS Drop
6168
- task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1

FSharpBuild.Directory.Build.targets

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,59 @@
55
<Import Project="eng\targets\NGenBinaries.targets" />
66
<Import Project="FSharp.Profiles.props" />
77

8-
<PropertyGroup>
9-
<CompileDependsOn>$(CompileDependsOn);CopyAndSubstituteTextFiles</CompileDependsOn>
10-
</PropertyGroup>
11-
128
<Target Name="CopyAndSubstituteTextFiles"
139
Inputs="@(CopyAndSubstituteText)"
14-
Outputs="@(CopyAndSubstituteText->'$(OutDir)%(TargetFilename)')">
10+
Outputs="@(CopyAndSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')"
11+
BeforeTargets="BeforeBuild">
12+
1513
<PropertyGroup>
14+
<__TargetFilePath>@(CopyAndSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')</__TargetFilePath>
15+
<__TargetFileName>@(CopyAndSubstituteText->'%(Filename)%(Extension)')</__TargetFileName>
16+
1617
<_ReplacementText>$([System.IO.File]::ReadAllText('%(CopyAndSubstituteText.FullPath)'))</_ReplacementText>
1718
<_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern1)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern1)', '%(CopyAndSubstituteText.Replacement1)'))</_ReplacementText>
1819
<_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern2)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern2)', '%(CopyAndSubstituteText.Replacement2)'))</_ReplacementText>
1920
</PropertyGroup>
20-
<WriteLinesToFile File="$(OutDir)%(CopyAndSubstituteText.TargetFilename)" Lines="$(_ReplacementText)" Overwrite="true" />
21+
22+
<MakeDir
23+
Directories="$(IntermediateOutputPath)"
24+
Condition="!Exists('$(IntermediateOutputPath)')" />
25+
<WriteLinesToFile File="$(__TargetFilePath)" Lines="$(_ReplacementText)" Overwrite="true" />
26+
27+
<!-- Make sure it will get cleaned -->
28+
<ItemGroup >
29+
<None Include="$(__TargetFilePath)" Condition="'$(__TargetFileName)' == 'App.config'" CopyToOutputDirectory="Never" />
30+
<None Include="$(__TargetFilePath)" Condition="'$(__TargetFileName)' != 'App.config'" CopyToOutputDirectory="PreserveNewest" />
31+
<FileWrites Include="$(__TargetFilePath)" Condition="'$(__TargetFileName)' != 'App.config'" />
32+
</ItemGroup>
33+
</Target>
34+
35+
<Target Name="_GenerateBuildPropertiesFile"
36+
Outputs="$(IntermediateOutputPath)buildproperties.fs"
37+
BeforeTargets="BeforeBuild"
38+
Condition="'$(Language)'=='F#'">
39+
40+
<ItemGroup>
41+
<_BuildPropertyLines Remove="@(_BuildPropertyLines)" />
42+
<_BuildPropertyLines Include="// &lt;auto-generated &gt;" />
43+
<_BuildPropertyLines Include="// &lt;Generated by the FSharp WriteCodeFragment class./&gt;" />
44+
<_BuildPropertyLines Include="// &lt;/auto-generated/&gt;" />
45+
<_BuildPropertyLines Include="//" />
46+
<_BuildPropertyLines Include="module internal FSharp.BuildProperties" />
47+
<_BuildPropertyLines Include="let fsProductVersion = &quot;$(FSPRODUCTVERSION)&quot;" />
48+
<_BuildPropertyLines Include="let fsLanguageVersion = &quot;$(FSLANGUAGEVERSION)&quot;" />
49+
</ItemGroup>
50+
51+
<MakeDir
52+
Directories="$(IntermediateOutputPath)"
53+
Condition="!Exists('$(IntermediateOutputPath)')" />
54+
<WriteLinesToFile File="$(IntermediateOutputPath)buildproperties.fs" Lines="@(_BuildPropertyLines)" Overwrite="true" />
55+
2156
<!-- Make sure it will get cleaned -->
22-
<CreateItem Include="$(OutDir)%(CopyAndSubstituteText.TargetFilename)">
23-
<Output TaskParameter="Include" ItemName="FileWrites" />
24-
</CreateItem>
57+
<ItemGroup>
58+
<FileWrites Include="$(IntermediateOutputPath)buildproperties.fs" />
59+
<CompileBefore Include="$(IntermediateOutputPath)buildproperties.fs" />
60+
</ItemGroup>
2561
</Target>
2662

2763
</Project>

azure-pipelines.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
trigger:
33
- master
44
- dev16.1
5+
- fsharp47
6+
- fsharp5
57
- release/*
68
pr:
79
- master
810
- dev16.1
11+
- fsharp47
12+
- fsharp5
913
- release/*
1014

1115
variables:
@@ -20,6 +24,12 @@ variables:
2024
- name: VisualStudioDropName
2125
value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)
2226

27+
# Variables defined in yml cannot be overridden at queue time; instead overridable variables must be defined in the web UI.
28+
# Commenting out until something like this is supported: https://github.com/Microsoft/azure-pipelines-yaml/pull/129
29+
#variables:
30+
#- name: SkipTests
31+
# defaultValue: false
32+
2333
jobs:
2434

2535
#---------------------------------------------------------------------------------------------------------------------#
@@ -55,6 +65,7 @@ jobs:
5565
-configuration $(_BuildConfig)
5666
-prepareMachine
5767
-testAll
68+
-officialSkipTests $(SkipTests)
5869
/p:SignType=$(_SignType)
5970
/p:DotNetSignType=$(_SignType)
6071
/p:MicroBuild_SigningEnabled=true
@@ -70,6 +81,24 @@ jobs:
7081
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
7182
/p:PublishToSymbolServer=true
7283
/p:VisualStudioDropName=$(VisualStudioDropName)
84+
- task: PublishBuildArtifacts@1
85+
displayName: Publish Artifact Packages
86+
inputs:
87+
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(_BuildConfig)'
88+
ArtifactName: 'Packages'
89+
condition: succeeded()
90+
- task: PublishBuildArtifacts@1
91+
displayName: Publish Artifact VSSetup
92+
inputs:
93+
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\Insertion'
94+
ArtifactName: 'VSSetup'
95+
condition: succeeded()
96+
- task: PublishBuildArtifacts@1
97+
displayName: Publish Artifact Nightly
98+
inputs:
99+
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\VisualFSharpFull.vsix'
100+
ArtifactName: 'Nightly'
101+
condition: succeeded()
73102

74103
#---------------------------------------------------------------------------------------------------------------------#
75104
# PR builds #

eng/Build.ps1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ param (
5252
[switch]$testFSharpQA,
5353
[switch]$testVs,
5454
[switch]$testAll,
55+
[string]$officialSkipTests = "false",
5556

5657
[parameter(ValueFromRemainingArguments=$true)][string[]]$properties)
5758

@@ -84,6 +85,7 @@ function Print-Usage() {
8485
Write-Host " -testFSharpCore Run FSharpCore unit tests"
8586
Write-Host " -testFSharpQA Run F# Cambridge tests"
8687
Write-Host " -testVs Run F# editor unit tests"
88+
Write-Host " -officialSkipTests <bool> Set to 'true' to skip running tests"
8789
Write-Host ""
8890
Write-Host "Advanced settings:"
8991
Write-Host " -ci Set when running on CI server"
@@ -112,6 +114,17 @@ function Process-Arguments() {
112114
$script:testVs = $True
113115
}
114116

117+
if ([System.Boolean]::Parse($script:officialSkipTests)) {
118+
$script:testAll = $False
119+
$script:testCambridge = $False
120+
$script:testCompiler = $False
121+
$script:testDesktop = $False
122+
$script:testCoreClr = $False
123+
$script:testFSharpCore = $False
124+
$script:testFSharpQA = $False
125+
$script:testVs = $False
126+
}
127+
115128
if ($noRestore) {
116129
$script:restore = $False;
117130
}

eng/Versions.props

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212
<!-- Version number computation -->
1313
<PropertyGroup>
1414
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
15-
<FSCoreMajorVersion>4.6</FSCoreMajorVersion>
15+
<FSLanguageVersion>4.6</FSLanguageVersion>
16+
<FSCoreMajorVersion>$(FSLanguageVersion)</FSCoreMajorVersion>
1617
<FSCorePackageVersion>$(FSCoreMajorVersion).3</FSCorePackageVersion>
1718
<FSCoreVersionPrefix>$(FSCoreMajorVersion).0</FSCoreVersionPrefix>
1819
<FSCoreVersion>$(FSCoreVersionPrefix).0</FSCoreVersion>
20+
<!-- The current published nuget package -->
21+
<FSharpCoreShippedPackageVersion>4.6.2</FSharpCoreShippedPackageVersion>
22+
<!-- The pattern for specifying the preview package -->
23+
<FSharpCorePreviewPackageVersion>$(FSCorePackageVersion)-$(PreReleaseVersionLabel).*</FSharpCorePreviewPackageVersion>
1924
</PropertyGroup>
2025
<PropertyGroup>
2126
<FSPackageMajorVersion>10.5</FSPackageMajorVersion>
@@ -171,4 +176,4 @@
171176
<RoslynToolsSignToolVersion>1.0.0-beta2-dev3</RoslynToolsSignToolVersion>
172177
<StrawberryPerl64Version>5.22.2.1</StrawberryPerl64Version>
173178
</PropertyGroup>
174-
</Project>
179+
</Project>

fcs/Directory.Build.targets

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
11
<Project>
2-
<!-- empty to prevent directory crawling -->
2+
3+
<Target Name="CopyAndSubstituteTextFiles"
4+
Inputs="@(CopyAndSubstituteText)"
5+
Outputs="@(CopyAndSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')"
6+
BeforeTargets="BeforeBuild">
7+
8+
<PropertyGroup>
9+
<__TargetFilePath>@(CopyAndSubstituteText->'$(IntermediateOutputPath)%(Filename)%(Extension)')</__TargetFilePath>
10+
<__TargetFileName>@(CopyAndSubstituteText->'%(Filename)%(Extension)')</__TargetFileName>
11+
12+
<_ReplacementText>$([System.IO.File]::ReadAllText('%(CopyAndSubstituteText.FullPath)'))</_ReplacementText>
13+
<_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern1)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern1)', '%(CopyAndSubstituteText.Replacement1)'))</_ReplacementText>
14+
<_ReplacementText Condition="'%(CopyAndSubstituteText.Pattern2)' != ''">$(_ReplacementText.Replace('%(CopyAndSubstituteText.Pattern2)', '%(CopyAndSubstituteText.Replacement2)'))</_ReplacementText>
15+
</PropertyGroup>
16+
17+
<MakeDir
18+
Directories="$(IntermediateOutputPath)"
19+
Condition="!Exists('$(IntermediateOutputPath)')" />
20+
<WriteLinesToFile File="$(__TargetFilePath)" Lines="$(_ReplacementText)" Overwrite="true" />
21+
22+
<!-- Make sure it will get cleaned -->
23+
<ItemGroup >
24+
<None Include="$(__TargetFilePath)" Condition="'$(__TargetFileName)' == 'App.config'" CopyToOutputDirectory="Never" />
25+
<None Include="$(__TargetFilePath)" Condition="'$(__TargetFileName)' != 'App.config'" CopyToOutputDirectory="PreserveNewest" />
26+
<FileWrites Include="$(__TargetFilePath)" Condition="'$(__TargetFileName)' != 'App.config'" />
27+
</ItemGroup>
28+
</Target>
29+
30+
<Target Name="_GenerateBuildPropertiesFile"
31+
Outputs="$(IntermediateOutputPath)$(ProjectName)\buildproperties.fs"
32+
BeforeTargets="BeforeBuild"
33+
Condition="'$(Language)'=='F#'">
34+
35+
<ItemGroup>
36+
<_BuildPropertyLines Remove="@(_BuildPropertyLines)" />
37+
<_BuildPropertyLines Include="// &lt;auto-generated &gt;" />
38+
<_BuildPropertyLines Include="// &lt;Generated by the FSharp WriteCodeFragment class./&gt;" />
39+
<_BuildPropertyLines Include="// &lt;/auto-generated/&gt;" />
40+
<_BuildPropertyLines Include="//" />
41+
<_BuildPropertyLines Include="module internal FSharp.BuildProperties" />
42+
<_BuildPropertyLines Include="let fsProductVersion = &quot;$(FSPRODUCTVERSION)&quot;" />
43+
<_BuildPropertyLines Include="let fsLanguageVersion = &quot;$(FSLANGUAGEVERSION)&quot;" />
44+
</ItemGroup>
45+
46+
<MakeDir
47+
Directories="$(IntermediateOutputPath)$(ProjectName)"
48+
Condition="!Exists('$(IntermediateOutputPath)$(ProjectName)')" />
49+
<WriteLinesToFile File="$(IntermediateOutputPath)$(ProjectName)\buildproperties.fs" Lines="@(_BuildPropertyLines)" Overwrite="true" />
50+
51+
<!-- Make sure it will get cleaned -->
52+
<ItemGroup>
53+
<FileWrites Include="$(IntermediateOutputPath)$(ProjectName)\buildproperties.fs" />
54+
<CompileBefore Include="$(IntermediateOutputPath)$(ProjectName)\buildproperties.fs" />
55+
</ItemGroup>
56+
</Target>
57+
358
</Project>

fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@
7373
<Compile Include="$(FSharpSourcesRoot)\..\tests\service\Program.fs" Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
7474
<Link>Program.fs</Link>
7575
</Compile>
76-
<None Include="App.config" />
76+
<CopyAndSubstituteText Include="App.config">
77+
<Pattern1>{{FSCoreVersion}}</Pattern1>
78+
<Replacement1>$(FSCoreVersion)</Replacement1>
79+
</CopyAndSubstituteText>
7780
</ItemGroup>
7881
<ItemGroup>
7982
<PackageReference Include="FSharp.Core" Version="$(FcsFSharpCorePkgVersion)" />

fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<DefineConstants>$(DefineConstants);COMPILER</DefineConstants>
99
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
1010
<DefineConstants>$(DefineConstants);NO_STRONG_NAMES</DefineConstants>
11+
<DefineConstants>$(DefineConstants);LOCALIZATION_FSCOMP</DefineConstants>
1112
<FsLexOutputFolder Condition="'$(TargetFramework)' != ''">$(TargetFramework)\</FsLexOutputFolder>
1213
<FsYaccOutputFolder Condition="'$(TargetFramework)' != ''">$(TargetFramework)\</FsYaccOutputFolder>
1314
<OtherFlags>$(OtherFlags) /warnon:1182</OtherFlags>

src/fsharp/ExtensionTyping.fs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,7 @@ module internal ExtensionTyping =
637637

638638
static member CreateArray ctxt xs = match xs with null -> null | _ -> xs |> Array.map (ProvidedMethodInfo.Create ctxt)
639639
member __.Handle = x
640-
#if !FX_NO_REFLECTION_METADATA_TOKENS
641640
member __.MetadataToken = x.MetadataToken
642-
#endif
643641
override __.Equals y = assert false; match y with :? ProvidedMethodInfo as y -> x.Equals y.Handle | _ -> false
644642
override __.GetHashCode() = assert false; x.GetHashCode()
645643

src/fsharp/ExtensionTyping.fsi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,7 @@ module internal ExtensionTyping =
181181
ProvidedMethodInfo =
182182
inherit ProvidedMethodBase
183183
member ReturnType : ProvidedType
184-
#if !FX_NO_REFLECTION_METADATA_TOKENS
185184
member MetadataToken : int
186-
#endif
187185

188186
and [<AllowNullLiteral; Sealed; Class>]
189187
ProvidedParameterInfo =

0 commit comments

Comments
 (0)