Skip to content

Commit b26994c

Browse files
Merge branch 'master' into nameof-operator
2 parents 5657759 + ccdfae0 commit b26994c

File tree

65 files changed

+1146
-749
lines changed

Some content is hidden

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

65 files changed

+1146
-749
lines changed

.nuget/NuGet.Config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
<add key="myget.org roslyn-tools" value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" />
1515
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
1616
<add key="vctools" value="https://vcppdogfooding.azurewebsites.net/nuget/" />
17+
<add key="myget.org roslyn tools" value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" />
18+
<add key="myget.org roslyn" value="https://dotnet.myget.org/F/roslyn/api/v3/index.json" />
1719
<add key="artifacts" value="../artifacts" />
1820
</packageSources>
1921
</configuration>

build.cmd

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ echo ^<debug^|release^>
2424
echo ^<diag^|publicsign^>
2525
echo ^<test^|test-net40-coreunit^|test-coreclr-coreunit^|test-compiler-unit^|test-pcl-coreunit^|test-net40-fsharp^|test-coreclr-fsharp^|test-net40-fsharpqa^>
2626
echo ^<include tag^>
27+
echo ^<init^>
2728
echo.
2829
echo No arguments default to 'default', meaning this (no testing)
2930
echo.
@@ -177,7 +178,7 @@ if /i '%ARG%' == 'microbuild' (
177178
set BUILD_PORTABLE=1
178179
set BUILD_VS=1
179180
set BUILD_SETUP=%FSC_BUILD_SETUP%
180-
181+
181182
set TEST_NET40_COMPILERUNIT_SUITE=1
182183
set TEST_NET40_COREUNIT_SUITE=1
183184
set TEST_NET40_FSHARP_SUITE=1
@@ -189,7 +190,6 @@ if /i '%ARG%' == 'microbuild' (
189190
set CI=1
190191
)
191192

192-
193193
REM These divide 'ci' into two chunks which can be done in parallel
194194
if /i '%ARG%' == 'ci_part1' (
195195
set _autoselect=0
@@ -204,7 +204,6 @@ if /i '%ARG%' == 'ci_part1' (
204204
set TEST_NET40_FSHARPQA_SUITE=1
205205
set TEST_VS_IDEUNIT_SUITE=1
206206
set CI=1
207-
208207
)
209208

210209
if /i '%ARG%' == 'ci_part2' (
@@ -328,6 +327,10 @@ if /i '%ARG%' == 'publicsign' (
328327
set BUILD_PUBLICSIGN=1
329328
)
330329

330+
if /i '%ARG%' == 'init' (
331+
set BUILD_PROTO_WITH_CORECLR_LKG=1
332+
)
333+
331334
goto :EOF
332335
:: Note: "goto :EOF" returns from an in-batchfile "call" command
333336
:: in preference to returning from the entire batch file.
@@ -371,7 +374,7 @@ echo .
371374
echo .
372375

373376
echo ---------------- Done with arguments, starting preparation -----------------
374-
set BuildToolsPackage=Microsoft.VSSDK.BuildTools.15.0.25929-RC2
377+
set BuildToolsPackage=Microsoft.VSSDK.BuildTools.15.0.26124-RC3
375378
if '%VSSDKInstall%'=='' (
376379
set VSSDKInstall=%~dp0packages\%BuildToolsPackage%\tools\vssdk
377380
)
@@ -477,6 +480,7 @@ if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (
477480
)
478481

479482
set _dotnetexe=%~dp0Tools\dotnetcli\dotnet.exe
483+
set NUGET_PACKAGES=%~dp0Packages
480484

481485
set _fsiexe="packages\FSharp.Compiler.Tools.4.0.1.19\tools\fsi.exe"
482486
if not exist %_fsiexe% echo Error: Could not find %_fsiexe% && goto :failure
@@ -495,7 +499,6 @@ if NOT EXIST Proto\net40\bin\fsc-proto.exe (
495499
set _dotnetexe=%~dp0Tools\dotnetcli\dotnet.exe
496500
set _architecture=win7-x64
497501

498-
499502
rem Build Proto
500503
if '%BUILD_PROTO%' == '1' (
501504
rmdir /s /q Proto

packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<package id="VisualCppTools" version="14.0.24519-Pre"/>
3030
<package id="Newtonsoft.Json" version="6.0.8"/>
3131
<package id="Microsoft.FSharp.TupleSample" version="1.0.0-alpha-161121"/>
32-
<package id="Microsoft.VSSDK.BuildTools" version="15.0.25929-RC2" />
32+
<package id="Microsoft.VSSDK.BuildTools" version="15.0.26124-RC3" />
3333

3434
<!-- Annoyingly the build of FSharp.Compiler.Server.Shared references a Visual Studio-specific attribute -->
3535
<!-- That DLL is logically part of the F# Compiler and F# Interactive but is shipped as part of the Visual F# IDE Tools -->

setup/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<package id="FsSrGen" version="2.0.0" targetFramework="net46" />
88
<package id="MicroBuild.Core" version="0.2.0" />
99
<package id="MicroBuild.Core.Sentinel" version="1.0.0" />
10-
<package id="MicroBuild.Plugins.SwixBuild" version="1.0.101" />
10+
<package id="MicroBuild.Plugins.SwixBuild" version="1.1.0-g0701ee829f" />
1111
<package id="WiX.Toolset.2015" version="3.10.0.1503" />
1212
<package id="Microsoft.VisualFSharp.Core.Redist" version="1.0.0" />
1313
<package id="Microsoft.VisualStudio.Shell.14.0" version="14.3.25407" targetFramework="net46" />

src/FSharpSource.Settings.targets

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<ConfigurationGroup Condition="'$(ConfigurationGroup)'==''">Debug</ConfigurationGroup>
1919
</PropertyGroup>
2020

21-
<!-- Nuget Package properties -->
2221
<PropertyGroup>
2322
<!-- Settings used all the time -->
2423
<Tailcalls>true</Tailcalls>
@@ -32,7 +31,7 @@
3231
<WarningsAsErrors />
3332

3433
<FX_NO_LOADER Condition=" '$(FX_NO_LOADER)'==''">false</FX_NO_LOADER>
35-
<VSSDK_BUILDTOOLS_VERSION>Microsoft.VSSDK.BuildTools.15.0.25929-RC2</VSSDK_BUILDTOOLS_VERSION>
34+
<VSSDK_BUILDTOOLS_VERSION>Microsoft.VSSDK.BuildTools.15.0.26124-RC3</VSSDK_BUILDTOOLS_VERSION>
3635

3736
<!-- Always qualify the IntermediateOutputPath by the TargetFramework if any exists -->
3837
<IntermediateOutputPath>obj\$(Configuration)\$(TargetFramework)\</IntermediateOutputPath>
@@ -106,12 +105,15 @@
106105
<DefineConstants Condition="'$(VisualStudioVersion)'=='' AND '$(ProjectLanguage)' != 'VisualBasic'">$(DefineConstants);VS_VERSION_DEV14</DefineConstants>
107106
</PropertyGroup>
108107

109-
<PropertyGroup>
108+
<!-- Nuget Package properties -->
109+
<PropertyGroup>
110110
<BuildRevision>$([System.DateTime]::Now.ToString(`yyMMdd`))</BuildRevision>
111-
<NuGetReleaseVersion>1.0.0</NuGetReleaseVersion>
111+
<NuGetReleaseVersion>1.0.0</NuGetReleaseVersion>
112112
<NuGetPreReleaseVersion>$(NuGetReleaseVersion)-rc</NuGetPreReleaseVersion>
113-
<NuGetPerBuildPreReleaseVersion Condition="'$(BuildRevision)' != ''">$(NuGetPreReleaseVersion)-$(BuildRevision.Trim())</NuGetPerBuildPreReleaseVersion>
114-
</PropertyGroup>
113+
<NuGetPerBuildPreReleaseVersion Condition="'$(BuildRevision)' != ''">$(NuGetPreReleaseVersion)-$(BuildRevision.Trim())</NuGetPerBuildPreReleaseVersion>
114+
<NUGET_PACKAGES Condition=" '$(NUGET_PACKAGES)' == '' ">$(MSBuildThisFileDirectory)..\packages</NUGET_PACKAGES>
115+
<RestorePackagesPath>$(NUGET_PACKAGES)</RestorePackagesPath>
116+
</PropertyGroup>
115117

116118
<PropertyGroup>
117119
<!-- Compiler tool locations. -->
@@ -121,14 +123,16 @@
121123
<FsiToolExe>fsi.exe</FsiToolExe>
122124
<FsLexToolExe>fslex.exe</FsLexToolExe>
123125
<FsYaccToolExe>fsyacc.exe</FsYaccToolExe>
124-
<RoslynVersion>2.0.0-rc2</RoslynVersion>
126+
<RoslynVersion>2.0.0-rc3-61324-01</RoslynVersion>
125127
<RoslynVSBinariesVersion>14.0</RoslynVSBinariesVersion>
126128
<RoslynVSPackagesVersion>14.3.25407</RoslynVSPackagesVersion>
127129

128130
<!-- FSharp.Compiler.Tools is currently only used to get a working FSI.EXE to execute some scripts during the build -->
129131
<!-- The LKG FSI.EXE requires MSBuild 15 to be installed, which is painful -->
130132
<FsiToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.19\tools</FsiToolPath>
131133
</PropertyGroup>
134+
132135
<Import Project="../Tools/Build.Common.props" Condition="'$(TargetFramework)'=='coreclr'"/>
136+
<Import Project="$(BuildVersionFilePath)" Condition="Exists('$(BuildVersionFilePath)')" />
133137

134138
</Project>

src/FSharpSource.targets

Lines changed: 86 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -412,18 +412,16 @@
412412

413413
<!-- Hook up .NET Core to enable solution refresh of packages -->
414414
<PropertyGroup Condition="'$(TargetFramework)'=='coreclr'">
415-
416-
<NuGetPackagesPath Condition="'$(NuGetPackagesPath)' == ''">$(FSharpSourcesRoot)\..\packages</NuGetPackagesPath>
417415

418416
<!-- Implicitly needed by packageresolve.targets. Should file a bug for a better error message here -->
419-
<PackagesDir>$(NuGetPackagesPath)\</PackagesDir>
417+
<PackagesDir>$(NUGET_PACKAGES)</PackagesDir>
420418

421419
<NuGetToolPath Condition="'$(NuGetToolPath)' == ''">$(FSharpSourcesRoot)\..\.nuget\</NuGetToolPath>
422420
<NuGetConfigCommandLine>-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>
423421

424-
<NugetRestoreCommand>"$(NuGetToolPath)NuGet.exe install -OutputDirectory "$(NuGetPackagesPath)" -Config "$(NuGetToolPath)NuGet.Config"</NugetRestoreCommand>
422+
<NugetRestoreCommand>"$(NuGetToolPath)NuGet.exe install -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)NuGet.Config"</NugetRestoreCommand>
425423

426-
<DnuRestoreCommand>"$(NuGetToolPath)NuGet.exe" restore -OutputDirectory "$(NuGetPackagesPath)" -Config "$(NuGetToolPath)NuGet.Config"</DnuRestoreCommand>
424+
<DnuRestoreCommand>"$(NuGetToolPath)NuGet.exe" restore -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)NuGet.Config"</DnuRestoreCommand>
427425

428426
<!-- Current version of .NET Core does not support all semantics used in our packages,
429427
so we ignore the pre-calculation in the lock file and calculate asset applicability in the build task -->
@@ -473,32 +471,27 @@
473471
</Target>
474472

475473
<Target Name="dotnetrestore" BeforeTargets="Build" Condition=" '$(TargetFramework)' == 'coreclr' ">
476-
<Exec Command="$(MSBuildThisFileDirectory)..\.nuget\nuget.exe restore -PackagesDirectory $(MSBuildThisFileDirectory)..\packages -Config $(MSBuildThisFileDirectory)..\.nuget\NuGet.Config project.json" />
477-
</Target>
478-
479-
<Target Name="nugetpack" AfterTargets="Build" Condition="'$(TargetFramework)' == 'coreclr' "
480-
Inputs="@(PackageNuspec)" Outputs='$(OutputPath.TrimEnd("\"))\nuget\"%(PackageNuspec.Filename)).nupkg'>
481-
<PropertyGroup>
482-
<PackageProperties>-prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)"</PackageProperties>
483-
</PropertyGroup>
484-
485-
<Exec Command='$(MSBuildThisFileDirectory)..\.nuget\nuget.exe pack %(PackageNuspec.Filename)%(PackageNuspec.Extension) -BasePath "$(OutputPath.TrimEnd("\"))" -ExcludeEmptyDirectories $(PackageProperties) -OutputDirectory "$(MSBuildThisFileDirectory)..\artifacts' />
474+
<Exec Command="$(MSBuildThisFileDirectory)..\.nuget\nuget.exe restore -PackagesDirectory $(PackagesDir) -Config $(MSBuildThisFileDirectory)..\.nuget\NuGet.Config project.json" />
486475
</Target>
487476

488477
<Target Name="dotnetrestore" BeforeTargets="Build" Condition=" '$(DOTNET_PUBLISH)' == 'true' ">
478+
<SetEnvVar Name="NUGET_PACKAGES" Value="$(NUGET_PACKAGES)" />
489479
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe restore --configfile $(MSBuildThisFileDirectory)..\.nuget\NuGet.Config project.json"/>
490480
</Target>
491481

492482
<Target Name="dotnetpublish" AfterTargets="Build" Condition=" '$(DOTNET_PUBLISH)' == 'true' ">
483+
<SetEnvVar Name="NUGET_PACKAGES" Value="$(NUGET_PACKAGES)" />
493484
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe --verbose publish --no-build project.json -r $(DOTNET_PUBLISH_PLATFORM) -c $(Configuration) -o $(DOTNET_PUBLISH_PATH)"/>
494485
</Target>
495486

496487
<Target Name="dotnetpublishfsccompiler" AfterTargets="CopyFilesToOutputDirectory" Condition=" '$(DOTNET_PUBLISH_FSC)' == 'true' ">
488+
<SetEnvVar Name="NUGET_PACKAGES" Value="$(NUGET_PACKAGES)" />
497489
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe restore DeployCompiler\fsc\project.json"/>
498490
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe --verbose publish --no-build DeployCompiler\fsc\project.json -r $(DOTNET_PUBLISH_PLATFORM) -c $(Configuration) -o $(DOTNET_PUBLISH_FSC_PATH)"/>
499491
</Target>
500492

501493
<Target Name="dotnetpublishfsicompiler" AfterTargets="CopyFilesToOutputDirectory" Condition=" '$(DOTNET_PUBLISH_FSI)' == 'true' ">
494+
<SetEnvVar Name="NUGET_PACKAGES" Value="$(NUGET_PACKAGES)" />
502495
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe restore DeployCompiler\fsi\project.json"/>
503496
<Exec Command="$(MSBuildThisFileDirectory)..\Tools\dotnetcli\dotnet.exe --verbose publish --no-build DeployCompiler\fsi\project.json -r $(DOTNET_PUBLISH_PLATFORM) -c $(Configuration) -o $(DOTNET_PUBLISH_FSI_PATH)"/>
504497
</Target>
@@ -518,6 +511,68 @@
518511
<WriteLinesToFile File="$(IntermediateOutputPath)source_link.json" Overwrite="true" Lines='{"documents": { "$(SrcRootDirectory)/*" : "$(RemoteUri.Replace(".git", "").Replace("github.com", "raw.githubusercontent.com"))/$(LatestCommit)/*" }}' />
519512
</Target>
520513

514+
<!-- If BuildVersionFilePath not specified then do nothing -->
515+
<Target Name="CleanVersionFile" Condition ="'$(BuildVersionFilePath)' != '' ">
516+
<PropertyGroup>
517+
<BuildVersionFileDir>$([System.IO.Path]::GetDirectoryName($(BuildVersionFilePath)))</BuildVersionFileDir>
518+
</PropertyGroup>
519+
<RemoveDir Condition="Exists('$(BuildVersionFileDir)')" Directories="$(BuildVersionFileDir)" />
520+
</Target>
521+
522+
<!-- If BuildVersionFilePath not specified then do nothing -->
523+
<Target Name="CreateOrUpdateBuildVersionFile" Condition ="'$(BuildVersionFilePath)' != '' ">
524+
<PropertyGroup>
525+
<BuildVersionFileDir>$([System.IO.Path]::GetDirectoryName($(BuildVersionFilePath)))</BuildVersionFileDir>
526+
<PackageVersionMajor Condition="'$(PackageVersionMajor)' == ''" >$(NuGetPerBuildPreReleaseVersion)</PackageVersionMajor>
527+
<PackageVersionMinor Condition="'$(PackageVersionMinor)' != ''" >$([MSBuild]::Add($(PackageVersionMinor), 1))</PackageVersionMinor>
528+
<PackageVersionMinor Condition="'$(PackageVersionMinor)' == ''" >1</PackageVersionMinor>
529+
</PropertyGroup>
530+
531+
<ItemGroup>
532+
<CurrentVersionLines Include="%3C%3Fxml version=%221.0%22 encoding=%22utf-8%22%3F%3E" />
533+
<CurrentVersionLines Include="%3C!-- This is a generated file. $(VersionSeedSourceComment) Seed Date is $(VersionSeedDate). --%3E" />
534+
<CurrentVersionLines Include="%3CProject xmlns=%22http://schemas.microsoft.com/developer/msbuild/2003%22%3E" />
535+
<CurrentVersionLines Include="%3CPropertyGroup%3E" />
536+
<CurrentVersionLines Include="%3CPackageVersionMajor Condition=%22%27%24(PackageVersionMajor)%27==%27%27%22%3E$(NuGetPerBuildPreReleaseVersion)%3C/PackageVersionMajor%3E" />
537+
<CurrentVersionLines Include="%3CPackageVersionMinor Condition=%22%27%24(PackageVersionMinor)%27==%27%27%22%3E$(PackageVersionMinor)%3C/PackageVersionMinor%3E" />
538+
<CurrentVersionLines Include="%3C/PropertyGroup%3E" />
539+
<CurrentVersionLines Include="%3C/Project%3E" />
540+
</ItemGroup>
541+
542+
<!-- Since by default the file will get dropped at the obj dir, make sure that the dir is created already or else WriteLinesToFile will error. -->
543+
<MakeDir Condition="!Exists('$(BuildVersionFileDir)')" Directories="$(BuildVersionFileDir)" />
544+
545+
<WriteLinesToFile
546+
ContinueOnError="WarnAndContinue"
547+
File="$(BuildVersionFilePath)"
548+
Lines="@(CurrentVersionLines)"
549+
Overwrite="true" />
550+
551+
<!-- Delete old BuildVersion.props files -->
552+
<ItemGroup>
553+
<OldBuildVersionFiles Include="$(BuildVersionFilePath)BuildVersions-*.props" Exclude="$(BuildVersionFilePath)%(BuildVersionFileItem.Filename).props" />
554+
</ItemGroup>
555+
<Delete Files="@(OldBuildVersionFiles)" TreatErrorsAsWarnings="true"/>
556+
</Target>
557+
558+
<Target Name="nugetpack"
559+
DependsOnTargets="CreateOrUpdateBuildVersionFile"
560+
AfterTargets="Build"
561+
Condition="'$(TargetFramework)' == 'coreclr' "
562+
Inputs="@(PackageNuspec)"
563+
Outputs='$(FSharpSourcesRoot.TrimEnd("\"))\..\$(Configuration)\artifacts\"%(PackageNuspec.Filename)).nupkg'>
564+
565+
<PropertyGroup>
566+
<PackageProperties>-prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)"</PackageProperties>
567+
</PropertyGroup>
568+
569+
<MakeDir Directories="$(FSharpSourcesRoot.TrimEnd('\'))\..\$(Configuration)\artifacts" />
570+
<MakeDir Directories="$(FSharpSourcesRoot.TrimEnd('\'))\..\artifacts" />
571+
<SetEnvVar Name="NUGET_PACKAGES" Value="$(NUGET_PACKAGES)" />
572+
<Exec Command='$(MSBuildThisFileDirectory)..\.nuget\nuget.exe pack @(PackageNuspec) -BasePath $(OutputPath.TrimEnd("\")) -ExcludeEmptyDirectories $(PackageProperties) -OutputDirectory $(FSharpSourcesRoot.TrimEnd("\"))\..\$(Configuration)\artifacts' />
573+
<Exec Command='$(MSBuildThisFileDirectory)..\.nuget\nuget.exe pack @(PackageNuspec) -BasePath $(OutputPath.TrimEnd("\")) -ExcludeEmptyDirectories $(PackageProperties) -OutputDirectory $(FSharpSourcesRoot.TrimEnd("\"))\..\artifacts' />
574+
</Target>
575+
521576
<UsingTask TaskName="ReplaceFileText" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
522577
<ParameterGroup>
523578
<InputFilename ParameterType="System.String" Required="true" />
@@ -541,4 +596,19 @@
541596
</Task>
542597
</UsingTask>
543598

544-
</Project>
599+
<UsingTask TaskName="SetEnvVar" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
600+
<ParameterGroup>
601+
<Name ParameterType="System.String" Required="true" />
602+
<Value ParameterType="System.String" Required="true" />
603+
</ParameterGroup>
604+
<Task>
605+
<Using Namespace="System" />
606+
<Code Type="Fragment" Language="cs">
607+
<![CDATA[
608+
Environment.SetEnvironmentVariable(Name, Value);
609+
]]>
610+
</Code>
611+
</Task>
612+
</UsingTask>
613+
614+
</Project>

src/Microbuild.Settings.targets

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,28 @@
226226
<Compile Include="@(TempCompile)" />
227227
</ItemGroup>
228228
</Target>
229-
229+
230+
<Target Name="GetVsixPackageVersion" Outputs="$(VsixPackageVersion)">
231+
<PropertyGroup>
232+
<!--
233+
234+
Given $(BUILD_BUILDNUMBER) = '20161225.1'
235+
Given $(MicroBuildAssemblyVersion) = '15.4.1.0'
236+
237+
Then $(BuildTimeStamp_Day) = 161225
238+
Then $(BuildTimeStamp_Number) = 01
239+
Then $(BuildTimeStamp) = 16122501
240+
Then $(MicroBuildAssemblyVersion_WithoutRevision) = 15.4.1
241+
Then $(VsixPackageVersion) = 15.4.1.16122501
242+
243+
-->
244+
<BuildTimeStamp_Day>$(BUILD_BUILDNUMBER.Split('.')[0].Substring(2))</BuildTimeStamp_Day>
245+
<BuildTimeStamp_Number>$(BUILD_BUILDNUMBER.Split('.')[1].PadLeft(2, '0'))</BuildTimeStamp_Number>
246+
<BuildTimeStamp>$(BuildTimeStamp_Day)$(BuildTimeStamp_Number)</BuildTimeStamp>
247+
<MicroBuildAssemblyVersion_WithoutRevision>$(MicroBuildAssemblyVersion.Substring(0, $(MicroBuildAssemblyVersion.LastIndexOf('.'))))</MicroBuildAssemblyVersion_WithoutRevision>
248+
<VsixPackageVersion>$(MicroBuildAssemblyVersion_WithoutRevision).$(BuildTimeStamp)</VsixPackageVersion>
249+
</PropertyGroup>
250+
</Target>
251+
230252
<Import Project="..\packages\MicroBuild.Core.$(MicroBuildCoreVersion)\build\MicroBuild.Core.targets" />
231253
</Project>

src/absil/il.fs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,11 +2494,19 @@ let prependInstrsToCode (instrs: ILInstr list) (c2: ILCode) =
24942494
let n = instrs.Length
24952495
match c2.Instrs.[0] with
24962496
// If there is a sequence point as the first instruction then keep it at the front
2497-
| I_seqpoint _ as i0 ->
2498-
{ c2 with Labels = Dictionary.ofList [ for kvp in c2.Labels -> (kvp.Key, if kvp.Value = 0 then 0 else kvp.Value + n) ]
2499-
Instrs = Array.append [| i0 |] (Array.append instrs c2.Instrs.[1..]) }
2500-
| _ ->
2501-
{ c2 with Labels = Dictionary.ofList [ for kvp in c2.Labels -> (kvp.Key, kvp.Value + n) ]
2497+
| I_seqpoint _ as i0 ->
2498+
let labels =
2499+
let dict = Dictionary.newWithSize c2.Labels.Count
2500+
for kvp in c2.Labels do dict.Add(kvp.Key, if kvp.Value = 0 then 0 else kvp.Value + n)
2501+
dict
2502+
{ c2 with Labels = labels
2503+
Instrs = Array.concat [| [|i0|] ; instrs ; c2.Instrs.[1..] |] }
2504+
| _ ->
2505+
let labels =
2506+
let dict = Dictionary.newWithSize c2.Labels.Count
2507+
for kvp in c2.Labels do dict.Add(kvp.Key, kvp.Value + n)
2508+
dict
2509+
{ c2 with Labels = labels
25022510
Instrs = Array.append instrs c2.Instrs }
25032511

25042512
let prependInstrsToMethod new_code md =
@@ -2706,7 +2714,7 @@ let mkILTypeDefForGlobalFunctions ilg (methods,fields) = mkILSimpleClass ilg (ty
27062714
let destTypeDefsWithGlobalFunctionsFirst ilg (tdefs: ILTypeDefs) =
27072715
let l = tdefs.AsList
27082716
let top,nontop = l |> List.partition (fun td -> td.Name = typeNameForGlobalFunctions)
2709-
let top2 = if top.Length = 0 then [ mkILTypeDefForGlobalFunctions ilg (emptyILMethods, emptyILFields) ] else top
2717+
let top2 = if isNil top then [ mkILTypeDefForGlobalFunctions ilg (emptyILMethods, emptyILFields) ] else top
27102718
top2@nontop
27112719

27122720
let mkILSimpleModule assname modname dll subsystemVersion useHighEntropyVA tdefs hashalg locale flags exportedTypes metadataVersion =

0 commit comments

Comments
 (0)