Skip to content

Commit c783b36

Browse files
authored
Merge pull request #9188 from dotnet/merges/master-to-release/dev16.7
Merge master to release/dev16.7
2 parents 6dd3750 + c904844 commit c783b36

9 files changed

Lines changed: 17 additions & 790 deletions

File tree

VisualFSharp.sln

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{
2222
EndProject
2323
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ItemTemplates", "ItemTemplates", "{F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}"
2424
EndProject
25-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utils", "Utils", "{D086C8C6-D00D-4C3B-9AB2-A4286C9F5922}"
26-
EndProject
2725
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FSharp.Compiler.Service.tests Support", "FSharp.Compiler.Service.tests Support", "{35636A82-401A-4C3A-B2AB-EB7DC5E9C268}"
2826
EndProject
2927
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Legacy", "Legacy", "{CCAB6E50-34C6-42AF-A6B0-567C29FCD91B}"
@@ -110,8 +108,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "HostedCompilerServer", "tes
110108
EndProject
111109
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ILComparer", "tests\fsharpqa\testenv\src\ILComparer\ILComparer.fsproj", "{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}"
112110
EndProject
113-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "LanguageServiceProfiling", "vsintegration\Utils\LanguageServiceProfiling\LanguageServiceProfiling.fsproj", "{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}"
114-
EndProject
115111
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.UIResources", "vsintegration\src\FSharp.UIResources\FSharp.UIResources.csproj", "{C4586A06-1402-48BC-8E35-A1B8642F895B}"
116112
EndProject
117113
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharp_Analysis", "tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
@@ -160,7 +156,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibraryProject", "vsintegra
160156
EndProject
161157
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TutorialProject", "vsintegration\ProjectTemplates\TutorialProject\TutorialProject.csproj", "{2937CBEC-262D-4C94-BE1D-291FAB72E3E8}"
162158
EndProject
163-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "DependencyManager", "src\fsharp\Microsoft.DotNet.DependencyManager\Microsoft.DotNet.DependencyManager.fsproj", "{C2F38485-5F87-4986-985B-55D7ED96D5CE}"
159+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.DotNet.DependencyManager", "src\fsharp\Microsoft.DotNet.DependencyManager\Microsoft.DotNet.DependencyManager.fsproj", "{C2F38485-5F87-4986-985B-55D7ED96D5CE}"
164160
EndProject
165161
Global
166162
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -664,18 +660,6 @@ Global
664660
{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|Any CPU.Build.0 = Release|Any CPU
665661
{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|x86.ActiveCfg = Release|Any CPU
666662
{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|x86.Build.0 = Release|Any CPU
667-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
668-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Debug|Any CPU.Build.0 = Debug|Any CPU
669-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Debug|x86.ActiveCfg = Debug|Any CPU
670-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Debug|x86.Build.0 = Debug|Any CPU
671-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|Any CPU.ActiveCfg = Release|Any CPU
672-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|Any CPU.Build.0 = Release|Any CPU
673-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|x86.ActiveCfg = Release|Any CPU
674-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|x86.Build.0 = Release|Any CPU
675-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Release|Any CPU.ActiveCfg = Release|Any CPU
676-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Release|Any CPU.Build.0 = Release|Any CPU
677-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Release|x86.ActiveCfg = Release|Any CPU
678-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Release|x86.Build.0 = Release|Any CPU
679663
{C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
680664
{C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|Any CPU.Build.0 = Debug|Any CPU
681665
{C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|x86.ActiveCfg = Debug|Any CPU
@@ -948,7 +932,6 @@ Global
948932
{3F044931-FB83-4433-B934-AE66AB27B278} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
949933
{F7876C9B-FB6A-4EFB-B058-D6967DB75FB2} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
950934
{F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
951-
{D086C8C6-D00D-4C3B-9AB2-A4286C9F5922} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
952935
{35636A82-401A-4C3A-B2AB-EB7DC5E9C268} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2}
953936
{CCAB6E50-34C6-42AF-A6B0-567C29FCD91B} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
954937
{991DCF75-C2EB-42B6-9A0D-AA1D2409D519} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
@@ -992,7 +975,6 @@ Global
992975
{1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}
993976
{4239EFEA-E746-446A-BF7A-51FCBAB13946} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
994977
{2E60864A-E3FF-4BCC-810F-DC7C34E6B236} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
995-
{E7FA3A71-51AF-4FCA-9C2F-7C853E515903} = {D086C8C6-D00D-4C3B-9AB2-A4286C9F5922}
996978
{C4586A06-1402-48BC-8E35-A1B8642F895B} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}
997979
{887630A3-4B1D-40EA-B8B3-2D842E9C40DB} = {35636A82-401A-4C3A-B2AB-EB7DC5E9C268}
998980
{FF76BD3C-5E0A-4752-B6C3-044F6E15719B} = {35636A82-401A-4C3A-B2AB-EB7DC5E9C268}

src/fsharp/fsi/fsi.fs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2922,15 +2922,19 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i
29222922
member __.TryFindBoundValue(name: string) =
29232923
fsiDynamicCompiler.TryFindBoundValue(fsiInteractionProcessor.CurrentState, name)
29242924

2925-
member __.AddBoundValue(name: string, reflectionValue: obj) =
2925+
member __.AddBoundValue(name: string, value: obj) =
2926+
match value with
2927+
| null -> nullArg "value"
2928+
| _ -> ()
2929+
29262930
// Explanation: When the user of the FsiInteractiveSession object calls this method, the
29272931
// code is parsed, checked and evaluated on the calling thread. This means EvalExpression
29282932
// is not safe to call concurrently.
29292933
let ctok = AssumeCompilationThreadWithoutEvidence()
29302934

29312935
let errorOptions = TcConfig.Create(tcConfigB, validate = false).errorSeverityOptions
29322936
let errorLogger = CompilationErrorLogger("AddBoundValue", errorOptions)
2933-
fsiInteractionProcessor.AddBoundValue(ctok, errorLogger, name, reflectionValue)
2937+
fsiInteractionProcessor.AddBoundValue(ctok, errorLogger, name, value)
29342938
let errs = errorLogger.GetErrors()
29352939
ErrorHelpers.CreateErrorInfos (errorOptions, true, "input.fsx", errs, true)
29362940

src/fsharp/fsi/fsi.fsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ type FsiEvaluationSession =
269269
/// Creates a root-level value with the given name and .NET object.
270270
/// If the .NET object contains types from assemblies that are not referenced in the interactive session, it will try to implicitly resolve them by default configuration.
271271
/// Name must be a valid identifier.
272-
member AddBoundValue : name: string * reflectionValue: obj -> FSharpErrorInfo[]
272+
member AddBoundValue : name: string * value: obj -> FSharpErrorInfo[]
273273

274274
/// Load the dummy interaction, load the initial files, and,
275275
/// if interacting, start the background thread to read the standard input.

tests/FSharp.Compiler.UnitTests/FsiTests.fs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
module FSharp.Compiler.UnitTests.FsiTests
1+
[<NUnit.Framework.SingleThreaded>]
2+
module FSharp.Compiler.UnitTests.FsiTests
23

4+
open System
35
open System.IO
46
open FSharp.Compiler.Interactive.Shell
57
open NUnit.Framework
@@ -404,6 +406,12 @@ let ``Creation of a bound value fails if the name contains dots`` () =
404406
Assert.AreEqual(FSharpErrorSeverity.Error, error.Severity)
405407
Assert.AreEqual("Identifier expected", error.Message)
406408

409+
[<Test>]
410+
let ``Creation of a bound value throws if the value passed is null`` () =
411+
use fsiSession = createFsiSession ()
412+
413+
Assert.Throws<ArgumentNullException>(fun () -> fsiSession.AddBoundValue("x", null) |> ignore) |> ignore
414+
407415
[<Test>]
408416
let ``Creation of a bound value succeeds if the value contains types from assemblies that are not referenced in the session, due to implicit resolution`` () =
409417
use fsiSession = createFsiSession ()

vsintegration/Utils/LanguageServiceProfiling/App.config

Lines changed: 0 additions & 6 deletions
This file was deleted.

vsintegration/Utils/LanguageServiceProfiling/AssemblyInfo.fs

Lines changed: 0 additions & 28 deletions
This file was deleted.

vsintegration/Utils/LanguageServiceProfiling/LanguageServiceProfiling.fsproj

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)