Skip to content

Commit

Permalink
Merge pull request #6457 from Microsoft/merges/master-to-fsharp5
Browse files Browse the repository at this point in the history
Merge master to fsharp5
  • Loading branch information
dotnet-automerge-bot authored Apr 8, 2019
2 parents e8d1c41 + 45e9d7b commit 94fd1f2
Show file tree
Hide file tree
Showing 18 changed files with 103 additions and 64 deletions.
27 changes: 14 additions & 13 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,29 @@
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
<FSCoreMajorVersion>4.6</FSCoreMajorVersion>
<FSCorePackageVersion>$(FSCoreMajorVersion).2</FSCorePackageVersion>
<FSCoreVersion>$(FSCoreMajorVersion).0</FSCoreVersion>
<FSCoreVersion Condition="'$(OfficialBuildId)' == ''">$(FSCoreVersion).0</FSCoreVersion>
<!-- PR builds should specify a 4-part version number -->
<FSCoreVersionPrefix>$(FSCoreMajorVersion).0</FSCoreVersionPrefix>
<FSCoreVersion>$(FSCoreVersionPrefix).0</FSCoreVersion>
</PropertyGroup>
<PropertyGroup>
<FSPackageMajorVersion>10.4</FSPackageMajorVersion>
<FSPackageVersion>$(FSPackageMajorVersion).2</FSPackageVersion>
<FSProductVersion>$(FSPackageVersion)</FSProductVersion>
<FSProductVersion Condition="'$(OfficialBuildId)' == ''">$(FSProductVersion).0</FSProductVersion>
<!-- PR builds should specify a 4-part version number -->
<FSProductVersionPrefix>$(FSPackageVersion)</FSProductVersionPrefix>
<FSProductVersion>$(FSPackageVersion).0</FSProductVersion>
</PropertyGroup>
<PropertyGroup>
<VSMajorVersion>16</VSMajorVersion>
<VSMinorVersion>1</VSMinorVersion>
<VSGeneralVersion>$(VSMajorVersion).0</VSGeneralVersion>
<VSAssemblyVersion>$(VSMajorVersion).$(VSMinorVersion).0</VSAssemblyVersion>
<VSAssemblyVersion Condition="'$(OfficialBuildId)' == ''">$(VSAssemblyVersion).0</VSAssemblyVersion>
<!-- PR builds should specify a 4-part version number -->
<VSAssemblyVersionPrefix>$(VSMajorVersion).$(VSMinorVersion).0</VSAssemblyVersionPrefix>
<VSAssemblyVersion>$(VSAssemblyVersionPrefix).0</VSAssemblyVersion>
</PropertyGroup>
<!-- version number assignment -->
<PropertyGroup>
<VersionPrefix>$(FSCoreVersion)</VersionPrefix>
<VersionPrefix>$(FSCoreVersionPrefix)</VersionPrefix>
<VersionPrefix Condition="'$(UseFSharpPackageVersion)' == 'true'">$(FSCorePackageVersion)</VersionPrefix>
<VersionPrefix Condition="'$(UseFSharpProductVersion)' == 'true'">$(FSProductVersion)</VersionPrefix>
<VersionPrefix Condition="'$(UseVsMicroBuildAssemblyVersion)' == 'true'">$(VSAssemblyVersion)</VersionPrefix>
<AssemblyVersion Condition="'$(OfficialBuildId)' == ''">$(VersionPrefix)</AssemblyVersion>
<VersionPrefix Condition="'$(UseFSharpProductVersion)' == 'true'">$(FSProductVersionPrefix)</VersionPrefix>
<VersionPrefix Condition="'$(UseVsMicroBuildAssemblyVersion)' == 'true'">$(VSAssemblyVersionPrefix)</VersionPrefix>
<AssemblyVersion Condition="'$(OfficialBuildId)' == ''">$(VersionPrefix).0</AssemblyVersion>
<!-- PR builds should explicitly specify a version number -->
</PropertyGroup>
<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions fcs/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<RestoreSources>
$(RestoreSources);
https://api.nuget.org/v3/index.json;
https://dotnet.myget.org/F/fsharp/api/v3/index.json;
</RestoreSources>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,8 @@
<PackageReference Include="FSharp.Core" Version="4.5.2" />
<PackageReference Include="FSharp.Core" Version="4.1.19" />
<PackageReference Include="FSharp.Core" Version="4.1.18" />
<PackageReference Include="FSharp.Compiler.Service.MSBuild.v12.0" Version="1.0.0" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.Build.Engine, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Engine.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.Build.Utilities.v12.0">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Utilities.v12.0.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.Build.Tasks.v12.0">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Tasks.v12.0.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,6 @@
<Reference Include="System.Runtime" />
<Reference Include="System.IO" />
<PackageReference Include="FSharp.Core" Version="4.6.2" />
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.Build.Engine, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Engine.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.Build.Utilities.v12.0">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Utilities.v12.0.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.Build.Tasks.v12.0">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Tasks.v12.0.dll</HintPath>
<Private>false</Private>
</Reference>
<PackageReference Include="FSharp.Compiler.Service.MSBuild.v12.0" Version="1.0.0" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions fcs/dependencies/MSBuild.v12.0/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.dll
10 changes: 10 additions & 0 deletions fcs/dependencies/MSBuild.v12.0/MSBuild.v12.0.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">

<PropertyGroup>
<TargetFramework>net45</TargetFramework>
<NuspecFile>MSBuild.v12.0.nuspec</NuspecFile>
</PropertyGroup>

<Target Name="Build" />

</Project>
20 changes: 20 additions & 0 deletions fcs/dependencies/MSBuild.v12.0/MSBuild.v12.0.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>FSharp.Compiler.Service.MSBuild.v12.0</id>
<version>1.0</version>
<authors>Microsoft and F# Software Foundation</authors>
<description>MSBuild.v12.0 dependencies for fcs.</description>
<dependencies>
<group targetFramework="net45">
</group>
</dependencies>
</metadata>
<files>
<file src="Microsoft.Build.dll" target="lib\net45" />
<file src="Microsoft.Build.Engine.dll" target="lib\net45" />
<file src="Microsoft.Build.Framework.dll" target="lib\net45" />
<file src="Microsoft.Build.Tasks.v12.0.dll" target="lib\net45" />
<file src="Microsoft.Build.Utilities.v12.0.dll" target="lib\net45" />
</files>
</package>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed fcs/dependencies/MSBuild.v12.0/Microsoft.Build.dll
Binary file not shown.
9 changes: 9 additions & 0 deletions fcs/dependencies/MSBuild.v12.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MSBuild.12.0 dependencies have been converted to a NuGet package.

To create an updated version of the package:

1. Copy the appropriate `Microsoft.Build.*.dll` files to this directory.
2. Update the `<version>` element of `MSBuild.v12.0.nuspec`.
3. Run `msbuild MSBuild.v12.0.csproj /t:Pack`
4. Upload `<repo-root>\artifacts\bin\fcs\FSharp.Compiler.Service.MSBuild.v12.0.*.nupkg` to the MyGet feed at
`https://dotnet.myget.org/F/fsharp/api/v3/index.json`
21 changes: 20 additions & 1 deletion src/fsharp/CompileOps.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4154,7 +4154,26 @@ type TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAssemblyResolu
// Add the invalidation signal handlers to each provider
for provider in providers do
provider.PUntaint((fun tp ->
let handler = tp.Invalidate.Subscribe(fun _ -> invalidateCcu.Trigger ("The provider '" + fileNameOfRuntimeAssembly + "' reported a change"))

// Register the type provider invalidation handler.
//
// We are explicit about what the handler closure captures to help reason about the
// lifetime of captured objects, especially in case the type provider instance gets leaked
// or keeps itself alive mistakenly, e.g. via some global state in the type provider instance.
//
// The closure captures
// 1. an Event value, ultimately this is made available in all CCus as ccu.InvalidateEvent
// 2. any handlers registered to ccu.InvalidateEvent
// 3. a message string
//
// Note that the invalidation handler does not explicitly capture the TcImports.
// The only place where handlers are registered is to ccu.InvalidateEvent is in IncrementalBuilder.fs.

let capturedInvalidateCcu = invalidateCcu
let capturedMessage = "The provider '" + fileNameOfRuntimeAssembly + "' reported a change"
let handler = tp.Invalidate.Subscribe(fun _ -> capturedInvalidateCcu.Trigger (capturedMessage))

// When the TcImports is disposed we detach the invalidation callback
tcImports.AttachDisposeAction(fun () -> try handler.Dispose() with _ -> ())), m)

match providers with
Expand Down
18 changes: 17 additions & 1 deletion src/fsharp/service/IncrementalBuild.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,23 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput
tcImports.GetCcusExcludingBase() |> Seq.iter (fun ccu ->
// When a CCU reports an invalidation, merge them together and just report a
// general "imports invalidated". This triggers a rebuild.
ccu.Deref.InvalidateEvent.Add(fun msg -> importsInvalidated.Trigger msg))
//
// We are explicit about what the handler closure captures to help reason about the
// lifetime of captured objects, especially in case the type provider instance gets leaked
// or keeps itself alive mistakenly, e.g. via some global state in the type provider instance.
//
// The handler only captures
// 1. a weak reference to the importsInvalidated event.
//
// The IncrementalBuilder holds the strong reference the importsInvalidated event.
//
// In the invalidation handler we use a weak reference to allow the IncrementalBuilder to
// be collected if, for some reason, a TP instance is not disposed or not GC'd.
let capturedImportsInvalidated = WeakReference<_>(importsInvalidated)
ccu.Deref.InvalidateEvent.Add(fun msg ->
match capturedImportsInvalidated.TryGetTarget() with
| true, tg -> tg.Trigger msg
| _ -> ()))
#endif


Expand Down
12 changes: 6 additions & 6 deletions vsintegration/Vsix/RegisterFsharpPackage.pkgdef
Original file line number Diff line number Diff line change
Expand Up @@ -62,42 +62,42 @@
[$RootKey$\CLSID\{e1194663-db3c-49eb-8b45-276fcdc440ea}]
"InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL"
"Class"="Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpBuildPropertyPage"
"Assembly"="FSharp.ProjectSystem.FSharp, Version=15.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"Assembly"="FSharp.ProjectSystem.FSharp, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ThreadingModel"="Both"
@="Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpBuildPropertyPage"

[$RootKey$\CLSID\{6d2d9b56-2691-4624-a1bf-d07a14594748}]
"InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL"
"Class"="Microsoft.VisualStudio.Editors.PropertyPages.FSharpApplicationPropPageComClass"
"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ThreadingModel"="Both"
@="Microsoft.VisualStudio.Editors.PropertyPages.FSharpApplicationPropPageComClass"

[$RootKey$\CLSID\{dd84aa8f-71bb-462a-8ef8-c9992cb325b7}]
"InprocServer32"="$System$mscoree.dll"
"Class"="Microsoft.VisualStudio.Editors.PropertyPages.FSharpBuildEventsPropPageComClass"
"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ThreadingModel"="Both"
@="Microsoft.VisualStudio.Editors.PropertyPages.FSharpBuildEventsPropPageComClass"

[$RootKey$\CLSID\{fac0a17e-2e70-4211-916a-0d34fb708bff}]
"InprocServer32"="$System$mscoree.dll"
"Class"="Microsoft.VisualStudio.Editors.PropertyPages.FSharpBuildPropPageComClass"
"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ThreadingModel"="Both"
@="Microsoft.VisualStudio.Editors.PropertyPages.FSharpBuildPropPageComClass"

[$RootKey$\CLSID\{9cfbeb2a-6824-43e2-bd3b-b112febc3772}]
"InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL"
"Class"="Microsoft.VisualStudio.Editors.PropertyPages.FSharpDebugPropPageComClass"
"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ThreadingModel"="Both"
@="Microsoft.VisualStudio.Editors.PropertyPages.FSharpDebugPropPageComClass"

[$RootKey$\CLSID\{df16b1a2-0e91-4499-ae60-c7144e614bf1}]
"InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL"
"Class"="Microsoft.VisualStudio.Editors.PropertyPages.FSharpReferencePathsPropPageComClass"
"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ThreadingModel"="Both"
@="Microsoft.VisualStudio.Editors.PropertyPages.FSharpReferencePathsPropPageComClass"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@
</AssemblyAttribute>
<AssemblyAttribute Include="Microsoft.VisualStudio.Shell.ProvideCodeBaseAttribute">
<AssemblyName>FSharp.Compiler.Private</AssemblyName>
<Version>$(FSProductVersion)$(_BuildNumberSuffix)</Version>
<Version>$(FSProductVersion)</Version>
<CodeBase>$PackageFolder$\FSharp.Compiler.Private.dll</CodeBase>
</AssemblyAttribute>
<AssemblyAttribute Include="Microsoft.VisualStudio.Shell.ProvideCodeBaseAttribute">
<AssemblyName>FSharp.Compiler.Server.Shared</AssemblyName>
<Version>$(FSProductVersion)</Version>
<CodeBase>$PackageFolder$\FSharp.Compiler.Server.Shared.dll</CodeBase>
<Version>$(FSProductVersion)$(_BuildNumberSuffix)</Version>
</AssemblyAttribute>
<AssemblyAttribute Include="Microsoft.VisualStudio.Shell.ProvideCodeBaseAttribute">
<AssemblyName>FSharp.UIResources</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

<ItemGroup>
<AssemblyAttribute Include="Microsoft.VisualStudio.Shell.ProvideCodeBaseAttribute">
<AssemblyName>FSharp.VS.FSI.Base</AssemblyName>
<AssemblyName>FSharp.VS.FSI</AssemblyName>
<Version>$(VSAssemblyVersion)</Version>
<CodeBase>$PackageFolder$\FSharp.VS.FSI.dll</CodeBase>
</AssemblyAttribute>
Expand Down

0 comments on commit 94fd1f2

Please sign in to comment.