diff --git a/.vsts-pr.yaml b/.vsts-pr.yaml index 44c277a3943..c9f88e2296c 100644 --- a/.vsts-pr.yaml +++ b/.vsts-pr.yaml @@ -4,12 +4,11 @@ jobs: vmImage: ubuntu-16.04 timeoutInMinutes: 90 strategy: - maxParallel: 2 + maxParallel: 3 matrix: dotnet_sdk: _command: make _args: Configuration=release - # disabled until it can be properly fixed release_fcs: _command: ./fcs/build.sh _args: Build @@ -23,6 +22,29 @@ jobs: continueOnError: true condition: failed() +- job: MacOS + pool: + vmImage: macOS-10.13 + timeoutInMinutes: 90 + strategy: + maxParallel: 3 + matrix: + dotnet_sdk: + _command: make + _args: Configuration=release + release_fcs: + _command: ./fcs/build.sh + _args: Build + steps: + - script: $(_command) $(_args) + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults' + ArtifactName: 'MacOS $(_command) $(_args)' + publishLocation: Container + continueOnError: true + condition: failed() + - job: Windows pool: vmImage: vs2017-win2016 diff --git a/FSharpBuild.Directory.Build.props b/FSharpBuild.Directory.Build.props index 9f2e7a2388a..48bf2f5b77d 100644 --- a/FSharpBuild.Directory.Build.props +++ b/FSharpBuild.Directory.Build.props @@ -44,9 +44,19 @@ + /usr + /Library/Frameworks/Mono.framework/Versions/Current + $(MonoRoot)/lib/mono true - /usr/lib/mono/4.5-api - /usr/lib/mono/4.6-api + $(MonoLibFolder)/4.5-api + $(MonoLibFolder)/4.5.1-api + $(MonoLibFolder)/4.5.2-api + $(MonoLibFolder)/4.6-api + $(MonoLibFolder)/4.6.1-api + $(MonoLibFolder)/4.6.2-api + $(MonoLibFolder)/4.7-api + $(MonoLibFolder)/4.7.1-api + $(MonoLibFolder)/4.7.2-api diff --git a/build/config/AssemblySignToolData.json b/build/config/AssemblySignToolData.json index 55d61478581..79eaf9f3355 100644 --- a/build/config/AssemblySignToolData.json +++ b/build/config/AssemblySignToolData.json @@ -39,7 +39,7 @@ "certificate": "VsixSHA2", "strongName": null, "values": [ - "bin\\VisualFSharpFull\\*\\*VisualFSharpFull.vsix", + "bin\\VisualFSharpFull\\*\\*\\VisualFSharpFull.vsix", "bin\\VisualFSharpTemplates\\*\\*\\VisualFSharpTemplate.vsix", "VSSetup\\*\\Insertion\\Microsoft.FSharp.Dependencies.vsix", "VSSetup\\*\\Insertion\\Microsoft.FSharp.VSIX.Full.Resources.*.vsix" @@ -49,8 +49,7 @@ "certificate": "NuGet", "strongName": null, "values": [ - "artifacts\\*.nupkg", - "artifacts\\*\\*.nupkg" + "packages\\*\\*.nupkg" ] } ], diff --git a/fsharp.proj b/fsharp.proj index 13925ad0792..86001c3568e 100644 --- a/fsharp.proj +++ b/fsharp.proj @@ -28,7 +28,6 @@ true true true - true true true @@ -91,10 +90,11 @@ - + + - + @@ -111,7 +111,7 @@ - + @@ -155,21 +155,25 @@ - + - + + - + + + + - + - + diff --git a/setup/Swix/Microsoft.FSharp.vsmanproj b/setup/Swix/Microsoft.FSharp.vsmanproj index 6e6f7d4e7e9..8780e94b2b5 100644 --- a/setup/Swix/Microsoft.FSharp.vsmanproj +++ b/setup/Swix/Microsoft.FSharp.vsmanproj @@ -12,10 +12,10 @@ - - - - + + + + diff --git a/setup/fsharp-setup-build.csproj b/setup/fsharp-setup-build.csproj index 7968f56c51b..074879dc20e 100644 --- a/setup/fsharp-setup-build.csproj +++ b/setup/fsharp-setup-build.csproj @@ -20,15 +20,6 @@ - - - ..\vsintegration\Vsix\VisualFSharpFull\VisualFSharpFull.csproj - - - ..\vsintegration\Vsix\VisualFSharpTemplates\VisualFSharpTemplates.csproj - - - @@ -59,9 +50,6 @@ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} - diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index 03aed23f5d3..c86ffc57035 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -2793,22 +2793,26 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = error(Error(FSComp.SR.buildExplicitCoreLibRequiresNoFramework("--noframework"), rangeStartup)) let ilGlobals = mkILGlobals ILScopeRef.Local + + // clrRoot: the location of the primary assembly (mscorlib.dll or netstandard.dll or System.Runtime.dll) + // + // targetFrameworkVersionValue: Normally just HighestInstalledNetFrameworkVersion() + // + // Note, when mscorlib.dll has been given explicitly the actual value of + // targetFrameworkVersion shouldn't matter since resolution has already happened. + // In those cases where it does matter (e.g. --noframework is not being used or we are processing further + // resolutions for a script) then it is correct to just use HighestInstalledNetFrameworkVersion(). let clrRootValue, targetFrameworkVersionValue = match primaryAssemblyExplicitFilenameOpt with - | Some(primaryAssemblyFilename) -> + | Some primaryAssemblyFilename -> let filename = ComputeMakePathAbsolute data.implicitIncludeDir primaryAssemblyFilename try - use ilReader = OpenILBinary(filename, data.reduceMemoryUsage, ilGlobals, None, data.shadowCopyReferences, data.tryGetMetadataSnapshot) - let ilModule = ilReader.ILModuleDef - match ilModule.ManifestOfAssembly.Version with - | Some(v1, v2, _, _) -> - let clrRoot = Some(Path.GetDirectoryName(FileSystem.GetFullPathShim(filename))) - clrRoot, (sprintf "v%d.%d" v1 v2) - | _ -> - failwith (FSComp.SR.buildCouldNotReadVersionInfoFromMscorlib()) + let clrRoot = Some(Path.GetDirectoryName(FileSystem.GetFullPathShim(filename))) + clrRoot, data.legacyReferenceResolver.HighestInstalledNetFrameworkVersion() with e -> + // We no longer expect the above to fail but leaving this just in case error(Error(FSComp.SR.buildErrorOpeningBinaryFile(filename, e.Message), rangeStartup)) - | _ -> + | None -> #if !ENABLE_MONO_SUPPORT // TODO: we have to get msbuild out of this if data.useSimpleResolution then @@ -2824,6 +2828,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = let fsharpBinariesDirValue = // NOTE: It's not clear why this behaviour has been changed for the NETSTANDARD compilations of the F# compiler #if NETSTANDARD1_6 || NETSTANDARD2_0 + ignore ilGlobals data.defaultFSharpBinariesDir #else match fslibExplicitFilenameOpt with diff --git a/src/fsharp/FSComp.txt b/src/fsharp/FSComp.txt index cb5747f3c5d..1e36681680f 100644 --- a/src/fsharp/FSComp.txt +++ b/src/fsharp/FSComp.txt @@ -44,7 +44,6 @@ buildProductNameCommunity,"F# Compiler for F# %s" 213,buildInvalidAssemblyName,"'%s' is not a valid assembly name" 214,buildInvalidPrivacy,"Unrecognized privacy setting '%s' for managed resource, valid options are 'public' and 'private'" 215,buildMultipleReferencesNotAllowed,"Multiple references to '%s.dll' are not permitted" -buildCouldNotReadVersionInfoFromMscorlib,"Could not read version from mscorlib.dll" 218,buildCannotReadAssembly,"Unable to read assembly '%s'" 220,buildAssemblyResolutionFailed,"Assembly resolution failure at or near this location" 221,buildImplicitModuleIsNotLegalIdentifier,"The declarations in this file will be placed in an implicit module '%s' based on the file name '%s'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file." diff --git a/src/fsharp/SimulatedMSBuildReferenceResolver.fs b/src/fsharp/SimulatedMSBuildReferenceResolver.fs index 6fd5fc53120..fd6acf30bbb 100644 --- a/src/fsharp/SimulatedMSBuildReferenceResolver.fs +++ b/src/fsharp/SimulatedMSBuildReferenceResolver.fs @@ -147,13 +147,14 @@ let internal SimulatedMSBuildResolver = match n.Version, n.GetPublicKeyToken() with | null, _ | _,null -> let options = - [ for gacdir in Directory.EnumerateDirectories(gac) do - let assdir = Path.Combine(gacdir,n.Name) - if Directory.Exists(assdir) then - for tdir in Directory.EnumerateDirectories(assdir) do - let trialPath = Path.Combine(tdir,qual) - if FileSystem.SafeExists(trialPath) then - yield trialPath ] + [ if Directory.Exists(gac) then + for gacdir in Directory.EnumerateDirectories(gac) do + let assemblyDir = Path.Combine(gacdir,n.Name) + if Directory.Exists(assemblyDir) then + for tdir in Directory.EnumerateDirectories(assemblyDir) do + let trialPath = Path.Combine(tdir,qual) + if FileSystem.SafeExists(trialPath) then + yield trialPath ] //printfn "sorting GAC paths: %A" options options |> List.sort // puts latest version last @@ -161,21 +162,22 @@ let internal SimulatedMSBuildResolver = |> function None -> () | Some p -> success p | v,tok -> - for gacdir in Directory.EnumerateDirectories(gac) do - //printfn "searching GAC directory: %s" gacdir - let assdir = Path.Combine(gacdir,n.Name) - if Directory.Exists(assdir) then - //printfn "searching GAC directory: %s" assdir - - let tokText = String.concat "" [| for b in tok -> sprintf "%02x" b |] - let verdir = Path.Combine(assdir,"v4.0_"+v.ToString()+"__"+tokText) - //printfn "searching GAC directory: %s" verdir - - if Directory.Exists(verdir) then - let trialPath = Path.Combine(verdir,qual) - //printfn "searching GAC: %s" trialPath - if FileSystem.SafeExists(trialPath) then - success trialPath + if Directory.Exists(gac) then + for gacdir in Directory.EnumerateDirectories(gac) do + //printfn "searching GAC directory: %s" gacdir + let assemblyDir = Path.Combine(gacdir,n.Name) + if Directory.Exists(assemblyDir) then + //printfn "searching GAC directory: %s" assemblyDir + + let tokText = String.concat "" [| for b in tok -> sprintf "%02x" b |] + let verdir = Path.Combine(assemblyDir,"v4.0_"+v.ToString()+"__"+tokText) + //printfn "searching GAC directory: %s" verdir + + if Directory.Exists(verdir) then + let trialPath = Path.Combine(verdir,qual) + //printfn "searching GAC: %s" trialPath + if FileSystem.SafeExists(trialPath) then + success trialPath with e -> logWarningOrError false "SR001" (e.ToString()) #endif diff --git a/src/fsharp/service/IncrementalBuild.fs b/src/fsharp/service/IncrementalBuild.fs index 8ece41fb6e9..48ca7074a19 100755 --- a/src/fsharp/service/IncrementalBuild.fs +++ b/src/fsharp/service/IncrementalBuild.fs @@ -1534,12 +1534,7 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput let stampedFileNamesNode = Vector.Stamp "SourceFileTimeStamps" StampFileNameTask fileNamesNode let stampedReferencedAssembliesNode = Vector.Stamp "StampReferencedAssembly" StampReferencedAssemblyTask referencedAssembliesNode let initialTcAccNode = Vector.Demultiplex "CombineImportedAssemblies" CombineImportedAssembliesTask stampedReferencedAssembliesNode -#if FCS_RETAIN_BACKGROUND_PARSE_RESULTS - let parseTreesNode = Vector.Map "ParseTrees" ParseTask stampedFileNamesNode - let tcStatesNode = Vector.ScanLeft "TypeCheckingStates" TypeCheckTask initialTcAccNode stampedFileNamesNode -#else let tcStatesNode = Vector.ScanLeft "TypeCheckingStates" (fun ctok tcAcc n -> TypeCheckTask ctok tcAcc (ParseTask ctok n)) initialTcAccNode stampedFileNamesNode -#endif let finalizedTypeCheckNode = Vector.Demultiplex "FinalizeTypeCheck" FinalizeTypeCheckTask tcStatesNode // Outputs @@ -1547,9 +1542,6 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput do buildDescription.DeclareVectorOutput stampedFileNamesNode do buildDescription.DeclareVectorOutput stampedReferencedAssembliesNode -#if FCS_RETAIN_BACKGROUND_PARSE_RESULTS - do buildDescription.DeclareVectorOutput parseTreesNode -#endif do buildDescription.DeclareVectorOutput tcStatesNode do buildDescription.DeclareScalarOutput initialTcAccNode do buildDescription.DeclareScalarOutput finalizedTypeCheckNode @@ -1712,15 +1704,6 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput member builder.GetParseResultsForFile (ctok: CompilationThreadToken, filename) = cancellable { let slotOfFile = builder.GetSlotOfFileName filename -#if FCS_RETAIN_BACKGROUND_PARSE_RESULTS - match GetVectorResultBySlot(parseTreesNode, slotOfFile, partialBuild) with - | Some (results, _) -> return results - | None -> - let! build = IncrementalBuild.EvalUpTo ctok SavePartialBuild (parseTreesNode, slotOfFile) partialBuild - match GetVectorResultBySlot(parseTreesNode, slotOfFile, build) with - | Some (results, _) -> return results - | None -> return! failwith "Build was not evaluated, expected the results to be ready after 'Eval' (GetParseResultsForFile)." -#else let! results = cancellable { match GetVectorResultBySlot(stampedFileNamesNode, slotOfFile, partialBuild) with @@ -1734,7 +1717,6 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput } // re-parse on demand instead of retaining return ParseTask ctok results -#endif } member __.SourceFiles = sourceFiles |> List.map (fun (_, f, _) -> f) diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf index ed192b1e097..3f1bc05e4f3 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -217,11 +217,6 @@ Víc odkazů na knihovnu {0}.dll se nepovoluje. - - Could not read version from mscorlib.dll - Nedala se přečíst verze souboru mscorlib.dll. - - Unable to read assembly '{0}' Sestavení {0} se nedá přečíst. diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf index 167c9864417..0f863391fb8 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -217,11 +217,6 @@ Mehrere Verweise auf "{0}.dll" sind nicht zulässig - - Could not read version from mscorlib.dll - Version konnte nicht aus "mscorlib.dll" gelesen werden. - - Unable to read assembly '{0}' Assembly "{0}" kann nicht gelesen werden. diff --git a/src/fsharp/xlf/FSComp.txt.en.xlf b/src/fsharp/xlf/FSComp.txt.en.xlf index 9af1fa19c42..8b1c95f11a9 100644 --- a/src/fsharp/xlf/FSComp.txt.en.xlf +++ b/src/fsharp/xlf/FSComp.txt.en.xlf @@ -217,11 +217,6 @@ Multiple references to '{0}.dll' are not permitted - - Could not read version from mscorlib.dll - Could not read version from mscorlib.dll - - Unable to read assembly '{0}' Unable to read assembly '{0}' diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf index f8b086b2e32..500baef4abb 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -217,11 +217,6 @@ No se permiten varias referencias a '{0}.dll'. - - Could not read version from mscorlib.dll - No se pudo leer la versión de mscorlib.dll. - - Unable to read assembly '{0}' No se puede leer el ensamblado '{0}'. diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf index 50b2101bf75..892e35c0936 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -217,11 +217,6 @@ Les références multiples à '{0}.dll' ne sont pas autorisées - - Could not read version from mscorlib.dll - Impossible de lire la version à partir de mscorlib.dll - - Unable to read assembly '{0}' Impossible de lire l'assembly '{0}' diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf index d7429465a6e..e76c351a481 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -217,11 +217,6 @@ Non sono consentiti più riferimenti a '{0}.dll' - - Could not read version from mscorlib.dll - Non è stato possibile leggere la versione da mscorlib.dll - - Unable to read assembly '{0}' Non è possibile leggere l'assembly '{0}' diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf index 23b8db64d87..d749b299e9c 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -217,11 +217,6 @@ '{0}.dll' に対する複数の参照は許可されていません - - Could not read version from mscorlib.dll - mscorlib.dll からバージョンを読み取ることができませんでした - - Unable to read assembly '{0}' アセンブリ '{0}' を読み取れません diff --git a/src/fsharp/xlf/FSComp.txt.ko.xlf b/src/fsharp/xlf/FSComp.txt.ko.xlf index aba87e79c25..99bfc40e52e 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -217,11 +217,6 @@ '{0}.dll'에 대한 다중 참조는 허용되지 않습니다. - - Could not read version from mscorlib.dll - mscorlib.dll에서 버전을 읽을 수 없습니다. - - Unable to read assembly '{0}' '{0}' 어셈블리를 읽을 수 없습니다. diff --git a/src/fsharp/xlf/FSComp.txt.pl.xlf b/src/fsharp/xlf/FSComp.txt.pl.xlf index 45c477ef097..1cf7eed9e71 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -217,11 +217,6 @@ Używanie wielu odwołań do pliku „{0}.dll” jest niedozwolone - - Could not read version from mscorlib.dll - Nie można odczytać wersji z pliku mscorlib.dll - - Unable to read assembly '{0}' Nie można odczytać zestawu „{0}” diff --git a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf index 00bea9f1f7d..77b15e0d74c 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -217,11 +217,6 @@ As referências múltiplas '{0}.dll' não são permitidas - - Could not read version from mscorlib.dll - Não foi possível ler a versão em mscorlib.dll - - Unable to read assembly '{0}' Não é possível ler o assembly '{0}' diff --git a/src/fsharp/xlf/FSComp.txt.ru.xlf b/src/fsharp/xlf/FSComp.txt.ru.xlf index bd56dee5120..115241aa23f 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -217,11 +217,6 @@ Множественные ссылки на файлы "{0}.dll" не допускаются - - Could not read version from mscorlib.dll - Не удалось прочитать версию из библиотеки mscorlib.dll - - Unable to read assembly '{0}' Не удается прочитать сборку "{0}" diff --git a/src/fsharp/xlf/FSComp.txt.tr.xlf b/src/fsharp/xlf/FSComp.txt.tr.xlf index 238db436ee6..7ccf53a4396 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -217,11 +217,6 @@ Birden çok '{0}.dll' başvurusuna izin verilmiyor - - Could not read version from mscorlib.dll - Sürüm, mscorlib.dll'den okunamadı - - Unable to read assembly '{0}' '{0}' bütünleştirilmiş kodu okunamıyor diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf index ef836689a48..3c193acf83a 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -217,11 +217,6 @@ 不允许多次引用“{0}.dll” - - Could not read version from mscorlib.dll - 未能从 mscorlib.dll 读取版本 - - Unable to read assembly '{0}' 无法读取程序集“{0}” diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf index 36d58223f3e..2970572468b 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -217,11 +217,6 @@ 不允許多次參考 '{0}.dll' - - Could not read version from mscorlib.dll - 無法從 mscorlib.dll 讀取版本 - - Unable to read assembly '{0}' 無法讀取組件 '{0}' diff --git a/tests/fsharp/single-test.fs b/tests/fsharp/single-test.fs index 54915dc1ec1..6ac31be4289 100644 --- a/tests/fsharp/single-test.fs +++ b/tests/fsharp/single-test.fs @@ -89,7 +89,7 @@ let generateOverrides = " template -let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework = +let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework configuration = let computeSourceItems addDirectory addCondition (compileItem:CompileItem) sources = let computeInclude src = let fileName = if addDirectory then Path.Combine(pc.SourceDirectory, src) else src @@ -172,7 +172,7 @@ let generateProjectArtifacts (pc:ProjectConfiguration) targetFramework = |> replaceTokens "$(OPTIMIZE)" optimize |> replaceTokens "$(DEBUG)" debug |> replaceTokens "$(TARGETFRAMEWORK)" targetFramework - |> replaceTokens "$(RestoreFromArtifactsPath)" (Path.GetFullPath(__SOURCE_DIRECTORY__) + "/../../artifacts") + |> replaceTokens "$(RestoreFromArtifactsPath)" (Path.GetFullPath(__SOURCE_DIRECTORY__) + "/../../artifacts/packages/" + configuration) generateProjBody @@ -218,7 +218,7 @@ let singleTestBuildAndRunCore cfg copyFiles p = let executeFsc testCompilerVersion targetFramework = let propsBody = generateProps testCompilerVersion emitFile propsFileName propsBody - let projectBody = generateProjectArtifacts pc targetFramework + let projectBody = generateProjectArtifacts pc targetFramework cfg.BUILD_CONFIG emitFile projectFileName projectBody use testOkFile = new FileGuard(Path.Combine(directory, "test.ok")) exec { cfg with Directory = directory } cfg.DotNetExe (sprintf "run -f %s" targetFramework) @@ -228,7 +228,7 @@ let singleTestBuildAndRunCore cfg copyFiles p = let executeFsi testCompilerVersion targetFramework = let propsBody = generateProps testCompilerVersion emitFile propsFileName propsBody - let projectBody = generateProjectArtifacts pc targetFramework + let projectBody = generateProjectArtifacts pc targetFramework cfg.BUILD_CONFIG emitFile projectFileName projectBody use testOkFile = new FileGuard(Path.Combine(directory, "test.ok")) exec { cfg with Directory = directory } cfg.DotNetExe "build /t:RunFSharpScript" diff --git a/tests/service/ProjectAnalysisTests.fs b/tests/service/ProjectAnalysisTests.fs index 0913c673988..2fce325322b 100644 --- a/tests/service/ProjectAnalysisTests.fs +++ b/tests/service/ProjectAnalysisTests.fs @@ -5184,11 +5184,7 @@ let ``Test request for parse and check doesn't check whole project`` () = backgroundCheckCount.Value |> shouldEqual 0 let checkResults1 = checker.CheckFileInProject(parseResults1, ProjectBig.fileNames.[5], 0, ProjectBig.fileSources2.[5], ProjectBig.options) |> Async.RunSynchronously let pD, tD = FSharpChecker.GlobalForegroundParseCountStatistic, FSharpChecker.GlobalForegroundTypeCheckCountStatistic -#if FCS_RETAIN_BACKGROUND_PARSE_RESULTS - backgroundParseCount.Value |> shouldEqual 10 -#else backgroundParseCount.Value |> shouldEqual 5 -#endif backgroundCheckCount.Value |> shouldEqual 5 (pD - pC) |> shouldEqual 0 (tD - tC) |> shouldEqual 1 @@ -5197,11 +5193,7 @@ let ``Test request for parse and check doesn't check whole project`` () = let pE, tE = FSharpChecker.GlobalForegroundParseCountStatistic, FSharpChecker.GlobalForegroundTypeCheckCountStatistic (pE - pD) |> shouldEqual 0 (tE - tD) |> shouldEqual 1 -#if FCS_RETAIN_BACKGROUND_PARSE_RESULTS - backgroundParseCount.Value |> shouldEqual 10 // but note, the project does not get reparsed -#else (backgroundParseCount.Value <= 8) |> shouldEqual true // but note, the project does not get reparsed -#endif (backgroundCheckCount.Value <= 8) |> shouldEqual true // only two extra typechecks of files // A subsequent ParseAndCheck of identical source code doesn't do any more anything @@ -5209,11 +5201,7 @@ let ``Test request for parse and check doesn't check whole project`` () = let pF, tF = FSharpChecker.GlobalForegroundParseCountStatistic, FSharpChecker.GlobalForegroundTypeCheckCountStatistic (pF - pE) |> shouldEqual 0 // note, no new parse of the file (tF - tE) |> shouldEqual 0 // note, no new typecheck of the file -#if FCS_RETAIN_BACKGROUND_PARSE_RESULTS - backgroundParseCount.Value |> shouldEqual 10 // but note, the project does not get reparsed -#else (backgroundParseCount.Value <= 8) |> shouldEqual true // but note, the project does not get reparsed -#endif (backgroundCheckCount.Value <= 8) |> shouldEqual true // only two extra typechecks of files () diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs index 790fdb58bb7..9e58d24c1f1 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs @@ -4265,12 +4265,8 @@ let x = query { for bbbb in abbbbc(*D0*) do ReplaceFileInMemory file2 [""] SaveFileToDisk file2 TakeCoffeeBreak(this.VS) - -#if FCS_RETAIN_BACKGROUND_PARSE_RESULTS - gpatcc.AssertExactly(notAA[file2], notAA[file2;file3]) -#else + gpatcc.AssertExactly(notAA[file2; file3], notAA[file2;file3]) -#endif /// FEATURE: References added to the project bring corresponding new .NET and F# items into scope. []