Skip to content

Commit

Permalink
Remove OPEN_BUILD build flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar Tawfik committed Jul 12, 2016
1 parent aab0002 commit 3b4119f
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 174 deletions.
1 change: 0 additions & 1 deletion src/FSharpSource.targets
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
</PropertyGroup>

<PropertyGroup>
<DefineConstants>$(DefineConstants);OPEN_BUILD</DefineConstants>
<!-- Disable uwa toolchain nuget package resolve logic. -->
<NuGetTargets Condition="'$(NuGetTargets)' == ''">false</NuGetTargets>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/CompileOps.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2252,7 +2252,7 @@ type TcConfigBuilder =
lcid = None
#endif
// See bug 6071 for product banner spec
productNameForBannerText = (FSComp.SR.buildProductName(FSharpEnvironment.DotNetBuildString))
productNameForBannerText = (FSComp.SR.buildProductName(FSharpEnvironment.FSharpBannerVersion))
showBanner = true
showTimes = false
showLoadedAssemblies = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,96 +584,4 @@ type AsyncModule() =
Assert.AreEqual(0, !okCount)
Assert.AreEqual(0, !errCount)
#endif
#endif

#if FSHARP_CORE_PORTABLE
// nothing
#else
#if FSHARP_CORE_2_0
// nothing
#else
#if FSHARP_CORE_NETCORE_PORTABLE || coreclr
//nothing
#else
// we are on the desktop
member this.RunExeAndExpectOutput(exeName, expected:string) =
let curDir = (new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase)).LocalPath |> System.IO.Path.GetDirectoryName
let psi = System.Diagnostics.ProcessStartInfo(exeName)
psi.WorkingDirectory <- curDir
psi.RedirectStandardOutput <- true
psi.UseShellExecute <- false
let p = System.Diagnostics.Process.Start(psi)
let out = p.StandardOutput.ReadToEnd()
p.WaitForExit()
let out = out.Replace("\r\n", "\n")
let expected = expected.Replace("\r\n", "\n")
Assert.AreEqual(expected, out)
#if OPEN_BUILD
#else
[<Test>]
member this.``ContinuationsThreadingDetails.AsyncWithSyncContext``() =
this.RunExeAndExpectOutput("AsyncWithSyncContext.exe", """
EmptyParallel [|("ok", true); ("caught:boom", true)|]
NonEmptyParallel [|("ok", true); ("form exception:boom", true)|]
ParallelSeqArgumentThrows [|("error", true)|]
Sleep1Return [|("ok", true); ("form exception:boom", true)|]
Sleep0Return [|("ok", true); ("form exception:boom", true)|]
Return [|("ok", true); ("caught:boom", true)|]
FromContinuationsSuccess [|("ok", true); ("caught:boom", true)|]
FromContinuationsError [|("error", true)|]
FromContinuationsCancel [|("cancel", true)|]
FromContinuationsThrows [|("error", true)|]
FromContinuationsSchedulesFutureSuccess [|("ok", false); ("unhandled", false)|]
FromContinuationsSchedulesFutureError [|("error", false)|]
FromContinuationsSchedulesFutureCancel [|("cancel", false)|]
FromContinuationsSchedulesFutureSuccessAndThrowsQuickly [|("error", true); ("unhandled", false)|]
FromContinuationsSchedulesFutureErrorAndThrowsQuickly [|("error", true); ("unhandled", false)|]
FromContinuationsSchedulesFutureCancelAndThrowsQuickly [|("error", true); ("unhandled", false)|]
FromContinuationsSchedulesFutureSuccessAndThrowsSlowly [|("ok", false); ("unhandled", false);
("caught:A continuation provided by Async.FromContinuations was invoked multiple times",
true)|]
FromContinuationsSchedulesFutureErrorAndThrowsSlowly [|("error", false);
("caught:A continuation provided by Async.FromContinuations was invoked multiple times",
true)|]
FromContinuationsSchedulesFutureCancelAndThrowsSlowly [|("cancel", false);
("caught:A continuation provided by Async.FromContinuations was invoked multiple times",
true)|]
AwaitWaitHandleAlreadySignaled0 [|("ok", true); ("caught:boom", true)|]
AwaitWaitHandleAlreadySignaled1 [|("ok", true); ("form exception:boom", true)|]
""" )
[<Test>]
member this.``ContinuationsThreadingDetails.AsyncSansSyncContext``() =
this.RunExeAndExpectOutput("AsyncSansSyncContext.exe", """
EmptyParallel [|("ok", true); ("caught:boom", true)|]
NonEmptyParallel [|("ok", false); ("unhandled", false)|]
ParallelSeqArgumentThrows [|("error", true)|]
Sleep1Return [|("ok", false); ("unhandled", false)|]
Sleep0Return [|("ok", false); ("unhandled", false)|]
Return [|("ok", true); ("caught:boom", true)|]
FromContinuationsSuccess [|("ok", true); ("caught:boom", true)|]
FromContinuationsError [|("error", true)|]
FromContinuationsCancel [|("cancel", true)|]
FromContinuationsThrows [|("error", true)|]
FromContinuationsSchedulesFutureSuccess [|("ok", false); ("unhandled", false)|]
FromContinuationsSchedulesFutureError [|("error", false)|]
FromContinuationsSchedulesFutureCancel [|("cancel", false)|]
FromContinuationsSchedulesFutureSuccessAndThrowsQuickly [|("error", true); ("unhandled", false)|]
FromContinuationsSchedulesFutureErrorAndThrowsQuickly [|("error", true); ("unhandled", false)|]
FromContinuationsSchedulesFutureCancelAndThrowsQuickly [|("error", true); ("unhandled", false)|]
FromContinuationsSchedulesFutureSuccessAndThrowsSlowly [|("ok", false); ("unhandled", false);
("caught:A continuation provided by Async.FromContinuations was invoked multiple times",
true)|]
FromContinuationsSchedulesFutureErrorAndThrowsSlowly [|("error", false);
("caught:A continuation provided by Async.FromContinuations was invoked multiple times",
true)|]
FromContinuationsSchedulesFutureCancelAndThrowsSlowly [|("cancel", false);
("caught:A continuation provided by Async.FromContinuations was invoked multiple times",
true)|]
AwaitWaitHandleAlreadySignaled0 [|("ok", true); ("caught:boom", true)|]
AwaitWaitHandleAlreadySignaled1 [|("ok", false); ("unhandled", false)|]
""" )
#endif

#endif
#endif
#endif
7 changes: 1 addition & 6 deletions src/fsharp/FSharp.Core.Unittests/LibraryTestFx.fs
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,7 @@ module SurfaceArea =

// verify public surface area matches expected
let verify expected platform fileName =
let workDir =
#if OPEN_BUILD
TestContext.CurrentContext.WorkDirectory
#else
""
#endif
let workDir = TestContext.CurrentContext.WorkDirectory
let logFile = sprintf "%s\\CoreUnit_%s_Xml.xml" workDir platform
let normalize (s:string) =
Regex.Replace(s, "(\\r\\n|\\n)+", "\r\n").Trim([|'\r';'\n'|])
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/fsi/fsi.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,7 @@ type internal FsiEvaluationSession (argv:string[], inReader:TextReader, outWrite
do InstallErrorLoggingOnThisThread errorLogger // FSI error logging on main thread.

let updateBannerText() =
tcConfigB.productNameForBannerText <- FSIstrings.SR.fsiProductName(FSharpEnvironment.DotNetBuildString)
tcConfigB.productNameForBannerText <- FSIstrings.SR.fsiProductName(FSharpEnvironment.FSharpBannerVersion)

do updateBannerText() // setting the correct banner so that 'fsi -?' display the right thing

Expand Down
10 changes: 1 addition & 9 deletions src/utils/CompilerLocationUtils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ open System.Runtime.InteropServices
module internal FSharpEnvironment =

/// The F# version reported in the banner
#if OPEN_BUILD
let DotNetBuildString = "(private)"
#else
/// The .NET runtime version that F# was built against (e.g. "v4.0.21104")
let DotNetRuntime = sprintf "v%s.%s.%s" Microsoft.BuildSettings.Version.Major Microsoft.BuildSettings.Version.Minor Microsoft.BuildSettings.Version.ProductBuild

/// The .NET build string that F# was built against (e.g. "4.0.21104.0")
let DotNetBuildString = Microsoft.BuildSettings.Version.OfFile
#endif
let FSharpBannerVersion = "4.1"

let versionOf<'t> =
#if FX_RESHAPED_REFLECTION
Expand Down
2 changes: 0 additions & 2 deletions vsintegration/src/FSharp.ProjectSystem.FSharp/Project.fs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem

open EnvDTE

open Internal.Utilities.Debug

module internal VSHiveUtilities =
/// For a given sub-hive, check to see if a 3rd party has specified any
/// custom/extended property pages.
Expand Down
57 changes: 0 additions & 57 deletions vsintegration/tests/unittests/Tests.BaseLine.fs

This file was deleted.

6 changes: 2 additions & 4 deletions vsintegration/tests/unittests/Tests.LanguageService.Script.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1237,16 +1237,14 @@ type UsingMSBuild() as this =
Assert.AreEqual(Path.Combine(projectFolder,"File1.fsx"), fas.ProjectFileNames.[0])
Assert.AreEqual(1, fas.ProjectFileNames.Length)

#if OPEN_BUILD
#else

/// FEATURE: #reference against a strong name should work.
[<Test>]
member public this.``Fsx.HashReferenceAgainstStrongName``() =
let code =
["#light"
#if FX_ATLEAST_40
sprintf "#reference \"System.Core, Version=%s, Culture=neutral, PublicKeyToken=b77a5c561934e089\"" Microsoft.BuildSettings.Version.OfAssembly
sprintf "#reference \"System.Core, Version=%s, Culture=neutral, PublicKeyToken=b77a5c561934e089\"" (System.Environment.Version.ToString())
#else
"#reference \"System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\""
#endif
Expand All @@ -1255,7 +1253,7 @@ type UsingMSBuild() as this =
MoveCursorToEndOfMarker(file,"open System.")
let completions = AutoCompleteAtCursor file
AssertCompListContains(completions,"Linq")
#endif


/// Try out some bogus file names in #r, #I and #load.
[<Test>]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
<Compile Include="TestLib.ProjectSystem.fs" />
<Compile Include="Tests.InternalCollections.fs" />
<Compile Include="Tests.Build.fs" />
<Compile Include="Tests.BaseLine.fs" />
<Compile Include="Tests.TaskReporter.fs" />
<Compile Include="Tests.Watson.fs" />
<Compile Include="Tests.XmlDocComments.fs" />
Expand Down

0 comments on commit 3b4119f

Please sign in to comment.