From fa803eea156b3cbd6849fc42176dc6dbfbaf4ee7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 11:31:06 +0200 Subject: [PATCH 01/38] Update dependencies from https://github.com/dotnet/msbuild build 20250414.9 (#18478) Microsoft.SourceBuild.Intermediate.msbuild , Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 17.13.24-preview-25209-01 -> To Version 17.13.25-preview-25214-09 Co-authored-by: dotnet-maestro[bot] --- NuGet.config | 2 +- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/NuGet.config b/NuGet.config index da8e2711646..bb182ae7ad1 100644 --- a/NuGet.config +++ b/NuGet.config @@ -8,7 +8,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 41c6f562b32..f1ed5b1566a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -7,26 +7,26 @@ - + https://github.com/dotnet/msbuild - 7a09d5ee44eb217e9c1ae0bab242c79c70423577 + 7ad4e1c76585d0ed6e438da2d4f9394326934399 - + https://github.com/dotnet/msbuild - 7a09d5ee44eb217e9c1ae0bab242c79c70423577 + 7ad4e1c76585d0ed6e438da2d4f9394326934399 - + https://github.com/dotnet/msbuild - 7a09d5ee44eb217e9c1ae0bab242c79c70423577 + 7ad4e1c76585d0ed6e438da2d4f9394326934399 - + https://github.com/dotnet/msbuild - 7a09d5ee44eb217e9c1ae0bab242c79c70423577 + 7ad4e1c76585d0ed6e438da2d4f9394326934399 - + https://github.com/dotnet/msbuild - 7a09d5ee44eb217e9c1ae0bab242c79c70423577 + 7ad4e1c76585d0ed6e438da2d4f9394326934399 https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index e8e0195904f..2bbd93c22ac 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -102,7 +102,7 @@ 17.10.40152 17.10.526-pre-g1b474069f5 17.10.41 - 17.13.24 + 17.13.25 $(RoslynVersion) $(RoslynVersion) @@ -138,9 +138,9 @@ 15.0.25123-Dev15Preview - 17.13.24 - 17.13.24 - 17.13.24 + 17.13.25 + 17.13.25 + 17.13.25 $(VisualStudioEditorPackagesVersion) From 9b4a7ce7bfdb7b5c9e50bee9b9c084111e5078a0 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Fri, 25 Apr 2025 10:37:02 +0100 Subject: [PATCH 02/38] Consolidate `SynExpr.LetOrUseBang(isUse=false)` (#18482) --- .../CheckComputationExpressions.fs | 371 +++++++++--------- 1 file changed, 183 insertions(+), 188 deletions(-) diff --git a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs index a7bcc1f9f87..011b6f0a5ac 100644 --- a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs @@ -863,6 +863,20 @@ let (|ExprAsUseBang|_|) expr = trivia = { LetOrUseBangKeyword = mBind }) -> ValueSome(spBind, isFromSource, pat, rhsExpr, andBangs, innerComp, mBind) | _ -> ValueNone +[] +let (|ExprAsLetBang|_|) expr = + match expr with + | SynExpr.LetOrUseBang( + bindDebugPoint = spBind + isUse = false + isFromSource = isFromSource + pat = letPat + rhs = letRhsExpr + andBangs = andBangBindings + body = innerComp + trivia = { LetOrUseBangKeyword = mBind }) -> ValueSome(spBind, isFromSource, letPat, letRhsExpr, andBangBindings, innerComp, mBind) + | _ -> ValueNone + // "cexpr; cexpr" is treated as builder.Combine(cexpr1, cexpr1) // This is not pretty - we have to decide which range markers we use for the calls to Combine and Delay // NOTE: we should probably suppress these sequence points altogether @@ -1764,51 +1778,6 @@ let rec TryTranslateComputationExpression |> addBindDebugPoint spBind ) - // 'let! pat = expr in expr' - // --> build.Bind(e1, (fun _argN -> match _argN with pat -> expr)) - // or - // --> build.BindReturn(e1, (fun _argN -> match _argN with pat -> expr-without-return)) - | SynExpr.LetOrUseBang( - bindDebugPoint = spBind - isUse = false - isFromSource = isFromSource - pat = pat - rhs = rhsExpr - andBangs = [] - body = innerComp - trivia = { LetOrUseBangKeyword = mBind }) -> - - if ceenv.isQuery then - error (Error(FSComp.SR.tcBindMayNotBeUsedInQueries (), mBind)) - - // Add the variables to the query variable space, on demand - let varSpace = - addVarsToVarSpace varSpace (fun _mCustomOp env -> - use _holder = TemporarilySuspendReportingTypecheckResultsToSink cenv.tcSink - - let _, _, vspecs, envinner, _ = - TcMatchPattern cenv (NewInferenceType cenv.g) env ceenv.tpenv pat None TcTrueMatchClause.No - - vspecs, envinner) - - let rhsExpr = - mkSourceExprConditional isFromSource rhsExpr ceenv.sourceMethInfo ceenv.builderValName - - Some( - TranslateComputationExpressionBind - ceenv - comp - q - varSpace - mBind - (addBindDebugPoint spBind) - "Bind" - [ rhsExpr ] - pat - innerComp - translatedCtxt - ) - // 'use! pat = e1 in e2' --> build.Bind(e1, (function _argN -> match _argN with pat -> build.Using(x, (fun _argN -> match _argN with pat -> e2)))) | ExprAsUseBang(spBind, isFromSource, pat, rhsExpr, andBangs, innerComp, mBind) -> if ceenv.isQuery then @@ -1870,66 +1839,21 @@ let rec TryTranslateComputationExpression error (Error(FSComp.SR.tcInvalidUseBangBindingNoAndBangs (), m)) + // 'let! pat = expr in expr' --> + // --> build.Bind(e1, (fun _argN -> match _argN with pat -> expr)) + // or + // --> build.BindReturn(e1, (fun _argN -> match _argN with pat -> expr-without-return)) // 'let! pat1 = expr1 and! pat2 = expr2 in ...' --> // build.BindN(expr1, expr2, ...) // or // build.BindNReturn(expr1, expr2, ...) // or // build.Bind(build.MergeSources(expr1, expr2), ...) - | SynExpr.LetOrUseBang( - bindDebugPoint = spBind - isUse = false - isFromSource = isFromSource - pat = letPat - rhs = letRhsExpr - andBangs = andBangBindings - body = innerComp - trivia = { LetOrUseBangKeyword = mBind }) -> - if not (cenv.g.langVersion.SupportsFeature LanguageFeature.AndBang) then - let andBangRange = - match andBangBindings with - | [] -> comp.Range - | h :: _ -> h.Trivia.AndBangKeyword - - error (Error(FSComp.SR.tcAndBangNotSupported (), andBangRange)) - - if ceenv.isQuery then - error (Error(FSComp.SR.tcBindMayNotBeUsedInQueries (), mBind)) - - let sources = - (letRhsExpr - :: [ for SynExprAndBang(body = andExpr) in andBangBindings -> andExpr ]) - |> List.map (fun expr -> mkSourceExprConditional isFromSource expr ceenv.sourceMethInfo ceenv.builderValName) - - let pats = - letPat :: [ for SynExprAndBang(pat = andPat) in andBangBindings -> andPat ] - - let sourcesRange = sources |> List.map (fun e -> e.Range) |> List.reduce unionRanges - - let numSources = sources.Length - let bindReturnNName = "Bind" + string numSources + "Return" - let bindNName = "Bind" + string numSources - - // Check if this is a Bind2Return etc. - let hasBindReturnN = - not ( - isNil ( - TryFindIntrinsicOrExtensionMethInfo - ResultCollectionSettings.AtMostOneResult - cenv - ceenv.env - mBind - ceenv.ad - bindReturnNName - ceenv.builderTy - ) - ) - - if - hasBindReturnN - && Option.isSome (convertSimpleReturnToExpr ceenv comp varSpace innerComp) - then - let consumePat = SynPat.Tuple(false, pats, [], letPat.Range) + | ExprAsLetBang(spBind, isFromSource, letPat, letRhsExpr, andBangBindings, innerComp, mBind) -> + match andBangBindings with + | [] -> + if ceenv.isQuery then + error (Error(FSComp.SR.tcBindMayNotBeUsedInQueries (), mBind)) // Add the variables to the query variable space, on demand let varSpace = @@ -1937,10 +1861,13 @@ let rec TryTranslateComputationExpression use _holder = TemporarilySuspendReportingTypecheckResultsToSink cenv.tcSink let _, _, vspecs, envinner, _ = - TcMatchPattern cenv (NewInferenceType cenv.g) env ceenv.tpenv consumePat None TcTrueMatchClause.No + TcMatchPattern cenv (NewInferenceType cenv.g) env ceenv.tpenv letPat None TcTrueMatchClause.No vspecs, envinner) + let rhsExpr = + mkSourceExprConditional isFromSource letRhsExpr ceenv.sourceMethInfo ceenv.builderValName + Some( TranslateComputationExpressionBind ceenv @@ -1949,17 +1876,40 @@ let rec TryTranslateComputationExpression varSpace mBind (addBindDebugPoint spBind) - bindNName - sources - consumePat + "Bind" + [ rhsExpr ] + letPat innerComp translatedCtxt ) + | _ -> + if not (cenv.g.langVersion.SupportsFeature LanguageFeature.AndBang) then + let andBangRange = + match andBangBindings with + | [] -> comp.Range + | h :: _ -> h.Trivia.AndBangKeyword - else + error (Error(FSComp.SR.tcAndBangNotSupported (), andBangRange)) + + if ceenv.isQuery then + error (Error(FSComp.SR.tcBindMayNotBeUsedInQueries (), mBind)) - // Check if this is a Bind2 etc. - let hasBindN = + let sources = + (letRhsExpr + :: [ for SynExprAndBang(body = andExpr) in andBangBindings -> andExpr ]) + |> List.map (fun expr -> mkSourceExprConditional isFromSource expr ceenv.sourceMethInfo ceenv.builderValName) + + let pats = + letPat :: [ for SynExprAndBang(pat = andPat) in andBangBindings -> andPat ] + + let sourcesRange = sources |> List.map (fun e -> e.Range) |> List.reduce unionRanges + + let numSources = sources.Length + let bindReturnNName = "Bind" + string numSources + "Return" + let bindNName = "Bind" + string numSources + + // Check if this is a Bind2Return etc. + let hasBindReturnN = not ( isNil ( TryFindIntrinsicOrExtensionMethInfo @@ -1968,12 +1918,15 @@ let rec TryTranslateComputationExpression ceenv.env mBind ceenv.ad - bindNName + bindReturnNName ceenv.builderTy ) ) - if hasBindN then + if + hasBindReturnN + && Option.isSome (convertSimpleReturnToExpr ceenv comp varSpace innerComp) + then let consumePat = SynPat.Tuple(false, pats, [], letPat.Range) // Add the variables to the query variable space, on demand @@ -2001,110 +1954,152 @@ let rec TryTranslateComputationExpression translatedCtxt ) else + // Check if this is a Bind2 etc. + let hasBindN = + not ( + isNil ( + TryFindIntrinsicOrExtensionMethInfo + ResultCollectionSettings.AtMostOneResult + cenv + ceenv.env + mBind + ceenv.ad + bindNName + ceenv.builderTy + ) + ) - // Look for the maximum supported MergeSources, MergeSources3, ... - let mkMergeSourcesName n = - if n = 2 then - "MergeSources" - else - "MergeSources" + (string n) - - let maxMergeSources = - let rec loop (n: int) = - let mergeSourcesName = mkMergeSourcesName n - - if - isNil ( - TryFindIntrinsicOrExtensionMethInfo - ResultCollectionSettings.AtMostOneResult - cenv - ceenv.env - mBind - ceenv.ad - mergeSourcesName - ceenv.builderTy - ) - then - (n - 1) + if hasBindN then + let consumePat = SynPat.Tuple(false, pats, [], letPat.Range) + + // Add the variables to the query variable space, on demand + let varSpace = + addVarsToVarSpace varSpace (fun _mCustomOp env -> + use _holder = TemporarilySuspendReportingTypecheckResultsToSink cenv.tcSink + + let _, _, vspecs, envinner, _ = + TcMatchPattern cenv (NewInferenceType cenv.g) env ceenv.tpenv consumePat None TcTrueMatchClause.No + + vspecs, envinner) + + Some( + TranslateComputationExpressionBind + ceenv + comp + q + varSpace + mBind + (addBindDebugPoint spBind) + bindNName + sources + consumePat + innerComp + translatedCtxt + ) + else + // Look for the maximum supported MergeSources, MergeSources3, ... + let mkMergeSourcesName n = + if n = 2 then + "MergeSources" else - loop (n + 1) + "MergeSources" + (string n) + + let maxMergeSources = + let rec loop (n: int) = + let mergeSourcesName = mkMergeSourcesName n + + if + isNil ( + TryFindIntrinsicOrExtensionMethInfo + ResultCollectionSettings.AtMostOneResult + cenv + ceenv.env + mBind + ceenv.ad + mergeSourcesName + ceenv.builderTy + ) + then + (n - 1) + else + loop (n + 1) - loop 2 + loop 2 - if maxMergeSources = 1 then - error (Error(FSComp.SR.tcRequireMergeSourcesOrBindN (bindNName), mBind)) + if maxMergeSources = 1 then + error (Error(FSComp.SR.tcRequireMergeSourcesOrBindN (bindNName), mBind)) - let rec mergeSources (sourcesAndPats: (SynExpr * SynPat) list) = - let numSourcesAndPats = sourcesAndPats.Length - assert (numSourcesAndPats <> 0) + let rec mergeSources (sourcesAndPats: (SynExpr * SynPat) list) = + let numSourcesAndPats = sourcesAndPats.Length + assert (numSourcesAndPats <> 0) - if numSourcesAndPats = 1 then - sourcesAndPats[0] + if numSourcesAndPats = 1 then + sourcesAndPats[0] - elif numSourcesAndPats <= maxMergeSources then + elif numSourcesAndPats <= maxMergeSources then - // Call MergeSources2(e1, e2), MergeSources3(e1, e2, e3) etc - let mergeSourcesName = mkMergeSourcesName numSourcesAndPats + // Call MergeSources2(e1, e2), MergeSources3(e1, e2, e3) etc + let mergeSourcesName = mkMergeSourcesName numSourcesAndPats - requireBuilderMethod mergeSourcesName mBind cenv ceenv.env ceenv.ad ceenv.builderTy mBind + requireBuilderMethod mergeSourcesName mBind cenv ceenv.env ceenv.ad ceenv.builderTy mBind - let source = - mkSynCall mergeSourcesName sourcesRange (List.map fst sourcesAndPats) ceenv.builderValName + let source = + mkSynCall mergeSourcesName sourcesRange (List.map fst sourcesAndPats) ceenv.builderValName - let pat = SynPat.Tuple(false, List.map snd sourcesAndPats, [], letPat.Range) - source, pat + let pat = SynPat.Tuple(false, List.map snd sourcesAndPats, [], letPat.Range) + source, pat - else + else - // Call MergeSourcesMax(e1, e2, e3, e4, (...)) - let nowSourcesAndPats, laterSourcesAndPats = - List.splitAt (maxMergeSources - 1) sourcesAndPats + // Call MergeSourcesMax(e1, e2, e3, e4, (...)) + let nowSourcesAndPats, laterSourcesAndPats = + List.splitAt (maxMergeSources - 1) sourcesAndPats - let mergeSourcesName = mkMergeSourcesName maxMergeSources + let mergeSourcesName = mkMergeSourcesName maxMergeSources - requireBuilderMethod mergeSourcesName mBind cenv ceenv.env ceenv.ad ceenv.builderTy mBind + requireBuilderMethod mergeSourcesName mBind cenv ceenv.env ceenv.ad ceenv.builderTy mBind - let laterSource, laterPat = mergeSources laterSourcesAndPats + let laterSource, laterPat = mergeSources laterSourcesAndPats - let source = - mkSynCall - mergeSourcesName - sourcesRange - (List.map fst nowSourcesAndPats @ [ laterSource ]) - ceenv.builderValName + let source = + mkSynCall + mergeSourcesName + sourcesRange + (List.map fst nowSourcesAndPats @ [ laterSource ]) + ceenv.builderValName - let pat = - SynPat.Tuple(false, List.map snd nowSourcesAndPats @ [ laterPat ], [], letPat.Range) + let pat = + SynPat.Tuple(false, List.map snd nowSourcesAndPats @ [ laterPat ], [], letPat.Range) - source, pat + source, pat - let mergedSources, consumePat = mergeSources (List.zip sources pats) + let mergedSources, consumePat = mergeSources (List.zip sources pats) - // Add the variables to the query variable space, on demand - let varSpace = - addVarsToVarSpace varSpace (fun _mCustomOp env -> - use _holder = TemporarilySuspendReportingTypecheckResultsToSink cenv.tcSink + // Add the variables to the query variable space, on demand + let varSpace = + addVarsToVarSpace varSpace (fun _mCustomOp env -> + use _holder = TemporarilySuspendReportingTypecheckResultsToSink cenv.tcSink - let _, _, vspecs, envinner, _ = - TcMatchPattern cenv (NewInferenceType cenv.g) env ceenv.tpenv consumePat None TcTrueMatchClause.No + let _, _, vspecs, envinner, _ = + TcMatchPattern cenv (NewInferenceType cenv.g) env ceenv.tpenv consumePat None TcTrueMatchClause.No - vspecs, envinner) + vspecs, envinner) - // Build the 'Bind' call - Some( - TranslateComputationExpressionBind - ceenv - comp - q - varSpace - mBind - (addBindDebugPoint spBind) - "Bind" - [ mergedSources ] - consumePat - innerComp - translatedCtxt - ) + // Build the 'Bind' call + Some( + TranslateComputationExpressionBind + ceenv + comp + q + varSpace + mBind + (addBindDebugPoint spBind) + "Bind" + [ mergedSources ] + consumePat + innerComp + translatedCtxt + ) | SynExpr.Match(spMatch, expr, clauses, m, trivia) -> if ceenv.isQuery then From 264a54e197671311bc8cbf7111a43307c46456f2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 12:07:36 +0200 Subject: [PATCH 03/38] Update dependencies from https://github.com/dotnet/arcade build 20250425.6 (#18511) Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.25208.6 -> To Version 9.0.0-beta.25225.6 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 +- .../job/source-index-stage1.yml | 4 +- global.json | 2 +- .../build-configuration.json | 4 + .../eng/common/PSScriptAnalyzerSettings.psd1 | 11 + src/arcade/eng/common/README.md | 28 ++ src/arcade/eng/common/SetupNugetSources.ps1 | 171 ++++++++ src/arcade/eng/common/SetupNugetSources.sh | 167 ++++++++ src/arcade/eng/common/build.cmd | 3 + .../common/core-templates/job/onelocbuild.yml | 121 ++++++ .../core-templates/jobs/source-build.yml | 58 +++ .../post-build/common-variables.yml | 22 + .../post-build/setup-maestro-vars.yml | 74 ++++ .../steps/component-governance.yml | 16 + .../steps/enable-internal-runtimes.yml | 32 ++ .../steps/enable-internal-sources.yml | 47 ++ .../steps/get-federated-access-token.yml | 42 ++ .../steps/publish-build-artifacts.yml | 20 + .../steps/publish-pipeline-artifacts.yml | 20 + .../core-templates/steps/retain-build.yml | 28 ++ .../core-templates/steps/send-to-helix.yml | 93 ++++ .../variables/pool-providers.yml | 8 + .../eng/common/cross/arm/tizen/tizen.patch | 9 + .../eng/common/cross/armel/tizen/tizen.patch | 9 + .../common/cross/riscv64/tizen/tizen.patch | 9 + .../eng/common/cross/tizen-build-rootfs.sh | 82 ++++ .../eng/common/cross/x64/tizen/tizen.patch | 9 + .../eng/common/cross/x86/tizen/tizen.patch | 9 + src/arcade/eng/common/darc-init.ps1 | 47 ++ src/arcade/eng/common/darc-init.sh | 82 ++++ src/arcade/eng/common/dotnet-install.cmd | 2 + src/arcade/eng/common/dotnet-install.ps1 | 28 ++ src/arcade/eng/common/dotnet-install.sh | 94 ++++ .../common/enable-cross-org-publishing.ps1 | 13 + src/arcade/eng/common/generate-locproject.ps1 | 189 +++++++++ src/arcade/eng/common/generate-sbom-prep.ps1 | 29 ++ src/arcade/eng/common/generate-sbom-prep.sh | 39 ++ src/arcade/eng/common/helixpublish.proj | 27 ++ src/arcade/eng/common/init-tools-native.ps1 | 203 +++++++++ src/arcade/eng/common/init-tools-native.sh | 238 +++++++++++ .../eng/common/internal-feed-operations.ps1 | 132 ++++++ .../eng/common/internal-feed-operations.sh | 141 ++++++ .../eng/common/internal/Directory.Build.props | 11 + src/arcade/eng/common/internal/NuGet.config | 7 + src/arcade/eng/common/internal/Tools.csproj | 22 + .../common/loc/P22DotNetHtmlLocalization.lss | 29 ++ src/arcade/eng/common/msbuild.ps1 | 28 ++ src/arcade/eng/common/msbuild.sh | 58 +++ .../eng/common/native/CommonLibrary.psm1 | 401 ++++++++++++++++++ .../eng/common/native/common-library.sh | 172 ++++++++ src/arcade/eng/common/native/init-compiler.sh | 146 +++++++ .../eng/common/native/init-distro-rid.sh | 110 +++++ .../eng/common/native/init-os-and-arch.sh | 85 ++++ .../eng/common/native/install-cmake-test.sh | 117 +++++ src/arcade/eng/common/native/install-cmake.sh | 117 +++++ src/arcade/eng/common/native/install-tool.ps1 | 132 ++++++ .../eng/common/pipeline-logging-functions.ps1 | 260 ++++++++++++ .../eng/common/pipeline-logging-functions.sh | 206 +++++++++ .../post-build/check-channel-consistency.ps1 | 48 +++ .../common/post-build/nuget-validation.ps1 | 22 + .../common/post-build/nuget-verification.ps1 | 121 ++++++ .../eng/common/post-build/redact-logs.ps1 | 89 ++++ .../post-build/sourcelink-validation.ps1 | 327 ++++++++++++++ .../common/post-build/symbols-validation.ps1 | 337 +++++++++++++++ src/arcade/eng/common/retain-build.ps1 | 45 ++ src/arcade/eng/common/sdl/NuGet.config | 18 + .../eng/common/sdl/configure-sdl-tool.ps1 | 130 ++++++ .../eng/common/sdl/execute-all-sdl-tools.ps1 | 167 ++++++++ .../common/sdl/extract-artifact-archives.ps1 | 63 +++ .../common/sdl/extract-artifact-packages.ps1 | 82 ++++ src/arcade/eng/common/sdl/init-sdl.ps1 | 55 +++ src/arcade/eng/common/sdl/run-sdl.ps1 | 49 +++ src/arcade/eng/common/sdl/sdl.ps1 | 38 ++ .../eng/common/sdl/trim-assets-version.ps1 | 75 ++++ src/arcade/eng/common/template-guidance.md | 133 ++++++ .../templates-official/job/onelocbuild.yml | 7 + .../job/publish-build-assets.yml | 7 + .../templates-official/job/source-build.yml | 7 + .../job/source-index-stage1.yml | 7 + .../templates-official/jobs/codeql-build.yml | 7 + .../common/templates-official/jobs/jobs.yml | 7 + .../templates-official/jobs/source-build.yml | 7 + .../post-build/common-variables.yml | 8 + .../post-build/post-build.yml | 8 + .../post-build/setup-maestro-vars.yml | 8 + .../steps/component-governance.yml | 7 + .../steps/enable-internal-runtimes.yml | 9 + .../steps/enable-internal-sources.yml | 7 + .../steps/generate-sbom.yml | 7 + .../steps/get-delegation-sas.yml | 7 + .../steps/get-federated-access-token.yml | 7 + .../templates-official/steps/publish-logs.yml | 7 + .../steps/publish-pipeline-artifacts.yml | 28 ++ .../templates-official/steps/retain-build.yml | 7 + .../steps/send-to-helix.yml | 7 + .../templates-official/steps/source-build.yml | 7 + .../variables/pool-providers.yml | 45 ++ .../variables/sdl-variables.yml | 7 + .../eng/common/templates/job/onelocbuild.yml | 7 + .../templates/job/publish-build-assets.yml | 7 + .../eng/common/templates/job/source-build.yml | 7 + .../templates/job/source-index-stage1.yml | 7 + .../common/templates/jobs/codeql-build.yml | 7 + src/arcade/eng/common/templates/jobs/jobs.yml | 7 + .../common/templates/jobs/source-build.yml | 7 + .../templates/post-build/common-variables.yml | 8 + .../templates/post-build/post-build.yml | 8 + .../post-build/setup-maestro-vars.yml | 8 + .../templates/steps/component-governance.yml | 7 + .../steps/enable-internal-runtimes.yml | 10 + .../steps/enable-internal-sources.yml | 7 + .../common/templates/steps/generate-sbom.yml | 7 + .../templates/steps/get-delegation-sas.yml | 7 + .../steps/get-federated-access-token.yml | 7 + .../common/templates/steps/publish-logs.yml | 7 + .../steps/publish-pipeline-artifacts.yml | 34 ++ .../common/templates/steps/retain-build.yml | 7 + .../common/templates/steps/send-to-helix.yml | 7 + .../common/templates/steps/source-build.yml | 7 + .../templates/variables/pool-providers.yml | 59 +++ 120 files changed, 6527 insertions(+), 7 deletions(-) create mode 100644 src/arcade/eng/common/BuildConfiguration/build-configuration.json create mode 100644 src/arcade/eng/common/PSScriptAnalyzerSettings.psd1 create mode 100644 src/arcade/eng/common/README.md create mode 100644 src/arcade/eng/common/SetupNugetSources.ps1 create mode 100644 src/arcade/eng/common/SetupNugetSources.sh create mode 100644 src/arcade/eng/common/build.cmd create mode 100644 src/arcade/eng/common/core-templates/job/onelocbuild.yml create mode 100644 src/arcade/eng/common/core-templates/jobs/source-build.yml create mode 100644 src/arcade/eng/common/core-templates/post-build/common-variables.yml create mode 100644 src/arcade/eng/common/core-templates/post-build/setup-maestro-vars.yml create mode 100644 src/arcade/eng/common/core-templates/steps/component-governance.yml create mode 100644 src/arcade/eng/common/core-templates/steps/enable-internal-runtimes.yml create mode 100644 src/arcade/eng/common/core-templates/steps/enable-internal-sources.yml create mode 100644 src/arcade/eng/common/core-templates/steps/get-federated-access-token.yml create mode 100644 src/arcade/eng/common/core-templates/steps/publish-build-artifacts.yml create mode 100644 src/arcade/eng/common/core-templates/steps/publish-pipeline-artifacts.yml create mode 100644 src/arcade/eng/common/core-templates/steps/retain-build.yml create mode 100644 src/arcade/eng/common/core-templates/steps/send-to-helix.yml create mode 100644 src/arcade/eng/common/core-templates/variables/pool-providers.yml create mode 100644 src/arcade/eng/common/cross/arm/tizen/tizen.patch create mode 100644 src/arcade/eng/common/cross/armel/tizen/tizen.patch create mode 100644 src/arcade/eng/common/cross/riscv64/tizen/tizen.patch create mode 100644 src/arcade/eng/common/cross/tizen-build-rootfs.sh create mode 100644 src/arcade/eng/common/cross/x64/tizen/tizen.patch create mode 100644 src/arcade/eng/common/cross/x86/tizen/tizen.patch create mode 100644 src/arcade/eng/common/darc-init.ps1 create mode 100644 src/arcade/eng/common/darc-init.sh create mode 100644 src/arcade/eng/common/dotnet-install.cmd create mode 100644 src/arcade/eng/common/dotnet-install.ps1 create mode 100644 src/arcade/eng/common/dotnet-install.sh create mode 100644 src/arcade/eng/common/enable-cross-org-publishing.ps1 create mode 100644 src/arcade/eng/common/generate-locproject.ps1 create mode 100644 src/arcade/eng/common/generate-sbom-prep.ps1 create mode 100644 src/arcade/eng/common/generate-sbom-prep.sh create mode 100644 src/arcade/eng/common/helixpublish.proj create mode 100644 src/arcade/eng/common/init-tools-native.ps1 create mode 100644 src/arcade/eng/common/init-tools-native.sh create mode 100644 src/arcade/eng/common/internal-feed-operations.ps1 create mode 100644 src/arcade/eng/common/internal-feed-operations.sh create mode 100644 src/arcade/eng/common/internal/Directory.Build.props create mode 100644 src/arcade/eng/common/internal/NuGet.config create mode 100644 src/arcade/eng/common/internal/Tools.csproj create mode 100644 src/arcade/eng/common/loc/P22DotNetHtmlLocalization.lss create mode 100644 src/arcade/eng/common/msbuild.ps1 create mode 100644 src/arcade/eng/common/msbuild.sh create mode 100644 src/arcade/eng/common/native/CommonLibrary.psm1 create mode 100644 src/arcade/eng/common/native/common-library.sh create mode 100644 src/arcade/eng/common/native/init-compiler.sh create mode 100644 src/arcade/eng/common/native/init-distro-rid.sh create mode 100644 src/arcade/eng/common/native/init-os-and-arch.sh create mode 100644 src/arcade/eng/common/native/install-cmake-test.sh create mode 100644 src/arcade/eng/common/native/install-cmake.sh create mode 100644 src/arcade/eng/common/native/install-tool.ps1 create mode 100644 src/arcade/eng/common/pipeline-logging-functions.ps1 create mode 100644 src/arcade/eng/common/pipeline-logging-functions.sh create mode 100644 src/arcade/eng/common/post-build/check-channel-consistency.ps1 create mode 100644 src/arcade/eng/common/post-build/nuget-validation.ps1 create mode 100644 src/arcade/eng/common/post-build/nuget-verification.ps1 create mode 100644 src/arcade/eng/common/post-build/redact-logs.ps1 create mode 100644 src/arcade/eng/common/post-build/sourcelink-validation.ps1 create mode 100644 src/arcade/eng/common/post-build/symbols-validation.ps1 create mode 100644 src/arcade/eng/common/retain-build.ps1 create mode 100644 src/arcade/eng/common/sdl/NuGet.config create mode 100644 src/arcade/eng/common/sdl/configure-sdl-tool.ps1 create mode 100644 src/arcade/eng/common/sdl/execute-all-sdl-tools.ps1 create mode 100644 src/arcade/eng/common/sdl/extract-artifact-archives.ps1 create mode 100644 src/arcade/eng/common/sdl/extract-artifact-packages.ps1 create mode 100644 src/arcade/eng/common/sdl/init-sdl.ps1 create mode 100644 src/arcade/eng/common/sdl/run-sdl.ps1 create mode 100644 src/arcade/eng/common/sdl/sdl.ps1 create mode 100644 src/arcade/eng/common/sdl/trim-assets-version.ps1 create mode 100644 src/arcade/eng/common/template-guidance.md create mode 100644 src/arcade/eng/common/templates-official/job/onelocbuild.yml create mode 100644 src/arcade/eng/common/templates-official/job/publish-build-assets.yml create mode 100644 src/arcade/eng/common/templates-official/job/source-build.yml create mode 100644 src/arcade/eng/common/templates-official/job/source-index-stage1.yml create mode 100644 src/arcade/eng/common/templates-official/jobs/codeql-build.yml create mode 100644 src/arcade/eng/common/templates-official/jobs/jobs.yml create mode 100644 src/arcade/eng/common/templates-official/jobs/source-build.yml create mode 100644 src/arcade/eng/common/templates-official/post-build/common-variables.yml create mode 100644 src/arcade/eng/common/templates-official/post-build/post-build.yml create mode 100644 src/arcade/eng/common/templates-official/post-build/setup-maestro-vars.yml create mode 100644 src/arcade/eng/common/templates-official/steps/component-governance.yml create mode 100644 src/arcade/eng/common/templates-official/steps/enable-internal-runtimes.yml create mode 100644 src/arcade/eng/common/templates-official/steps/enable-internal-sources.yml create mode 100644 src/arcade/eng/common/templates-official/steps/generate-sbom.yml create mode 100644 src/arcade/eng/common/templates-official/steps/get-delegation-sas.yml create mode 100644 src/arcade/eng/common/templates-official/steps/get-federated-access-token.yml create mode 100644 src/arcade/eng/common/templates-official/steps/publish-logs.yml create mode 100644 src/arcade/eng/common/templates-official/steps/publish-pipeline-artifacts.yml create mode 100644 src/arcade/eng/common/templates-official/steps/retain-build.yml create mode 100644 src/arcade/eng/common/templates-official/steps/send-to-helix.yml create mode 100644 src/arcade/eng/common/templates-official/steps/source-build.yml create mode 100644 src/arcade/eng/common/templates-official/variables/pool-providers.yml create mode 100644 src/arcade/eng/common/templates-official/variables/sdl-variables.yml create mode 100644 src/arcade/eng/common/templates/job/onelocbuild.yml create mode 100644 src/arcade/eng/common/templates/job/publish-build-assets.yml create mode 100644 src/arcade/eng/common/templates/job/source-build.yml create mode 100644 src/arcade/eng/common/templates/job/source-index-stage1.yml create mode 100644 src/arcade/eng/common/templates/jobs/codeql-build.yml create mode 100644 src/arcade/eng/common/templates/jobs/jobs.yml create mode 100644 src/arcade/eng/common/templates/jobs/source-build.yml create mode 100644 src/arcade/eng/common/templates/post-build/common-variables.yml create mode 100644 src/arcade/eng/common/templates/post-build/post-build.yml create mode 100644 src/arcade/eng/common/templates/post-build/setup-maestro-vars.yml create mode 100644 src/arcade/eng/common/templates/steps/component-governance.yml create mode 100644 src/arcade/eng/common/templates/steps/enable-internal-runtimes.yml create mode 100644 src/arcade/eng/common/templates/steps/enable-internal-sources.yml create mode 100644 src/arcade/eng/common/templates/steps/generate-sbom.yml create mode 100644 src/arcade/eng/common/templates/steps/get-delegation-sas.yml create mode 100644 src/arcade/eng/common/templates/steps/get-federated-access-token.yml create mode 100644 src/arcade/eng/common/templates/steps/publish-logs.yml create mode 100644 src/arcade/eng/common/templates/steps/publish-pipeline-artifacts.yml create mode 100644 src/arcade/eng/common/templates/steps/retain-build.yml create mode 100644 src/arcade/eng/common/templates/steps/send-to-helix.yml create mode 100644 src/arcade/eng/common/templates/steps/source-build.yml create mode 100644 src/arcade/eng/common/templates/variables/pool-providers.yml diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f1ed5b1566a..3d486a94d20 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,14 +42,14 @@ - + https://github.com/dotnet/arcade - aa61e8c20a869bcc994f8b29eb07d927d2bec6f4 + bfbc858ba868b60fffaf7b2150f1d2165b01e786 - + https://github.com/dotnet/arcade - aa61e8c20a869bcc994f8b29eb07d927d2bec6f4 + bfbc858ba868b60fffaf7b2150f1d2165b01e786 diff --git a/eng/common/core-templates/job/source-index-stage1.yml b/eng/common/core-templates/job/source-index-stage1.yml index 205fb5b3a39..8b833332b3e 100644 --- a/eng/common/core-templates/job/source-index-stage1.yml +++ b/eng/common/core-templates/job/source-index-stage1.yml @@ -1,7 +1,7 @@ parameters: runAsPublic: false - sourceIndexUploadPackageVersion: 2.0.0-20240522.1 - sourceIndexProcessBinlogPackageVersion: 1.0.1-20240522.1 + sourceIndexUploadPackageVersion: 2.0.0-20250425.2 + sourceIndexProcessBinlogPackageVersion: 1.0.1-20250425.2 sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" preSteps: [] diff --git a/global.json b/global.json index dad4b18b2fa..025b675460e 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25208.6", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25225.6", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } diff --git a/src/arcade/eng/common/BuildConfiguration/build-configuration.json b/src/arcade/eng/common/BuildConfiguration/build-configuration.json new file mode 100644 index 00000000000..3d1cc89894c --- /dev/null +++ b/src/arcade/eng/common/BuildConfiguration/build-configuration.json @@ -0,0 +1,4 @@ +{ + "RetryCountLimit": 1, + "RetryByAnyError": false +} diff --git a/src/arcade/eng/common/PSScriptAnalyzerSettings.psd1 b/src/arcade/eng/common/PSScriptAnalyzerSettings.psd1 new file mode 100644 index 00000000000..4c1ea7c98ea --- /dev/null +++ b/src/arcade/eng/common/PSScriptAnalyzerSettings.psd1 @@ -0,0 +1,11 @@ +@{ + IncludeRules=@('PSAvoidUsingCmdletAliases', + 'PSAvoidUsingWMICmdlet', + 'PSAvoidUsingPositionalParameters', + 'PSAvoidUsingInvokeExpression', + 'PSUseDeclaredVarsMoreThanAssignments', + 'PSUseCmdletCorrectly', + 'PSStandardDSCFunctionsInResource', + 'PSUseIdenticalMandatoryParametersForDSC', + 'PSUseIdenticalParametersForDSC') +} \ No newline at end of file diff --git a/src/arcade/eng/common/README.md b/src/arcade/eng/common/README.md new file mode 100644 index 00000000000..ff49c371527 --- /dev/null +++ b/src/arcade/eng/common/README.md @@ -0,0 +1,28 @@ +# Don't touch this folder + + uuuuuuuuuuuuuuuuuuuu + u" uuuuuuuuuuuuuuuuuu "u + u" u$$$$$$$$$$$$$$$$$$$$u "u + u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u + u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u + u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u + u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u + $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ + $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ + $ $$$" ... "$... ...$" ... "$$$ ... "$$$ $ + $ $$$u `"$$$$$$$ $$$ $$$$$ $$ $$$ $$$ $ + $ $$$$$$uu "$$$$ $$$ $$$$$ $$ """ u$$$ $ + $ $$$""$$$ $$$$ $$$u "$$$" u$$ $$$$$$$$ $ + $ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $ + $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ + "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" + "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" + "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" + "u "$$$$$$$$$$$$$$$$$$$$$$$$" u" + "u "$$$$$$$$$$$$$$$$$$$$" u" + "u """""""""""""""""" u" + """""""""""""""""""" + +!!! Changes made in this directory are subject to being overwritten by automation !!! + +The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first. diff --git a/src/arcade/eng/common/SetupNugetSources.ps1 b/src/arcade/eng/common/SetupNugetSources.ps1 new file mode 100644 index 00000000000..5db4ad71ee2 --- /dev/null +++ b/src/arcade/eng/common/SetupNugetSources.ps1 @@ -0,0 +1,171 @@ +# This script adds internal feeds required to build commits that depend on internal package sources. For instance, +# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables +# disabled internal Maestro (darc-int*) feeds. +# +# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. +# +# See example call for this script below. +# +# - task: PowerShell@2 +# displayName: Setup Private Feeds Credentials +# condition: eq(variables['Agent.OS'], 'Windows_NT') +# inputs: +# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 +# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token +# env: +# Token: $(dn-bot-dnceng-artifact-feeds-rw) +# +# Note that the NuGetAuthenticate task should be called after SetupNugetSources. +# This ensures that: +# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt) +# - The credential provider is installed. +# +# This logic is also abstracted into enable-internal-sources.yml. + +[CmdletBinding()] +param ( + [Parameter(Mandatory = $true)][string]$ConfigFile, + $Password +) + +$ErrorActionPreference = "Stop" +Set-StrictMode -Version 2.0 +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + +. $PSScriptRoot\tools.ps1 + +# Add source entry to PackageSources +function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) { + $packageSource = $sources.SelectSingleNode("add[@key='$SourceName']") + + if ($packageSource -eq $null) + { + $packageSource = $doc.CreateElement("add") + $packageSource.SetAttribute("key", $SourceName) + $packageSource.SetAttribute("value", $SourceEndPoint) + $sources.AppendChild($packageSource) | Out-Null + } + else { + Write-Host "Package source $SourceName already present." + } + + AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd +} + +# Add a credential node for the specified source +function AddCredential($creds, $source, $username, $pwd) { + # If no cred supplied, don't do anything. + if (!$pwd) { + return; + } + + # Looks for credential configuration for the given SourceName. Create it if none is found. + $sourceElement = $creds.SelectSingleNode($Source) + if ($sourceElement -eq $null) + { + $sourceElement = $doc.CreateElement($Source) + $creds.AppendChild($sourceElement) | Out-Null + } + + # Add the node to the credential if none is found. + $usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']") + if ($usernameElement -eq $null) + { + $usernameElement = $doc.CreateElement("add") + $usernameElement.SetAttribute("key", "Username") + $sourceElement.AppendChild($usernameElement) | Out-Null + } + $usernameElement.SetAttribute("value", $Username) + + # Add the to the credential if none is found. + # Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs. + # -> https://github.com/NuGet/Home/issues/5526 + $passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']") + if ($passwordElement -eq $null) + { + $passwordElement = $doc.CreateElement("add") + $passwordElement.SetAttribute("key", "ClearTextPassword") + $sourceElement.AppendChild($passwordElement) | Out-Null + } + + $passwordElement.SetAttribute("value", $pwd) +} + +function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) { + $maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]") + + Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds." + + ForEach ($PackageSource in $maestroPrivateSources) { + Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key + AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd + } +} + +function EnablePrivatePackageSources($DisabledPackageSources) { + $maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]") + ForEach ($DisabledPackageSource in $maestroPrivateSources) { + Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource" + # Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries + $DisabledPackageSources.RemoveChild($DisabledPackageSource) + } +} + +if (!(Test-Path $ConfigFile -PathType Leaf)) { + Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" + ExitWithExitCode 1 +} + +# Load NuGet.config +$doc = New-Object System.Xml.XmlDocument +$filename = (Get-Item $ConfigFile).FullName +$doc.Load($filename) + +# Get reference to or create one if none exist already +$sources = $doc.DocumentElement.SelectSingleNode("packageSources") +if ($sources -eq $null) { + $sources = $doc.CreateElement("packageSources") + $doc.DocumentElement.AppendChild($sources) | Out-Null +} + +$creds = $null +if ($Password) { + # Looks for a node. Create it if none is found. + $creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") + if ($creds -eq $null) { + $creds = $doc.CreateElement("packageSourceCredentials") + $doc.DocumentElement.AppendChild($creds) | Out-Null + } +} + +# Check for disabledPackageSources; we'll enable any darc-int ones we find there +$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources") +if ($disabledSources -ne $null) { + Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node" + EnablePrivatePackageSources -DisabledPackageSources $disabledSources +} + +$userName = "dn-bot" + +# Insert credential nodes for Maestro's private feeds +InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password + +# 3.1 uses a different feed url format so it's handled differently here +$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']") +if ($dotnet31Source -ne $null) { + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password +} + +$dotnetVersions = @('5','6','7','8','9') + +foreach ($dotnetVersion in $dotnetVersions) { + $feedPrefix = "dotnet" + $dotnetVersion; + $dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']") + if ($dotnetSource -ne $null) { + AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password + AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password + } +} + +$doc.Save($filename) diff --git a/src/arcade/eng/common/SetupNugetSources.sh b/src/arcade/eng/common/SetupNugetSources.sh new file mode 100644 index 00000000000..4604b61b032 --- /dev/null +++ b/src/arcade/eng/common/SetupNugetSources.sh @@ -0,0 +1,167 @@ +#!/usr/bin/env bash + +# This script adds internal feeds required to build commits that depend on internal package sources. For instance, +# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables +# disabled internal Maestro (darc-int*) feeds. +# +# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. +# +# See example call for this script below. +# +# - task: Bash@3 +# displayName: Setup Internal Feeds +# inputs: +# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh +# arguments: $(Build.SourcesDirectory)/NuGet.config +# condition: ne(variables['Agent.OS'], 'Windows_NT') +# - task: NuGetAuthenticate@1 +# +# Note that the NuGetAuthenticate task should be called after SetupNugetSources. +# This ensures that: +# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt) +# - The credential provider is installed. +# +# This logic is also abstracted into enable-internal-sources.yml. + +ConfigFile=$1 +CredToken=$2 +NL='\n' +TB=' ' + +source="${BASH_SOURCE[0]}" + +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. "$scriptroot/tools.sh" + +if [ ! -f "$ConfigFile" ]; then + Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" + ExitWithExitCode 1 +fi + +if [[ `uname -s` == "Darwin" ]]; then + NL=$'\\\n' + TB='' +fi + +# Ensure there is a ... section. +grep -i "" $ConfigFile +if [ "$?" != "0" ]; then + echo "Adding ... section." + ConfigNodeHeader="" + PackageSourcesTemplate="${TB}${NL}${TB}" + + sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" $ConfigFile +fi + +# Ensure there is a ... section. +grep -i "" $ConfigFile +if [ "$?" != "0" ]; then + echo "Adding ... section." + + PackageSourcesNodeFooter="" + PackageSourceCredentialsTemplate="${TB}${NL}${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" $ConfigFile +fi + +PackageSources=() + +# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present +grep -i "" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3.1-internal') + + grep -i "" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding dotnet3.1-internal-transport to the packageSources." + PackageSourcesNodeFooter="" + PackageSourceTemplate="${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3.1-internal-transport') +fi + +DotNetVersions=('5' '6' '7' '8' '9') + +for DotNetVersion in ${DotNetVersions[@]} ; do + FeedPrefix="dotnet${DotNetVersion}"; + grep -i "" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=("$FeedPrefix-internal") + + grep -i "" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding $FeedPrefix-internal-transport to the packageSources." + PackageSourcesNodeFooter="" + PackageSourceTemplate="${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=("$FeedPrefix-internal-transport") + fi +done + +# I want things split line by line +PrevIFS=$IFS +IFS=$'\n' +PackageSources+="$IFS" +PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') +IFS=$PrevIFS + +if [ "$CredToken" ]; then + for FeedName in ${PackageSources[@]} ; do + # Check if there is no existing credential for this FeedName + grep -i "<$FeedName>" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding credentials for $FeedName." + + PackageSourceCredentialsNodeFooter="" + NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}" + + sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile + fi + done +fi + +# Re-enable any entries in disabledPackageSources where the feed name contains darc-int +grep -i "" $ConfigFile +if [ "$?" == "0" ]; then + DisabledDarcIntSources=() + echo "Re-enabling any disabled \"darc-int\" package sources in $ConfigFile" + DisabledDarcIntSources+=$(grep -oh '"darc-int-[^"]*" value="true"' $ConfigFile | tr -d '"') + for DisabledSourceName in ${DisabledDarcIntSources[@]} ; do + if [[ $DisabledSourceName == darc-int* ]] + then + OldDisableValue="" + NewDisableValue="" + sed -i.bak "s|$OldDisableValue|$NewDisableValue|" $ConfigFile + echo "Neutralized disablePackageSources entry for '$DisabledSourceName'" + fi + done +fi diff --git a/src/arcade/eng/common/build.cmd b/src/arcade/eng/common/build.cmd new file mode 100644 index 00000000000..99daf368aba --- /dev/null +++ b/src/arcade/eng/common/build.cmd @@ -0,0 +1,3 @@ +@echo off +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0build.ps1""" %*" +exit /b %ErrorLevel% diff --git a/src/arcade/eng/common/core-templates/job/onelocbuild.yml b/src/arcade/eng/common/core-templates/job/onelocbuild.yml new file mode 100644 index 00000000000..00feec8ebbc --- /dev/null +++ b/src/arcade/eng/common/core-templates/job/onelocbuild.yml @@ -0,0 +1,121 @@ +parameters: + # Optional: dependencies of the job + dependsOn: '' + + # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool + pool: '' + + CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex + GithubPat: $(BotAccount-dotnet-bot-repo-PAT) + + SourcesDirectory: $(Build.SourcesDirectory) + CreatePr: true + AutoCompletePr: false + ReusePr: true + UseLfLineEndings: true + UseCheckedInLocProjectJson: false + SkipLocProjectJsonGeneration: false + LanguageSet: VS_Main_Languages + LclSource: lclFilesInRepo + LclPackageId: '' + RepoType: gitHub + GitHubOrg: dotnet + MirrorRepo: '' + MirrorBranch: main + condition: '' + JobNameSuffix: '' + is1ESPipeline: '' +jobs: +- job: OneLocBuild${{ parameters.JobNameSuffix }} + + dependsOn: ${{ parameters.dependsOn }} + + displayName: OneLocBuild${{ parameters.JobNameSuffix }} + + variables: + - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat + - name: _GenerateLocProjectArguments + value: -SourcesDirectory ${{ parameters.SourcesDirectory }} + -LanguageSet "${{ parameters.LanguageSet }}" + -CreateNeutralXlfs + - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: + - name: _GenerateLocProjectArguments + value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson + - template: /eng/common/core-templates/variables/pool-providers.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + + ${{ if ne(parameters.pool, '') }}: + pool: ${{ parameters.pool }} + ${{ if eq(parameters.pool, '') }}: + pool: + # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) + ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + name: AzurePipelines-EO + image: 1ESPT-Windows2022 + demands: Cmd + os: windows + # If it's not devdiv, it's dnceng + ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: + name: $(DncEngInternalBuildPool) + image: 1es-windows-2022 + os: windows + + steps: + - ${{ if eq(parameters.is1ESPipeline, '') }}: + - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error + + - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: + - task: Powershell@2 + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 + arguments: $(_GenerateLocProjectArguments) + displayName: Generate LocProject.json + condition: ${{ parameters.condition }} + + - task: OneLocBuild@2 + displayName: OneLocBuild + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + inputs: + locProj: eng/Localize/LocProject.json + outDir: $(Build.ArtifactStagingDirectory) + lclSource: ${{ parameters.LclSource }} + lclPackageId: ${{ parameters.LclPackageId }} + isCreatePrSelected: ${{ parameters.CreatePr }} + isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} + ${{ if eq(parameters.CreatePr, true) }}: + isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }} + ${{ if eq(parameters.RepoType, 'gitHub') }}: + isShouldReusePrSelected: ${{ parameters.ReusePr }} + packageSourceAuth: patAuth + patVariable: ${{ parameters.CeapexPat }} + ${{ if eq(parameters.RepoType, 'gitHub') }}: + repoType: ${{ parameters.RepoType }} + gitHubPatVariable: "${{ parameters.GithubPat }}" + ${{ if ne(parameters.MirrorRepo, '') }}: + isMirrorRepoSelected: true + gitHubOrganization: ${{ parameters.GitHubOrg }} + mirrorRepo: ${{ parameters.MirrorRepo }} + mirrorBranch: ${{ parameters.MirrorBranch }} + condition: ${{ parameters.condition }} + + - template: /eng/common/core-templates/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + args: + displayName: Publish Localization Files + pathToPublish: '$(Build.ArtifactStagingDirectory)/loc' + publishLocation: Container + artifactName: Loc + condition: ${{ parameters.condition }} + + - template: /eng/common/core-templates/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + args: + displayName: Publish LocProject.json + pathToPublish: '$(Build.SourcesDirectory)/eng/Localize/' + publishLocation: Container + artifactName: Loc + condition: ${{ parameters.condition }} \ No newline at end of file diff --git a/src/arcade/eng/common/core-templates/jobs/source-build.yml b/src/arcade/eng/common/core-templates/jobs/source-build.yml new file mode 100644 index 00000000000..a10ccfbee6d --- /dev/null +++ b/src/arcade/eng/common/core-templates/jobs/source-build.yml @@ -0,0 +1,58 @@ +parameters: + # This template adds arcade-powered source-build to CI. A job is created for each platform, as + # well as an optional server job that completes when all platform jobs complete. + + # The name of the "join" job for all source-build platforms. If set to empty string, the job is + # not included. Existing repo pipelines can use this job depend on all source-build jobs + # completing without maintaining a separate list of every single job ID: just depend on this one + # server job. By default, not included. Recommended name if used: 'Source_Build_Complete'. + allCompletedJobId: '' + + # See /eng/common/core-templates/job/source-build.yml + jobNamePrefix: 'Source_Build' + + # This is the default platform provided by Arcade, intended for use by a managed-only repo. + defaultManagedPlatform: + name: 'Managed' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9' + + # Defines the platforms on which to run build jobs. One job is created for each platform, and the + # object in this array is sent to the job template as 'platform'. If no platforms are specified, + # one job runs on 'defaultManagedPlatform'. + platforms: [] + + is1ESPipeline: '' + + # If set to true and running on a non-public project, + # Internal nuget and blob storage locations will be enabled. + # This is not enabled by default because many repositories do not need internal sources + # and do not need to have the required service connections approved in the pipeline. + enableInternalSources: false + +jobs: + +- ${{ if ne(parameters.allCompletedJobId, '') }}: + - job: ${{ parameters.allCompletedJobId }} + displayName: Source-Build Complete + pool: server + dependsOn: + - ${{ each platform in parameters.platforms }}: + - ${{ parameters.jobNamePrefix }}_${{ platform.name }} + - ${{ if eq(length(parameters.platforms), 0) }}: + - ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }} + +- ${{ each platform in parameters.platforms }}: + - template: /eng/common/core-templates/job/source-build.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + jobNamePrefix: ${{ parameters.jobNamePrefix }} + platform: ${{ platform }} + enableInternalSources: ${{ parameters.enableInternalSources }} + +- ${{ if eq(length(parameters.platforms), 0) }}: + - template: /eng/common/core-templates/job/source-build.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + jobNamePrefix: ${{ parameters.jobNamePrefix }} + platform: ${{ parameters.defaultManagedPlatform }} + enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/src/arcade/eng/common/core-templates/post-build/common-variables.yml b/src/arcade/eng/common/core-templates/post-build/common-variables.yml new file mode 100644 index 00000000000..d5627a994ae --- /dev/null +++ b/src/arcade/eng/common/core-templates/post-build/common-variables.yml @@ -0,0 +1,22 @@ +variables: + - group: Publish-Build-Assets + + # Whether the build is internal or not + - name: IsInternalBuild + value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }} + + # Default Maestro++ API Endpoint and API Version + - name: MaestroApiEndPoint + value: "https://maestro.dot.net" + - name: MaestroApiVersion + value: "2020-02-20" + + - name: SourceLinkCLIVersion + value: 3.0.0 + - name: SymbolToolVersion + value: 1.0.1 + - name: BinlogToolVersion + value: 1.0.11 + + - name: runCodesignValidationInjection + value: false diff --git a/src/arcade/eng/common/core-templates/post-build/setup-maestro-vars.yml b/src/arcade/eng/common/core-templates/post-build/setup-maestro-vars.yml new file mode 100644 index 00000000000..f7602980dbe --- /dev/null +++ b/src/arcade/eng/common/core-templates/post-build/setup-maestro-vars.yml @@ -0,0 +1,74 @@ +parameters: + BARBuildId: '' + PromoteToChannelIds: '' + is1ESPipeline: '' + +steps: + - ${{ if eq(parameters.is1ESPipeline, '') }}: + - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error + + - ${{ if eq(coalesce(parameters.PromoteToChannelIds, 0), 0) }}: + - task: DownloadBuildArtifacts@0 + displayName: Download Release Configs + inputs: + buildType: current + artifactName: ReleaseConfigs + checkDownloadedFiles: true + + - task: AzureCLI@2 + name: setReleaseVars + displayName: Set Release Configs Vars + inputs: + azureSubscription: "Darc: Maestro Production" + scriptType: pscore + scriptLocation: inlineScript + inlineScript: | + try { + if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { + $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt + + $BarId = $Content | Select -Index 0 + $Channels = $Content | Select -Index 1 + $IsStableBuild = $Content | Select -Index 2 + + $AzureDevOpsProject = $Env:System_TeamProject + $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId + $AzureDevOpsBuildId = $Env:Build_BuildId + } + else { + . $(Build.SourcesDirectory)\eng\common\tools.ps1 + $darc = Get-Darc + $buildInfo = & $darc get-build ` + --id ${{ parameters.BARBuildId }} ` + --extended ` + --output-format json ` + --ci ` + | convertFrom-Json + + $BarId = ${{ parameters.BARBuildId }} + $Channels = $Env:PromoteToMaestroChannels -split "," + $Channels = $Channels -join "][" + $Channels = "[$Channels]" + + $IsStableBuild = $buildInfo.stable + $AzureDevOpsProject = $buildInfo.azureDevOpsProject + $AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId + $AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId + } + + Write-Host "##vso[task.setvariable variable=BARBuildId]$BarId" + Write-Host "##vso[task.setvariable variable=TargetChannels]$Channels" + Write-Host "##vso[task.setvariable variable=IsStableBuild]$IsStableBuild" + + Write-Host "##vso[task.setvariable variable=AzDOProjectName]$AzureDevOpsProject" + Write-Host "##vso[task.setvariable variable=AzDOPipelineId]$AzureDevOpsBuildDefinitionId" + Write-Host "##vso[task.setvariable variable=AzDOBuildId]$AzureDevOpsBuildId" + } + catch { + Write-Host $_ + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + exit 1 + } + env: + PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} diff --git a/src/arcade/eng/common/core-templates/steps/component-governance.yml b/src/arcade/eng/common/core-templates/steps/component-governance.yml new file mode 100644 index 00000000000..cf0649aa956 --- /dev/null +++ b/src/arcade/eng/common/core-templates/steps/component-governance.yml @@ -0,0 +1,16 @@ +parameters: + disableComponentGovernance: false + componentGovernanceIgnoreDirectories: '' + is1ESPipeline: false + displayName: 'Component Detection' + +steps: +- ${{ if eq(parameters.disableComponentGovernance, 'true') }}: + - script: echo "##vso[task.setvariable variable=skipComponentGovernanceDetection]true" + displayName: Set skipComponentGovernanceDetection variable +- ${{ if ne(parameters.disableComponentGovernance, 'true') }}: + - task: ComponentGovernanceComponentDetection@0 + continueOnError: true + displayName: ${{ parameters.displayName }} + inputs: + ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} diff --git a/src/arcade/eng/common/core-templates/steps/enable-internal-runtimes.yml b/src/arcade/eng/common/core-templates/steps/enable-internal-runtimes.yml new file mode 100644 index 00000000000..6bdbf62ac50 --- /dev/null +++ b/src/arcade/eng/common/core-templates/steps/enable-internal-runtimes.yml @@ -0,0 +1,32 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +parameters: +- name: federatedServiceConnection + type: string + default: 'dotnetbuilds-internal-read' +- name: outputVariableName + type: string + default: 'dotnetbuilds-internal-container-read-token-base64' +- name: expiryInHours + type: number + default: 1 +- name: base64Encode + type: boolean + default: true +- name: is1ESPipeline + type: boolean + default: false + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/core-templates/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: ${{ parameters.federatedServiceConnection }} + outputVariableName: ${{ parameters.outputVariableName }} + expiryInHours: ${{ parameters.expiryInHours }} + base64Encode: ${{ parameters.base64Encode }} + storageAccount: dotnetbuilds + container: internal + permissions: rl + is1ESPipeline: ${{ parameters.is1ESPipeline }} \ No newline at end of file diff --git a/src/arcade/eng/common/core-templates/steps/enable-internal-sources.yml b/src/arcade/eng/common/core-templates/steps/enable-internal-sources.yml new file mode 100644 index 00000000000..64f881bffc3 --- /dev/null +++ b/src/arcade/eng/common/core-templates/steps/enable-internal-sources.yml @@ -0,0 +1,47 @@ +parameters: +# This is the Azure federated service connection that we log into to get an access token. +- name: nugetFederatedServiceConnection + type: string + default: 'dnceng-artifacts-feeds-read' +- name: is1ESPipeline + type: boolean + default: false +# Legacy parameters to allow for PAT usage +- name: legacyCredential + type: string + default: '' + +steps: +- ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if ne(parameters.legacyCredential, '') }}: + - task: PowerShell@2 + displayName: Setup Internal Feeds + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: ${{ parameters.legacyCredential }} + # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. + # If running on DevDiv, NuGetAuthenticate is not really an option. It's scoped to a single feed, and we have many feeds that + # may be added. Instead, we'll use the traditional approach (add cred to nuget.config), but use an account token. + - ${{ else }}: + - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - task: PowerShell@2 + displayName: Setup Internal Feeds + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config + - ${{ else }}: + - template: /eng/common/templates/steps/get-federated-access-token.yml + parameters: + federatedServiceConnection: ${{ parameters.nugetFederatedServiceConnection }} + outputVariableName: 'dnceng-artifacts-feeds-read-access-token' + - task: PowerShell@2 + displayName: Setup Internal Feeds + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) + # This is required in certain scenarios to install the ADO credential provider. + # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others + # (e.g. dotnet msbuild). + - task: NuGetAuthenticate@1 diff --git a/src/arcade/eng/common/core-templates/steps/get-federated-access-token.yml b/src/arcade/eng/common/core-templates/steps/get-federated-access-token.yml new file mode 100644 index 00000000000..3a4d4410c48 --- /dev/null +++ b/src/arcade/eng/common/core-templates/steps/get-federated-access-token.yml @@ -0,0 +1,42 @@ +parameters: +- name: federatedServiceConnection + type: string +- name: outputVariableName + type: string +- name: is1ESPipeline + type: boolean +- name: stepName + type: string + default: 'getFederatedAccessToken' +- name: condition + type: string + default: '' +# Resource to get a token for. Common values include: +# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps +# - 'https://storage.azure.com/' for storage +# Defaults to Azure DevOps +- name: resource + type: string + default: '499b84ac-1321-427f-aa17-267ca6975798' +- name: isStepOutputVariable + type: boolean + default: false + +steps: +- task: AzureCLI@2 + displayName: 'Getting federated access token for feeds' + name: ${{ parameters.stepName }} + ${{ if ne(parameters.condition, '') }}: + condition: ${{ parameters.condition }} + inputs: + azureSubscription: ${{ parameters.federatedServiceConnection }} + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" + exit 1 + } + Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" + Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken" \ No newline at end of file diff --git a/src/arcade/eng/common/core-templates/steps/publish-build-artifacts.yml b/src/arcade/eng/common/core-templates/steps/publish-build-artifacts.yml new file mode 100644 index 00000000000..f24ce346684 --- /dev/null +++ b/src/arcade/eng/common/core-templates/steps/publish-build-artifacts.yml @@ -0,0 +1,20 @@ +parameters: +- name: is1ESPipeline + type: boolean + default: false +- name: args + type: object + default: {} +steps: +- ${{ if ne(parameters.is1ESPipeline, true) }}: + - template: /eng/common/templates/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + ${{ each parameter in parameters.args }}: + ${{ parameter.key }}: ${{ parameter.value }} +- ${{ else }}: + - template: /eng/common/templates-official/steps/publish-build-artifacts.yml + parameters: + is1ESPipeline: ${{ parameters.is1ESPipeline }} + ${{ each parameter in parameters.args }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/core-templates/steps/publish-pipeline-artifacts.yml b/src/arcade/eng/common/core-templates/steps/publish-pipeline-artifacts.yml new file mode 100644 index 00000000000..2efec04dc2c --- /dev/null +++ b/src/arcade/eng/common/core-templates/steps/publish-pipeline-artifacts.yml @@ -0,0 +1,20 @@ +parameters: +- name: is1ESPipeline + type: boolean + default: false + +- name: args + type: object + default: {} + +steps: +- ${{ if ne(parameters.is1ESPipeline, true) }}: + - template: /eng/common/templates/steps/publish-pipeline-artifacts.yml + parameters: + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} +- ${{ else }}: + - template: /eng/common/templates-official/steps/publish-pipeline-artifacts.yml + parameters: + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/core-templates/steps/retain-build.yml b/src/arcade/eng/common/core-templates/steps/retain-build.yml new file mode 100644 index 00000000000..83d97a26a01 --- /dev/null +++ b/src/arcade/eng/common/core-templates/steps/retain-build.yml @@ -0,0 +1,28 @@ +parameters: + # Optional azure devops PAT with build execute permissions for the build's organization, + # only needed if the build that should be retained ran on a different organization than + # the pipeline where this template is executing from + Token: '' + # Optional BuildId to retain, defaults to the current running build + BuildId: '' + # Azure devops Organization URI for the build in the https://dev.azure.com/ format. + # Defaults to the organization the current pipeline is running on + AzdoOrgUri: '$(System.CollectionUri)' + # Azure devops project for the build. Defaults to the project the current pipeline is running on + AzdoProject: '$(System.TeamProject)' + +steps: + - task: powershell@2 + inputs: + targetType: 'filePath' + filePath: eng/common/retain-build.ps1 + pwsh: true + arguments: > + -AzdoOrgUri: ${{parameters.AzdoOrgUri}} + -AzdoProject ${{parameters.AzdoProject}} + -Token ${{coalesce(parameters.Token, '$env:SYSTEM_ACCESSTOKEN') }} + -BuildId ${{coalesce(parameters.BuildId, '$env:BUILD_ID')}} + displayName: Enable permanent build retention + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + BUILD_ID: $(Build.BuildId) \ No newline at end of file diff --git a/src/arcade/eng/common/core-templates/steps/send-to-helix.yml b/src/arcade/eng/common/core-templates/steps/send-to-helix.yml new file mode 100644 index 00000000000..68fa739c4ab --- /dev/null +++ b/src/arcade/eng/common/core-templates/steps/send-to-helix.yml @@ -0,0 +1,93 @@ +# Please remember to update the documentation if you make changes to these parameters! +parameters: + HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/ + HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/' + HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number + HelixTargetQueues: '' # required -- semicolon-delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues + HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group + HelixProjectPath: 'eng/common/helixpublish.proj' # optional -- path to the project file to build relative to BUILD_SOURCESDIRECTORY + HelixProjectArguments: '' # optional -- arguments passed to the build command + HelixConfiguration: '' # optional -- additional property attached to a job + HelixPreCommands: '' # optional -- commands to run before Helix work item execution + HelixPostCommands: '' # optional -- commands to run after Helix work item execution + WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects + WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects + WorkItemTimeout: '' # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects + CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload + XUnitProjects: '' # optional -- semicolon-delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true + XUnitWorkItemTimeout: '' # optional -- the workitem timeout in seconds for all workitems created from the xUnit projects specified by XUnitProjects + XUnitPublishTargetFramework: '' # optional -- framework to use to publish your xUnit projects + XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner + XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects + IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion + DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json + DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json + WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." + IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set + HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting https://helix.int-dot.net ) + Creator: '' # optional -- if the build is external, use this to specify who is sending the job + DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO + condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() + continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false + +steps: + - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY/${{ parameters.HelixProjectPath }} /restore /p:TreatWarningsAsErrors=false ${{ parameters.HelixProjectArguments }} /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"' + displayName: ${{ parameters.DisplayNamePrefix }} (Windows) + env: + BuildConfig: $(_BuildConfig) + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixConfiguration: ${{ parameters.HelixConfiguration }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + WorkItemCommand: ${{ parameters.WorkItemCommand }} + WorkItemTimeout: ${{ parameters.WorkItemTimeout }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + XUnitProjects: ${{ parameters.XUnitProjects }} + XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} + XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} + XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} + XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + HelixBaseUri: ${{ parameters.HelixBaseUri }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} + - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/${{ parameters.HelixProjectPath }} /restore /p:TreatWarningsAsErrors=false ${{ parameters.HelixProjectArguments }} /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog + displayName: ${{ parameters.DisplayNamePrefix }} (Unix) + env: + BuildConfig: $(_BuildConfig) + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixConfiguration: ${{ parameters.HelixConfiguration }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + WorkItemCommand: ${{ parameters.WorkItemCommand }} + WorkItemTimeout: ${{ parameters.WorkItemTimeout }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + XUnitProjects: ${{ parameters.XUnitProjects }} + XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} + XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} + XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} + XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + HelixBaseUri: ${{ parameters.HelixBaseUri }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} diff --git a/src/arcade/eng/common/core-templates/variables/pool-providers.yml b/src/arcade/eng/common/core-templates/variables/pool-providers.yml new file mode 100644 index 00000000000..41053d382a2 --- /dev/null +++ b/src/arcade/eng/common/core-templates/variables/pool-providers.yml @@ -0,0 +1,8 @@ +parameters: + is1ESPipeline: false + +variables: + - ${{ if eq(parameters.is1ESPipeline, 'true') }}: + - template: /eng/common/templates-official/variables/pool-providers.yml + - ${{ else }}: + - template: /eng/common/templates/variables/pool-providers.yml \ No newline at end of file diff --git a/src/arcade/eng/common/cross/arm/tizen/tizen.patch b/src/arcade/eng/common/cross/arm/tizen/tizen.patch new file mode 100644 index 00000000000..fb12ade7250 --- /dev/null +++ b/src/arcade/eng/common/cross/arm/tizen/tizen.patch @@ -0,0 +1,9 @@ +diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so +--- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900 ++++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900 +@@ -2,4 +2,4 @@ + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ + OUTPUT_FORMAT(elf32-littlearm) +-GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) ) ++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-armhf.so.3 ) ) diff --git a/src/arcade/eng/common/cross/armel/tizen/tizen.patch b/src/arcade/eng/common/cross/armel/tizen/tizen.patch new file mode 100644 index 00000000000..ca7c7c1ff75 --- /dev/null +++ b/src/arcade/eng/common/cross/armel/tizen/tizen.patch @@ -0,0 +1,9 @@ +diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so +--- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900 ++++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900 +@@ -2,4 +2,4 @@ + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ + OUTPUT_FORMAT(elf32-littlearm) +-GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.3 ) ) ++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.3 ) ) diff --git a/src/arcade/eng/common/cross/riscv64/tizen/tizen.patch b/src/arcade/eng/common/cross/riscv64/tizen/tizen.patch new file mode 100644 index 00000000000..eb6d1c07470 --- /dev/null +++ b/src/arcade/eng/common/cross/riscv64/tizen/tizen.patch @@ -0,0 +1,9 @@ +diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so +--- a/usr/lib64/libc.so 2016-12-30 23:00:08.284951863 +0900 ++++ b/usr/lib64/libc.so 2016-12-30 23:00:32.140951815 +0900 +@@ -2,4 +2,4 @@ + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ + OUTPUT_FORMAT(elf64-littleriscv) +-GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-riscv64-lp64d.so.1 ) ) ++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-riscv64-lp64d.so.1 ) ) diff --git a/src/arcade/eng/common/cross/tizen-build-rootfs.sh b/src/arcade/eng/common/cross/tizen-build-rootfs.sh new file mode 100644 index 00000000000..ba31c93285f --- /dev/null +++ b/src/arcade/eng/common/cross/tizen-build-rootfs.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash +set -e + +ARCH=$1 +LINK_ARCH=$ARCH + +case "$ARCH" in + arm) + TIZEN_ARCH="armv7hl" + ;; + armel) + TIZEN_ARCH="armv7l" + LINK_ARCH="arm" + ;; + arm64) + TIZEN_ARCH="aarch64" + ;; + x86) + TIZEN_ARCH="i686" + ;; + x64) + TIZEN_ARCH="x86_64" + LINK_ARCH="x86" + ;; + riscv64) + TIZEN_ARCH="riscv64" + LINK_ARCH="riscv" + ;; + *) + echo "Unsupported architecture for tizen: $ARCH" + exit 1 +esac + +__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +__TIZEN_CROSSDIR="$__CrossDir/${ARCH}/tizen" + +if [[ -z "$ROOTFS_DIR" ]]; then + echo "ROOTFS_DIR is not defined." + exit 1; +fi + +TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp +mkdir -p $TIZEN_TMP_DIR + +# Download files +echo ">>Start downloading files" +VERBOSE=1 $__CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR $TIZEN_ARCH +echo "<>Start constructing Tizen rootfs" +TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm` +cd $ROOTFS_DIR +for f in $TIZEN_RPM_FILES; do + rpm2cpio $f | cpio -idm --quiet +done +echo "<>Start configuring Tizen rootfs" +ln -sfn asm-${LINK_ARCH} ./usr/include/asm +patch -p1 < $__TIZEN_CROSSDIR/tizen.patch +if [[ "$TIZEN_ARCH" == "riscv64" ]]; then + echo "Fixing broken symlinks in $PWD" + rm ./usr/lib64/libresolv.so + ln -s ../../lib64/libresolv.so.2 ./usr/lib64/libresolv.so + rm ./usr/lib64/libpthread.so + ln -s ../../lib64/libpthread.so.0 ./usr/lib64/libpthread.so + rm ./usr/lib64/libdl.so + ln -s ../../lib64/libdl.so.2 ./usr/lib64/libdl.so + rm ./usr/lib64/libutil.so + ln -s ../../lib64/libutil.so.1 ./usr/lib64/libutil.so + rm ./usr/lib64/libm.so + ln -s ../../lib64/libm.so.6 ./usr/lib64/libm.so + rm ./usr/lib64/librt.so + ln -s ../../lib64/librt.so.1 ./usr/lib64/librt.so + rm ./lib/ld-linux-riscv64-lp64d.so.1 + ln -s ../lib64/ld-linux-riscv64-lp64d.so.1 ./lib/ld-linux-riscv64-lp64d.so.1 +fi +echo "< 0 ]]; do + opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" + case "$opt" in + --darcversion) + darcVersion=$2 + shift + ;; + --versionendpoint) + versionEndpoint=$2 + shift + ;; + --verbosity) + verbosity=$2 + shift + ;; + --toolpath) + toolpath=$2 + shift + ;; + *) + echo "Invalid argument: $1" + usage + exit 1 + ;; + esac + + shift +done + +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. "$scriptroot/tools.sh" + +if [ -z "$darcVersion" ]; then + darcVersion=$(curl -X GET "$versionEndpoint" -H "accept: text/plain") +fi + +function InstallDarcCli { + local darc_cli_package_name="microsoft.dotnet.darc" + + InitializeDotNetCli true + local dotnet_root=$_InitializeDotNetCli + + if [ -z "$toolpath" ]; then + local tool_list=$($dotnet_root/dotnet tool list -g) + if [[ $tool_list = *$darc_cli_package_name* ]]; then + echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g) + fi + else + local tool_list=$($dotnet_root/dotnet tool list --tool-path "$toolpath") + if [[ $tool_list = *$darc_cli_package_name* ]]; then + echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path "$toolpath") + fi + fi + + local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" + + echo "Installing Darc CLI version $darcVersion..." + echo "You may need to restart your command shell if this is the first dotnet tool you have installed." + if [ -z "$toolpath" ]; then + echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g) + else + echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath") + fi +} + +InstallDarcCli diff --git a/src/arcade/eng/common/dotnet-install.cmd b/src/arcade/eng/common/dotnet-install.cmd new file mode 100644 index 00000000000..b1c2642e76f --- /dev/null +++ b/src/arcade/eng/common/dotnet-install.cmd @@ -0,0 +1,2 @@ +@echo off +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*" \ No newline at end of file diff --git a/src/arcade/eng/common/dotnet-install.ps1 b/src/arcade/eng/common/dotnet-install.ps1 new file mode 100644 index 00000000000..811f0f717f7 --- /dev/null +++ b/src/arcade/eng/common/dotnet-install.ps1 @@ -0,0 +1,28 @@ +[CmdletBinding(PositionalBinding=$false)] +Param( + [string] $verbosity = 'minimal', + [string] $architecture = '', + [string] $version = 'Latest', + [string] $runtime = 'dotnet', + [string] $RuntimeSourceFeed = '', + [string] $RuntimeSourceFeedKey = '' +) + +. $PSScriptRoot\tools.ps1 + +$dotnetRoot = Join-Path $RepoRoot '.dotnet' + +$installdir = $dotnetRoot +try { + if ($architecture -and $architecture.Trim() -eq 'x86') { + $installdir = Join-Path $installdir 'x86' + } + InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ + ExitWithExitCode 1 +} + +ExitWithExitCode 0 diff --git a/src/arcade/eng/common/dotnet-install.sh b/src/arcade/eng/common/dotnet-install.sh new file mode 100644 index 00000000000..7b9d97e3bd4 --- /dev/null +++ b/src/arcade/eng/common/dotnet-install.sh @@ -0,0 +1,94 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. "$scriptroot/tools.sh" + +version='Latest' +architecture='' +runtime='dotnet' +runtimeSourceFeed='' +runtimeSourceFeedKey='' +while [[ $# > 0 ]]; do + opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" + case "$opt" in + -version|-v) + shift + version="$1" + ;; + -architecture|-a) + shift + architecture="$1" + ;; + -runtime|-r) + shift + runtime="$1" + ;; + -runtimesourcefeed) + shift + runtimeSourceFeed="$1" + ;; + -runtimesourcefeedkey) + shift + runtimeSourceFeedKey="$1" + ;; + *) + Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1" + exit 1 + ;; + esac + shift +done + +# Use uname to determine what the CPU is, see https://en.wikipedia.org/wiki/Uname#Examples +cpuname=$(uname -m) +case $cpuname in + arm64|aarch64) + buildarch=arm64 + if [ "$(getconf LONG_BIT)" -lt 64 ]; then + # This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS) + buildarch=arm + fi + ;; + loongarch64) + buildarch=loongarch64 + ;; + amd64|x86_64) + buildarch=x64 + ;; + armv*l) + buildarch=arm + ;; + i[3-6]86) + buildarch=x86 + ;; + riscv64) + buildarch=riscv64 + ;; + *) + echo "Unknown CPU $cpuname detected, treating it as x64" + buildarch=x64 + ;; +esac + +dotnetRoot="${repo_root}.dotnet" +if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then + dotnetRoot="$dotnetRoot/$architecture" +fi + +InstallDotNet "$dotnetRoot" $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || { + local exit_code=$? + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2 + ExitWithExitCode $exit_code +} + +ExitWithExitCode 0 diff --git a/src/arcade/eng/common/enable-cross-org-publishing.ps1 b/src/arcade/eng/common/enable-cross-org-publishing.ps1 new file mode 100644 index 00000000000..da09da4f1fc --- /dev/null +++ b/src/arcade/eng/common/enable-cross-org-publishing.ps1 @@ -0,0 +1,13 @@ +param( + [string] $token +) + + +. $PSScriptRoot\pipeline-logging-functions.ps1 + +# Write-PipelineSetVariable will no-op if a variable named $ci is not defined +# Since this script is only ever called in AzDO builds, just universally set it +$ci = $true + +Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false diff --git a/src/arcade/eng/common/generate-locproject.ps1 b/src/arcade/eng/common/generate-locproject.ps1 new file mode 100644 index 00000000000..524aaa57f2b --- /dev/null +++ b/src/arcade/eng/common/generate-locproject.ps1 @@ -0,0 +1,189 @@ +Param( + [Parameter(Mandatory=$true)][string] $SourcesDirectory, # Directory where source files live; if using a Localize directory it should live in here + [string] $LanguageSet = 'VS_Main_Languages', # Language set to be used in the LocProject.json + [switch] $UseCheckedInLocProjectJson, # When set, generates a LocProject.json and compares it to one that already exists in the repo; otherwise just generates one + [switch] $CreateNeutralXlfs # Creates neutral xlf files. Only set to false when running locally +) + +# Generates LocProject.json files for the OneLocBuild task. OneLocBuildTask is described here: +# https://ceapex.visualstudio.com/CEINTL/_wiki/wikis/CEINTL.wiki/107/Localization-with-OneLocBuild-Task + +Set-StrictMode -Version 2.0 +$ErrorActionPreference = "Stop" +. $PSScriptRoot\pipeline-logging-functions.ps1 + +$exclusionsFilePath = "$SourcesDirectory\eng\Localize\LocExclusions.json" +$exclusions = @{ Exclusions = @() } +if (Test-Path -Path $exclusionsFilePath) +{ + $exclusions = Get-Content "$exclusionsFilePath" | ConvertFrom-Json +} + +Push-Location "$SourcesDirectory" # push location for Resolve-Path -Relative to work + +# Template files +$jsonFiles = @() +$jsonTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\.template\.config\\localize\\.+\.en\.json" } # .NET templating pattern +$jsonTemplateFiles | ForEach-Object { + $null = $_.Name -Match "(.+)\.[\w-]+\.json" # matches '[filename].[langcode].json + + $destinationFile = "$($_.Directory.FullName)\$($Matches.1).json" + $jsonFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru +} + +$jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern + +$wxlFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\.+\.wxl" -And -Not( $_.Directory.Name -Match "\d{4}" ) } # localized files live in four digit lang ID directories; this excludes them +if (-not $wxlFiles) { + $wxlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\1033\\.+\.wxl" } # pick up en files (1033 = en) specifically so we can copy them to use as the neutral xlf files + if ($wxlEnFiles) { + $wxlFiles = @() + $wxlEnFiles | ForEach-Object { + $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)" + $wxlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru + } + } +} + +$macosHtmlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\.lproj\\.+\.html$" } # add installer HTML files +$macosHtmlFiles = @() +if ($macosHtmlEnFiles) { + $macosHtmlEnFiles | ForEach-Object { + $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)" + $macosHtmlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru + } +} + +$xlfFiles = @() + +$allXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.xlf" +$langXlfFiles = @() +if ($allXlfFiles) { + $null = $allXlfFiles[0].FullName -Match "\.([\w-]+)\.xlf" # matches '[langcode].xlf' + $firstLangCode = $Matches.1 + $langXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.$firstLangCode.xlf" +} +$langXlfFiles | ForEach-Object { + $null = $_.Name -Match "(.+)\.[\w-]+\.xlf" # matches '[filename].[langcode].xlf + + $destinationFile = "$($_.Directory.FullName)\$($Matches.1).xlf" + $xlfFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru +} + +$locFiles = $jsonFiles + $jsonWinformsTemplateFiles + $xlfFiles + +$locJson = @{ + Projects = @( + @{ + LanguageSet = $LanguageSet + LocItems = @( + $locFiles | ForEach-Object { + $outputPath = "$(($_.DirectoryName | Resolve-Path -Relative) + "\")" + $continue = $true + foreach ($exclusion in $exclusions.Exclusions) { + if ($_.FullName.Contains($exclusion)) + { + $continue = $false + } + } + $sourceFile = ($_.FullName | Resolve-Path -Relative) + if (!$CreateNeutralXlfs -and $_.Extension -eq '.xlf') { + Remove-Item -Path $sourceFile + } + if ($continue) + { + if ($_.Directory.Name -eq 'en' -and $_.Extension -eq '.json') { + return @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnPath" + OutputPath = "$($_.Directory.Parent.FullName | Resolve-Path -Relative)\" + } + } else { + return @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnName" + OutputPath = $outputPath + } + } + } + } + ) + }, + @{ + LanguageSet = $LanguageSet + CloneLanguageSet = "WiX_CloneLanguages" + LssFiles = @( "wxl_loc.lss" ) + LocItems = @( + $wxlFiles | ForEach-Object { + $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" + $continue = $true + foreach ($exclusion in $exclusions.Exclusions) { + if ($_.FullName.Contains($exclusion)) { + $continue = $false + } + } + $sourceFile = ($_.FullName | Resolve-Path -Relative) + if ($continue) + { + return @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnPath" + OutputPath = $outputPath + } + } + } + ) + }, + @{ + LanguageSet = $LanguageSet + CloneLanguageSet = "VS_macOS_CloneLanguages" + LssFiles = @( ".\eng\common\loc\P22DotNetHtmlLocalization.lss" ) + LocItems = @( + $macosHtmlFiles | ForEach-Object { + $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" + $continue = $true + foreach ($exclusion in $exclusions.Exclusions) { + if ($_.FullName.Contains($exclusion)) { + $continue = $false + } + } + $sourceFile = ($_.FullName | Resolve-Path -Relative) + $lciFile = $sourceFile + ".lci" + if ($continue) { + $result = @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnPath" + OutputPath = $outputPath + } + if (Test-Path $lciFile -PathType Leaf) { + $result["LciFile"] = $lciFile + } + return $result + } + } + ) + } + ) +} + +$json = ConvertTo-Json $locJson -Depth 5 +Write-Host "LocProject.json generated:`n`n$json`n`n" +Pop-Location + +if (!$UseCheckedInLocProjectJson) { + New-Item "$SourcesDirectory\eng\Localize\LocProject.json" -Force # Need this to make sure the Localize directory is created + Set-Content "$SourcesDirectory\eng\Localize\LocProject.json" $json +} +else { + New-Item "$SourcesDirectory\eng\Localize\LocProject-generated.json" -Force # Need this to make sure the Localize directory is created + Set-Content "$SourcesDirectory\eng\Localize\LocProject-generated.json" $json + + if ((Get-FileHash "$SourcesDirectory\eng\Localize\LocProject-generated.json").Hash -ne (Get-FileHash "$SourcesDirectory\eng\Localize\LocProject.json").Hash) { + Write-PipelineTelemetryError -Category "OneLocBuild" -Message "Existing LocProject.json differs from generated LocProject.json. Download LocProject-generated.json and compare them." + + exit 1 + } + else { + Write-Host "Generated LocProject.json and current LocProject.json are identical." + } +} diff --git a/src/arcade/eng/common/generate-sbom-prep.ps1 b/src/arcade/eng/common/generate-sbom-prep.ps1 new file mode 100644 index 00000000000..a0c7d792a76 --- /dev/null +++ b/src/arcade/eng/common/generate-sbom-prep.ps1 @@ -0,0 +1,29 @@ +Param( + [Parameter(Mandatory=$true)][string] $ManifestDirPath # Manifest directory where sbom will be placed +) + +. $PSScriptRoot\pipeline-logging-functions.ps1 + +# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly +# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. +$ArtifactName = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" +$SafeArtifactName = $ArtifactName -replace '["/:<>\\|?@*"() ]', '_' +$SbomGenerationDir = Join-Path $ManifestDirPath $SafeArtifactName + +Write-Host "Artifact name before : $ArtifactName" +Write-Host "Artifact name after : $SafeArtifactName" + +Write-Host "Creating dir $ManifestDirPath" + +# create directory for sbom manifest to be placed +if (!(Test-Path -path $SbomGenerationDir)) +{ + New-Item -ItemType Directory -path $SbomGenerationDir + Write-Host "Successfully created directory $SbomGenerationDir" +} +else{ + Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." +} + +Write-Host "Updating artifact name" +Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$SafeArtifactName" diff --git a/src/arcade/eng/common/generate-sbom-prep.sh b/src/arcade/eng/common/generate-sbom-prep.sh new file mode 100644 index 00000000000..b8ecca72bbf --- /dev/null +++ b/src/arcade/eng/common/generate-sbom-prep.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" + +# resolve $SOURCE until the file is no longer a symlink +while [[ -h $source ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" +. $scriptroot/pipeline-logging-functions.sh + + +# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts. +artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM" +safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}" +manifest_dir=$1 + +# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly +# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. +sbom_generation_dir="$manifest_dir/$safe_artifact_name" + +if [ ! -d "$sbom_generation_dir" ] ; then + mkdir -p "$sbom_generation_dir" + echo "Sbom directory created." $sbom_generation_dir +else + Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." +fi + +echo "Artifact name before : "$artifact_name +echo "Artifact name after : "$safe_artifact_name +export ARTIFACT_NAME=$safe_artifact_name +echo "##vso[task.setvariable variable=ARTIFACT_NAME]$safe_artifact_name" + +exit 0 diff --git a/src/arcade/eng/common/helixpublish.proj b/src/arcade/eng/common/helixpublish.proj new file mode 100644 index 00000000000..c1323bf4121 --- /dev/null +++ b/src/arcade/eng/common/helixpublish.proj @@ -0,0 +1,27 @@ + + + + + msbuild + + + + + %(Identity) + + + + + + $(WorkItemDirectory) + $(WorkItemCommand) + $(WorkItemTimeout) + + + + + + + + + diff --git a/src/arcade/eng/common/init-tools-native.ps1 b/src/arcade/eng/common/init-tools-native.ps1 new file mode 100644 index 00000000000..27ccdb9ecc9 --- /dev/null +++ b/src/arcade/eng/common/init-tools-native.ps1 @@ -0,0 +1,203 @@ +<# +.SYNOPSIS +Entry point script for installing native tools + +.DESCRIPTION +Reads $RepoRoot\global.json file to determine native assets to install +and executes installers for those tools + +.PARAMETER BaseUri +Base file directory or Url from which to acquire tool archives + +.PARAMETER InstallDirectory +Directory to install native toolset. This is a command-line override for the default +Install directory precedence order: +- InstallDirectory command-line override +- NETCOREENG_INSTALL_DIRECTORY environment variable +- (default) %USERPROFILE%/.netcoreeng/native + +.PARAMETER Clean +Switch specifying to not install anything, but cleanup native asset folders + +.PARAMETER Force +Clean and then install tools + +.PARAMETER DownloadRetries +Total number of retry attempts + +.PARAMETER RetryWaitTimeInSeconds +Wait time between retry attempts in seconds + +.PARAMETER GlobalJsonFile +File path to global.json file + +.PARAMETER PathPromotion +Optional switch to enable either promote native tools specified in the global.json to the path (in Azure Pipelines) +or break the build if a native tool is not found on the path (on a local dev machine) + +.NOTES +#> +[CmdletBinding(PositionalBinding=$false)] +Param ( + [string] $BaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external', + [string] $InstallDirectory, + [switch] $Clean = $False, + [switch] $Force = $False, + [int] $DownloadRetries = 5, + [int] $RetryWaitTimeInSeconds = 30, + [string] $GlobalJsonFile, + [switch] $PathPromotion +) + +if (!$GlobalJsonFile) { + $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName 'global.json' +} + +Set-StrictMode -version 2.0 +$ErrorActionPreference='Stop' + +. $PSScriptRoot\pipeline-logging-functions.ps1 +Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1') + +try { + # Define verbose switch if undefined + $Verbose = $VerbosePreference -Eq 'Continue' + + $EngCommonBaseDir = Join-Path $PSScriptRoot 'native\' + $NativeBaseDir = $InstallDirectory + if (!$NativeBaseDir) { + $NativeBaseDir = CommonLibrary\Get-NativeInstallDirectory + } + $Env:CommonLibrary_NativeInstallDir = $NativeBaseDir + $InstallBin = Join-Path $NativeBaseDir 'bin' + $InstallerPath = Join-Path $EngCommonBaseDir 'install-tool.ps1' + + # Process tools list + Write-Host "Processing $GlobalJsonFile" + If (-Not (Test-Path $GlobalJsonFile)) { + Write-Host "Unable to find '$GlobalJsonFile'" + exit 0 + } + $NativeTools = Get-Content($GlobalJsonFile) -Raw | + ConvertFrom-Json | + Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue + if ($NativeTools) { + if ($PathPromotion -eq $True) { + $ArcadeToolsDirectory = "$env:SYSTEMDRIVE\arcade-tools" + if (Test-Path $ArcadeToolsDirectory) { # if this directory exists, we should use native tools on machine + $NativeTools.PSObject.Properties | ForEach-Object { + $ToolName = $_.Name + $ToolVersion = $_.Value + $InstalledTools = @{} + + if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) { + if ($ToolVersion -eq "latest") { + $ToolVersion = "" + } + $ToolDirectories = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending) + if ($ToolDirectories -eq $null) { + Write-Error "Unable to find directory for $ToolName $ToolVersion; please make sure the tool is installed on this image." + exit 1 + } + $ToolDirectory = $ToolDirectories[0] + $BinPathFile = "$($ToolDirectory.FullName)\binpath.txt" + if (-not (Test-Path -Path "$BinPathFile")) { + Write-Error "Unable to find binpath.txt in '$($ToolDirectory.FullName)' ($ToolName $ToolVersion); artifact is either installed incorrectly or is not a bootstrappable tool." + exit 1 + } + $BinPath = Get-Content "$BinPathFile" + $ToolPath = Convert-Path -Path $BinPath + Write-Host "Adding $ToolName to the path ($ToolPath)..." + Write-Host "##vso[task.prependpath]$ToolPath" + $env:PATH = "$ToolPath;$env:PATH" + $InstalledTools += @{ $ToolName = $ToolDirectory.FullName } + } + } + return $InstalledTools + } else { + $NativeTools.PSObject.Properties | ForEach-Object { + $ToolName = $_.Name + $ToolVersion = $_.Value + + if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) { + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "$ToolName not found on path. Please install $ToolName $ToolVersion before proceeding." + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "If this is running on a build machine, the arcade-tools directory was not found, which means there's an error with the image." + } + } + exit 0 + } + } else { + $NativeTools.PSObject.Properties | ForEach-Object { + $ToolName = $_.Name + $ToolVersion = $_.Value + $LocalInstallerArguments = @{ ToolName = "$ToolName" } + $LocalInstallerArguments += @{ InstallPath = "$InstallBin" } + $LocalInstallerArguments += @{ BaseUri = "$BaseUri" } + $LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" } + $LocalInstallerArguments += @{ Version = "$ToolVersion" } + + if ($Verbose) { + $LocalInstallerArguments += @{ Verbose = $True } + } + if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') { + if($Force) { + $LocalInstallerArguments += @{ Force = $True } + } + } + if ($Clean) { + $LocalInstallerArguments += @{ Clean = $True } + } + + Write-Verbose "Installing $ToolName version $ToolVersion" + Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'" + & $InstallerPath @LocalInstallerArguments + if ($LASTEXITCODE -Ne "0") { + $errMsg = "$ToolName installation failed" + if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) { + $showNativeToolsWarning = $true + if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) { + $showNativeToolsWarning = $false + } + if ($showNativeToolsWarning) { + Write-Warning $errMsg + } + $toolInstallationFailure = $true + } else { + # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 + Write-Host $errMsg + exit 1 + } + } + } + + if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) { + # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 + Write-Host 'Native tools bootstrap failed' + exit 1 + } + } + } + else { + Write-Host 'No native tools defined in global.json' + exit 0 + } + + if ($Clean) { + exit 0 + } + if (Test-Path $InstallBin) { + Write-Host 'Native tools are available from ' (Convert-Path -Path $InstallBin) + Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)" + return $InstallBin + } + elseif (-not ($PathPromotion)) { + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed' + exit 1 + } + exit 0 +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_ + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/init-tools-native.sh b/src/arcade/eng/common/init-tools-native.sh new file mode 100644 index 00000000000..3e6a8d6acf2 --- /dev/null +++ b/src/arcade/eng/common/init-tools-native.sh @@ -0,0 +1,238 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +base_uri='https://netcorenativeassets.blob.core.windows.net/resource-packages/external' +install_directory='' +clean=false +force=false +download_retries=5 +retry_wait_time_seconds=30 +global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json" +declare -a native_assets + +. $scriptroot/pipeline-logging-functions.sh +. $scriptroot/native/common-library.sh + +while (($# > 0)); do + lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" + case $lowerI in + --baseuri) + base_uri=$2 + shift 2 + ;; + --installdirectory) + install_directory=$2 + shift 2 + ;; + --clean) + clean=true + shift 1 + ;; + --force) + force=true + shift 1 + ;; + --donotabortonfailure) + donotabortonfailure=true + shift 1 + ;; + --donotdisplaywarnings) + donotdisplaywarnings=true + shift 1 + ;; + --downloadretries) + download_retries=$2 + shift 2 + ;; + --retrywaittimeseconds) + retry_wait_time_seconds=$2 + shift 2 + ;; + --help) + echo "Common settings:" + echo " --installdirectory Directory to install native toolset." + echo " This is a command-line override for the default" + echo " Install directory precedence order:" + echo " - InstallDirectory command-line override" + echo " - NETCOREENG_INSTALL_DIRECTORY environment variable" + echo " - (default) %USERPROFILE%/.netcoreeng/native" + echo "" + echo " --clean Switch specifying not to install anything, but cleanup native asset folders" + echo " --donotabortonfailure Switch specifiying whether to abort native tools installation on failure" + echo " --donotdisplaywarnings Switch specifiying whether to display warnings during native tools installation on failure" + echo " --force Clean and then install tools" + echo " --help Print help and exit" + echo "" + echo "Advanced settings:" + echo " --baseuri Base URI for where to download native tools from" + echo " --downloadretries Number of times a download should be attempted" + echo " --retrywaittimeseconds Wait time between download attempts" + echo "" + exit 0 + ;; + esac +done + +function ReadGlobalJsonNativeTools { + # happy path: we have a proper JSON parsing tool `jq(1)` in PATH! + if command -v jq &> /dev/null; then + + # jq: read each key/value pair under "native-tools" entry and emit: + # KEY="" VALUE="" + # followed by a null byte. + # + # bash: read line with null byte delimeter and push to array (for later `eval`uation). + + while IFS= read -rd '' line; do + native_assets+=("$line") + done < <(jq -r '. | + select(has("native-tools")) | + ."native-tools" | + keys[] as $k | + @sh "KEY=\($k) VALUE=\(.[$k])\u0000"' "$global_json_file") + + return + fi + + # Warning: falling back to manually parsing JSON, which is not recommended. + + # Following routine matches the output and escaping logic of jq(1)'s @sh formatter used above. + # It has been tested with several weird strings with escaped characters in entries (key and value) + # and results were compared with the output of jq(1) in binary representation using xxd(1); + # just before the assignment to 'native_assets' array (above and below). + + # try to capture the section under "native-tools". + if [[ ! "$(cat "$global_json_file")" =~ \"native-tools\"[[:space:]\:\{]*([^\}]+) ]]; then + return + fi + + section="${BASH_REMATCH[1]}" + + parseStarted=0 + possibleEnd=0 + escaping=0 + escaped=0 + isKey=1 + + for (( i=0; i<${#section}; i++ )); do + char="${section:$i:1}" + if ! ((parseStarted)) && [[ "$char" =~ [[:space:],:] ]]; then continue; fi + + if ! ((escaping)) && [[ "$char" == "\\" ]]; then + escaping=1 + elif ((escaping)) && ! ((escaped)); then + escaped=1 + fi + + if ! ((parseStarted)) && [[ "$char" == "\"" ]]; then + parseStarted=1 + possibleEnd=0 + elif [[ "$char" == "'" ]]; then + token="$token'\\\''" + possibleEnd=0 + elif ((escaping)) || [[ "$char" != "\"" ]]; then + token="$token$char" + possibleEnd=1 + fi + + if ((possibleEnd)) && ! ((escaping)) && [[ "$char" == "\"" ]]; then + # Use printf to unescape token to match jq(1)'s @sh formatting rules. + # do not use 'token="$(printf "$token")"' syntax, as $() eats the trailing linefeed. + printf -v token "'$token'" + + if ((isKey)); then + KEY="$token" + isKey=0 + else + line="KEY=$KEY VALUE=$token" + native_assets+=("$line") + isKey=1 + fi + + # reset for next token + parseStarted=0 + token= + elif ((escaping)) && ((escaped)); then + escaping=0 + escaped=0 + fi + done +} + +native_base_dir=$install_directory +if [[ -z $install_directory ]]; then + native_base_dir=$(GetNativeInstallDirectory) +fi + +install_bin="${native_base_dir}/bin" +installed_any=false + +ReadGlobalJsonNativeTools + +if [[ ${#native_assets[@]} -eq 0 ]]; then + echo "No native tools defined in global.json" + exit 0; +else + native_installer_dir="$scriptroot/native" + for index in "${!native_assets[@]}"; do + eval "${native_assets["$index"]}" + + installer_path="$native_installer_dir/install-$KEY.sh" + installer_command="$installer_path" + installer_command+=" --baseuri $base_uri" + installer_command+=" --installpath $install_bin" + installer_command+=" --version $VALUE" + echo $installer_command + + if [[ $force = true ]]; then + installer_command+=" --force" + fi + + if [[ $clean = true ]]; then + installer_command+=" --clean" + fi + + if [[ -a $installer_path ]]; then + $installer_command + if [[ $? != 0 ]]; then + if [[ $donotabortonfailure = true ]]; then + if [[ $donotdisplaywarnings != true ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed" + fi + else + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed" + exit 1 + fi + else + $installed_any = true + fi + else + if [[ $donotabortonfailure == true ]]; then + if [[ $donotdisplaywarnings != true ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed: no install script" + fi + else + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed: no install script" + exit 1 + fi + fi + done +fi + +if [[ $clean = true ]]; then + exit 0 +fi + +if [[ -d $install_bin ]]; then + echo "Native tools are available from $install_bin" + echo "##vso[task.prependpath]$install_bin" +else + if [[ $installed_any = true ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Native tools install directory does not exist, installation failed" + exit 1 + fi +fi + +exit 0 diff --git a/src/arcade/eng/common/internal-feed-operations.ps1 b/src/arcade/eng/common/internal-feed-operations.ps1 new file mode 100644 index 00000000000..92b77347d99 --- /dev/null +++ b/src/arcade/eng/common/internal-feed-operations.ps1 @@ -0,0 +1,132 @@ +param( + [Parameter(Mandatory=$true)][string] $Operation, + [string] $AuthToken, + [string] $CommitSha, + [string] $RepoName, + [switch] $IsFeedPrivate +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 +. $PSScriptRoot\tools.ps1 + +# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed +# in build agents by CredProvider to authenticate the restore requests to internal feeds as specified in +# https://github.com/microsoft/artifacts-credprovider/blob/0f53327cd12fd893d8627d7b08a2171bf5852a41/README.md#environment-variables. This should ONLY be called from identified +# internal builds +function SetupCredProvider { + param( + [string] $AuthToken + ) + + # Install the Cred Provider NuGet plugin + Write-Host 'Setting up Cred Provider NuGet plugin in the agent...' + Write-Host "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..." + + $url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1' + + Write-Host "Writing the contents of 'installcredprovider.ps1' locally..." + Invoke-WebRequest $url -OutFile installcredprovider.ps1 + + Write-Host 'Installing plugin...' + .\installcredprovider.ps1 -Force + + Write-Host "Deleting local copy of 'installcredprovider.ps1'..." + Remove-Item .\installcredprovider.ps1 + + if (-Not("$env:USERPROFILE\.nuget\plugins\netcore")) { + Write-PipelineTelemetryError -Category 'Arcade' -Message 'CredProvider plugin was not installed correctly!' + ExitWithExitCode 1 + } + else { + Write-Host 'CredProvider plugin was installed correctly!' + } + + # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable + # feeds successfully + + $nugetConfigPath = Join-Path $RepoRoot "NuGet.config" + + if (-Not (Test-Path -Path $nugetConfigPath)) { + Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!' + ExitWithExitCode 1 + } + + $endpoints = New-Object System.Collections.ArrayList + $nugetConfigPackageSources = Select-Xml -Path $nugetConfigPath -XPath "//packageSources/add[contains(@key, 'darc-int-')]/@value" | foreach{$_.Node.Value} + + if (($nugetConfigPackageSources | Measure-Object).Count -gt 0 ) { + foreach ($stableRestoreResource in $nugetConfigPackageSources) { + $trimmedResource = ([string]$stableRestoreResource).Trim() + [void]$endpoints.Add(@{endpoint="$trimmedResource"; password="$AuthToken"}) + } + } + + if (($endpoints | Measure-Object).Count -gt 0) { + $endpointCredentials = @{endpointCredentials=$endpoints} | ConvertTo-Json -Compress + + # Create the environment variables the AzDo way + Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $endpointCredentials -Properties @{ + 'variable' = 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' + 'issecret' = 'false' + } + + # We don't want sessions cached since we will be updating the endpoints quite frequently + Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data 'False' -Properties @{ + 'variable' = 'NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED' + 'issecret' = 'false' + } + } + else + { + Write-Host 'No internal endpoints found in NuGet.config' + } +} + +#Workaround for https://github.com/microsoft/msbuild/issues/4430 +function InstallDotNetSdkAndRestoreArcade { + $dotnetTempDir = Join-Path $RepoRoot "dotnet" + $dotnetSdkVersion="2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*) + $dotnet = "$dotnetTempDir\dotnet.exe" + $restoreProjPath = "$PSScriptRoot\restore.proj" + + Write-Host "Installing dotnet SDK version $dotnetSdkVersion to restore Arcade SDK..." + InstallDotNetSdk "$dotnetTempDir" "$dotnetSdkVersion" + + '' | Out-File "$restoreProjPath" + + & $dotnet restore $restoreProjPath + + Write-Host 'Arcade SDK restored!' + + if (Test-Path -Path $restoreProjPath) { + Remove-Item $restoreProjPath + } + + if (Test-Path -Path $dotnetTempDir) { + Remove-Item $dotnetTempDir -Recurse + } +} + +try { + Push-Location $PSScriptRoot + + if ($Operation -like 'setup') { + SetupCredProvider $AuthToken + } + elseif ($Operation -like 'install-restore') { + InstallDotNetSdkAndRestoreArcade + } + else { + Write-PipelineTelemetryError -Category 'Arcade' -Message "Unknown operation '$Operation'!" + ExitWithExitCode 1 + } +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Arcade' -Message $_ + ExitWithExitCode 1 +} +finally { + Pop-Location +} diff --git a/src/arcade/eng/common/internal-feed-operations.sh b/src/arcade/eng/common/internal-feed-operations.sh new file mode 100644 index 00000000000..9378223ba09 --- /dev/null +++ b/src/arcade/eng/common/internal-feed-operations.sh @@ -0,0 +1,141 @@ +#!/usr/bin/env bash + +set -e + +# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed +# in build agents by CredProvider to authenticate the restore requests to internal feeds as specified in +# https://github.com/microsoft/artifacts-credprovider/blob/0f53327cd12fd893d8627d7b08a2171bf5852a41/README.md#environment-variables. +# This should ONLY be called from identified internal builds +function SetupCredProvider { + local authToken=$1 + + # Install the Cred Provider NuGet plugin + echo "Setting up Cred Provider NuGet plugin in the agent..."... + echo "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..." + + local url="https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh" + + echo "Writing the contents of 'installcredprovider.ps1' locally..." + local installcredproviderPath="installcredprovider.sh" + if command -v curl > /dev/null; then + curl $url > "$installcredproviderPath" + else + wget -q -O "$installcredproviderPath" "$url" + fi + + echo "Installing plugin..." + . "$installcredproviderPath" + + echo "Deleting local copy of 'installcredprovider.sh'..." + rm installcredprovider.sh + + if [ ! -d "$HOME/.nuget/plugins" ]; then + Write-PipelineTelemetryError -category 'Build' 'CredProvider plugin was not installed correctly!' + ExitWithExitCode 1 + else + echo "CredProvider plugin was installed correctly!" + fi + + # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable + # feeds successfully + + local nugetConfigPath="{$repo_root}NuGet.config" + + if [ ! "$nugetConfigPath" ]; then + Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!" + ExitWithExitCode 1 + fi + + local endpoints='[' + local nugetConfigPackageValues=`cat "$nugetConfigPath" | grep "key=\"darc-int-"` + local pattern="value=\"(.*)\"" + + for value in $nugetConfigPackageValues + do + if [[ $value =~ $pattern ]]; then + local endpoint="${BASH_REMATCH[1]}" + endpoints+="{\"endpoint\": \"$endpoint\", \"password\": \"$authToken\"}," + fi + done + + endpoints=${endpoints%?} + endpoints+=']' + + if [ ${#endpoints} -gt 2 ]; then + local endpointCredentials="{\"endpointCredentials\": "$endpoints"}" + + echo "##vso[task.setvariable variable=VSS_NUGET_EXTERNAL_FEED_ENDPOINTS]$endpointCredentials" + echo "##vso[task.setvariable variable=NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED]False" + else + echo "No internal endpoints found in NuGet.config" + fi +} + +# Workaround for https://github.com/microsoft/msbuild/issues/4430 +function InstallDotNetSdkAndRestoreArcade { + local dotnetTempDir="$repo_root/dotnet" + local dotnetSdkVersion="2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*) + local restoreProjPath="$repo_root/eng/common/restore.proj" + + echo "Installing dotnet SDK version $dotnetSdkVersion to restore Arcade SDK..." + echo "" > "$restoreProjPath" + + InstallDotNetSdk "$dotnetTempDir" "$dotnetSdkVersion" + + local res=`$dotnetTempDir/dotnet restore $restoreProjPath` + echo "Arcade SDK restored!" + + # Cleanup + if [ "$restoreProjPath" ]; then + rm "$restoreProjPath" + fi + + if [ "$dotnetTempDir" ]; then + rm -r $dotnetTempDir + fi +} + +source="${BASH_SOURCE[0]}" +operation='' +authToken='' +repoName='' + +while [[ $# > 0 ]]; do + opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" + case "$opt" in + --operation) + operation=$2 + shift + ;; + --authtoken) + authToken=$2 + shift + ;; + *) + echo "Invalid argument: $1" + usage + exit 1 + ;; + esac + + shift +done + +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. "$scriptroot/tools.sh" + +if [ "$operation" = "setup" ]; then + SetupCredProvider $authToken +elif [ "$operation" = "install-restore" ]; then + InstallDotNetSdkAndRestoreArcade +else + echo "Unknown operation '$operation'!" +fi diff --git a/src/arcade/eng/common/internal/Directory.Build.props b/src/arcade/eng/common/internal/Directory.Build.props new file mode 100644 index 00000000000..f1d041c33da --- /dev/null +++ b/src/arcade/eng/common/internal/Directory.Build.props @@ -0,0 +1,11 @@ + + + + + false + false + + + + + diff --git a/src/arcade/eng/common/internal/NuGet.config b/src/arcade/eng/common/internal/NuGet.config new file mode 100644 index 00000000000..19d3d311b16 --- /dev/null +++ b/src/arcade/eng/common/internal/NuGet.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/arcade/eng/common/internal/Tools.csproj b/src/arcade/eng/common/internal/Tools.csproj new file mode 100644 index 00000000000..feaa6d20812 --- /dev/null +++ b/src/arcade/eng/common/internal/Tools.csproj @@ -0,0 +1,22 @@ + + + + + net472 + false + false + + + + + + + + + + + + + + + diff --git a/src/arcade/eng/common/loc/P22DotNetHtmlLocalization.lss b/src/arcade/eng/common/loc/P22DotNetHtmlLocalization.lss new file mode 100644 index 00000000000..5d892d61939 --- /dev/null +++ b/src/arcade/eng/common/loc/P22DotNetHtmlLocalization.lss @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/arcade/eng/common/msbuild.ps1 b/src/arcade/eng/common/msbuild.ps1 new file mode 100644 index 00000000000..f041e5ddd95 --- /dev/null +++ b/src/arcade/eng/common/msbuild.ps1 @@ -0,0 +1,28 @@ +[CmdletBinding(PositionalBinding=$false)] +Param( + [string] $verbosity = 'minimal', + [bool] $warnAsError = $true, + [bool] $nodeReuse = $true, + [switch] $ci, + [switch] $prepareMachine, + [switch] $excludePrereleaseVS, + [string] $msbuildEngine = $null, + [Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs +) + +. $PSScriptRoot\tools.ps1 + +try { + if ($ci) { + $nodeReuse = $false + } + + MSBuild @extraArgs +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Build' -Message $_ + ExitWithExitCode 1 +} + +ExitWithExitCode 0 \ No newline at end of file diff --git a/src/arcade/eng/common/msbuild.sh b/src/arcade/eng/common/msbuild.sh new file mode 100644 index 00000000000..20d3dad5435 --- /dev/null +++ b/src/arcade/eng/common/msbuild.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" + +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +verbosity='minimal' +warn_as_error=true +node_reuse=true +prepare_machine=false +extra_args='' + +while (($# > 0)); do + lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" + case $lowerI in + --verbosity) + verbosity=$2 + shift 2 + ;; + --warnaserror) + warn_as_error=$2 + shift 2 + ;; + --nodereuse) + node_reuse=$2 + shift 2 + ;; + --ci) + ci=true + shift 1 + ;; + --preparemachine) + prepare_machine=true + shift 1 + ;; + *) + extra_args="$extra_args $1" + shift 1 + ;; + esac +done + +. "$scriptroot/tools.sh" + +if [[ "$ci" == true ]]; then + node_reuse=false +fi + +MSBuild $extra_args +ExitWithExitCode 0 diff --git a/src/arcade/eng/common/native/CommonLibrary.psm1 b/src/arcade/eng/common/native/CommonLibrary.psm1 new file mode 100644 index 00000000000..f71f6af6cdb --- /dev/null +++ b/src/arcade/eng/common/native/CommonLibrary.psm1 @@ -0,0 +1,401 @@ +<# +.SYNOPSIS +Helper module to install an archive to a directory + +.DESCRIPTION +Helper module to download and extract an archive to a specified directory + +.PARAMETER Uri +Uri of artifact to download + +.PARAMETER InstallDirectory +Directory to extract artifact contents to + +.PARAMETER Force +Force download / extraction if file or contents already exist. Default = False + +.PARAMETER DownloadRetries +Total number of retry attempts. Default = 5 + +.PARAMETER RetryWaitTimeInSeconds +Wait time between retry attempts in seconds. Default = 30 + +.NOTES +Returns False if download or extraction fail, True otherwise +#> +function DownloadAndExtract { + [CmdletBinding(PositionalBinding=$false)] + Param ( + [Parameter(Mandatory=$True)] + [string] $Uri, + [Parameter(Mandatory=$True)] + [string] $InstallDirectory, + [switch] $Force = $False, + [int] $DownloadRetries = 5, + [int] $RetryWaitTimeInSeconds = 30 + ) + # Define verbose switch if undefined + $Verbose = $VerbosePreference -Eq "Continue" + + $TempToolPath = CommonLibrary\Get-TempPathFilename -Path $Uri + + # Download native tool + $DownloadStatus = CommonLibrary\Get-File -Uri $Uri ` + -Path $TempToolPath ` + -DownloadRetries $DownloadRetries ` + -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds ` + -Force:$Force ` + -Verbose:$Verbose + + if ($DownloadStatus -Eq $False) { + Write-Error "Download failed from $Uri" + return $False + } + + # Extract native tool + $UnzipStatus = CommonLibrary\Expand-Zip -ZipPath $TempToolPath ` + -OutputDirectory $InstallDirectory ` + -Force:$Force ` + -Verbose:$Verbose + + if ($UnzipStatus -Eq $False) { + # Retry Download one more time with Force=true + $DownloadRetryStatus = CommonLibrary\Get-File -Uri $Uri ` + -Path $TempToolPath ` + -DownloadRetries 1 ` + -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds ` + -Force:$True ` + -Verbose:$Verbose + + if ($DownloadRetryStatus -Eq $False) { + Write-Error "Last attempt of download failed as well" + return $False + } + + # Retry unzip again one more time with Force=true + $UnzipRetryStatus = CommonLibrary\Expand-Zip -ZipPath $TempToolPath ` + -OutputDirectory $InstallDirectory ` + -Force:$True ` + -Verbose:$Verbose + if ($UnzipRetryStatus -Eq $False) + { + Write-Error "Last attempt of unzip failed as well" + # Clean up partial zips and extracts + if (Test-Path $TempToolPath) { + Remove-Item $TempToolPath -Force + } + if (Test-Path $InstallDirectory) { + Remove-Item $InstallDirectory -Force -Recurse + } + return $False + } + } + + return $True +} + +<# +.SYNOPSIS +Download a file, retry on failure + +.DESCRIPTION +Download specified file and retry if attempt fails + +.PARAMETER Uri +Uri of file to download. If Uri is a local path, the file will be copied instead of downloaded + +.PARAMETER Path +Path to download or copy uri file to + +.PARAMETER Force +Overwrite existing file if present. Default = False + +.PARAMETER DownloadRetries +Total number of retry attempts. Default = 5 + +.PARAMETER RetryWaitTimeInSeconds +Wait time between retry attempts in seconds Default = 30 + +#> +function Get-File { + [CmdletBinding(PositionalBinding=$false)] + Param ( + [Parameter(Mandatory=$True)] + [string] $Uri, + [Parameter(Mandatory=$True)] + [string] $Path, + [int] $DownloadRetries = 5, + [int] $RetryWaitTimeInSeconds = 30, + [switch] $Force = $False + ) + $Attempt = 0 + + if ($Force) { + if (Test-Path $Path) { + Remove-Item $Path -Force + } + } + if (Test-Path $Path) { + Write-Host "File '$Path' already exists, skipping download" + return $True + } + + $DownloadDirectory = Split-Path -ErrorAction Ignore -Path "$Path" -Parent + if (-Not (Test-Path $DownloadDirectory)) { + New-Item -path $DownloadDirectory -force -itemType "Directory" | Out-Null + } + + $TempPath = "$Path.tmp" + if (Test-Path -IsValid -Path $Uri) { + Write-Verbose "'$Uri' is a file path, copying temporarily to '$TempPath'" + Copy-Item -Path $Uri -Destination $TempPath + Write-Verbose "Moving temporary file to '$Path'" + Move-Item -Path $TempPath -Destination $Path + return $? + } + else { + Write-Verbose "Downloading $Uri" + # Don't display the console progress UI - it's a huge perf hit + $ProgressPreference = 'SilentlyContinue' + while($Attempt -Lt $DownloadRetries) + { + try { + Invoke-WebRequest -UseBasicParsing -Uri $Uri -OutFile $TempPath + Write-Verbose "Downloaded to temporary location '$TempPath'" + Move-Item -Path $TempPath -Destination $Path + Write-Verbose "Moved temporary file to '$Path'" + return $True + } + catch { + $Attempt++ + if ($Attempt -Lt $DownloadRetries) { + $AttemptsLeft = $DownloadRetries - $Attempt + Write-Warning "Download failed, $AttemptsLeft attempts remaining, will retry in $RetryWaitTimeInSeconds seconds" + Start-Sleep -Seconds $RetryWaitTimeInSeconds + } + else { + Write-Error $_ + Write-Error $_.Exception + } + } + } + } + + return $False +} + +<# +.SYNOPSIS +Generate a shim for a native tool + +.DESCRIPTION +Creates a wrapper script (shim) that passes arguments forward to native tool assembly + +.PARAMETER ShimName +The name of the shim + +.PARAMETER ShimDirectory +The directory where shims are stored + +.PARAMETER ToolFilePath +Path to file that shim forwards to + +.PARAMETER Force +Replace shim if already present. Default = False + +.NOTES +Returns $True if generating shim succeeds, $False otherwise +#> +function New-ScriptShim { + [CmdletBinding(PositionalBinding=$false)] + Param ( + [Parameter(Mandatory=$True)] + [string] $ShimName, + [Parameter(Mandatory=$True)] + [string] $ShimDirectory, + [Parameter(Mandatory=$True)] + [string] $ToolFilePath, + [Parameter(Mandatory=$True)] + [string] $BaseUri, + [switch] $Force + ) + try { + Write-Verbose "Generating '$ShimName' shim" + + if (-Not (Test-Path $ToolFilePath)){ + Write-Error "Specified tool file path '$ToolFilePath' does not exist" + return $False + } + + # WinShimmer is a small .NET Framework program that creates .exe shims to bootstrapped programs + # Many of the checks for installed programs expect a .exe extension for Windows tools, rather + # than a .bat or .cmd file. + # Source: https://github.com/dotnet/arcade/tree/master/src/WinShimmer + if (-Not (Test-Path "$ShimDirectory\WinShimmer\winshimmer.exe")) { + $InstallStatus = DownloadAndExtract -Uri "$BaseUri/windows/winshimmer/WinShimmer.zip" ` + -InstallDirectory $ShimDirectory\WinShimmer ` + -Force:$Force ` + -DownloadRetries 2 ` + -RetryWaitTimeInSeconds 5 ` + -Verbose:$Verbose + } + + if ((Test-Path (Join-Path $ShimDirectory "$ShimName.exe"))) { + Write-Host "$ShimName.exe already exists; replacing..." + Remove-Item (Join-Path $ShimDirectory "$ShimName.exe") + } + + & "$ShimDirectory\WinShimmer\winshimmer.exe" $ShimName $ToolFilePath $ShimDirectory + return $True + } + catch { + Write-Host $_ + Write-Host $_.Exception + return $False + } +} + +<# +.SYNOPSIS +Returns the machine architecture of the host machine + +.NOTES +Returns 'x64' on 64 bit machines + Returns 'x86' on 32 bit machines +#> +function Get-MachineArchitecture { + $ProcessorArchitecture = $Env:PROCESSOR_ARCHITECTURE + $ProcessorArchitectureW6432 = $Env:PROCESSOR_ARCHITEW6432 + if($ProcessorArchitecture -Eq "X86") + { + if(($ProcessorArchitectureW6432 -Eq "") -Or + ($ProcessorArchitectureW6432 -Eq "X86")) { + return "x86" + } + $ProcessorArchitecture = $ProcessorArchitectureW6432 + } + if (($ProcessorArchitecture -Eq "AMD64") -Or + ($ProcessorArchitecture -Eq "IA64") -Or + ($ProcessorArchitecture -Eq "ARM64") -Or + ($ProcessorArchitecture -Eq "LOONGARCH64") -Or + ($ProcessorArchitecture -Eq "RISCV64")) { + return "x64" + } + return "x86" +} + +<# +.SYNOPSIS +Get the name of a temporary folder under the native install directory +#> +function Get-TempDirectory { + return Join-Path (Get-NativeInstallDirectory) "temp/" +} + +function Get-TempPathFilename { + [CmdletBinding(PositionalBinding=$false)] + Param ( + [Parameter(Mandatory=$True)] + [string] $Path + ) + $TempDir = CommonLibrary\Get-TempDirectory + $TempFilename = Split-Path $Path -leaf + $TempPath = Join-Path $TempDir $TempFilename + return $TempPath +} + +<# +.SYNOPSIS +Returns the base directory to use for native tool installation + +.NOTES +Returns the value of the NETCOREENG_INSTALL_DIRECTORY if that environment variable +is set, or otherwise returns an install directory under the %USERPROFILE% +#> +function Get-NativeInstallDirectory { + $InstallDir = $Env:NETCOREENG_INSTALL_DIRECTORY + if (!$InstallDir) { + $InstallDir = Join-Path $Env:USERPROFILE ".netcoreeng/native/" + } + return $InstallDir +} + +<# +.SYNOPSIS +Unzip an archive + +.DESCRIPTION +Powershell module to unzip an archive to a specified directory + +.PARAMETER ZipPath (Required) +Path to archive to unzip + +.PARAMETER OutputDirectory (Required) +Output directory for archive contents + +.PARAMETER Force +Overwrite output directory contents if they already exist + +.NOTES +- Returns True and does not perform an extraction if output directory already exists but Overwrite is not True. +- Returns True if unzip operation is successful +- Returns False if Overwrite is True and it is unable to remove contents of OutputDirectory +- Returns False if unable to extract zip archive +#> +function Expand-Zip { + [CmdletBinding(PositionalBinding=$false)] + Param ( + [Parameter(Mandatory=$True)] + [string] $ZipPath, + [Parameter(Mandatory=$True)] + [string] $OutputDirectory, + [switch] $Force + ) + + Write-Verbose "Extracting '$ZipPath' to '$OutputDirectory'" + try { + if ((Test-Path $OutputDirectory) -And (-Not $Force)) { + Write-Host "Directory '$OutputDirectory' already exists, skipping extract" + return $True + } + if (Test-Path $OutputDirectory) { + Write-Verbose "'Force' is 'True', but '$OutputDirectory' exists, removing directory" + Remove-Item $OutputDirectory -Force -Recurse + if ($? -Eq $False) { + Write-Error "Unable to remove '$OutputDirectory'" + return $False + } + } + + $TempOutputDirectory = Join-Path "$(Split-Path -Parent $OutputDirectory)" "$(Split-Path -Leaf $OutputDirectory).tmp" + if (Test-Path $TempOutputDirectory) { + Remove-Item $TempOutputDirectory -Force -Recurse + } + New-Item -Path $TempOutputDirectory -Force -ItemType "Directory" | Out-Null + + Add-Type -assembly "system.io.compression.filesystem" + [io.compression.zipfile]::ExtractToDirectory("$ZipPath", "$TempOutputDirectory") + if ($? -Eq $False) { + Write-Error "Unable to extract '$ZipPath'" + return $False + } + + Move-Item -Path $TempOutputDirectory -Destination $OutputDirectory + } + catch { + Write-Host $_ + Write-Host $_.Exception + + return $False + } + return $True +} + +export-modulemember -function DownloadAndExtract +export-modulemember -function Expand-Zip +export-modulemember -function Get-File +export-modulemember -function Get-MachineArchitecture +export-modulemember -function Get-NativeInstallDirectory +export-modulemember -function Get-TempDirectory +export-modulemember -function Get-TempPathFilename +export-modulemember -function New-ScriptShim diff --git a/src/arcade/eng/common/native/common-library.sh b/src/arcade/eng/common/native/common-library.sh new file mode 100644 index 00000000000..080c2c283ae --- /dev/null +++ b/src/arcade/eng/common/native/common-library.sh @@ -0,0 +1,172 @@ +#!/usr/bin/env bash + +function GetNativeInstallDirectory { + local install_dir + + if [[ -z $NETCOREENG_INSTALL_DIRECTORY ]]; then + install_dir=$HOME/.netcoreeng/native/ + else + install_dir=$NETCOREENG_INSTALL_DIRECTORY + fi + + echo $install_dir + return 0 +} + +function GetTempDirectory { + + echo $(GetNativeInstallDirectory)temp/ + return 0 +} + +function ExpandZip { + local zip_path=$1 + local output_directory=$2 + local force=${3:-false} + + echo "Extracting $zip_path to $output_directory" + if [[ -d $output_directory ]] && [[ $force = false ]]; then + echo "Directory '$output_directory' already exists, skipping extract" + return 0 + fi + + if [[ -d $output_directory ]]; then + echo "'Force flag enabled, but '$output_directory' exists. Removing directory" + rm -rf $output_directory + if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to remove '$output_directory'" + return 1 + fi + fi + + echo "Creating directory: '$output_directory'" + mkdir -p $output_directory + + echo "Extracting archive" + tar -xf $zip_path -C $output_directory + if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to extract '$zip_path'" + return 1 + fi + + return 0 +} + +function GetCurrentOS { + local unameOut="$(uname -s)" + case $unameOut in + Linux*) echo "Linux";; + Darwin*) echo "MacOS";; + esac + return 0 +} + +function GetFile { + local uri=$1 + local path=$2 + local force=${3:-false} + local download_retries=${4:-5} + local retry_wait_time_seconds=${5:-30} + + if [[ -f $path ]]; then + if [[ $force = false ]]; then + echo "File '$path' already exists. Skipping download" + return 0 + else + rm -rf $path + fi + fi + + if [[ -f $uri ]]; then + echo "'$uri' is a file path, copying file to '$path'" + cp $uri $path + return $? + fi + + echo "Downloading $uri" + # Use curl if available, otherwise use wget + if command -v curl > /dev/null; then + curl "$uri" -sSL --retry $download_retries --retry-delay $retry_wait_time_seconds --create-dirs -o "$path" --fail + else + wget -q -O "$path" "$uri" --tries="$download_retries" + fi + + return $? +} + +function GetTempPathFileName { + local path=$1 + + local temp_dir=$(GetTempDirectory) + local temp_file_name=$(basename $path) + echo $temp_dir$temp_file_name + return 0 +} + +function DownloadAndExtract { + local uri=$1 + local installDir=$2 + local force=${3:-false} + local download_retries=${4:-5} + local retry_wait_time_seconds=${5:-30} + + local temp_tool_path=$(GetTempPathFileName $uri) + + echo "downloading to: $temp_tool_path" + + # Download file + GetFile "$uri" "$temp_tool_path" $force $download_retries $retry_wait_time_seconds + if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to download '$uri' to '$temp_tool_path'." + return 1 + fi + + # Extract File + echo "extracting from $temp_tool_path to $installDir" + ExpandZip "$temp_tool_path" "$installDir" $force $download_retries $retry_wait_time_seconds + if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to extract '$temp_tool_path' to '$installDir'." + return 1 + fi + + return 0 +} + +function NewScriptShim { + local shimpath=$1 + local tool_file_path=$2 + local force=${3:-false} + + echo "Generating '$shimpath' shim" + if [[ -f $shimpath ]]; then + if [[ $force = false ]]; then + echo "File '$shimpath' already exists." >&2 + return 1 + else + rm -rf $shimpath + fi + fi + + if [[ ! -f $tool_file_path ]]; then + # try to see if the path is lower cased + tool_file_path="$(echo $tool_file_path | tr "[:upper:]" "[:lower:]")" + if [[ ! -f $tool_file_path ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist" + return 1 + fi + fi + + local shim_contents=$'#!/usr/bin/env bash\n' + shim_contents+="SHIMARGS="$'$1\n' + shim_contents+="$tool_file_path"$' $SHIMARGS\n' + + # Write shim file + echo "$shim_contents" > $shimpath + + chmod +x $shimpath + + echo "Finished generating shim '$shimpath'" + + return $? +} + diff --git a/src/arcade/eng/common/native/init-compiler.sh b/src/arcade/eng/common/native/init-compiler.sh new file mode 100644 index 00000000000..9a0e1f2b456 --- /dev/null +++ b/src/arcade/eng/common/native/init-compiler.sh @@ -0,0 +1,146 @@ +#!/bin/sh +# +# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables +# +# NOTE: some scripts source this file and rely on stdout being empty, make sure +# to not output *anything* here, unless it is an error message that fails the +# build. + +if [ -z "$build_arch" ] || [ -z "$compiler" ]; then + echo "Usage..." + echo "build_arch= compiler= init-compiler.sh" + echo "Specify the target architecture." + echo "Specify the name of compiler (clang or gcc)." + exit 1 +fi + +case "$compiler" in + clang*|-clang*|--clang*) + # clangx.y or clang-x.y + version="$(echo "$compiler" | tr -d '[:alpha:]-=')" + majorVersion="${version%%.*}" + + # LLVM based on v18 released in early 2024, with two releases per year + maxVersion="$((18 + ((($(date +%Y) - 2024) * 12 + $(date +%-m) - 3) / 6)))" + compiler=clang + ;; + + gcc*|-gcc*|--gcc*) + # gccx.y or gcc-x.y + version="$(echo "$compiler" | tr -d '[:alpha:]-=')" + majorVersion="${version%%.*}" + + # GCC based on v14 released in early 2024, with one release per year + maxVersion="$((14 + ((($(date +%Y) - 2024) * 12 + $(date +%-m) - 3) / 12)))" + compiler=gcc + ;; +esac + +cxxCompiler="$compiler++" + +# clear the existing CC and CXX from environment +CC= +CXX= +LDFLAGS= + +if [ "$compiler" = "gcc" ]; then cxxCompiler="g++"; fi + +check_version_exists() { + desired_version=-1 + + # Set up the environment to be used for building with the desired compiler. + if command -v "$compiler-$1" > /dev/null; then + desired_version="-$1" + elif command -v "$compiler$1" > /dev/null; then + desired_version="$1" + fi + + echo "$desired_version" +} + +__baseOS="$(uname)" +set_compiler_version_from_CC() { + if [ "$__baseOS" = "Darwin" ]; then + # On Darwin, the versions from -version/-dumpversion refer to Xcode + # versions, not llvm versions, so we can't rely on them. + return + fi + + version="$("$CC" -dumpversion)" + if [ -z "$version" ]; then + echo "Error: $CC -dumpversion didn't provide a version" + exit 1 + fi + + # gcc and clang often display 3 part versions. However, gcc can show only 1 part in some environments. + IFS=. read -r majorVersion _ < /dev/null; then + echo "Error: No compatible version of $compiler was found within the range of $minVersion to $maxVersion. Please upgrade your toolchain or specify the compiler explicitly using CLR_CC and CLR_CXX environment variables." + exit 1 + fi + + CC="$(command -v "$compiler" 2> /dev/null)" + CXX="$(command -v "$cxxCompiler" 2> /dev/null)" + set_compiler_version_from_CC + fi + else + desired_version="$(check_version_exists "$majorVersion")" + if [ "$desired_version" = "-1" ]; then + echo "Error: Could not find specific version of $compiler: $majorVersion." + exit 1 + fi + fi + + if [ -z "$CC" ]; then + CC="$(command -v "$compiler$desired_version" 2> /dev/null)" + CXX="$(command -v "$cxxCompiler$desired_version" 2> /dev/null)" + if [ -z "$CXX" ]; then CXX="$(command -v "$cxxCompiler" 2> /dev/null)"; fi + set_compiler_version_from_CC + fi +else + if [ ! -f "$CLR_CC" ]; then + echo "Error: CLR_CC is set but path '$CLR_CC' does not exist" + exit 1 + fi + CC="$CLR_CC" + CXX="$CLR_CXX" + set_compiler_version_from_CC +fi + +if [ -z "$CC" ]; then + echo "Error: Unable to find $compiler." + exit 1 +fi + +if [ "$__baseOS" != "Darwin" ]; then + # On Darwin, we always want to use the Apple linker. + + # Only lld version >= 9 can be considered stable. lld supports s390x starting from 18.0. + if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && { [ "$build_arch" != "s390x" ] || [ "$majorVersion" -ge 18 ]; }; then + if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then + LDFLAGS="-fuse-ld=lld" + fi + fi +fi + +SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version" 2> /dev/null)" + +export CC CXX LDFLAGS SCAN_BUILD_COMMAND diff --git a/src/arcade/eng/common/native/init-distro-rid.sh b/src/arcade/eng/common/native/init-distro-rid.sh new file mode 100644 index 00000000000..83ea7aab0e0 --- /dev/null +++ b/src/arcade/eng/common/native/init-distro-rid.sh @@ -0,0 +1,110 @@ +#!/bin/sh + +# getNonPortableDistroRid +# +# Input: +# targetOs: (str) +# targetArch: (str) +# rootfsDir: (str) +# +# Return: +# non-portable rid +getNonPortableDistroRid() +{ + targetOs="$1" + targetArch="$2" + rootfsDir="$3" + nonPortableRid="" + + if [ "$targetOs" = "linux" ]; then + # shellcheck disable=SC1091 + if [ -e "${rootfsDir}/etc/os-release" ]; then + . "${rootfsDir}/etc/os-release" + if echo "${VERSION_ID:-}" | grep -qE '^([[:digit:]]|\.)+$'; then + nonPortableRid="${ID}.${VERSION_ID}-${targetArch}" + else + # Rolling release distros either do not set VERSION_ID, set it as blank or + # set it to non-version looking string (such as TEMPLATE_VERSION_ID on ArchLinux); + # so omit it here to be consistent with everything else. + nonPortableRid="${ID}-${targetArch}" + fi + elif [ -e "${rootfsDir}/android_platform" ]; then + # shellcheck disable=SC1091 + . "${rootfsDir}/android_platform" + nonPortableRid="$RID" + fi + fi + + if [ "$targetOs" = "freebsd" ]; then + # $rootfsDir can be empty. freebsd-version is a shell script and should always work. + __freebsd_major_version=$("$rootfsDir"/bin/freebsd-version | cut -d'.' -f1) + nonPortableRid="freebsd.$__freebsd_major_version-${targetArch}" + elif command -v getprop >/dev/null && getprop ro.product.system.model | grep -qi android; then + __android_sdk_version=$(getprop ro.build.version.sdk) + nonPortableRid="android.$__android_sdk_version-${targetArch}" + elif [ "$targetOs" = "illumos" ]; then + __uname_version=$(uname -v) + nonPortableRid="illumos-${targetArch}" + elif [ "$targetOs" = "solaris" ]; then + __uname_version=$(uname -v) + __solaris_major_version=$(echo "$__uname_version" | cut -d'.' -f1) + nonPortableRid="solaris.$__solaris_major_version-${targetArch}" + elif [ "$targetOs" = "haiku" ]; then + __uname_release="$(uname -r)" + nonPortableRid=haiku.r"$__uname_release"-"$targetArch" + fi + + echo "$nonPortableRid" | tr '[:upper:]' '[:lower:]' +} + +# initDistroRidGlobal +# +# Input: +# os: (str) +# arch: (str) +# rootfsDir?: (nullable:string) +# +# Return: +# None +# +# Notes: +# It is important to note that the function does not return anything, but it +# exports the following variables on success: +# __DistroRid : Non-portable rid of the target platform. +# __PortableTargetOS : OS-part of the portable rid that corresponds to the target platform. +initDistroRidGlobal() +{ + targetOs="$1" + targetArch="$2" + rootfsDir="" + if [ $# -ge 3 ]; then + rootfsDir="$3" + fi + + if [ -n "${rootfsDir}" ]; then + # We may have a cross build. Check for the existence of the rootfsDir + if [ ! -e "${rootfsDir}" ]; then + echo "Error: rootfsDir has been passed, but the location is not valid." + exit 1 + fi + fi + + __DistroRid=$(getNonPortableDistroRid "${targetOs}" "${targetArch}" "${rootfsDir}") + + if [ -z "${__PortableTargetOS:-}" ]; then + __PortableTargetOS="$targetOs" + + STRINGS="$(command -v strings || true)" + if [ -z "$STRINGS" ]; then + STRINGS="$(command -v llvm-strings || true)" + fi + + # Check for musl-based distros (e.g. Alpine Linux, Void Linux). + if "${rootfsDir}/usr/bin/ldd" --version 2>&1 | grep -q musl || + ( [ -n "$STRINGS" ] && "$STRINGS" "${rootfsDir}/usr/bin/ldd" 2>&1 | grep -q musl ); then + __PortableTargetOS="linux-musl" + fi + fi + + export __DistroRid __PortableTargetOS +} diff --git a/src/arcade/eng/common/native/init-os-and-arch.sh b/src/arcade/eng/common/native/init-os-and-arch.sh new file mode 100644 index 00000000000..38921d4338f --- /dev/null +++ b/src/arcade/eng/common/native/init-os-and-arch.sh @@ -0,0 +1,85 @@ +#!/bin/sh + +# Use uname to determine what the OS is. +OSName=$(uname -s | tr '[:upper:]' '[:lower:]') + +if command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then + OSName="android" +fi + +case "$OSName" in +freebsd|linux|netbsd|openbsd|sunos|android|haiku) + os="$OSName" ;; +darwin) + os=osx ;; +*) + echo "Unsupported OS $OSName detected!" + exit 1 ;; +esac + +# On Solaris, `uname -m` is discouraged, see https://docs.oracle.com/cd/E36784_01/html/E36870/uname-1.html +# and `uname -p` returns processor type (e.g. i386 on amd64). +# The appropriate tool to determine CPU is isainfo(1) https://docs.oracle.com/cd/E36784_01/html/E36870/isainfo-1.html. +if [ "$os" = "sunos" ]; then + if uname -o 2>&1 | grep -q illumos; then + os="illumos" + else + os="solaris" + fi + CPUName=$(isainfo -n) +else + # For the rest of the operating systems, use uname(1) to determine what the CPU is. + CPUName=$(uname -m) +fi + +case "$CPUName" in + arm64|aarch64) + arch=arm64 + if [ "$(getconf LONG_BIT)" -lt 64 ]; then + # This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS) + arch=arm + fi + ;; + + loongarch64) + arch=loongarch64 + ;; + + riscv64) + arch=riscv64 + ;; + + amd64|x86_64) + arch=x64 + ;; + + armv7l|armv8l) + # shellcheck disable=SC1091 + if (NAME=""; . /etc/os-release; test "$NAME" = "Tizen"); then + arch=armel + else + arch=arm + fi + ;; + + armv6l) + arch=armv6 + ;; + + i[3-6]86) + echo "Unsupported CPU $CPUName detected, build might not succeed!" + arch=x86 + ;; + + s390x) + arch=s390x + ;; + + ppc64le) + arch=ppc64le + ;; + *) + echo "Unknown CPU $CPUName detected!" + exit 1 + ;; +esac diff --git a/src/arcade/eng/common/native/install-cmake-test.sh b/src/arcade/eng/common/native/install-cmake-test.sh new file mode 100644 index 00000000000..8a5e7cf0db5 --- /dev/null +++ b/src/arcade/eng/common/native/install-cmake-test.sh @@ -0,0 +1,117 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. $scriptroot/common-library.sh + +base_uri= +install_path= +version= +clean=false +force=false +download_retries=5 +retry_wait_time_seconds=30 + +while (($# > 0)); do + lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" + case $lowerI in + --baseuri) + base_uri=$2 + shift 2 + ;; + --installpath) + install_path=$2 + shift 2 + ;; + --version) + version=$2 + shift 2 + ;; + --clean) + clean=true + shift 1 + ;; + --force) + force=true + shift 1 + ;; + --downloadretries) + download_retries=$2 + shift 2 + ;; + --retrywaittimeseconds) + retry_wait_time_seconds=$2 + shift 2 + ;; + --help) + echo "Common settings:" + echo " --baseuri Base file directory or Url wrom which to acquire tool archives" + echo " --installpath Base directory to install native tool to" + echo " --clean Don't install the tool, just clean up the current install of the tool" + echo " --force Force install of tools even if they previously exist" + echo " --help Print help and exit" + echo "" + echo "Advanced settings:" + echo " --downloadretries Total number of retry attempts" + echo " --retrywaittimeseconds Wait time between retry attempts in seconds" + echo "" + exit 0 + ;; + esac +done + +tool_name="cmake-test" +tool_os=$(GetCurrentOS) +tool_folder="$(echo $tool_os | tr "[:upper:]" "[:lower:]")" +tool_arch="x86_64" +tool_name_moniker="$tool_name-$version-$tool_os-$tool_arch" +tool_install_directory="$install_path/$tool_name/$version" +tool_file_path="$tool_install_directory/$tool_name_moniker/bin/$tool_name" +shim_path="$install_path/$tool_name.sh" +uri="${base_uri}/$tool_folder/$tool_name/$tool_name_moniker.tar.gz" + +# Clean up tool and installers +if [[ $clean = true ]]; then + echo "Cleaning $tool_install_directory" + if [[ -d $tool_install_directory ]]; then + rm -rf $tool_install_directory + fi + + echo "Cleaning $shim_path" + if [[ -f $shim_path ]]; then + rm -rf $shim_path + fi + + tool_temp_path=$(GetTempPathFileName $uri) + echo "Cleaning $tool_temp_path" + if [[ -f $tool_temp_path ]]; then + rm -rf $tool_temp_path + fi + + exit 0 +fi + +# Install tool +if [[ -f $tool_file_path ]] && [[ $force = false ]]; then + echo "$tool_name ($version) already exists, skipping install" + exit 0 +fi + +DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds + +if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed' + exit 1 +fi + +# Generate Shim +# Always rewrite shims so that we are referencing the expected version +NewScriptShim $shim_path $tool_file_path true + +if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed' + exit 1 +fi + +exit 0 diff --git a/src/arcade/eng/common/native/install-cmake.sh b/src/arcade/eng/common/native/install-cmake.sh new file mode 100644 index 00000000000..de496beebc5 --- /dev/null +++ b/src/arcade/eng/common/native/install-cmake.sh @@ -0,0 +1,117 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. $scriptroot/common-library.sh + +base_uri= +install_path= +version= +clean=false +force=false +download_retries=5 +retry_wait_time_seconds=30 + +while (($# > 0)); do + lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" + case $lowerI in + --baseuri) + base_uri=$2 + shift 2 + ;; + --installpath) + install_path=$2 + shift 2 + ;; + --version) + version=$2 + shift 2 + ;; + --clean) + clean=true + shift 1 + ;; + --force) + force=true + shift 1 + ;; + --downloadretries) + download_retries=$2 + shift 2 + ;; + --retrywaittimeseconds) + retry_wait_time_seconds=$2 + shift 2 + ;; + --help) + echo "Common settings:" + echo " --baseuri Base file directory or Url wrom which to acquire tool archives" + echo " --installpath Base directory to install native tool to" + echo " --clean Don't install the tool, just clean up the current install of the tool" + echo " --force Force install of tools even if they previously exist" + echo " --help Print help and exit" + echo "" + echo "Advanced settings:" + echo " --downloadretries Total number of retry attempts" + echo " --retrywaittimeseconds Wait time between retry attempts in seconds" + echo "" + exit 0 + ;; + esac +done + +tool_name="cmake" +tool_os=$(GetCurrentOS) +tool_folder="$(echo $tool_os | tr "[:upper:]" "[:lower:]")" +tool_arch="x86_64" +tool_name_moniker="$tool_name-$version-$tool_os-$tool_arch" +tool_install_directory="$install_path/$tool_name/$version" +tool_file_path="$tool_install_directory/$tool_name_moniker/bin/$tool_name" +shim_path="$install_path/$tool_name.sh" +uri="${base_uri}/$tool_folder/$tool_name/$tool_name_moniker.tar.gz" + +# Clean up tool and installers +if [[ $clean = true ]]; then + echo "Cleaning $tool_install_directory" + if [[ -d $tool_install_directory ]]; then + rm -rf $tool_install_directory + fi + + echo "Cleaning $shim_path" + if [[ -f $shim_path ]]; then + rm -rf $shim_path + fi + + tool_temp_path=$(GetTempPathFileName $uri) + echo "Cleaning $tool_temp_path" + if [[ -f $tool_temp_path ]]; then + rm -rf $tool_temp_path + fi + + exit 0 +fi + +# Install tool +if [[ -f $tool_file_path ]] && [[ $force = false ]]; then + echo "$tool_name ($version) already exists, skipping install" + exit 0 +fi + +DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds + +if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed' + exit 1 +fi + +# Generate Shim +# Always rewrite shims so that we are referencing the expected version +NewScriptShim $shim_path $tool_file_path true + +if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed' + exit 1 +fi + +exit 0 diff --git a/src/arcade/eng/common/native/install-tool.ps1 b/src/arcade/eng/common/native/install-tool.ps1 new file mode 100644 index 00000000000..78f2d84a4e4 --- /dev/null +++ b/src/arcade/eng/common/native/install-tool.ps1 @@ -0,0 +1,132 @@ +<# +.SYNOPSIS +Install native tool + +.DESCRIPTION +Install cmake native tool from Azure blob storage + +.PARAMETER InstallPath +Base directory to install native tool to + +.PARAMETER BaseUri +Base file directory or Url from which to acquire tool archives + +.PARAMETER CommonLibraryDirectory +Path to folder containing common library modules + +.PARAMETER Force +Force install of tools even if they previously exist + +.PARAMETER Clean +Don't install the tool, just clean up the current install of the tool + +.PARAMETER DownloadRetries +Total number of retry attempts + +.PARAMETER RetryWaitTimeInSeconds +Wait time between retry attempts in seconds + +.NOTES +Returns 0 if install succeeds, 1 otherwise +#> +[CmdletBinding(PositionalBinding=$false)] +Param ( + [Parameter(Mandatory=$True)] + [string] $ToolName, + [Parameter(Mandatory=$True)] + [string] $InstallPath, + [Parameter(Mandatory=$True)] + [string] $BaseUri, + [Parameter(Mandatory=$True)] + [string] $Version, + [string] $CommonLibraryDirectory = $PSScriptRoot, + [switch] $Force = $False, + [switch] $Clean = $False, + [int] $DownloadRetries = 5, + [int] $RetryWaitTimeInSeconds = 30 +) + +. $PSScriptRoot\..\pipeline-logging-functions.ps1 + +# Import common library modules +Import-Module -Name (Join-Path $CommonLibraryDirectory "CommonLibrary.psm1") + +try { + # Define verbose switch if undefined + $Verbose = $VerbosePreference -Eq "Continue" + + $Arch = CommonLibrary\Get-MachineArchitecture + $ToolOs = "win64" + if($Arch -Eq "x32") { + $ToolOs = "win32" + } + $ToolNameMoniker = "$ToolName-$Version-$ToolOs-$Arch" + $ToolInstallDirectory = Join-Path $InstallPath "$ToolName\$Version\" + $Uri = "$BaseUri/windows/$ToolName/$ToolNameMoniker.zip" + $ShimPath = Join-Path $InstallPath "$ToolName.exe" + + if ($Clean) { + Write-Host "Cleaning $ToolInstallDirectory" + if (Test-Path $ToolInstallDirectory) { + Remove-Item $ToolInstallDirectory -Force -Recurse + } + Write-Host "Cleaning $ShimPath" + if (Test-Path $ShimPath) { + Remove-Item $ShimPath -Force + } + $ToolTempPath = CommonLibrary\Get-TempPathFilename -Path $Uri + Write-Host "Cleaning $ToolTempPath" + if (Test-Path $ToolTempPath) { + Remove-Item $ToolTempPath -Force + } + exit 0 + } + + # Install tool + if ((Test-Path $ToolInstallDirectory) -And (-Not $Force)) { + Write-Verbose "$ToolName ($Version) already exists, skipping install" + } + else { + $InstallStatus = CommonLibrary\DownloadAndExtract -Uri $Uri ` + -InstallDirectory $ToolInstallDirectory ` + -Force:$Force ` + -DownloadRetries $DownloadRetries ` + -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds ` + -Verbose:$Verbose + + if ($InstallStatus -Eq $False) { + Write-PipelineTelemetryError "Installation failed" -Category "NativeToolsetBootstrapping" + exit 1 + } + } + + $ToolFilePath = Get-ChildItem $ToolInstallDirectory -Recurse -Filter "$ToolName.exe" | % { $_.FullName } + if (@($ToolFilePath).Length -Gt 1) { + Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))" + exit 1 + } elseif (@($ToolFilePath).Length -Lt 1) { + Write-Host "$ToolName was not found in $ToolInstallDirectory." + exit 1 + } + + # Generate shim + # Always rewrite shims so that we are referencing the expected version + $GenerateShimStatus = CommonLibrary\New-ScriptShim -ShimName $ToolName ` + -ShimDirectory $InstallPath ` + -ToolFilePath "$ToolFilePath" ` + -BaseUri $BaseUri ` + -Force:$Force ` + -Verbose:$Verbose + + if ($GenerateShimStatus -Eq $False) { + Write-PipelineTelemetryError "Generate shim failed" -Category "NativeToolsetBootstrapping" + return 1 + } + + exit 0 +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category "NativeToolsetBootstrapping" -Message $_ + exit 1 +} diff --git a/src/arcade/eng/common/pipeline-logging-functions.ps1 b/src/arcade/eng/common/pipeline-logging-functions.ps1 new file mode 100644 index 00000000000..8e422c561e4 --- /dev/null +++ b/src/arcade/eng/common/pipeline-logging-functions.ps1 @@ -0,0 +1,260 @@ +# Source for this file was taken from https://github.com/microsoft/azure-pipelines-task-lib/blob/11c9439d4af17e6475d9fe058e6b2e03914d17e6/powershell/VstsTaskSdk/LoggingCommandFunctions.ps1 and modified. + +# NOTE: You should not be calling these method directly as they are likely to change. Instead you should be calling the Write-Pipeline* functions defined in tools.ps1 + +$script:loggingCommandPrefix = '##vso[' +$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"? + New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' } + New-Object psobject -Property @{ Token = "`r" ; Replacement = '%0D' } + New-Object psobject -Property @{ Token = "`n" ; Replacement = '%0A' } + New-Object psobject -Property @{ Token = "]" ; Replacement = '%5D' } +) +# TODO: BUG: Escape % ??? +# TODO: Add test to verify don't need to escape "=". + +# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set +function Write-PipelineTelemetryError { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Category, + [Parameter(Mandatory = $true)] + [string]$Message, + [Parameter(Mandatory = $false)] + [string]$Type = 'error', + [string]$ErrCode, + [string]$SourcePath, + [string]$LineNumber, + [string]$ColumnNumber, + [switch]$AsOutput, + [switch]$Force) + + $PSBoundParameters.Remove('Category') | Out-Null + + if ($Force -Or ((Test-Path variable:ci) -And $ci)) { + $Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message" + } + $PSBoundParameters.Remove('Message') | Out-Null + $PSBoundParameters.Add('Message', $Message) + Write-PipelineTaskError @PSBoundParameters +} + +# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set +function Write-PipelineTaskError { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Message, + [Parameter(Mandatory = $false)] + [string]$Type = 'error', + [string]$ErrCode, + [string]$SourcePath, + [string]$LineNumber, + [string]$ColumnNumber, + [switch]$AsOutput, + [switch]$Force + ) + + if (!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) { + if ($Type -eq 'error') { + Write-Host $Message -ForegroundColor Red + return + } + elseif ($Type -eq 'warning') { + Write-Host $Message -ForegroundColor Yellow + return + } + } + + if (($Type -ne 'error') -and ($Type -ne 'warning')) { + Write-Host $Message + return + } + $PSBoundParameters.Remove('Force') | Out-Null + if (-not $PSBoundParameters.ContainsKey('Type')) { + $PSBoundParameters.Add('Type', 'error') + } + Write-LogIssue @PSBoundParameters +} + +function Write-PipelineSetVariable { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Name, + [string]$Value, + [switch]$Secret, + [switch]$AsOutput, + [bool]$IsMultiJobVariable = $true) + + if ((Test-Path variable:ci) -And $ci) { + Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{ + 'variable' = $Name + 'isSecret' = $Secret + 'isOutput' = $IsMultiJobVariable + } -AsOutput:$AsOutput + } +} + +function Write-PipelinePrependPath { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Path, + [switch]$AsOutput) + + if ((Test-Path variable:ci) -And $ci) { + Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput + } +} + +function Write-PipelineSetResult { + [CmdletBinding()] + param( + [ValidateSet("Succeeded", "SucceededWithIssues", "Failed", "Cancelled", "Skipped")] + [Parameter(Mandatory = $true)] + [string]$Result, + [string]$Message) + if ((Test-Path variable:ci) -And $ci) { + Write-LoggingCommand -Area 'task' -Event 'complete' -Data $Message -Properties @{ + 'result' = $Result + } + } +} + +<######################################## +# Private functions. +########################################> +function Format-LoggingCommandData { + [CmdletBinding()] + param([string]$Value, [switch]$Reverse) + + if (!$Value) { + return '' + } + + if (!$Reverse) { + foreach ($mapping in $script:loggingCommandEscapeMappings) { + $Value = $Value.Replace($mapping.Token, $mapping.Replacement) + } + } + else { + for ($i = $script:loggingCommandEscapeMappings.Length - 1 ; $i -ge 0 ; $i--) { + $mapping = $script:loggingCommandEscapeMappings[$i] + $Value = $Value.Replace($mapping.Replacement, $mapping.Token) + } + } + + return $Value +} + +function Format-LoggingCommand { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Area, + [Parameter(Mandatory = $true)] + [string]$Event, + [string]$Data, + [hashtable]$Properties) + + # Append the preamble. + [System.Text.StringBuilder]$sb = New-Object -TypeName System.Text.StringBuilder + $null = $sb.Append($script:loggingCommandPrefix).Append($Area).Append('.').Append($Event) + + # Append the properties. + if ($Properties) { + $first = $true + foreach ($key in $Properties.Keys) { + [string]$value = Format-LoggingCommandData $Properties[$key] + if ($value) { + if ($first) { + $null = $sb.Append(' ') + $first = $false + } + else { + $null = $sb.Append(';') + } + + $null = $sb.Append("$key=$value") + } + } + } + + # Append the tail and output the value. + $Data = Format-LoggingCommandData $Data + $sb.Append(']').Append($Data).ToString() +} + +function Write-LoggingCommand { + [CmdletBinding(DefaultParameterSetName = 'Parameters')] + param( + [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')] + [string]$Area, + [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')] + [string]$Event, + [Parameter(ParameterSetName = 'Parameters')] + [string]$Data, + [Parameter(ParameterSetName = 'Parameters')] + [hashtable]$Properties, + [Parameter(Mandatory = $true, ParameterSetName = 'Object')] + $Command, + [switch]$AsOutput) + + if ($PSCmdlet.ParameterSetName -eq 'Object') { + Write-LoggingCommand -Area $Command.Area -Event $Command.Event -Data $Command.Data -Properties $Command.Properties -AsOutput:$AsOutput + return + } + + $command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties + if ($AsOutput) { + $command + } + else { + Write-Host $command + } +} + +function Write-LogIssue { + [CmdletBinding()] + param( + [ValidateSet('warning', 'error')] + [Parameter(Mandatory = $true)] + [string]$Type, + [string]$Message, + [string]$ErrCode, + [string]$SourcePath, + [string]$LineNumber, + [string]$ColumnNumber, + [switch]$AsOutput) + + $command = Format-LoggingCommand -Area 'task' -Event 'logissue' -Data $Message -Properties @{ + 'type' = $Type + 'code' = $ErrCode + 'sourcepath' = $SourcePath + 'linenumber' = $LineNumber + 'columnnumber' = $ColumnNumber + } + if ($AsOutput) { + return $command + } + + if ($Type -eq 'error') { + $foregroundColor = $host.PrivateData.ErrorForegroundColor + $backgroundColor = $host.PrivateData.ErrorBackgroundColor + if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { + $foregroundColor = [System.ConsoleColor]::Red + $backgroundColor = [System.ConsoleColor]::Black + } + } + else { + $foregroundColor = $host.PrivateData.WarningForegroundColor + $backgroundColor = $host.PrivateData.WarningBackgroundColor + if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { + $foregroundColor = [System.ConsoleColor]::Yellow + $backgroundColor = [System.ConsoleColor]::Black + } + } + + Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor +} diff --git a/src/arcade/eng/common/pipeline-logging-functions.sh b/src/arcade/eng/common/pipeline-logging-functions.sh new file mode 100644 index 00000000000..6a0b2255e91 --- /dev/null +++ b/src/arcade/eng/common/pipeline-logging-functions.sh @@ -0,0 +1,206 @@ +#!/usr/bin/env bash + +function Write-PipelineTelemetryError { + local telemetry_category='' + local force=false + local function_args=() + local message='' + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" + case "$opt" in + -category|-c) + telemetry_category=$2 + shift + ;; + -force|-f) + force=true + ;; + -*) + function_args+=("$1 $2") + shift + ;; + *) + message=$* + ;; + esac + shift + done + + if [[ $force != true ]] && [[ "$ci" != true ]]; then + echo "$message" >&2 + return + fi + + if [[ $force == true ]]; then + function_args+=("-force") + fi + message="(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message" + function_args+=("$message") + Write-PipelineTaskError ${function_args[@]} +} + +function Write-PipelineTaskError { + local message_type="error" + local sourcepath='' + local linenumber='' + local columnnumber='' + local error_code='' + local force=false + + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" + case "$opt" in + -type|-t) + message_type=$2 + shift + ;; + -sourcepath|-s) + sourcepath=$2 + shift + ;; + -linenumber|-ln) + linenumber=$2 + shift + ;; + -columnnumber|-cn) + columnnumber=$2 + shift + ;; + -errcode|-e) + error_code=$2 + shift + ;; + -force|-f) + force=true + ;; + *) + break + ;; + esac + + shift + done + + if [[ $force != true ]] && [[ "$ci" != true ]]; then + echo "$@" >&2 + return + fi + + local message="##vso[task.logissue" + + message="$message type=$message_type" + + if [ -n "$sourcepath" ]; then + message="$message;sourcepath=$sourcepath" + fi + + if [ -n "$linenumber" ]; then + message="$message;linenumber=$linenumber" + fi + + if [ -n "$columnnumber" ]; then + message="$message;columnnumber=$columnnumber" + fi + + if [ -n "$error_code" ]; then + message="$message;code=$error_code" + fi + + message="$message]$*" + echo "$message" +} + +function Write-PipelineSetVariable { + if [[ "$ci" != true ]]; then + return + fi + + local name='' + local value='' + local secret=false + local as_output=false + local is_multi_job_variable=true + + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" + case "$opt" in + -name|-n) + name=$2 + shift + ;; + -value|-v) + value=$2 + shift + ;; + -secret|-s) + secret=true + ;; + -as_output|-a) + as_output=true + ;; + -is_multi_job_variable|-i) + is_multi_job_variable=$2 + shift + ;; + esac + shift + done + + value=${value/;/%3B} + value=${value/\\r/%0D} + value=${value/\\n/%0A} + value=${value/]/%5D} + + local message="##vso[task.setvariable variable=$name;isSecret=$secret;isOutput=$is_multi_job_variable]$value" + + if [[ "$as_output" == true ]]; then + $message + else + echo "$message" + fi +} + +function Write-PipelinePrependPath { + local prepend_path='' + + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" + case "$opt" in + -path|-p) + prepend_path=$2 + shift + ;; + esac + shift + done + + export PATH="$prepend_path:$PATH" + + if [[ "$ci" == true ]]; then + echo "##vso[task.prependpath]$prepend_path" + fi +} + +function Write-PipelineSetResult { + local result='' + local message='' + + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" + case "$opt" in + -result|-r) + result=$2 + shift + ;; + -message|-m) + message=$2 + shift + ;; + esac + shift + done + + if [[ "$ci" == true ]]; then + echo "##vso[task.complete result=$result;]$message" + fi +} diff --git a/src/arcade/eng/common/post-build/check-channel-consistency.ps1 b/src/arcade/eng/common/post-build/check-channel-consistency.ps1 new file mode 100644 index 00000000000..61208d2d135 --- /dev/null +++ b/src/arcade/eng/common/post-build/check-channel-consistency.ps1 @@ -0,0 +1,48 @@ +param( + [Parameter(Mandatory=$true)][string] $PromoteToChannels, # List of channels that the build should be promoted to + [Parameter(Mandatory=$true)][array] $AvailableChannelIds # List of channel IDs available in the YAML implementation +) + +try { + $ErrorActionPreference = 'Stop' + Set-StrictMode -Version 2.0 + + # `tools.ps1` checks $ci to perform some actions. Since the post-build + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + $disableConfigureToolsetImport = $true + . $PSScriptRoot\..\tools.ps1 + + if ($PromoteToChannels -eq "") { + Write-PipelineTaskError -Type 'warning' -Message "This build won't publish assets as it's not configured to any Maestro channel. If that wasn't intended use Darc to configure a default channel using add-default-channel for this branch or to promote it to a channel using add-build-to-channel. See https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md#assigning-an-individual-build-to-a-channel for more info." + ExitWithExitCode 0 + } + + # Check that every channel that Maestro told to promote the build to + # is available in YAML + $PromoteToChannelsIds = $PromoteToChannels -split "\D" | Where-Object { $_ } + + $hasErrors = $false + + foreach ($id in $PromoteToChannelsIds) { + if (($id -ne 0) -and ($id -notin $AvailableChannelIds)) { + Write-PipelineTaskError -Message "Channel $id is not present in the post-build YAML configuration! This is an error scenario. Please contact @dnceng." + $hasErrors = $true + } + } + + # The `Write-PipelineTaskError` doesn't error the script and we might report several errors + # in the previous lines. The check below makes sure that we return an error state from the + # script if we reported any validation error + if ($hasErrors) { + ExitWithExitCode 1 + } + + Write-Host 'done.' +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Category 'CheckChannelConsistency' -Message "There was an error while trying to check consistency of Maestro default channels for the build and post-build YAML configuration." + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/post-build/nuget-validation.ps1 b/src/arcade/eng/common/post-build/nuget-validation.ps1 new file mode 100644 index 00000000000..e5de00c8983 --- /dev/null +++ b/src/arcade/eng/common/post-build/nuget-validation.ps1 @@ -0,0 +1,22 @@ +# This script validates NuGet package metadata information using this +# tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage + +param( + [Parameter(Mandatory=$true)][string] $PackagesPath # Path to where the packages to be validated are +) + +# `tools.ps1` checks $ci to perform some actions. Since the post-build +# scripts don't necessarily execute in the same agent that run the +# build.ps1/sh script this variable isn't automatically set. +$ci = $true +$disableConfigureToolsetImport = $true +. $PSScriptRoot\..\tools.ps1 + +try { + & $PSScriptRoot\nuget-verification.ps1 ${PackagesPath}\*.nupkg +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_ + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/post-build/nuget-verification.ps1 b/src/arcade/eng/common/post-build/nuget-verification.ps1 new file mode 100644 index 00000000000..a365194a938 --- /dev/null +++ b/src/arcade/eng/common/post-build/nuget-verification.ps1 @@ -0,0 +1,121 @@ +<# +.SYNOPSIS + Verifies that Microsoft NuGet packages have proper metadata. +.DESCRIPTION + Downloads a verification tool and runs metadata validation on the provided NuGet packages. This script writes an + error if any of the provided packages fail validation. All arguments provided to this PowerShell script that do not + match PowerShell parameters are passed on to the verification tool downloaded during the execution of this script. +.PARAMETER NuGetExePath + The path to the nuget.exe binary to use. If not provided, nuget.exe will be downloaded into the -DownloadPath + directory. +.PARAMETER PackageSource + The package source to use to download the verification tool. If not provided, nuget.org will be used. +.PARAMETER DownloadPath + The directory path to download the verification tool and nuget.exe to. If not provided, + %TEMP%\NuGet.VerifyNuGetPackage will be used. +.PARAMETER args + Arguments that will be passed to the verification tool. +.EXAMPLE + PS> .\verify.ps1 *.nupkg + Verifies the metadata of all .nupkg files in the currect working directory. +.EXAMPLE + PS> .\verify.ps1 --help + Displays the help text of the downloaded verifiction tool. +.LINK + https://github.com/NuGet/NuGetGallery/blob/master/src/VerifyMicrosoftPackage/README.md +#> + +# This script was copied from https://github.com/NuGet/NuGetGallery/blob/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1 + +[CmdletBinding(PositionalBinding = $false)] +param( + [string]$NuGetExePath, + [string]$PackageSource = "https://api.nuget.org/v3/index.json", + [string]$DownloadPath, + [Parameter(ValueFromRemainingArguments = $true)] + [string[]]$args +) + +# The URL to download nuget.exe. +$nugetExeUrl = "https://dist.nuget.org/win-x86-commandline/v4.9.4/nuget.exe" + +# The package ID of the verification tool. +$packageId = "NuGet.VerifyMicrosoftPackage" + +# The location that nuget.exe and the verification tool will be downloaded to. +if (!$DownloadPath) { + $DownloadPath = (Join-Path $env:TEMP "NuGet.VerifyMicrosoftPackage") +} + +$fence = New-Object -TypeName string -ArgumentList '=', 80 + +# Create the download directory, if it doesn't already exist. +if (!(Test-Path $DownloadPath)) { + New-Item -ItemType Directory $DownloadPath | Out-Null +} +Write-Host "Using download path: $DownloadPath" + +if ($NuGetExePath) { + $nuget = $NuGetExePath +} else { + $downloadedNuGetExe = Join-Path $DownloadPath "nuget.exe" + + # Download nuget.exe, if it doesn't already exist. + if (!(Test-Path $downloadedNuGetExe)) { + Write-Host "Downloading nuget.exe from $nugetExeUrl..." + $ProgressPreference = 'SilentlyContinue' + try { + Invoke-WebRequest $nugetExeUrl -OutFile $downloadedNuGetExe + $ProgressPreference = 'Continue' + } catch { + $ProgressPreference = 'Continue' + Write-Error $_ + Write-Error "nuget.exe failed to download." + exit + } + } + + $nuget = $downloadedNuGetExe +} + +Write-Host "Using nuget.exe path: $nuget" +Write-Host " " + +# Download the latest version of the verification tool. +Write-Host "Downloading the latest version of $packageId from $packageSource..." +Write-Host $fence +& $nuget install $packageId ` + -Prerelease ` + -OutputDirectory $DownloadPath ` + -Source $PackageSource +Write-Host $fence +Write-Host " " + +if ($LASTEXITCODE -ne 0) { + Write-Error "nuget.exe failed to fetch the verify tool." + exit +} + +# Find the most recently downloaded tool +Write-Host "Finding the most recently downloaded verification tool." +$verifyProbePath = Join-Path $DownloadPath "$packageId.*" +$verifyPath = Get-ChildItem -Path $verifyProbePath -Directory ` + | Sort-Object -Property LastWriteTime -Descending ` + | Select-Object -First 1 +$verify = Join-Path $verifyPath "tools\NuGet.VerifyMicrosoftPackage.exe" +Write-Host "Using verification tool: $verify" +Write-Host " " + +# Execute the verification tool. +Write-Host "Executing the verify tool..." +Write-Host $fence +& $verify $args +Write-Host $fence +Write-Host " " + +# Respond to the exit code. +if ($LASTEXITCODE -ne 0) { + Write-Error "The verify tool found some problems." +} else { + Write-Output "The verify tool succeeded." +} diff --git a/src/arcade/eng/common/post-build/redact-logs.ps1 b/src/arcade/eng/common/post-build/redact-logs.ps1 new file mode 100644 index 00000000000..b7fc1959150 --- /dev/null +++ b/src/arcade/eng/common/post-build/redact-logs.ps1 @@ -0,0 +1,89 @@ +[CmdletBinding(PositionalBinding=$False)] +param( + [Parameter(Mandatory=$true, Position=0)][string] $InputPath, + [Parameter(Mandatory=$true)][string] $BinlogToolVersion, + [Parameter(Mandatory=$false)][string] $DotnetPath, + [Parameter(Mandatory=$false)][string] $PackageFeed = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json', + # File with strings to redact - separated by newlines. + # For comments start the line with '# ' - such lines are ignored + [Parameter(Mandatory=$false)][string] $TokensFilePath, + [Parameter(ValueFromRemainingArguments=$true)][String[]]$TokensToRedact +) + +try { + $ErrorActionPreference = 'Stop' + Set-StrictMode -Version 2.0 + + # `tools.ps1` checks $ci to perform some actions. Since the post-build + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + $disableConfigureToolsetImport = $true + . $PSScriptRoot\..\tools.ps1 + + $packageName = 'binlogtool' + + $dotnet = $DotnetPath + + if (!$dotnet) { + $dotnetRoot = InitializeDotNetCli -install:$true + $dotnet = "$dotnetRoot\dotnet.exe" + } + + $toolList = & "$dotnet" tool list -g + + if ($toolList -like "*$packageName*") { + & "$dotnet" tool uninstall $packageName -g + } + + $toolPath = "$PSScriptRoot\..\..\..\.tools" + $verbosity = 'minimal' + + New-Item -ItemType Directory -Force -Path $toolPath + + Push-Location -Path $toolPath + + try { + Write-Host "Installing Binlog redactor CLI..." + Write-Host "'$dotnet' new tool-manifest" + & "$dotnet" new tool-manifest + Write-Host "'$dotnet' tool install $packageName --local --add-source '$PackageFeed' -v $verbosity --version $BinlogToolVersion" + & "$dotnet" tool install $packageName --local --add-source "$PackageFeed" -v $verbosity --version $BinlogToolVersion + + if (Test-Path $TokensFilePath) { + Write-Host "Adding additional sensitive data for redaction from file: " $TokensFilePath + $TokensToRedact += Get-Content -Path $TokensFilePath | Foreach {$_.Trim()} | Where { $_ -notmatch "^# " } + } + + $optionalParams = [System.Collections.ArrayList]::new() + + Foreach ($p in $TokensToRedact) + { + if($p -match '^\$\(.*\)$') + { + Write-Host ("Ignoring token {0} as it is probably unexpanded AzDO variable" -f $p) + } + elseif($p) + { + $optionalParams.Add("-p:" + $p) | Out-Null + } + } + + & $dotnet binlogtool redact --input:$InputPath --recurse --in-place ` + @optionalParams + + if ($LastExitCode -ne 0) { + Write-PipelineTelemetryError -Category 'Redactor' -Type 'warning' -Message "Problems using Redactor tool (exit code: $LastExitCode). But ignoring them now." + } + } + finally { + Pop-Location + } + + Write-Host 'done.' +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Category 'Redactor' -Message "There was an error while trying to redact logs. Error: $_" + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/post-build/sourcelink-validation.ps1 b/src/arcade/eng/common/post-build/sourcelink-validation.ps1 new file mode 100644 index 00000000000..1976ef70fb8 --- /dev/null +++ b/src/arcade/eng/common/post-build/sourcelink-validation.ps1 @@ -0,0 +1,327 @@ +param( + [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where Symbols.NuGet packages to be checked are stored + [Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation + [Parameter(Mandatory=$false)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade + [Parameter(Mandatory=$false)][string] $GHCommit, # GitHub commit SHA used to build the packages + [Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 + +# `tools.ps1` checks $ci to perform some actions. Since the post-build +# scripts don't necessarily execute in the same agent that run the +# build.ps1/sh script this variable isn't automatically set. +$ci = $true +$disableConfigureToolsetImport = $true +. $PSScriptRoot\..\tools.ps1 + +# Cache/HashMap (File -> Exist flag) used to consult whether a file exist +# in the repository at a specific commit point. This is populated by inserting +# all files present in the repo at a specific commit point. +$global:RepoFiles = @{} + +# Maximum number of jobs to run in parallel +$MaxParallelJobs = 16 + +$MaxRetries = 5 +$RetryWaitTimeInSeconds = 30 + +# Wait time between check for system load +$SecondsBetweenLoadChecks = 10 + +if (!$InputPath -or !(Test-Path $InputPath)){ + Write-Host "No files to validate." + ExitWithExitCode 0 +} + +$ValidatePackage = { + param( + [string] $PackagePath # Full path to a Symbols.NuGet package + ) + + . $using:PSScriptRoot\..\tools.ps1 + + # Ensure input file exist + if (!(Test-Path $PackagePath)) { + Write-Host "Input file does not exist: $PackagePath" + return [pscustomobject]@{ + result = 1 + packagePath = $PackagePath + } + } + + # Extensions for which we'll look for SourceLink information + # For now we'll only care about Portable & Embedded PDBs + $RelevantExtensions = @('.dll', '.exe', '.pdb') + + Write-Host -NoNewLine 'Validating ' ([System.IO.Path]::GetFileName($PackagePath)) '...' + + $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) + $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId + $FailedFiles = 0 + + Add-Type -AssemblyName System.IO.Compression.FileSystem + + [System.IO.Directory]::CreateDirectory($ExtractPath) | Out-Null + + try { + $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) + + $zip.Entries | + Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | + ForEach-Object { + $FileName = $_.FullName + $Extension = [System.IO.Path]::GetExtension($_.Name) + $FakeName = -Join((New-Guid), $Extension) + $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName + + # We ignore resource DLLs + if ($FileName.EndsWith('.resources.dll')) { + return [pscustomobject]@{ + result = 0 + packagePath = $PackagePath + } + } + + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) + + $ValidateFile = { + param( + [string] $FullPath, # Full path to the module that has to be checked + [string] $RealPath, + [ref] $FailedFiles + ) + + $sourcelinkExe = "$env:USERPROFILE\.dotnet\tools" + $sourcelinkExe = Resolve-Path "$sourcelinkExe\sourcelink.exe" + $SourceLinkInfos = & $sourcelinkExe print-urls $FullPath | Out-String + + if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) { + $NumFailedLinks = 0 + + # We only care about Http addresses + $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches + + if ($Matches.Count -ne 0) { + $Matches.Value | + ForEach-Object { + $Link = $_ + $CommitUrl = "https://raw.githubusercontent.com/${using:GHRepoName}/${using:GHCommit}/" + + $FilePath = $Link.Replace($CommitUrl, "") + $Status = 200 + $Cache = $using:RepoFiles + + $attempts = 0 + + while ($attempts -lt $using:MaxRetries) { + if ( !($Cache.ContainsKey($FilePath)) ) { + try { + $Uri = $Link -as [System.URI] + + if ($Link -match "submodules") { + # Skip submodule links until sourcelink properly handles submodules + $Status = 200 + } + elseif ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) { + # Only GitHub links are valid + $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode + } + else { + # If it's not a github link, we want to break out of the loop and not retry. + $Status = 0 + $attempts = $using:MaxRetries + } + } + catch { + Write-Host $_ + $Status = 0 + } + } + + if ($Status -ne 200) { + $attempts++ + + if ($attempts -lt $using:MaxRetries) + { + $attemptsLeft = $using:MaxRetries - $attempts + Write-Warning "Download failed, $attemptsLeft attempts remaining, will retry in $using:RetryWaitTimeInSeconds seconds" + Start-Sleep -Seconds $using:RetryWaitTimeInSeconds + } + else { + if ($NumFailedLinks -eq 0) { + if ($FailedFiles.Value -eq 0) { + Write-Host + } + + Write-Host "`tFile $RealPath has broken links:" + } + + Write-Host "`t`tFailed to retrieve $Link" + + $NumFailedLinks++ + } + } + else { + break + } + } + } + } + + if ($NumFailedLinks -ne 0) { + $FailedFiles.value++ + $global:LASTEXITCODE = 1 + } + } + } + + &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles) + } + } + catch { + Write-Host $_ + } + finally { + $zip.Dispose() + } + + if ($FailedFiles -eq 0) { + Write-Host 'Passed.' + return [pscustomobject]@{ + result = 0 + packagePath = $PackagePath + } + } + else { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "$PackagePath has broken SourceLink links." + return [pscustomobject]@{ + result = 1 + packagePath = $PackagePath + } + } +} + +function CheckJobResult( + $result, + $packagePath, + [ref]$ValidationFailures, + [switch]$logErrors) { + if ($result -ne '0') { + if ($logErrors) { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "$packagePath has broken SourceLink links." + } + $ValidationFailures.Value++ + } +} + +function ValidateSourceLinkLinks { + if ($GHRepoName -ne '' -and !($GHRepoName -Match '^[^\s\/]+/[^\s\/]+$')) { + if (!($GHRepoName -Match '^[^\s-]+-[^\s]+$')) { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHRepoName should be in the format / or -. '$GHRepoName'" + ExitWithExitCode 1 + } + else { + $GHRepoName = $GHRepoName -replace '^([^\s-]+)-([^\s]+)$', '$1/$2'; + } + } + + if ($GHCommit -ne '' -and !($GHCommit -Match '^[0-9a-fA-F]{40}$')) { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'" + ExitWithExitCode 1 + } + + if ($GHRepoName -ne '' -and $GHCommit -ne '') { + $RepoTreeURL = -Join('http://api.github.com/repos/', $GHRepoName, '/git/trees/', $GHCommit, '?recursive=1') + $CodeExtensions = @('.cs', '.vb', '.fs', '.fsi', '.fsx', '.fsscript') + + try { + # Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash + $Data = Invoke-WebRequest $RepoTreeURL -UseBasicParsing | ConvertFrom-Json | Select-Object -ExpandProperty tree + + foreach ($file in $Data) { + $Extension = [System.IO.Path]::GetExtension($file.path) + + if ($CodeExtensions.Contains($Extension)) { + $RepoFiles[$file.path] = 1 + } + } + } + catch { + Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching." + } + } + elseif ($GHRepoName -ne '' -or $GHCommit -ne '') { + Write-Host 'For using the http caching mechanism both GHRepoName and GHCommit should be informed.' + } + + if (Test-Path $ExtractPath) { + Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue + } + + $ValidationFailures = 0 + + # Process each NuGet package in parallel + Get-ChildItem "$InputPath\*.symbols.nupkg" | + ForEach-Object { + Write-Host "Starting $($_.FullName)" + Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName | Out-Null + $NumJobs = @(Get-Job -State 'Running').Count + + while ($NumJobs -ge $MaxParallelJobs) { + Write-Host "There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again." + sleep $SecondsBetweenLoadChecks + $NumJobs = @(Get-Job -State 'Running').Count + } + + foreach ($Job in @(Get-Job -State 'Completed')) { + $jobResult = Wait-Job -Id $Job.Id | Receive-Job + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$ValidationFailures) -LogErrors + Remove-Job -Id $Job.Id + } + } + + foreach ($Job in @(Get-Job)) { + $jobResult = Wait-Job -Id $Job.Id | Receive-Job + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$ValidationFailures) + Remove-Job -Id $Job.Id + } + if ($ValidationFailures -gt 0) { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "$ValidationFailures package(s) failed validation." + ExitWithExitCode 1 + } +} + +function InstallSourcelinkCli { + $sourcelinkCliPackageName = 'sourcelink' + + $dotnetRoot = InitializeDotNetCli -install:$true + $dotnet = "$dotnetRoot\dotnet.exe" + $toolList = & "$dotnet" tool list --global + + if (($toolList -like "*$sourcelinkCliPackageName*") -and ($toolList -like "*$sourcelinkCliVersion*")) { + Write-Host "SourceLink CLI version $sourcelinkCliVersion is already installed." + } + else { + Write-Host "Installing SourceLink CLI version $sourcelinkCliVersion..." + Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' + & "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity "minimal" --global + } +} + +try { + InstallSourcelinkCli + + foreach ($Job in @(Get-Job)) { + Remove-Job -Id $Job.Id + } + + ValidateSourceLinkLinks +} +catch { + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'SourceLink' -Message $_ + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/post-build/symbols-validation.ps1 b/src/arcade/eng/common/post-build/symbols-validation.ps1 new file mode 100644 index 00000000000..7146e593ffa --- /dev/null +++ b/src/arcade/eng/common/post-build/symbols-validation.ps1 @@ -0,0 +1,337 @@ +param( + [Parameter(Mandatory = $true)][string] $InputPath, # Full path to directory where NuGet packages to be checked are stored + [Parameter(Mandatory = $true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation + [Parameter(Mandatory = $true)][string] $DotnetSymbolVersion, # Version of dotnet symbol to use + [Parameter(Mandatory = $false)][switch] $CheckForWindowsPdbs, # If we should check for the existence of windows pdbs in addition to portable PDBs + [Parameter(Mandatory = $false)][switch] $ContinueOnError, # If we should keep checking symbols after an error + [Parameter(Mandatory = $false)][switch] $Clean, # Clean extracted symbols directory after checking symbols + [Parameter(Mandatory = $false)][string] $SymbolExclusionFile # Exclude the symbols in the file from publishing to symbol server +) + +. $PSScriptRoot\..\tools.ps1 +# Maximum number of jobs to run in parallel +$MaxParallelJobs = 16 + +# Max number of retries +$MaxRetry = 5 + +# Wait time between check for system load +$SecondsBetweenLoadChecks = 10 + +# Set error codes +Set-Variable -Name "ERROR_BADEXTRACT" -Option Constant -Value -1 +Set-Variable -Name "ERROR_FILEDOESNOTEXIST" -Option Constant -Value -2 + +$WindowsPdbVerificationParam = "" +if ($CheckForWindowsPdbs) { + $WindowsPdbVerificationParam = "--windows-pdbs" +} + +$ExclusionSet = New-Object System.Collections.Generic.HashSet[string]; + +if (!$InputPath -or !(Test-Path $InputPath)){ + Write-Host "No symbols to validate." + ExitWithExitCode 0 +} + +#Check if the path exists +if ($SymbolExclusionFile -and (Test-Path $SymbolExclusionFile)){ + [string[]]$Exclusions = Get-Content "$SymbolExclusionFile" + $Exclusions | foreach { if($_ -and $_.Trim()){$ExclusionSet.Add($_)} } +} +else{ + Write-Host "Symbol Exclusion file does not exists. No symbols to exclude." +} + +$CountMissingSymbols = { + param( + [string] $PackagePath, # Path to a NuGet package + [string] $WindowsPdbVerificationParam # If we should check for the existence of windows pdbs in addition to portable PDBs + ) + + Add-Type -AssemblyName System.IO.Compression.FileSystem + + Write-Host "Validating $PackagePath " + + # Ensure input file exist + if (!(Test-Path $PackagePath)) { + Write-PipelineTaskError "Input file does not exist: $PackagePath" + return [pscustomobject]@{ + result = $using:ERROR_FILEDOESNOTEXIST + packagePath = $PackagePath + } + } + + # Extensions for which we'll look for symbols + $RelevantExtensions = @('.dll', '.exe', '.so', '.dylib') + + # How many files are missing symbol information + $MissingSymbols = 0 + + $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) + $PackageGuid = New-Guid + $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageGuid + $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols' + + try { + [System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath) + } + catch { + Write-Host "Something went wrong extracting $PackagePath" + Write-Host $_ + return [pscustomobject]@{ + result = $using:ERROR_BADEXTRACT + packagePath = $PackagePath + } + } + + Get-ChildItem -Recurse $ExtractPath | + Where-Object { $RelevantExtensions -contains $_.Extension } | + ForEach-Object { + $FileName = $_.FullName + if ($FileName -Match '\\ref\\') { + Write-Host "`t Ignoring reference assembly file " $FileName + return + } + + $FirstMatchingSymbolDescriptionOrDefault = { + param( + [string] $FullPath, # Full path to the module that has to be checked + [string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols + [string] $WindowsPdbVerificationParam, # Parameter to pass to potential check for windows-pdbs. + [string] $SymbolsPath + ) + + $FileName = [System.IO.Path]::GetFileName($FullPath) + $Extension = [System.IO.Path]::GetExtension($FullPath) + + # Those below are potential symbol files that the `dotnet symbol` might + # return. Which one will be returned depend on the type of file we are + # checking and which type of file was uploaded. + + # The file itself is returned + $SymbolPath = $SymbolsPath + '\' + $FileName + + # PDB file for the module + $PdbPath = $SymbolPath.Replace($Extension, '.pdb') + + # PDB file for R2R module (created by crossgen) + $NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb') + + # DBG file for a .so library + $SODbg = $SymbolPath.Replace($Extension, '.so.dbg') + + # DWARF file for a .dylib + $DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf') + + $dotnetSymbolExe = "$env:USERPROFILE\.dotnet\tools" + $dotnetSymbolExe = Resolve-Path "$dotnetSymbolExe\dotnet-symbol.exe" + + $totalRetries = 0 + + while ($totalRetries -lt $using:MaxRetry) { + + # Save the output and get diagnostic output + $output = & $dotnetSymbolExe --symbols --modules $WindowsPdbVerificationParam $TargetServerParam $FullPath -o $SymbolsPath --diagnostics | Out-String + + if ((Test-Path $PdbPath) -and (Test-path $SymbolPath)) { + return 'Module and PDB for Module' + } + elseif ((Test-Path $NGenPdb) -and (Test-Path $PdbPath) -and (Test-Path $SymbolPath)) { + return 'Dll, PDB and NGen PDB' + } + elseif ((Test-Path $SODbg) -and (Test-Path $SymbolPath)) { + return 'So and DBG for SO' + } + elseif ((Test-Path $DylibDwarf) -and (Test-Path $SymbolPath)) { + return 'Dylib and Dwarf for Dylib' + } + elseif (Test-Path $SymbolPath) { + return 'Module' + } + else + { + $totalRetries++ + } + } + + return $null + } + + $FileRelativePath = $FileName.Replace("$ExtractPath\", "") + if (($($using:ExclusionSet) -ne $null) -and ($($using:ExclusionSet).Contains($FileRelativePath) -or ($($using:ExclusionSet).Contains($FileRelativePath.Replace("\", "/"))))){ + Write-Host "Skipping $FileName from symbol validation" + } + + else { + $FileGuid = New-Guid + $ExpandedSymbolsPath = Join-Path -Path $SymbolsPath -ChildPath $FileGuid + + $SymbolsOnMSDL = & $FirstMatchingSymbolDescriptionOrDefault ` + -FullPath $FileName ` + -TargetServerParam '--microsoft-symbol-server' ` + -SymbolsPath "$ExpandedSymbolsPath-msdl" ` + -WindowsPdbVerificationParam $WindowsPdbVerificationParam + $SymbolsOnSymWeb = & $FirstMatchingSymbolDescriptionOrDefault ` + -FullPath $FileName ` + -TargetServerParam '--internal-server' ` + -SymbolsPath "$ExpandedSymbolsPath-symweb" ` + -WindowsPdbVerificationParam $WindowsPdbVerificationParam + + Write-Host -NoNewLine "`t Checking file " $FileName "... " + + if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) { + Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)" + } + else { + $MissingSymbols++ + + if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) { + Write-Host 'No symbols found on MSDL or SymWeb!' + } + else { + if ($SymbolsOnMSDL -eq $null) { + Write-Host 'No symbols found on MSDL!' + } + else { + Write-Host 'No symbols found on SymWeb!' + } + } + } + } + } + + if ($using:Clean) { + Remove-Item $ExtractPath -Recurse -Force + } + + Pop-Location + + return [pscustomobject]@{ + result = $MissingSymbols + packagePath = $PackagePath + } +} + +function CheckJobResult( + $result, + $packagePath, + [ref]$DupedSymbols, + [ref]$TotalFailures) { + if ($result -eq $ERROR_BADEXTRACT) { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$packagePath has duplicated symbol files" + $DupedSymbols.Value++ + } + elseif ($result -eq $ERROR_FILEDOESNOTEXIST) { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$packagePath does not exist" + $TotalFailures.Value++ + } + elseif ($result -gt '0') { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $result modules in the package $packagePath" + $TotalFailures.Value++ + } + else { + Write-Host "All symbols verified for package $packagePath" + } +} + +function CheckSymbolsAvailable { + if (Test-Path $ExtractPath) { + Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue + } + + $TotalPackages = 0 + $TotalFailures = 0 + $DupedSymbols = 0 + + Get-ChildItem "$InputPath\*.nupkg" | + ForEach-Object { + $FileName = $_.Name + $FullName = $_.FullName + + # These packages from Arcade-Services include some native libraries that + # our current symbol uploader can't handle. Below is a workaround until + # we get issue: https://github.com/dotnet/arcade/issues/2457 sorted. + if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') { + Write-Host "Ignoring Arcade-services file: $FileName" + Write-Host + return + } + elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') { + Write-Host "Ignoring Arcade-services file: $FileName" + Write-Host + return + } + + $TotalPackages++ + + Start-Job -ScriptBlock $CountMissingSymbols -ArgumentList @($FullName,$WindowsPdbVerificationParam) | Out-Null + + $NumJobs = @(Get-Job -State 'Running').Count + + while ($NumJobs -ge $MaxParallelJobs) { + Write-Host "There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again." + sleep $SecondsBetweenLoadChecks + $NumJobs = @(Get-Job -State 'Running').Count + } + + foreach ($Job in @(Get-Job -State 'Completed')) { + $jobResult = Wait-Job -Id $Job.Id | Receive-Job + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures) + Remove-Job -Id $Job.Id + } + Write-Host + } + + foreach ($Job in @(Get-Job)) { + $jobResult = Wait-Job -Id $Job.Id | Receive-Job + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures) + } + + if ($TotalFailures -gt 0 -or $DupedSymbols -gt 0) { + if ($TotalFailures -gt 0) { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Symbols missing for $TotalFailures/$TotalPackages packages" + } + + if ($DupedSymbols -gt 0) { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$DupedSymbols/$TotalPackages packages had duplicated symbol files and could not be extracted" + } + + ExitWithExitCode 1 + } + else { + Write-Host "All symbols validated!" + } +} + +function InstallDotnetSymbol { + $dotnetSymbolPackageName = 'dotnet-symbol' + + $dotnetRoot = InitializeDotNetCli -install:$true + $dotnet = "$dotnetRoot\dotnet.exe" + $toolList = & "$dotnet" tool list --global + + if (($toolList -like "*$dotnetSymbolPackageName*") -and ($toolList -like "*$dotnetSymbolVersion*")) { + Write-Host "dotnet-symbol version $dotnetSymbolVersion is already installed." + } + else { + Write-Host "Installing dotnet-symbol version $dotnetSymbolVersion..." + Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' + & "$dotnet" tool install $dotnetSymbolPackageName --version $dotnetSymbolVersion --verbosity "minimal" --global + } +} + +try { + InstallDotnetSymbol + + foreach ($Job in @(Get-Job)) { + Remove-Job -Id $Job.Id + } + + CheckSymbolsAvailable +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message $_ + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/retain-build.ps1 b/src/arcade/eng/common/retain-build.ps1 new file mode 100644 index 00000000000..e7ba975adeb --- /dev/null +++ b/src/arcade/eng/common/retain-build.ps1 @@ -0,0 +1,45 @@ + +Param( +[Parameter(Mandatory=$true)][int] $buildId, +[Parameter(Mandatory=$true)][string] $azdoOrgUri, +[Parameter(Mandatory=$true)][string] $azdoProject, +[Parameter(Mandatory=$true)][string] $token +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 + +function Get-AzDOHeaders( + [string] $token) +{ + $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":${token}")) + $headers = @{"Authorization"="Basic $base64AuthInfo"} + return $headers +} + +function Update-BuildRetention( + [string] $azdoOrgUri, + [string] $azdoProject, + [int] $buildId, + [string] $token) +{ + $headers = Get-AzDOHeaders -token $token + $requestBody = "{ + `"keepForever`": `"true`" + }" + + $requestUri = "${azdoOrgUri}/${azdoProject}/_apis/build/builds/${buildId}?api-version=6.0" + write-Host "Attempting to retain build using the following URI: ${requestUri} ..." + + try { + Invoke-RestMethod -Uri $requestUri -Method Patch -Body $requestBody -Header $headers -contentType "application/json" + Write-Host "Updated retention settings for build ${buildId}." + } + catch { + Write-Error "Failed to update retention settings for build: $_.Exception.Response.StatusDescription" + exit 1 + } +} + +Update-BuildRetention -azdoOrgUri $azdoOrgUri -azdoProject $azdoProject -buildId $buildId -token $token +exit 0 diff --git a/src/arcade/eng/common/sdl/NuGet.config b/src/arcade/eng/common/sdl/NuGet.config new file mode 100644 index 00000000000..3849bdb3cf5 --- /dev/null +++ b/src/arcade/eng/common/sdl/NuGet.config @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/arcade/eng/common/sdl/configure-sdl-tool.ps1 b/src/arcade/eng/common/sdl/configure-sdl-tool.ps1 new file mode 100644 index 00000000000..27f5a4115fc --- /dev/null +++ b/src/arcade/eng/common/sdl/configure-sdl-tool.ps1 @@ -0,0 +1,130 @@ +Param( + [string] $GuardianCliLocation, + [string] $WorkingDirectory, + [string] $TargetDirectory, + [string] $GdnFolder, + # The list of Guardian tools to configure. For each object in the array: + # - If the item is a [hashtable], it must contain these entries: + # - Name = The tool name as Guardian knows it. + # - Scenario = (Optional) Scenario-specific name for this configuration entry. It must be unique + # among all tool entries with the same Name. + # - Args = (Optional) Array of Guardian tool configuration args, like '@("Target > C:\temp")' + # - If the item is a [string] $v, it is treated as '@{ Name="$v" }' + [object[]] $ToolsList, + [string] $GuardianLoggerLevel='Standard', + # Optional: Additional params to add to any tool using CredScan. + [string[]] $CrScanAdditionalRunConfigParams, + # Optional: Additional params to add to any tool using PoliCheck. + [string[]] $PoliCheckAdditionalRunConfigParams, + # Optional: Additional params to add to any tool using CodeQL/Semmle. + [string[]] $CodeQLAdditionalRunConfigParams, + # Optional: Additional params to add to any tool using Binskim. + [string[]] $BinskimAdditionalRunConfigParams +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 +$disableConfigureToolsetImport = $true +$global:LASTEXITCODE = 0 + +try { + # `tools.ps1` checks $ci to perform some actions. Since the SDL + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + . $PSScriptRoot\..\tools.ps1 + + # Normalize tools list: all in [hashtable] form with defined values for each key. + $ToolsList = $ToolsList | + ForEach-Object { + if ($_ -is [string]) { + $_ = @{ Name = $_ } + } + + if (-not ($_['Scenario'])) { $_.Scenario = "" } + if (-not ($_['Args'])) { $_.Args = @() } + $_ + } + + Write-Host "List of tools to configure:" + $ToolsList | ForEach-Object { $_ | Out-String | Write-Host } + + # We store config files in the r directory of .gdn + $gdnConfigPath = Join-Path $GdnFolder 'r' + $ValidPath = Test-Path $GuardianCliLocation + + if ($ValidPath -eq $False) + { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location." + ExitWithExitCode 1 + } + + foreach ($tool in $ToolsList) { + # Put together the name and scenario to make a unique key. + $toolConfigName = $tool.Name + if ($tool.Scenario) { + $toolConfigName += "_" + $tool.Scenario + } + + Write-Host "=== Configuring $toolConfigName..." + + $gdnConfigFile = Join-Path $gdnConfigPath "$toolConfigName-configure.gdnconfig" + + # For some tools, add default and automatic args. + switch -Exact ($tool.Name) { + 'credscan' { + if ($targetDirectory) { + $tool.Args += "`"TargetDirectory < $TargetDirectory`"" + } + $tool.Args += "`"OutputType < pre`"" + $tool.Args += $CrScanAdditionalRunConfigParams + } + 'policheck' { + if ($targetDirectory) { + $tool.Args += "`"Target < $TargetDirectory`"" + } + $tool.Args += $PoliCheckAdditionalRunConfigParams + } + {$_ -in 'semmle', 'codeql'} { + if ($targetDirectory) { + $tool.Args += "`"SourceCodeDirectory < $TargetDirectory`"" + } + $tool.Args += $CodeQLAdditionalRunConfigParams + } + 'binskim' { + if ($targetDirectory) { + # Binskim crashes due to specific PDBs. GitHub issue: https://github.com/microsoft/binskim/issues/924. + # We are excluding all `_.pdb` files from the scan. + $tool.Args += "`"Target < $TargetDirectory\**;-:file|$TargetDirectory\**\_.pdb`"" + } + $tool.Args += $BinskimAdditionalRunConfigParams + } + } + + # Create variable pointing to the args array directly so we can use splat syntax later. + $toolArgs = $tool.Args + + # Configure the tool. If args array is provided or the current tool has some default arguments + # defined, add "--args" and splat each element on the end. Arg format is "{Arg id} < {Value}", + # one per parameter. Doc page for "guardian configure": + # https://dev.azure.com/securitytools/SecurityIntegration/_wiki/wikis/Guardian/1395/configure + Exec-BlockVerbosely { + & $GuardianCliLocation configure ` + --working-directory $WorkingDirectory ` + --tool $tool.Name ` + --output-path $gdnConfigFile ` + --logger-level $GuardianLoggerLevel ` + --noninteractive ` + --force ` + $(if ($toolArgs) { "--args" }) @toolArgs + Exit-IfNZEC "Sdl" + } + + Write-Host "Created '$toolConfigName' configuration file: $gdnConfigFile" + } +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/sdl/execute-all-sdl-tools.ps1 b/src/arcade/eng/common/sdl/execute-all-sdl-tools.ps1 new file mode 100644 index 00000000000..4715d75e974 --- /dev/null +++ b/src/arcade/eng/common/sdl/execute-all-sdl-tools.ps1 @@ -0,0 +1,167 @@ +Param( + [string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified) + [string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified) + [string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified + [string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade) + [string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master + [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located + [string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located + [string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault + + # Optional: list of SDL tools to run on source code. See 'configure-sdl-tool.ps1' for tools list + # format. + [object[]] $SourceToolsList, + # Optional: list of SDL tools to run on built artifacts. See 'configure-sdl-tool.ps1' for tools + # list format. + [object[]] $ArtifactToolsList, + # Optional: list of SDL tools to run without automatically specifying a target directory. See + # 'configure-sdl-tool.ps1' for tools list format. + [object[]] $CustomToolsList, + + [bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs. + [string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs. + [string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber) + [bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed + [bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs. + [string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs. + [string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs. + [string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. + [string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. + [string] $GuardianLoggerLevel='Standard', # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error + [string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1") + [string[]] $PoliCheckAdditionalRunConfigParams, # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1") + [string[]] $CodeQLAdditionalRunConfigParams, # Optional: Additional Params to custom build a Semmle/CodeQL run config in the format @("xyz < abc","sdf < 1") + [string[]] $BinskimAdditionalRunConfigParams, # Optional: Additional Params to custom build a Binskim run config in the format @("xyz < abc","sdf < 1") + [bool] $BreakOnFailure=$False # Optional: Fail the build if there were errors during the run +) + +try { + $ErrorActionPreference = 'Stop' + Set-StrictMode -Version 2.0 + $disableConfigureToolsetImport = $true + $global:LASTEXITCODE = 0 + + # `tools.ps1` checks $ci to perform some actions. Since the SDL + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + . $PSScriptRoot\..\tools.ps1 + + #Replace repo names to the format of org/repo + if (!($Repository.contains('/'))) { + $RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2'; + } + else{ + $RepoName = $Repository; + } + + if ($GuardianPackageName) { + $guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path 'tools' 'guardian.cmd')) + } else { + $guardianCliLocation = $GuardianCliLocation + } + + $workingDirectory = (Split-Path $SourceDirectory -Parent) + $ValidPath = Test-Path $guardianCliLocation + + if ($ValidPath -eq $False) + { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Invalid Guardian CLI Location.' + ExitWithExitCode 1 + } + + Exec-BlockVerbosely { + & $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel + } + $gdnFolder = Join-Path $workingDirectory '.gdn' + + if ($TsaOnboard) { + if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) { + Exec-BlockVerbosely { + & $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel + } + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + } else { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not onboard to TSA -- not all required values ($TsaCodebaseName, $TsaNotificationEmail, $TsaCodebaseAdmin, $TsaBugAreaPath) were specified.' + ExitWithExitCode 1 + } + } + + # Configure a list of tools with a default target directory. Populates the ".gdn/r" directory. + function Configure-ToolsList([object[]] $tools, [string] $targetDirectory) { + if ($tools -and $tools.Count -gt 0) { + Exec-BlockVerbosely { + & $(Join-Path $PSScriptRoot 'configure-sdl-tool.ps1') ` + -GuardianCliLocation $guardianCliLocation ` + -WorkingDirectory $workingDirectory ` + -TargetDirectory $targetDirectory ` + -GdnFolder $gdnFolder ` + -ToolsList $tools ` + -AzureDevOpsAccessToken $AzureDevOpsAccessToken ` + -GuardianLoggerLevel $GuardianLoggerLevel ` + -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams ` + -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams ` + -CodeQLAdditionalRunConfigParams $CodeQLAdditionalRunConfigParams ` + -BinskimAdditionalRunConfigParams $BinskimAdditionalRunConfigParams + if ($BreakOnFailure) { + Exit-IfNZEC "Sdl" + } + } + } + } + + # Configure Artifact and Source tools with default Target directories. + Configure-ToolsList $ArtifactToolsList $ArtifactsDirectory + Configure-ToolsList $SourceToolsList $SourceDirectory + # Configure custom tools with no default Target directory. + Configure-ToolsList $CustomToolsList $null + + # At this point, all tools are configured in the ".gdn" directory. Run them all in a single call. + # (If we used "run" multiple times, each run would overwrite data from earlier runs.) + Exec-BlockVerbosely { + & $(Join-Path $PSScriptRoot 'run-sdl.ps1') ` + -GuardianCliLocation $guardianCliLocation ` + -WorkingDirectory $SourceDirectory ` + -UpdateBaseline $UpdateBaseline ` + -GdnFolder $gdnFolder + } + + if ($TsaPublish) { + if ($TsaBranchName -and $BuildNumber) { + if (-not $TsaRepositoryName) { + $TsaRepositoryName = "$($Repository)-$($BranchName)" + } + Exec-BlockVerbosely { + & $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel + } + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + } else { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not publish to TSA -- not all required values ($TsaBranchName, $BuildNumber) were specified.' + ExitWithExitCode 1 + } + } + + if ($BreakOnFailure) { + Write-Host "Failing the build in case of breaking results..." + Exec-BlockVerbosely { + & $guardianCliLocation break --working-directory $workingDirectory --logger-level $GuardianLoggerLevel + } + } else { + Write-Host "Letting the build pass even if there were breaking results..." + } +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + exit 1 +} diff --git a/src/arcade/eng/common/sdl/extract-artifact-archives.ps1 b/src/arcade/eng/common/sdl/extract-artifact-archives.ps1 new file mode 100644 index 00000000000..68da4fbf257 --- /dev/null +++ b/src/arcade/eng/common/sdl/extract-artifact-archives.ps1 @@ -0,0 +1,63 @@ +# This script looks for each archive file in a directory and extracts it into the target directory. +# For example, the file "$InputPath/bin.tar.gz" extracts to "$ExtractPath/bin.tar.gz.extracted/**". +# Uses the "tar" utility added to Windows 10 / Windows 2019 that supports tar.gz and zip. +param( + # Full path to directory where archives are stored. + [Parameter(Mandatory=$true)][string] $InputPath, + # Full path to directory to extract archives into. May be the same as $InputPath. + [Parameter(Mandatory=$true)][string] $ExtractPath +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 + +$disableConfigureToolsetImport = $true + +try { + # `tools.ps1` checks $ci to perform some actions. Since the SDL + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + . $PSScriptRoot\..\tools.ps1 + + Measure-Command { + $jobs = @() + + # Find archive files for non-Windows and Windows builds. + $archiveFiles = @( + Get-ChildItem (Join-Path $InputPath "*.tar.gz") + Get-ChildItem (Join-Path $InputPath "*.zip") + ) + + foreach ($targzFile in $archiveFiles) { + $jobs += Start-Job -ScriptBlock { + $file = $using:targzFile + $fileName = [System.IO.Path]::GetFileName($file) + $extractDir = Join-Path $using:ExtractPath "$fileName.extracted" + + New-Item $extractDir -ItemType Directory -Force | Out-Null + + Write-Host "Extracting '$file' to '$extractDir'..." + + # Pipe errors to stdout to prevent PowerShell detecting them and quitting the job early. + # This type of quit skips the catch, so we wouldn't be able to tell which file triggered the + # error. Save output so it can be stored in the exception string along with context. + $output = tar -xf $file -C $extractDir 2>&1 + # Handle NZEC manually rather than using Exit-IfNZEC: we are in a background job, so we + # don't have access to the outer scope. + if ($LASTEXITCODE -ne 0) { + throw "Error extracting '$file': non-zero exit code ($LASTEXITCODE). Output: '$output'" + } + + Write-Host "Extracted to $extractDir" + } + } + + Receive-Job $jobs -Wait + } +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/sdl/extract-artifact-packages.ps1 b/src/arcade/eng/common/sdl/extract-artifact-packages.ps1 new file mode 100644 index 00000000000..f031ed5b25e --- /dev/null +++ b/src/arcade/eng/common/sdl/extract-artifact-packages.ps1 @@ -0,0 +1,82 @@ +param( + [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where artifact packages are stored + [Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 + +$disableConfigureToolsetImport = $true + +function ExtractArtifacts { + if (!(Test-Path $InputPath)) { + Write-Host "Input Path does not exist: $InputPath" + ExitWithExitCode 0 + } + $Jobs = @() + Get-ChildItem "$InputPath\*.nupkg" | + ForEach-Object { + $Jobs += Start-Job -ScriptBlock $ExtractPackage -ArgumentList $_.FullName + } + + foreach ($Job in $Jobs) { + Wait-Job -Id $Job.Id | Receive-Job + } +} + +try { + # `tools.ps1` checks $ci to perform some actions. Since the SDL + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + . $PSScriptRoot\..\tools.ps1 + + $ExtractPackage = { + param( + [string] $PackagePath # Full path to a NuGet package + ) + + if (!(Test-Path $PackagePath)) { + Write-PipelineTelemetryError -Category 'Build' -Message "Input file does not exist: $PackagePath" + ExitWithExitCode 1 + } + + $RelevantExtensions = @('.dll', '.exe', '.pdb') + Write-Host -NoNewLine 'Extracting ' ([System.IO.Path]::GetFileName($PackagePath)) '...' + + $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) + $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId + + Add-Type -AssemblyName System.IO.Compression.FileSystem + + [System.IO.Directory]::CreateDirectory($ExtractPath); + + try { + $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) + + $zip.Entries | + Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | + ForEach-Object { + $TargetPath = Join-Path -Path $ExtractPath -ChildPath (Split-Path -Path $_.FullName) + [System.IO.Directory]::CreateDirectory($TargetPath); + + $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.FullName + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile) + } + } + catch { + Write-Host $_ + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 + } + finally { + $zip.Dispose() + } + } + Measure-Command { ExtractArtifacts } +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/sdl/init-sdl.ps1 b/src/arcade/eng/common/sdl/init-sdl.ps1 new file mode 100644 index 00000000000..3ac1d92b370 --- /dev/null +++ b/src/arcade/eng/common/sdl/init-sdl.ps1 @@ -0,0 +1,55 @@ +Param( + [string] $GuardianCliLocation, + [string] $Repository, + [string] $BranchName='master', + [string] $WorkingDirectory, + [string] $AzureDevOpsAccessToken, + [string] $GuardianLoggerLevel='Standard' +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 +$disableConfigureToolsetImport = $true +$global:LASTEXITCODE = 0 + +# `tools.ps1` checks $ci to perform some actions. Since the SDL +# scripts don't necessarily execute in the same agent that run the +# build.ps1/sh script this variable isn't automatically set. +$ci = $true +. $PSScriptRoot\..\tools.ps1 + +# Don't display the console progress UI - it's a huge perf hit +$ProgressPreference = 'SilentlyContinue' + +# Construct basic auth from AzDO access token; construct URI to the repository's gdn folder stored in that repository; construct location of zip file +$encodedPat = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$AzureDevOpsAccessToken")) +$escapedRepository = [Uri]::EscapeDataString("/$Repository/$BranchName/.gdn") +$uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cfg/Items?path=$escapedRepository&versionDescriptor[versionOptions]=0&`$format=zip&api-version=5.0" +$zipFile = "$WorkingDirectory/gdn.zip" + +Add-Type -AssemblyName System.IO.Compression.FileSystem +$gdnFolder = (Join-Path $WorkingDirectory '.gdn') + +try { + # if the folder does not exist, we'll do a guardian init and push it to the remote repository + Write-Host 'Initializing Guardian...' + Write-Host "$GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel" + & $GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian init failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + # We create the mainbaseline so it can be edited later + Write-Host "$GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline" + & $GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian baseline failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + ExitWithExitCode 0 +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/sdl/run-sdl.ps1 b/src/arcade/eng/common/sdl/run-sdl.ps1 new file mode 100644 index 00000000000..2eac8c78f10 --- /dev/null +++ b/src/arcade/eng/common/sdl/run-sdl.ps1 @@ -0,0 +1,49 @@ +Param( + [string] $GuardianCliLocation, + [string] $WorkingDirectory, + [string] $GdnFolder, + [string] $UpdateBaseline, + [string] $GuardianLoggerLevel='Standard' +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 +$disableConfigureToolsetImport = $true +$global:LASTEXITCODE = 0 + +try { + # `tools.ps1` checks $ci to perform some actions. Since the SDL + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + . $PSScriptRoot\..\tools.ps1 + + # We store config files in the r directory of .gdn + $gdnConfigPath = Join-Path $GdnFolder 'r' + $ValidPath = Test-Path $GuardianCliLocation + + if ($ValidPath -eq $False) + { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location." + ExitWithExitCode 1 + } + + $gdnConfigFiles = Get-ChildItem $gdnConfigPath -Recurse -Include '*.gdnconfig' + Write-Host "Discovered Guardian config files:" + $gdnConfigFiles | Out-String | Write-Host + + Exec-BlockVerbosely { + & $GuardianCliLocation run ` + --working-directory $WorkingDirectory ` + --baseline mainbaseline ` + --update-baseline $UpdateBaseline ` + --logger-level $GuardianLoggerLevel ` + --config @gdnConfigFiles + Exit-IfNZEC "Sdl" + } +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/sdl/sdl.ps1 b/src/arcade/eng/common/sdl/sdl.ps1 new file mode 100644 index 00000000000..648c5068d7d --- /dev/null +++ b/src/arcade/eng/common/sdl/sdl.ps1 @@ -0,0 +1,38 @@ + +function Install-Gdn { + param( + [Parameter(Mandatory=$true)] + [string]$Path, + + # If omitted, install the latest version of Guardian, otherwise install that specific version. + [string]$Version + ) + + $ErrorActionPreference = 'Stop' + Set-StrictMode -Version 2.0 + $disableConfigureToolsetImport = $true + $global:LASTEXITCODE = 0 + + # `tools.ps1` checks $ci to perform some actions. Since the SDL + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + . $PSScriptRoot\..\tools.ps1 + + $argumentList = @("install", "Microsoft.Guardian.Cli", "-Source https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json", "-OutputDirectory $Path", "-NonInteractive", "-NoCache") + + if ($Version) { + $argumentList += "-Version $Version" + } + + Start-Process nuget -Verbose -ArgumentList $argumentList -NoNewWindow -Wait + + $gdnCliPath = Get-ChildItem -Filter guardian.cmd -Recurse -Path $Path + + if (!$gdnCliPath) + { + Write-PipelineTelemetryError -Category 'Sdl' -Message 'Failure installing Guardian' + } + + return $gdnCliPath.FullName +} \ No newline at end of file diff --git a/src/arcade/eng/common/sdl/trim-assets-version.ps1 b/src/arcade/eng/common/sdl/trim-assets-version.ps1 new file mode 100644 index 00000000000..0daa2a9e946 --- /dev/null +++ b/src/arcade/eng/common/sdl/trim-assets-version.ps1 @@ -0,0 +1,75 @@ +<# +.SYNOPSIS +Install and run the 'Microsoft.DotNet.VersionTools.Cli' tool with the 'trim-artifacts-version' command to trim the version from the NuGet assets file name. + +.PARAMETER InputPath +Full path to directory where artifact packages are stored + +.PARAMETER Recursive +Search for NuGet packages recursively + +#> + +Param( + [string] $InputPath, + [bool] $Recursive = $true +) + +$CliToolName = "Microsoft.DotNet.VersionTools.Cli" + +function Install-VersionTools-Cli { + param( + [Parameter(Mandatory=$true)][string]$Version + ) + + Write-Host "Installing the package '$CliToolName' with a version of '$version' ..." + $feed = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" + + $argumentList = @("tool", "install", "--local", "$CliToolName", "--add-source $feed", "--no-cache", "--version $Version", "--create-manifest-if-needed") + Start-Process "$dotnet" -Verbose -ArgumentList $argumentList -NoNewWindow -Wait +} + +# ------------------------------------------------------------------- + +if (!(Test-Path $InputPath)) { + Write-Host "Input Path '$InputPath' does not exist" + ExitWithExitCode 1 +} + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 + +$disableConfigureToolsetImport = $true +$global:LASTEXITCODE = 0 + +# `tools.ps1` checks $ci to perform some actions. Since the SDL +# scripts don't necessarily execute in the same agent that run the +# build.ps1/sh script this variable isn't automatically set. +$ci = $true +. $PSScriptRoot\..\tools.ps1 + +try { + $dotnetRoot = InitializeDotNetCli -install:$true + $dotnet = "$dotnetRoot\dotnet.exe" + + $toolsetVersion = Read-ArcadeSdkVersion + Install-VersionTools-Cli -Version $toolsetVersion + + $cliToolFound = (& "$dotnet" tool list --local | Where-Object {$_.Split(' ')[0] -eq $CliToolName}) + if ($null -eq $cliToolFound) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "The '$CliToolName' tool is not installed." + ExitWithExitCode 1 + } + + Exec-BlockVerbosely { + & "$dotnet" $CliToolName trim-assets-version ` + --assets-path $InputPath ` + --recursive $Recursive + Exit-IfNZEC "Sdl" + } +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} diff --git a/src/arcade/eng/common/template-guidance.md b/src/arcade/eng/common/template-guidance.md new file mode 100644 index 00000000000..98bbc1ded0b --- /dev/null +++ b/src/arcade/eng/common/template-guidance.md @@ -0,0 +1,133 @@ +# Overview + +Arcade provides templates for public (`/templates`) and 1ES pipeline templates (`/templates-official`) scenarios. Pipelines which are required to be managed by 1ES pipeline templates should reference `/templates-offical`, all other pipelines may reference `/templates`. + +## How to use + +Basic guidance is: + +- 1ES Pipeline Template or 1ES Microbuild template runs should reference `eng/common/templates-official`. Any internal production-graded pipeline should use these templates. + +- All other runs should reference `eng/common/templates`. + +See [azure-pipelines.yml](../../azure-pipelines.yml) (templates-official example) or [azure-pipelines-pr.yml](../../azure-pipelines-pr.yml) (templates example) for examples. + +#### The `templateIs1ESManaged` parameter + +The `templateIs1ESManaged` is available on most templates and affects which of the variants is used for nested templates. See [Development Notes](#development-notes) below for more information on the `templateIs1ESManaged1 parameter. + +- For templates under `job/`, `jobs/`, `steps`, or `post-build/`, this parameter must be explicitly set. + +## Multiple outputs + +1ES pipeline templates impose a policy where every publish artifact execution results in additional security scans being injected into your pipeline. When using `templates-official/jobs/jobs.yml`, Arcade reduces the number of additional security injections by gathering all publishing outputs into the [Build.ArtifactStagingDirectory](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services), and utilizing the [outputParentDirectory](https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs#multiple-outputs) feature of 1ES pipeline templates. When implementing your pipeline, if you ensure publish artifacts are located in the `$(Build.ArtifactStagingDirectory)`, and utilize the 1ES provided template context, then you can reduce the number of security scans for your pipeline. + +Example: +``` yaml +# azure-pipelines.yml +extends: + template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate + parameters: + stages: + - stage: build + jobs: + - template: /eng/common/templates-official/jobs/jobs.yml@self + parameters: + # 1ES makes use of outputs to reduce security task injection overhead + templateContext: + outputs: + - output: pipelineArtifact + displayName: 'Publish logs from source' + continueOnError: true + condition: always() + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/log + artifactName: Logs + jobs: + - job: Windows + steps: + - script: echo "friendly neighborhood" > artifacts/marvel/spiderman.txt + # copy build outputs to artifact staging directory for publishing + - task: CopyFiles@2 + displayName: Gather build output + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts/marvel' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/marvel' +``` + +Note: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`). + +## Development notes + +**Folder / file structure** + +``` text +eng\common\ + [templates || templates-official]\ + job\ + job.yml (shim + artifact publishing logic) + onelocbuild.yml (shim) + publish-build-assets.yml (shim) + source-build.yml (shim) + source-index-stage1.yml (shim) + jobs\ + codeql-build.yml (shim) + jobs.yml (shim) + source-build.yml (shim) + post-build\ + post-build.yml (shim) + common-variabls.yml (shim) + setup-maestro-vars.yml (shim) + steps\ + publish-build-artifacts.yml (logic) + publish-pipeline-artifacts.yml (logic) + component-governance.yml (shim) + generate-sbom.yml (shim) + publish-logs.yml (shim) + retain-build.yml (shim) + send-to-helix.yml (shim) + source-build.yml (shim) + variables\ + pool-providers.yml (logic + redirect) # templates/variables/pool-providers.yml will redirect to templates-official/variables/pool-providers.yml if you are running in the internal project + sdl-variables.yml (logic) + core-templates\ + job\ + job.yml (logic) + onelocbuild.yml (logic) + publish-build-assets.yml (logic) + source-build.yml (logic) + source-index-stage1.yml (logic) + jobs\ + codeql-build.yml (logic) + jobs.yml (logic) + source-build.yml (logic) + post-build\ + common-variabls.yml (logic) + post-build.yml (logic) + setup-maestro-vars.yml (logic) + steps\ + component-governance.yml (logic) + generate-sbom.yml (logic) + publish-build-artifacts.yml (redirect) + publish-logs.yml (logic) + publish-pipeline-artifacts.yml (redirect) + retain-build.yml (logic) + send-to-helix.yml (logic) + source-build.yml (logic) + variables\ + pool-providers.yml (redirect) +``` + +In the table above, a file is designated as "shim", "logic", or "redirect". + +- shim - represents a yaml file which is an intermediate step between pipeline logic and .Net Core Engineering's templates (`core-templates`) and defines the `is1ESPipeline` parameter value. + +- logic - represents actual base template logic. + +- redirect- represents a file in `core-templates` which redirects to the "logic" file in either `templates` or `templates-official`. + +Logic for Arcade's templates live **primarily** in the `core-templates` folder. The exceptions to the location of the logic files are around artifact publishing, which is handled differently between 1es pipeline templates and standard templates. `templates` and `templates-official` provide shim entry points which redirect to `core-templates` while also defining the `is1ESPipeline` parameter. If a shim is referenced in `templates`, then `is1ESPipeline` is set to `false`. If a shim is referenced in `templates-official`, then `is1ESPipeline` is set to `true`. + +Within `templates` and `templates-official`, the templates at the "stages", and "jobs" / "job" level have been replaced with shims. Templates at the "steps" and "variables" level are typically too granular to be replaced with shims and instead persist logic which is directly applicable to either scenario. + +Within `core-templates`, there are a handful of places where logic is dependent on which shim entry point was used. In those places, we redirect back to the respective logic file in `templates` or `templates-official`. diff --git a/src/arcade/eng/common/templates-official/job/onelocbuild.yml b/src/arcade/eng/common/templates-official/job/onelocbuild.yml new file mode 100644 index 00000000000..0f0c514b912 --- /dev/null +++ b/src/arcade/eng/common/templates-official/job/onelocbuild.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/job/onelocbuild.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/job/publish-build-assets.yml b/src/arcade/eng/common/templates-official/job/publish-build-assets.yml new file mode 100644 index 00000000000..d667a70e8de --- /dev/null +++ b/src/arcade/eng/common/templates-official/job/publish-build-assets.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/job/publish-build-assets.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/job/source-build.yml b/src/arcade/eng/common/templates-official/job/source-build.yml new file mode 100644 index 00000000000..1a480034b67 --- /dev/null +++ b/src/arcade/eng/common/templates-official/job/source-build.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/job/source-build.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/job/source-index-stage1.yml b/src/arcade/eng/common/templates-official/job/source-index-stage1.yml new file mode 100644 index 00000000000..6d5ead316f9 --- /dev/null +++ b/src/arcade/eng/common/templates-official/job/source-index-stage1.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/job/source-index-stage1.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/jobs/codeql-build.yml b/src/arcade/eng/common/templates-official/jobs/codeql-build.yml new file mode 100644 index 00000000000..a726322ecfe --- /dev/null +++ b/src/arcade/eng/common/templates-official/jobs/codeql-build.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/jobs/codeql-build.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/jobs/jobs.yml b/src/arcade/eng/common/templates-official/jobs/jobs.yml new file mode 100644 index 00000000000..007deddaea0 --- /dev/null +++ b/src/arcade/eng/common/templates-official/jobs/jobs.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/jobs/jobs.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/jobs/source-build.yml b/src/arcade/eng/common/templates-official/jobs/source-build.yml new file mode 100644 index 00000000000..483e7b611f3 --- /dev/null +++ b/src/arcade/eng/common/templates-official/jobs/source-build.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/jobs/source-build.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/post-build/common-variables.yml b/src/arcade/eng/common/templates-official/post-build/common-variables.yml new file mode 100644 index 00000000000..c32fc49233f --- /dev/null +++ b/src/arcade/eng/common/templates-official/post-build/common-variables.yml @@ -0,0 +1,8 @@ +variables: +- template: /eng/common/core-templates/post-build/common-variables.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/post-build/post-build.yml b/src/arcade/eng/common/templates-official/post-build/post-build.yml new file mode 100644 index 00000000000..2364c0fd4a5 --- /dev/null +++ b/src/arcade/eng/common/templates-official/post-build/post-build.yml @@ -0,0 +1,8 @@ +stages: +- template: /eng/common/core-templates/post-build/post-build.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/post-build/setup-maestro-vars.yml b/src/arcade/eng/common/templates-official/post-build/setup-maestro-vars.yml new file mode 100644 index 00000000000..024397d8786 --- /dev/null +++ b/src/arcade/eng/common/templates-official/post-build/setup-maestro-vars.yml @@ -0,0 +1,8 @@ +steps: +- template: /eng/common/core-templates/post-build/setup-maestro-vars.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/steps/component-governance.yml b/src/arcade/eng/common/templates-official/steps/component-governance.yml new file mode 100644 index 00000000000..30bb3985ca2 --- /dev/null +++ b/src/arcade/eng/common/templates-official/steps/component-governance.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/component-governance.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/enable-internal-runtimes.yml b/src/arcade/eng/common/templates-official/steps/enable-internal-runtimes.yml new file mode 100644 index 00000000000..f9dd238c6cd --- /dev/null +++ b/src/arcade/eng/common/templates-official/steps/enable-internal-runtimes.yml @@ -0,0 +1,9 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default +steps: +- template: /eng/common/core-templates/steps/enable-internal-runtimes.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/enable-internal-sources.yml b/src/arcade/eng/common/templates-official/steps/enable-internal-sources.yml new file mode 100644 index 00000000000..e6d57182284 --- /dev/null +++ b/src/arcade/eng/common/templates-official/steps/enable-internal-sources.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/enable-internal-sources.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/steps/generate-sbom.yml b/src/arcade/eng/common/templates-official/steps/generate-sbom.yml new file mode 100644 index 00000000000..9a89a4706d9 --- /dev/null +++ b/src/arcade/eng/common/templates-official/steps/generate-sbom.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/generate-sbom.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/get-delegation-sas.yml b/src/arcade/eng/common/templates-official/steps/get-delegation-sas.yml new file mode 100644 index 00000000000..c5a9c1f8275 --- /dev/null +++ b/src/arcade/eng/common/templates-official/steps/get-delegation-sas.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/get-delegation-sas.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/get-federated-access-token.yml b/src/arcade/eng/common/templates-official/steps/get-federated-access-token.yml new file mode 100644 index 00000000000..c8dcf6b8139 --- /dev/null +++ b/src/arcade/eng/common/templates-official/steps/get-federated-access-token.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/get-federated-access-token.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/steps/publish-logs.yml b/src/arcade/eng/common/templates-official/steps/publish-logs.yml new file mode 100644 index 00000000000..579fd531e94 --- /dev/null +++ b/src/arcade/eng/common/templates-official/steps/publish-logs.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/publish-logs.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/publish-pipeline-artifacts.yml b/src/arcade/eng/common/templates-official/steps/publish-pipeline-artifacts.yml new file mode 100644 index 00000000000..172f9f0fdc9 --- /dev/null +++ b/src/arcade/eng/common/templates-official/steps/publish-pipeline-artifacts.yml @@ -0,0 +1,28 @@ +parameters: +- name: is1ESPipeline + type: boolean + default: true + +- name: args + type: object + default: {} + +steps: +- ${{ if ne(parameters.is1ESPipeline, true) }}: + - 'eng/common/templates-official cannot be referenced from a non-1ES managed template': error +- task: 1ES.PublishPipelineArtifact@1 + displayName: ${{ coalesce(parameters.args.displayName, 'Publish to Build Artifact') }} + ${{ if parameters.args.condition }}: + condition: ${{ parameters.args.condition }} + ${{ else }}: + condition: succeeded() + ${{ if parameters.args.continueOnError }}: + continueOnError: ${{ parameters.args.continueOnError }} + inputs: + targetPath: ${{ parameters.args.targetPath }} + ${{ if parameters.args.artifactName }}: + artifactName: ${{ parameters.args.artifactName }} + ${{ if parameters.args.properties }}: + properties: ${{ parameters.args.properties }} + ${{ if parameters.args.sbomEnabled }}: + sbomEnabled: ${{ parameters.args.sbomEnabled }} diff --git a/src/arcade/eng/common/templates-official/steps/retain-build.yml b/src/arcade/eng/common/templates-official/steps/retain-build.yml new file mode 100644 index 00000000000..5594551508a --- /dev/null +++ b/src/arcade/eng/common/templates-official/steps/retain-build.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/retain-build.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/send-to-helix.yml b/src/arcade/eng/common/templates-official/steps/send-to-helix.yml new file mode 100644 index 00000000000..6500f21bf84 --- /dev/null +++ b/src/arcade/eng/common/templates-official/steps/send-to-helix.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/send-to-helix.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/source-build.yml b/src/arcade/eng/common/templates-official/steps/source-build.yml new file mode 100644 index 00000000000..8f92c49e7b0 --- /dev/null +++ b/src/arcade/eng/common/templates-official/steps/source-build.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/source-build.yml + parameters: + is1ESPipeline: true + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/variables/pool-providers.yml b/src/arcade/eng/common/templates-official/variables/pool-providers.yml new file mode 100644 index 00000000000..1f308b24efc --- /dev/null +++ b/src/arcade/eng/common/templates-official/variables/pool-providers.yml @@ -0,0 +1,45 @@ +# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, +# otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. + +# Motivation: +# Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS +# (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing +# (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS. +# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services +# team needs to move resources around and create new and potentially differently-named pools. Using this template +# file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. + +# How to use: +# This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). +# If we find alternate naming conventions in broad usage it can be added to the condition below. +# +# First, import the template in an arcade-ified repo to pick up the variables, e.g.: +# +# variables: +# - template: /eng/common/templates-official/variables/pool-providers.yml +# +# ... then anywhere specifying the pool provider use the runtime variables, +# $(DncEngInternalBuildPool) +# +# pool: +# name: $(DncEngInternalBuildPool) +# image: 1es-windows-2022 + +variables: + # Coalesce the target and source branches so we know when a PR targets a release branch + # If these variables are somehow missing, fall back to main (tends to have more capacity) + + # Any new -Svc alternative pools should have variables added here to allow for splitting work + + - name: DncEngInternalBuildPool + value: $[ + replace( + replace( + eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), + True, + 'NetCore1ESPool-Svc-Internal' + ), + False, + 'NetCore1ESPool-Internal' + ) + ] \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/variables/sdl-variables.yml b/src/arcade/eng/common/templates-official/variables/sdl-variables.yml new file mode 100644 index 00000000000..dbdd66d4a4b --- /dev/null +++ b/src/arcade/eng/common/templates-official/variables/sdl-variables.yml @@ -0,0 +1,7 @@ +variables: +# The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in +# sync with the packages.config file. +- name: DefaultGuardianVersion + value: 0.109.0 +- name: GuardianPackagesConfigFile + value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config \ No newline at end of file diff --git a/src/arcade/eng/common/templates/job/onelocbuild.yml b/src/arcade/eng/common/templates/job/onelocbuild.yml new file mode 100644 index 00000000000..ff829dc4c70 --- /dev/null +++ b/src/arcade/eng/common/templates/job/onelocbuild.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/job/onelocbuild.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/job/publish-build-assets.yml b/src/arcade/eng/common/templates/job/publish-build-assets.yml new file mode 100644 index 00000000000..ab2edec2adb --- /dev/null +++ b/src/arcade/eng/common/templates/job/publish-build-assets.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/job/publish-build-assets.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/job/source-build.yml b/src/arcade/eng/common/templates/job/source-build.yml new file mode 100644 index 00000000000..e44d47b1d76 --- /dev/null +++ b/src/arcade/eng/common/templates/job/source-build.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/job/source-build.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/job/source-index-stage1.yml b/src/arcade/eng/common/templates/job/source-index-stage1.yml new file mode 100644 index 00000000000..89f3291593c --- /dev/null +++ b/src/arcade/eng/common/templates/job/source-index-stage1.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/job/source-index-stage1.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/jobs/codeql-build.yml b/src/arcade/eng/common/templates/jobs/codeql-build.yml new file mode 100644 index 00000000000..517f24d6a52 --- /dev/null +++ b/src/arcade/eng/common/templates/jobs/codeql-build.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/jobs/codeql-build.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/jobs/jobs.yml b/src/arcade/eng/common/templates/jobs/jobs.yml new file mode 100644 index 00000000000..388e9037b3e --- /dev/null +++ b/src/arcade/eng/common/templates/jobs/jobs.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/jobs/jobs.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/jobs/source-build.yml b/src/arcade/eng/common/templates/jobs/source-build.yml new file mode 100644 index 00000000000..818d4c326db --- /dev/null +++ b/src/arcade/eng/common/templates/jobs/source-build.yml @@ -0,0 +1,7 @@ +jobs: +- template: /eng/common/core-templates/jobs/source-build.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/post-build/common-variables.yml b/src/arcade/eng/common/templates/post-build/common-variables.yml new file mode 100644 index 00000000000..7fa10587559 --- /dev/null +++ b/src/arcade/eng/common/templates/post-build/common-variables.yml @@ -0,0 +1,8 @@ +variables: +- template: /eng/common/core-templates/post-build/common-variables.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/post-build/post-build.yml b/src/arcade/eng/common/templates/post-build/post-build.yml new file mode 100644 index 00000000000..53ede714bdd --- /dev/null +++ b/src/arcade/eng/common/templates/post-build/post-build.yml @@ -0,0 +1,8 @@ +stages: +- template: /eng/common/core-templates/post-build/post-build.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/post-build/setup-maestro-vars.yml b/src/arcade/eng/common/templates/post-build/setup-maestro-vars.yml new file mode 100644 index 00000000000..a79fab5b441 --- /dev/null +++ b/src/arcade/eng/common/templates/post-build/setup-maestro-vars.yml @@ -0,0 +1,8 @@ +steps: +- template: /eng/common/core-templates/post-build/setup-maestro-vars.yml + parameters: + # Specifies whether to use 1ES + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/steps/component-governance.yml b/src/arcade/eng/common/templates/steps/component-governance.yml new file mode 100644 index 00000000000..c12a5f8d21d --- /dev/null +++ b/src/arcade/eng/common/templates/steps/component-governance.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/component-governance.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/enable-internal-runtimes.yml b/src/arcade/eng/common/templates/steps/enable-internal-runtimes.yml new file mode 100644 index 00000000000..b21a8038cc1 --- /dev/null +++ b/src/arcade/eng/common/templates/steps/enable-internal-runtimes.yml @@ -0,0 +1,10 @@ +# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' +# variable with the base64-encoded SAS token, by default + +steps: +- template: /eng/common/core-templates/steps/enable-internal-runtimes.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/enable-internal-sources.yml b/src/arcade/eng/common/templates/steps/enable-internal-sources.yml new file mode 100644 index 00000000000..5f87e9abb8a --- /dev/null +++ b/src/arcade/eng/common/templates/steps/enable-internal-sources.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/enable-internal-sources.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/steps/generate-sbom.yml b/src/arcade/eng/common/templates/steps/generate-sbom.yml new file mode 100644 index 00000000000..26dc00a2e0f --- /dev/null +++ b/src/arcade/eng/common/templates/steps/generate-sbom.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/generate-sbom.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/get-delegation-sas.yml b/src/arcade/eng/common/templates/steps/get-delegation-sas.yml new file mode 100644 index 00000000000..83760c9798e --- /dev/null +++ b/src/arcade/eng/common/templates/steps/get-delegation-sas.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/get-delegation-sas.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/get-federated-access-token.yml b/src/arcade/eng/common/templates/steps/get-federated-access-token.yml new file mode 100644 index 00000000000..31e151d9d9e --- /dev/null +++ b/src/arcade/eng/common/templates/steps/get-federated-access-token.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/get-federated-access-token.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/steps/publish-logs.yml b/src/arcade/eng/common/templates/steps/publish-logs.yml new file mode 100644 index 00000000000..4ea86bd8823 --- /dev/null +++ b/src/arcade/eng/common/templates/steps/publish-logs.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/publish-logs.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/publish-pipeline-artifacts.yml b/src/arcade/eng/common/templates/steps/publish-pipeline-artifacts.yml new file mode 100644 index 00000000000..5dd698b212f --- /dev/null +++ b/src/arcade/eng/common/templates/steps/publish-pipeline-artifacts.yml @@ -0,0 +1,34 @@ +parameters: +- name: is1ESPipeline + type: boolean + default: false + +- name: args + type: object + default: {} + +steps: +- ${{ if eq(parameters.is1ESPipeline, true) }}: + - 'eng/common/templates cannot be referenced from a 1ES managed template': error +- task: PublishPipelineArtifact@1 + displayName: ${{ coalesce(parameters.args.displayName, 'Publish to Build Artifact') }} + ${{ if parameters.args.condition }}: + condition: ${{ parameters.args.condition }} + ${{ else }}: + condition: succeeded() + ${{ if parameters.args.continueOnError }}: + continueOnError: ${{ parameters.args.continueOnError }} + inputs: + targetPath: ${{ parameters.args.targetPath }} + ${{ if parameters.args.artifactName }}: + artifactName: ${{ parameters.args.artifactName }} + ${{ if parameters.args.publishLocation }}: + publishLocation: ${{ parameters.args.publishLocation }} + ${{ if parameters.args.fileSharePath }}: + fileSharePath: ${{ parameters.args.fileSharePath }} + ${{ if parameters.args.Parallel }}: + parallel: ${{ parameters.args.Parallel }} + ${{ if parameters.args.parallelCount }}: + parallelCount: ${{ parameters.args.parallelCount }} + ${{ if parameters.args.properties }}: + properties: ${{ parameters.args.properties }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/steps/retain-build.yml b/src/arcade/eng/common/templates/steps/retain-build.yml new file mode 100644 index 00000000000..8e841ace3d2 --- /dev/null +++ b/src/arcade/eng/common/templates/steps/retain-build.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/retain-build.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/send-to-helix.yml b/src/arcade/eng/common/templates/steps/send-to-helix.yml new file mode 100644 index 00000000000..39f99fc2762 --- /dev/null +++ b/src/arcade/eng/common/templates/steps/send-to-helix.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/send-to-helix.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/source-build.yml b/src/arcade/eng/common/templates/steps/source-build.yml new file mode 100644 index 00000000000..23c1d6f4e9f --- /dev/null +++ b/src/arcade/eng/common/templates/steps/source-build.yml @@ -0,0 +1,7 @@ +steps: +- template: /eng/common/core-templates/steps/source-build.yml + parameters: + is1ESPipeline: false + + ${{ each parameter in parameters }}: + ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/variables/pool-providers.yml b/src/arcade/eng/common/templates/variables/pool-providers.yml new file mode 100644 index 00000000000..e0b19c14a07 --- /dev/null +++ b/src/arcade/eng/common/templates/variables/pool-providers.yml @@ -0,0 +1,59 @@ +# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, +# otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. + +# Motivation: +# Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS +# (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing +# (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS. +# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services +# team needs to move resources around and create new and potentially differently-named pools. Using this template +# file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. + +# How to use: +# This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). +# If we find alternate naming conventions in broad usage it can be added to the condition below. +# +# First, import the template in an arcade-ified repo to pick up the variables, e.g.: +# +# variables: +# - template: /eng/common/templates/variables/pool-providers.yml +# +# ... then anywhere specifying the pool provider use the runtime variables, +# $(DncEngInternalBuildPool) and $ (DncEngPublicBuildPool), e.g.: +# +# pool: +# name: $(DncEngInternalBuildPool) +# demands: ImageOverride -equals windows.vs2019.amd64 +variables: + - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - template: /eng/common/templates-official/variables/pool-providers.yml + - ${{ else }}: + # Coalesce the target and source branches so we know when a PR targets a release branch + # If these variables are somehow missing, fall back to main (tends to have more capacity) + + # Any new -Svc alternative pools should have variables added here to allow for splitting work + - name: DncEngPublicBuildPool + value: $[ + replace( + replace( + eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), + True, + 'NetCore-Svc-Public' + ), + False, + 'NetCore-Public' + ) + ] + + - name: DncEngInternalBuildPool + value: $[ + replace( + replace( + eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), + True, + 'NetCore1ESPool-Svc-Internal' + ), + False, + 'NetCore1ESPool-Internal' + ) + ] From 9995898e73a174fbe094cdedbde11423ec4e33db Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Mon, 28 Apr 2025 15:30:37 +0100 Subject: [PATCH 04/38] Allow `_` in `use!` bindings values (#18487) --- .../.FSharp.Compiler.Service/9.0.300.md | 1 + docs/release-notes/.Language/preview.md | 1 + .../CheckComputationExpressions.fs | 33 +++++-- src/Compiler/FSComp.txt | 1 + src/Compiler/Facilities/LanguageFeatures.fs | 3 + src/Compiler/Facilities/LanguageFeatures.fsi | 1 + src/Compiler/pars.fsy | 22 ++++- src/Compiler/xlf/FSComp.txt.cs.xlf | 5 + src/Compiler/xlf/FSComp.txt.de.xlf | 5 + src/Compiler/xlf/FSComp.txt.es.xlf | 5 + src/Compiler/xlf/FSComp.txt.fr.xlf | 5 + src/Compiler/xlf/FSComp.txt.it.xlf | 5 + src/Compiler/xlf/FSComp.txt.ja.xlf | 5 + src/Compiler/xlf/FSComp.txt.ko.xlf | 5 + src/Compiler/xlf/FSComp.txt.pl.xlf | 5 + src/Compiler/xlf/FSComp.txt.pt-BR.xlf | 5 + src/Compiler/xlf/FSComp.txt.ru.xlf | 5 + src/Compiler/xlf/FSComp.txt.tr.xlf | 5 + src/Compiler/xlf/FSComp.txt.zh-Hans.xlf | 5 + src/Compiler/xlf/FSComp.txt.zh-Hant.xlf | 5 + .../UseBindings/UseBang01.fs | 58 ++++++++++++ .../UseBindings/UseBang02.fs | 57 ++++++++++++ .../UseBindings/UseBang03.fs | 71 +++++++++++++++ .../UseBindings/UseBang04.fs | 91 +++++++++++++++++++ .../UseBindings/UseBangBindings.fs | 86 ++++++++++++++++++ .../UseBindings/UseBindingDiscard02.fs | 26 ++++++ .../UseBindings/UseBindings.fs | 32 +------ .../FSharp.Compiler.ComponentTests.fsproj | 1 + 28 files changed, 511 insertions(+), 38 deletions(-) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang03.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang04.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBangBindings.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindingDiscard02.fs diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index 16f5721e22a..7224d401d6e 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -25,6 +25,7 @@ * Fixed [#18433](https://github.com/dotnet/fsharp/issues/18433), a rare case of an internal error in xml comment processing. ([PR #18436](https://github.com/dotnet/fsharp/pull/18436)) * Fix confusing type inference error in task expression ([Issue #13789](https://github.com/dotnet/fsharp/issues/13789), [PR #18450](https://github.com/dotnet/fsharp/pull/18450)) * Fix missing `null` highlighting in tooltips ([PR #18457](https://github.com/dotnet/fsharp/pull/18457)) +* Allow `_` in `use!` bindings values (lift FS1228 restriction) ([PR #18487](https://github.com/dotnet/fsharp/pull/18487)) * Make `[]` combination work([PR #18444](https://github.com/dotnet/fsharp/pull/18444/)) ### Added diff --git a/docs/release-notes/.Language/preview.md b/docs/release-notes/.Language/preview.md index 905e086a163..d1576a84eca 100644 --- a/docs/release-notes/.Language/preview.md +++ b/docs/release-notes/.Language/preview.md @@ -4,6 +4,7 @@ * Deprecate places where `seq` can be omitted. ([Language suggestion #1033](https://github.com/fsharp/fslang-suggestions/issues/1033), [PR #17772](https://github.com/dotnet/fsharp/pull/17772)) * Added type conversions cache, only enabled for compiler runs ([PR#17668](https://github.com/dotnet/fsharp/pull/17668)) * Support ValueOption + Struct attribute as optional parameter for methods ([Language suggestion #1136](https://github.com/fsharp/fslang-suggestions/issues/1136), [PR #18098](https://github.com/dotnet/fsharp/pull/18098)) +* Allow `_` in `use!` bindings values (lift FS1228 restriction) ([PR #18487](https://github.com/dotnet/fsharp/pull/18487)) * Warn when `unit` is passed to an `obj`-typed argument ([PR #18330](https://github.com/dotnet/fsharp/pull/18330)) ### Fixed diff --git a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs index 011b6f0a5ac..f861665a5fc 100644 --- a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs @@ -4,6 +4,7 @@ /// with generalization at appropriate points. module internal FSharp.Compiler.CheckComputationExpressions +open FSharp.Compiler.TcGlobals open Internal.Utilities.Library open FSharp.Compiler.AccessibilityLogic open FSharp.Compiler.AttributeChecking @@ -1783,12 +1784,33 @@ let rec TryTranslateComputationExpression if ceenv.isQuery then error (Error(FSComp.SR.tcBindMayNotBeUsedInQueries (), mBind)) - match pat, andBangs with - | (SynPat.Named(ident = SynIdent(id, _); isThisVal = false) | SynPat.LongIdent(longDotId = SynLongIdent(id = [ id ]))), [] -> + match andBangs with + | [] -> // Valid pattern case - handle with Using + Bind requireBuilderMethod "Using" mBind cenv ceenv.env ceenv.ad ceenv.builderTy mBind requireBuilderMethod "Bind" mBind cenv ceenv.env ceenv.ad ceenv.builderTy mBind + let supportsUseBangBindingValueDiscard = + ceenv.cenv.g.langVersion.SupportsFeature LanguageFeature.UseBangBindingValueDiscard + + // use! x = ... + // use! (x) = ... + // use! (__) = ... + // use! _ = ... + // use! (_) = ... + let rec extractIdentifierFromPattern pat = + match pat with + | SynPat.Named(ident = SynIdent(id, _); isThisVal = false) -> id, pat + | SynPat.LongIdent(longDotId = SynLongIdent(id = [ id ])) -> id, pat + | SynPat.Wild(m) when supportsUseBangBindingValueDiscard -> + // To properly call the Using(disposable) CE member, we need to convert the wildcard to a SynPat.Named + let tmpIdent = mkSynId m "_" + tmpIdent, SynPat.Named(SynIdent(tmpIdent, None), false, None, m) + | SynPat.Paren(pat = pat) -> extractIdentifierFromPattern pat + | _ -> error (Error(FSComp.SR.tcInvalidUseBangBinding (), pat.Range)) + + let ident, pat = extractIdentifierFromPattern pat + let bindExpr = let consumeExpr = SynExpr.MatchLambda( @@ -1809,14 +1831,14 @@ let rec TryTranslateComputationExpression ) let consumeExpr = - mkSynCall "Using" mBind [ SynExpr.Ident id; consumeExpr ] ceenv.builderValName + mkSynCall "Using" mBind [ SynExpr.Ident ident; consumeExpr ] ceenv.builderValName let consumeExpr = SynExpr.MatchLambda( false, mBind, [ - SynMatchClause(pat, None, consumeExpr, id.idRange, DebugPointAtTarget.No, SynMatchClauseTrivia.Zero) + SynMatchClause(pat, None, consumeExpr, ident.idRange, DebugPointAtTarget.No, SynMatchClauseTrivia.Zero) ], DebugPointAtBinding.NoneAtInvisible, mBind @@ -1829,8 +1851,7 @@ let rec TryTranslateComputationExpression |> addBindDebugPoint spBind Some(translatedCtxt bindExpr) - | _pat, [] -> error (Error(FSComp.SR.tcInvalidUseBangBinding (), mBind)) - | _pat, _ands -> + | _ -> // Has andBangs let m = match andBangs with diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index 9bfa12ce963..aab4de2a554 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -1798,3 +1798,4 @@ featureDontWarnOnUppercaseIdentifiersInBindingPatterns,"Don't warn on uppercase featureDeprecatePlacesWhereSeqCanBeOmitted,"Deprecate places where 'seq' can be omitted" featureSupportValueOptionsAsOptionalParameters,"Support ValueOption as valid type for optional member parameters" featureSupportWarnWhenUnitPassedToObjArg,"Warn when unit is passed to a member accepting `obj` argument, e.g. `Method(o:obj)` will warn if called via `Method()`." +featureUseBangBindingValueDiscard,"Allows use! _ = ... in computation expressions" diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index 7a9a14b8602..874b709d658 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -99,6 +99,7 @@ type LanguageFeature = | DeprecatePlacesWhereSeqCanBeOmitted | SupportValueOptionsAsOptionalParameters | WarnWhenUnitPassedToObjArg + | UseBangBindingValueDiscard /// LanguageVersion management type LanguageVersion(versionText) = @@ -229,6 +230,7 @@ type LanguageVersion(versionText) = LanguageFeature.DeprecatePlacesWhereSeqCanBeOmitted, previewVersion LanguageFeature.SupportValueOptionsAsOptionalParameters, previewVersion LanguageFeature.WarnWhenUnitPassedToObjArg, previewVersion + LanguageFeature.UseBangBindingValueDiscard, previewVersion ] static let defaultLanguageVersion = LanguageVersion("default") @@ -391,6 +393,7 @@ type LanguageVersion(versionText) = | LanguageFeature.DeprecatePlacesWhereSeqCanBeOmitted -> FSComp.SR.featureDeprecatePlacesWhereSeqCanBeOmitted () | LanguageFeature.SupportValueOptionsAsOptionalParameters -> FSComp.SR.featureSupportValueOptionsAsOptionalParameters () | LanguageFeature.WarnWhenUnitPassedToObjArg -> FSComp.SR.featureSupportWarnWhenUnitPassedToObjArg () + | LanguageFeature.UseBangBindingValueDiscard -> FSComp.SR.featureUseBangBindingValueDiscard () /// Get a version string associated with the given feature. static member GetFeatureVersionString feature = diff --git a/src/Compiler/Facilities/LanguageFeatures.fsi b/src/Compiler/Facilities/LanguageFeatures.fsi index 410a8b193c9..f50357f3fe0 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fsi +++ b/src/Compiler/Facilities/LanguageFeatures.fsi @@ -90,6 +90,7 @@ type LanguageFeature = | DeprecatePlacesWhereSeqCanBeOmitted | SupportValueOptionsAsOptionalParameters | WarnWhenUnitPassedToObjArg + | UseBangBindingValueDiscard /// LanguageVersion management type LanguageVersion = diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 7cac0ad0dc0..e6e3a657592 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -3755,13 +3755,23 @@ atomicPattern: { SynPat.ArrayOrList(true, $2, lhs parseState) } | UNDERSCORE - { SynPat.Wild(lhs parseState) } + { (* Underscore pattern ('_') is represented as SynPat.Wild + This wild pattern is used in all binding forms: + - let _ = ... + - use _ = ... + - let! _ = ... + - use! _ = ... + This ensures consistent representation of wildcard bindings in the AST *) + SynPat.Wild(lhs parseState) } | QMARK ident { SynPat.OptionalVal($2, lhs parseState) } | atomicPatternLongIdent %prec prec_atompat_pathop - { let vis, lidwd = $1 + { (* This rule handles identifiers in patterns like 'use! __' *) + (* For simple identifiers (like '__'), it creates a SynPat.Named AST node *) + (* For complex paths (A.B.C) or uppercase ids, it calls mkSynPatMaybeVar *) + let vis, lidwd = $1 if not (isNilOrSingleton lidwd.LongIdent) || String.isLeadingIdentifierCharacterUpperCase (List.head lidwd.LongIdent).idText then mkSynPatMaybeVar lidwd vis (lhs parseState) else @@ -4431,7 +4441,13 @@ declExpr: SynExpr.YieldOrReturnFrom(($1, not $1), arbExpr ("yield!", mYieldAll), mYieldAll, trivia) } | BINDER headBindingPattern EQUALS typedSequentialExprBlock IN opt_OBLOCKSEP moreBinders typedSequentialExprBlock %prec expr_let - { let spBind = DebugPointAtBinding.Yes(rhs2 parseState 1 5) + { (* This rule handles the 'use!' and 'let!' binding expressions in computation expressions *) + (* The BINDER token represents keywords like 'use!' or 'let!' *) + (* headBindingPattern represents patterns in the binding: + - Underscore ('_') patterns are preserved as SynPat.Wild + - Named patterns ('__') are represented as SynPat.Named + - Identifiers (like 'value') are represented as SynPat.LongIdent *) + let spBind = DebugPointAtBinding.Yes(rhs2 parseState 1 5) let mEquals = rhs parseState 3 let m = unionRanges (rhs parseState 1) $8.Range let trivia: SynExprLetOrUseBangTrivia = { LetOrUseBangKeyword = rhs parseState 1 ; EqualsRange = Some mEquals } diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index 7d64601c303..adb2b01d334 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -657,6 +657,11 @@ Interoperabilita mezi neřízeným obecným omezením jazyka C# a F# (emitovat další modreq) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 67f4270377e..7deaf880012 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -657,6 +657,11 @@ Interop zwischen nicht verwalteter generischer Einschränkung in C# und F# (zusätzlicher ModReq ausgeben) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index 9478e3d2c55..e8090e5579e 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -657,6 +657,11 @@ Interoperabilidad entre la restricción genérica no administrada de C# y F# (emitir modreq adicional) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index 57fade5d250..25faaecb3a4 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -657,6 +657,11 @@ Interopérabilité entre les contraintes génériques non gérées de C# et F# (émettre un modreq supplémentaire) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index 14d670e8455..30d68a3330b 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -657,6 +657,11 @@ Interoperabilità tra il vincolo generico non gestito di C# e di F# (crea un modreq aggiuntivo) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index 78acb0fd944..9f2709fa559 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -657,6 +657,11 @@ C# と F# のアンマネージド ジェネリック制約の間の相互運用 (追加の modreq を出力) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index 604ac431e4a..2c80d361ef6 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -657,6 +657,11 @@ C#과 F#의 관리되지 않는 제네릭 제약 조건 간의 Interop(추가 modreq 내보내기) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index fdee3d82f7d..0bd80d75a72 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -657,6 +657,11 @@ Międzyoperacyjnie między niezarządzanym ograniczeniem ogólnym języka C# i F# (emituj dodatkowe modreq) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index 2f86c57d960..c0e79885fed 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -657,6 +657,11 @@ Interoperabilidade entre a restrição genérica não gerenciada de C# e F# (emitir modreq adicional) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index fefd5255a0b..3a4610e93df 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -657,6 +657,11 @@ Взаимодействие между универсальным ограничением "unmanaged" C# и F#(создание дополнительного modreq) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index 5325f0ab09f..6d1bee2476b 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -657,6 +657,11 @@ C# ile F#' arasında yönetilmeyen genel kısıtlama (ek modreq yayın) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index 2e8b957d810..a60e3188af7 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -657,6 +657,11 @@ C# 和 F# 的非托管泛型约束之间的互操作(发出额外的 modreq) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index f0924b3d30f..3253c4e45f7 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -657,6 +657,11 @@ C# 與 F# 的非受控泛型條件約束之間的 Interop (發出額外的 modreq) + + Allows use! _ = ... in computation expressions + Allows use! _ = ... in computation expressions + + Use type conversion cache during compilation Use type conversion cache during compilation diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang01.fs new file mode 100644 index 00000000000..4b6335c3789 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang01.fs @@ -0,0 +1,58 @@ +open System + +open System + +type Disposable(id: int) = + static let mutable disposedIds = Set.empty + static let mutable constructedIds = Set.empty + + do constructedIds <- constructedIds.Add(id) + + member _.Id = id + + static member GetDisposed() = disposedIds + static member GetConstructed() = constructedIds + static member Reset() = + disposedIds <- Set.empty + constructedIds <- Set.empty + + interface IDisposable with + member this.Dispose() = disposedIds <- disposedIds.Add(this.Id) + +type DisposableBuilder() = + member _.Using(resource: #IDisposable, f) = + async { + use res = resource + return! f res + } + + member _.Bind(disposable: Disposable, f) = async.Bind(async.Return(disposable), f) + member _.Return(x) = async.Return x + member _.ReturnFrom(x) = x + member _.Bind(task, f) = async.Bind(task, f) + +let counterDisposable = DisposableBuilder() + +let testBindingPatterns() = + Disposable.Reset() + + counterDisposable { + use! res = new Disposable(1) + use! __ = new Disposable(2) + use! (res1) = new Disposable(3) + use! _ = new Disposable(4) + use! (_) = new Disposable(5) + return () + } |> Async.RunSynchronously + + let constructed = Disposable.GetConstructed() + let disposed = Disposable.GetDisposed() + let undisposed = constructed - disposed + + if not undisposed.IsEmpty then + printfn $"Undisposed instances: %A{undisposed}" + failwithf "Not all disposables were properly disposed" + else + printfn $"Success! All %d{constructed.Count} disposables were properly disposed" + +testBindingPatterns() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang02.fs new file mode 100644 index 00000000000..d57f0b8c14d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang02.fs @@ -0,0 +1,57 @@ +open System + +open System + +type Disposable(id: int) = + static let mutable disposedIds = Set.empty + static let mutable constructedIds = Set.empty + + do constructedIds <- constructedIds.Add(id) + + member _.Id = id + + static member GetDisposed() = disposedIds + static member GetConstructed() = constructedIds + static member Reset() = + disposedIds <- Set.empty + constructedIds <- Set.empty + + interface IDisposable with + member this.Dispose() = disposedIds <- disposedIds.Add(this.Id) + +type DisposableBuilder() = + member _.Using(resource: #IDisposable, f) = + async { + use res = resource + return! f res + } + + member _.Bind(disposable: Disposable, f) = async.Bind(async.Return(disposable), f) + member _.Return(x) = async.Return x + member _.ReturnFrom(x) = x + member _.Bind(task, f) = async.Bind(task, f) + +let counterDisposable = DisposableBuilder() + +let testBindingPatterns() = + Disposable.Reset() + + counterDisposable { + use! _ = new Disposable(1) + use! _ = new Disposable(2) + use! (_) = new Disposable(3) + use! (_) = new Disposable(4) + return () + } |> Async.RunSynchronously + + let constructed = Disposable.GetConstructed() + let disposed = Disposable.GetDisposed() + let undisposed = constructed - disposed + + if not undisposed.IsEmpty then + printfn $"Undisposed instances: %A{undisposed}" + failwithf "Not all disposables were properly disposed" + else + printfn $"Success! All %d{constructed.Count} disposables were properly disposed" + +testBindingPatterns() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang03.fs new file mode 100644 index 00000000000..57c814c561a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang03.fs @@ -0,0 +1,71 @@ +open System + +type Disposable(id: int) = + static let mutable disposedIds = Map.empty + static let mutable constructedIds = Set.empty + + do constructedIds <- constructedIds.Add(id) + + member _.Id = id + + static member GetDisposed() = disposedIds + static member GetConstructed() = constructedIds + static member Reset() = + disposedIds <- Map.empty + constructedIds <- Set.empty + + interface IDisposable with + member this.Dispose() = + let currentCount = + match Map.tryFind this.Id disposedIds with + | Some count -> count + | None -> 0 + disposedIds <- Map.add this.Id (currentCount + 1) disposedIds + +type DisposableBuilder() = + member _.Using(resource: #IDisposable, f) = + async { + use res = resource + return! f res + } + + member _.Bind(disposable: Disposable, f) = async.Bind(async.Return(disposable), f) + member _.Return(x) = async.Return x + member _.ReturnFrom(x) = x + member _.Bind(task, f) = async.Bind(task, f) + +let counterDisposable = DisposableBuilder() + +let testBindingPatterns() = + Disposable.Reset() + + counterDisposable { + use! res = new Disposable(1) + use! __ = new Disposable(2) + use! (res1) = new Disposable(3) + use! _ = new Disposable(4) + use! (_) = new Disposable(5) + return () + } |> Async.RunSynchronously + + let constructed = Disposable.GetConstructed() + let disposed = Disposable.GetDisposed() + + let disposedSet = Set.ofSeq (Map.keys disposed) + let undisposed = constructed - disposedSet + + if not undisposed.IsEmpty then + printfn $"Undisposed instances: %A{undisposed}" + failwithf "Not all disposables were properly disposed" + + let multipleDisposed = + disposed + |> Map.filter (fun _ count -> count > 1) + + if not multipleDisposed.IsEmpty then + printfn $"Objects disposed multiple times: %A{multipleDisposed}" + failwithf "Some disposables were disposed multiple times" + + printfn $"Success! All %d{constructed.Count} disposables were properly disposed exactly once" + +testBindingPatterns() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang04.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang04.fs new file mode 100644 index 00000000000..3c32e29bc46 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang04.fs @@ -0,0 +1,91 @@ +open System + +type Disposable(id: int) = + static let mutable disposedIds = Map.empty + static let mutable constructedIds = Set.empty + + do constructedIds <- constructedIds.Add(id) + + member _.Id = id + + static member GetDisposed() = disposedIds + static member GetConstructed() = constructedIds + static member Reset() = + disposedIds <- Map.empty + constructedIds <- Set.empty + + interface IDisposable with + member this.Dispose() = + let currentCount = + match Map.tryFind this.Id disposedIds with + | Some count -> count + | None -> 0 + disposedIds <- Map.add this.Id (currentCount + 1) disposedIds + +type DisposableBuilder() = + member _.Using(resource: #IDisposable, f) = + async { + use res = resource + return! f res + } + + member _.Bind(disposable: Disposable, f) = async.Bind(async.Return(disposable), f) + member _.Return(x) = async.Return x + member _.ReturnFrom(x) = x + member _.Bind(task, f) = async.Bind(task, f) + +let counterDisposable = DisposableBuilder() + +let testBindingPatterns() = + Disposable.Reset() + + counterDisposable { + use! res = new Disposable(1) + use! __ = new Disposable(2) + use! (res1) = new Disposable(3) + + use! _ = new Disposable(4) + use! _ = new Disposable(5) + + use! x = new Disposable(6) + use! x = new Disposable(7) + + use! (_) = new Disposable(8) + use! (_) = new Disposable(9) + + return () + } |> Async.RunSynchronously + + let constructed = Disposable.GetConstructed() + let disposed = Disposable.GetDisposed() + + let disposedSet = Set.ofSeq (Map.keys disposed) + let undisposed = constructed - disposedSet + + if not undisposed.IsEmpty then + printfn $"Undisposed instances: %A{undisposed}" + failwithf "Not all disposables were properly disposed" + + // Verify each object was disposed exactly once + let incorrectlyDisposed = + disposed + |> Map.partition (fun _ count -> count = 1) + |> snd + + if not incorrectlyDisposed.IsEmpty then + printfn $"Objects with incorrect disposal count: %A{incorrectlyDisposed}" + failwithf "Some disposables were not disposed exactly once" + + let idChecks = + [1..9] |> List.map (fun id -> + match Map.tryFind id disposed with + | Some 1 -> true + | _ -> false + ) + + if not ((List.forall id) idChecks) then + failwithf "Not all disposable IDs were properly handled" + + printfn $"Success! All %d{constructed.Count} disposables were properly disposed exactly once, including repeated patterns" + +testBindingPatterns() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBangBindings.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBangBindings.fs new file mode 100644 index 00000000000..ba0f31bd885 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBangBindings.fs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Language + +open FSharp.Test +open Xunit +open FSharp.Test.Compiler + +module UseBangBindingsVersion9 = + [] + let ``UseBangBindings - UseBang01_fs - Current LangVersion`` compilation = + compilation + |> asFsx + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 1228, Line 43, Col 14, Line 43, Col 15, "'use!' bindings must be of the form 'use! = '") + ] + + [] + let ``UseBangBindings - UseBang02_fs - Current LangVersion`` compilation = + compilation + |> asFsx + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 1228, Line 40, Col 14, Line 40, Col 15, "'use!' bindings must be of the form 'use! = '") + ] + + [] + let ``UseBangBindings - UseBang03_fs - Current LangVersion`` compilation = + compilation + |> asFsx + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 1228, Line 46, Col 14, Line 46, Col 15, "'use!' bindings must be of the form 'use! = '") + ] + + [] + let ``UseBangBindings - UseBang04_fs - Current LangVersion`` compilation = + compilation + |> asFsx + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 1228, Line 47, Col 14, Line 47, Col 15, "'use!' bindings must be of the form 'use! = '") + ] + +module UseBangBindingsPreview = + [] + let ``UseBangBindings - UseBang01_fs - Preview LangVersion`` compilation = + compilation + |> asExe + |> withLangVersionPreview + |> compileAndRun + |> shouldSucceed + + [] + let ``UseBangBindings - UseBang02_fs - Preview LangVersion`` compilation = + compilation + |> asExe + |> withLangVersionPreview + |> compileAndRun + |> shouldSucceed + + [] + let ``UseBangBindings - UseBang03_fs - Preview LangVersion`` compilation = + compilation + |> asExe + |> withLangVersionPreview + |> compileAndRun + |> shouldSucceed + + [] + let ``UseBangBindings - UseBang04_fs - Preview LangVersion`` compilation = + compilation + |> asExe + |> withLangVersionPreview + |> compileAndRun + |> shouldSucceed + diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindingDiscard02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindingDiscard02.fs new file mode 100644 index 00000000000..9a31ba2763b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindingDiscard02.fs @@ -0,0 +1,26 @@ +open System + +type private Disposable() = + [] static val mutable private disposedTimes: int + [] static val mutable private constructedTimes: int + + do Disposable.constructedTimes <- Disposable.constructedTimes + 1 + + static member DisposeCallCount() = Disposable.disposedTimes + static member ConstructorCallCount() = Disposable.constructedTimes + + interface System.IDisposable with + member _.Dispose() = + Disposable.disposedTimes <- Disposable.disposedTimes + 1 + +let _scope = + use _ = new Disposable() + () + +let disposeCalls = Disposable.DisposeCallCount() +if disposeCalls <> 1 then + failwith "was not disposed or disposed too many times" + +let ctorCalls = Disposable.ConstructorCallCount() +if ctorCalls <> 1 then + failwithf "unexpected constructor call count: %i" ctorCalls diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs index 8196a9fe286..74137286a8a 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs @@ -27,35 +27,9 @@ module UseBindings = |> withErrorCode 3350 |> withDiagnosticMessageMatches "Feature 'discard pattern in use binding' is not available.*" - [] - let ``Dispose called for discarded value of use binding`` () = - Fsx """ -type private Disposable() = - [] static val mutable private disposedTimes: int - [] static val mutable private constructedTimes: int - - do Disposable.constructedTimes <- Disposable.constructedTimes + 1 - - static member DisposeCallCount() = Disposable.disposedTimes - static member ConstructorCallCount() = Disposable.constructedTimes - - interface System.IDisposable with - member _.Dispose() = - Disposable.disposedTimes <- Disposable.disposedTimes + 1 - -let _scope = - use _ = new Disposable() - () - -let disposeCalls = Disposable.DisposeCallCount() -if disposeCalls <> 1 then - failwith "was not disposed or disposed too many times" - -let ctorCalls = Disposable.ConstructorCallCount() -if ctorCalls <> 1 then - failwithf "unexpected constructor call count: %i" ctorCalls - - """ + [] + let ``Dispose called for discarded value of use binding`` compilation = + compilation |> asExe |> withLangVersion60 |> compileAndRun diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 49b459e2796..98eb8a9336c 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -75,6 +75,7 @@ + From 54fb3da711680b99e3323c0616b9f14d63b495ef Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Wed, 30 Apr 2025 09:29:37 +0200 Subject: [PATCH 05/38] Checker: don't capture environment for checked modules (#18519) --- .../.FSharp.Compiler.Service/9.0.300.md | 1 + src/Compiler/Checking/CheckDeclarations.fs | 11 ++-- src/Compiler/Checking/CheckDeclarations.fsi | 3 +- src/Compiler/Driver/ParseAndCheckInputs.fs | 6 +- .../CompletionTests.fs | 64 +++++++++++++++++++ 5 files changed, 74 insertions(+), 11 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index 7224d401d6e..8b539ee2e56 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -27,6 +27,7 @@ * Fix missing `null` highlighting in tooltips ([PR #18457](https://github.com/dotnet/fsharp/pull/18457)) * Allow `_` in `use!` bindings values (lift FS1228 restriction) ([PR #18487](https://github.com/dotnet/fsharp/pull/18487)) * Make `[]` combination work([PR #18444](https://github.com/dotnet/fsharp/pull/18444/)) +* Fix code completion considers types from own namespace non-imported ([PR #18518](https://github.com/dotnet/fsharp/issues/18518)) ### Added * Added missing type constraints in FCS. ([PR #18241](https://github.com/dotnet/fsharp/pull/18241)) diff --git a/src/Compiler/Checking/CheckDeclarations.fs b/src/Compiler/Checking/CheckDeclarations.fs index 78acf62bb98..92368118f3a 100644 --- a/src/Compiler/Checking/CheckDeclarations.fs +++ b/src/Compiler/Checking/CheckDeclarations.fs @@ -341,7 +341,7 @@ let AddNonLocalCcu g amap scopem env assemblyName (ccu: CcuThunk, internalsVisib env /// Adjust the TcEnv to account for a fully processed "namespace" declaration in this file -let AddLocalRootModuleOrNamespace tcSink g amap scopem env (moduleTy: ModuleOrNamespaceType) = +let AddLocalRootModuleOrNamespace g amap scopem env (moduleTy: ModuleOrNamespaceType) = // Compute the top-rooted module or namespace references let modrefs = moduleTy.ModuleAndNamespaceDefinitions |> List.map mkLocalModuleRef // Compute the top-rooted type definitions @@ -350,7 +350,6 @@ let AddLocalRootModuleOrNamespace tcSink g amap scopem env (moduleTy: ModuleOrNa let env = { env with eNameResEnv = if isNil tcrefs then env.eNameResEnv else AddTyconRefsToNameEnv BulkAdd.No false g amap env.eAccessRights scopem true env.eNameResEnv tcrefs eUngeneralizableItems = addFreeItemOfModuleTy moduleTy env.eUngeneralizableItems } - CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) env /// Inside "namespace X.Y.Z" there is an implicit open of "X.Y.Z" @@ -4978,7 +4977,7 @@ let rec TcSignatureElementNonMutRec (cenv: cenv) parent typeNames endm (env: TcE CallNameResolutionSink cenv.tcSink (moduleEntity.Range, env.NameEnv, item, emptyTyparInst, ItemOccurrence.Binding, env.AccessRights)) // For 'namespace rec' and 'module rec' we add the thing being defined - let envNS = if isRec then AddLocalRootModuleOrNamespace cenv.tcSink g cenv.amap m envNS modTyRoot else envNS + let envNS = if isRec then AddLocalRootModuleOrNamespace g cenv.amap m envNS modTyRoot else envNS let nsInfo = Some (modulNSOpt, envNS.eModuleOrNamespaceTypeAccumulator) let mutRecNSInfo = if isRec then nsInfo else None @@ -4990,7 +4989,7 @@ let rec TcSignatureElementNonMutRec (cenv: cenv) parent typeNames endm (env: TcE if isNil enclosingNamespacePath then envAtEnd else - let env = AddLocalRootModuleOrNamespace cenv.tcSink g cenv.amap m env modTyRoot + let env = AddLocalRootModuleOrNamespace g cenv.amap m env modTyRoot // If the namespace is an interactive fragment e.g. FSI_0002, then open FSI_0002 in the subsequent environment. let env, _openDecls = @@ -5440,7 +5439,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem CallNameResolutionSink cenv.tcSink (moduleEntity.Range, env.NameEnv, item, emptyTyparInst, ItemOccurrence.Binding, env.AccessRights)) // For 'namespace rec' and 'module rec' we add the thing being defined - let envNS = if isRec then AddLocalRootModuleOrNamespace cenv.tcSink g cenv.amap m envNS modTyRoot else envNS + let envNS = if isRec then AddLocalRootModuleOrNamespace g cenv.amap m envNS modTyRoot else envNS let nsInfo = Some (modulNSOpt, envNS.eModuleOrNamespaceTypeAccumulator) let mutRecNSInfo = if isRec then nsInfo else None @@ -5453,7 +5452,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem if isNil enclosingNamespacePath then envAtEnd, [] else - let env = AddLocalRootModuleOrNamespace cenv.tcSink g cenv.amap m env modTyRoot + let env = AddLocalRootModuleOrNamespace g cenv.amap m env modTyRoot // If the namespace is an interactive fragment e.g. FSI_0002, then open FSI_0002 in the subsequent environment let env, openDecls = diff --git a/src/Compiler/Checking/CheckDeclarations.fsi b/src/Compiler/Checking/CheckDeclarations.fsi index fb4679f2438..9b06fcc828d 100644 --- a/src/Compiler/Checking/CheckDeclarations.fsi +++ b/src/Compiler/Checking/CheckDeclarations.fsi @@ -13,8 +13,7 @@ open FSharp.Compiler.TcGlobals open FSharp.Compiler.Text open FSharp.Compiler.TypedTree -val AddLocalRootModuleOrNamespace: - TcResultsSink -> TcGlobals -> ImportMap -> range -> TcEnv -> ModuleOrNamespaceType -> TcEnv +val AddLocalRootModuleOrNamespace: TcGlobals -> ImportMap -> range -> TcEnv -> ModuleOrNamespaceType -> TcEnv val CreateInitialTcEnv: TcGlobals * ImportMap * range * assemblyName: string * (CcuThunk * string list * string list) list -> diff --git a/src/Compiler/Driver/ParseAndCheckInputs.fs b/src/Compiler/Driver/ParseAndCheckInputs.fs index 6b7171b5697..3d9884b2cef 100644 --- a/src/Compiler/Driver/ParseAndCheckInputs.fs +++ b/src/Compiler/Driver/ParseAndCheckInputs.fs @@ -1198,14 +1198,14 @@ let AddCheckResultsToTcState // Add the implementation as to the implementation env let tcImplEnv = - AddLocalRootModuleOrNamespace TcResultsSink.NoSink tcGlobals amap m tcImplEnv implFileSigType + AddLocalRootModuleOrNamespace tcGlobals amap m tcImplEnv implFileSigType // Add the implementation as to the signature env (unless it had an explicit signature) let tcSigEnv = if hadSig then tcState.tcsTcSigEnv else - AddLocalRootModuleOrNamespace TcResultsSink.NoSink tcGlobals amap m tcState.tcsTcSigEnv implFileSigType + AddLocalRootModuleOrNamespace tcGlobals amap m tcState.tcsTcSigEnv implFileSigType // Open the prefixPath for fsi.exe (tcImplEnv) let tcImplEnv, openDecls = @@ -1563,7 +1563,7 @@ let CheckOneInputWithCallback let rootSigs = Zmap.add qualNameOfFile sigFileType tcState.tcsRootSigs let tcSigEnv = - AddLocalRootModuleOrNamespace TcResultsSink.NoSink tcGlobals amap m tcState.tcsTcSigEnv sigFileType + AddLocalRootModuleOrNamespace tcGlobals amap m tcState.tcsTcSigEnv sigFileType // Add the signature to the signature env (unless it had an explicit signature) let ccuSigForFile = CombineCcuContentFragments [ sigFileType; tcState.tcsCcuSig ] diff --git a/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs b/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs index 38c6812728d..c4a924d25d9 100644 --- a/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs @@ -134,3 +134,67 @@ let f (s: string) = () """ assertHasItemWithNames ["Length"] info + + +[] +let ``Import - Ns 01`` () = + let info = + getCompletionInfo "let _: R " (14, 12) """ +namespace Ns + +type Rec1 = { F: int } + + +namespace Ns + +type Rec2 = { F: int } + +module M = + + type Rec3 = { F: int } + + let _: R = () +""" + assertHasItemWithNames ["Rec1"; "Rec2"; "Rec3"] info + +[] +let ``Import - Ns 02 - Rec`` () = + let info = + getCompletionInfo "let _: R " (14, 12) """ +namespace Ns + +type Rec1 = { F: int } + + +namespace rec Ns + +type Rec2 = { F: int } + +module M = + + type Rec3 = { F: int } + + let _: R = () +""" + assertHasItemWithNames ["Rec1"; "Rec2"; "Rec3"] info + +[] +let ``Import - Ns 03 - Rec`` () = + let info = + getCompletionInfo "let _: R " (14, 12) """ +namespace Ns + +type Rec1 = { F: int } + + +namespace rec Ns + +type Rec2 = { F: int } + +module rec M = + + type Rec3 = { F: int } + + let _: R = () +""" + assertHasItemWithNames ["Rec1"; "Rec2"; "Rec3"] info \ No newline at end of file From cf6b53e8f3aff1a79e660ad2cdf84564dd0ff1c3 Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Wed, 30 Apr 2025 22:07:56 +0200 Subject: [PATCH 06/38] reuse fsi sessions in tests (#18527) --- eng/build.sh | 2 +- .../Miscellaneous/FsharpSuiteMigrated.fs | 26 +++++--- .../Miscellaneous/MigratedCoreTests.fs | 10 +-- tests/FSharp.Test.Utilities/Compiler.fs | 12 +++- tests/FSharp.Test.Utilities/ScriptHelpers.fs | 5 +- tests/FSharp.Test.Utilities/XunitHelpers.fs | 62 ++++++++++++++----- 6 files changed, 83 insertions(+), 34 deletions(-) diff --git a/eng/build.sh b/eng/build.sh index 53de7fda4c9..3c9404c8161 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -226,7 +226,7 @@ function Test() { projectname="${projectname%.*}" testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework.xml" args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"xunit;LogFilePath=$testlogpath\" --blame-hang-timeout 5minutes --results-directory $artifacts_dir/TestResults/$configuration -p:vstestusemsbuildoutput=false" - args+=" -- xUnit.MaxParallelThreads=1" + "$DOTNET_INSTALL_DIR/dotnet" $args || exit $? } diff --git a/tests/FSharp.Compiler.ComponentTests/Miscellaneous/FsharpSuiteMigrated.fs b/tests/FSharp.Compiler.ComponentTests/Miscellaneous/FsharpSuiteMigrated.fs index 8ab6a4ac584..ecba3a3fa85 100644 --- a/tests/FSharp.Compiler.ComponentTests/Miscellaneous/FsharpSuiteMigrated.fs +++ b/tests/FSharp.Compiler.ComponentTests/Miscellaneous/FsharpSuiteMigrated.fs @@ -14,11 +14,18 @@ open FSharp.Test.ScriptHelpers module Configuration = let supportedNames = set ["testlib.fsi";"testlib.fs";"test.mli";"test.ml";"test.fsi";"test.fs";"test2.fsi";"test2.fs";"test.fsx";"test2.fsx"] +[] +type ScriptSessionIsolation = Shared | Isolated + module ScriptRunner = open Internal.Utilities.Library - let private createEngine(args,version) = - getSessionForEval args version + let private getOrCreateEngine(args,version) sessionIsolation = + match sessionIsolation with + | ScriptSessionIsolation.Isolated -> + new FSharpScript(args, true, version) + | ScriptSessionIsolation.Shared -> + getSessionForEval args version let defaultDefines = [ @@ -27,12 +34,12 @@ module ScriptRunner = #endif ] - let runScriptFile version (cu:CompilationUnit) = + let runScriptFile version sessionIsolation (cu:CompilationUnit) = let cu = cu |> withDefines defaultDefines match cu with | FS fsSource -> use capture = new TestConsole.ExecutionCapture() - let engine = createEngine (fsSource.Options |> Array.ofList,version) + let engine = getOrCreateEngine (fsSource.Options |> Array.ofList,version) sessionIsolation let res = evalScriptFromDiskInSharedSession engine cu match res with | CompilationResult.Failure _ -> res @@ -88,7 +95,7 @@ module TestFrameworkAdapter = | LangVersion.SupportsMl -> "5.0", "--mlcompatibility" :: bonusArgs - let singleTestBuildAndRunAuxVersion (folder:string) bonusArgs mode langVersion = + let singleTestBuildAndRunAuxVersion (folder:string) bonusArgs mode langVersion sessionIsolation = let absFolder = Path.Combine(baseFolder,folder) let supportedNames, files = match mode with @@ -137,17 +144,17 @@ module TestFrameworkAdapter = cu |> withDebug |> withNoOptimize - |> ScriptRunner.runScriptFile langVersion + |> ScriptRunner.runScriptFile langVersion sessionIsolation |> shouldSucceed | FSC_OPTIMIZED -> cu |> withOptimize |> withNoDebug - |> ScriptRunner.runScriptFile langVersion + |> ScriptRunner.runScriptFile langVersion sessionIsolation |> shouldSucceed | FSI -> cu - |> ScriptRunner.runScriptFile langVersion + |> ScriptRunner.runScriptFile langVersion sessionIsolation |> shouldSucceed | COMPILED_EXE_APP -> cu @@ -161,7 +168,8 @@ module TestFrameworkAdapter = let singleTestBuildAndRunAux folder bonusArgs mode = singleTestBuildAndRunAuxVersion folder bonusArgs mode LangVersion.Latest let singleTestBuildAndRunVersion folder mode version = singleTestBuildAndRunAuxVersion folder [] mode version - let singleTestBuildAndRun folder mode = singleTestBuildAndRunVersion folder mode LangVersion.Latest + let singleTestBuildAndRun folder mode = singleTestBuildAndRunVersion folder mode LangVersion.Latest ScriptSessionIsolation.Shared + let singleTestBuildAndRunIsolated folder mode = singleTestBuildAndRunVersion folder mode LangVersion.Latest ScriptSessionIsolation.Isolated let singleVersionedNegTestAux folder bonusArgs version testName = singleTestBuildAndRunAuxVersion folder bonusArgs (NEG_TEST_BUILD testName) version diff --git a/tests/FSharp.Compiler.ComponentTests/Miscellaneous/MigratedCoreTests.fs b/tests/FSharp.Compiler.ComponentTests/Miscellaneous/MigratedCoreTests.fs index d0cd80472f1..bc2e782a769 100644 --- a/tests/FSharp.Compiler.ComponentTests/Miscellaneous/MigratedCoreTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Miscellaneous/MigratedCoreTests.fs @@ -352,13 +352,13 @@ let ``subtype-FSC_OPTIMIZED`` () = singleTestBuildAndRun "core/subtype" FSC_OPTI let ``subtype-FSI`` () = singleTestBuildAndRun "core/subtype" FSI [] -let ``syntax-FSC_DEBUG`` () = singleTestBuildAndRun "core/syntax" FSC_DEBUG +let ``syntax-FSC_DEBUG`` () = singleTestBuildAndRunIsolated "core/syntax" FSC_DEBUG [] -let ``syntax-FSC_OPTIMIZED`` () = singleTestBuildAndRun "core/syntax" FSC_OPTIMIZED +let ``syntax-FSC_OPTIMIZED`` () = singleTestBuildAndRunIsolated "core/syntax" FSC_OPTIMIZED [] -let ``syntax-FSI`` () = singleTestBuildAndRun "core/syntax" FSI +let ``syntax-FSI`` () = singleTestBuildAndRunIsolated "core/syntax" FSI [] let ``test int32-FSC_DEBUG`` () = singleTestBuildAndRun "core/int32" FSC_DEBUG @@ -453,10 +453,10 @@ let ``fsi_load-FSC_OPTIMIZED`` () = singleTestBuildAndRun "core/fsi-load" FSC_OP let ``fsi_load-FSI`` () = singleTestBuildAndRun "core/fsi-load" FSI [] -let ``reflect-FSC_OPTIMIZED`` () = singleTestBuildAndRun "core/reflect" FSC_OPTIMIZED +let ``reflect-FSC_OPTIMIZED`` () = singleTestBuildAndRunIsolated "core/reflect" FSC_OPTIMIZED [] -let ``reflect-FSI`` () = singleTestBuildAndRun "core/reflect" FSI +let ``reflect-FSI`` () = singleTestBuildAndRunIsolated "core/reflect" FSI let isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 2b3ccface37..9cda28613dd 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -1154,7 +1154,17 @@ module rec Compiler = evalFSharp fs script | _ -> failwith "Script evaluation is only supported for F#." - let getSessionForEval args version = new FSharpScript(additionalArgs=args,quiet=true,langVersion=version) + let internal sessionCache = + Collections.Concurrent.ConcurrentDictionary * LangVersion, FSharpScript>() + + let getSessionForEval args version = + let key = Set args, version + match sessionCache.TryGetValue(key) with + | true, script -> script + | _ -> + let script = new FSharpScript(additionalArgs=args,quiet=true,langVersion=version) + sessionCache.TryAdd(key, script) |> ignore + script let evalInSharedSession (script:FSharpScript) (cUnit: CompilationUnit) : CompilationResult = match cUnit with diff --git a/tests/FSharp.Test.Utilities/ScriptHelpers.fs b/tests/FSharp.Test.Utilities/ScriptHelpers.fs index aa0593fa090..f7b68ac812e 100644 --- a/tests/FSharp.Test.Utilities/ScriptHelpers.fs +++ b/tests/FSharp.Test.Utilities/ScriptHelpers.fs @@ -64,7 +64,10 @@ type FSharpScript(?additionalArgs: string[], ?quiet: bool, ?langVersion: LangVer Thread.CurrentThread.CurrentCulture <- Option.defaultValue Globalization.CultureInfo.InvariantCulture desiredCulture let cancellationToken = defaultArg cancellationToken CancellationToken.None - let ch, errors = fsi.EvalInteractionNonThrowing(code, cancellationToken) + let ch, errors = + // lock, because For memory conservation in CI FSharpScripts may be reused between tests + lock fsi <| fun () -> + fsi.EvalInteractionNonThrowing(code, cancellationToken) Thread.CurrentThread.CurrentCulture <- originalCulture diff --git a/tests/FSharp.Test.Utilities/XunitHelpers.fs b/tests/FSharp.Test.Utilities/XunitHelpers.fs index 34a44df17ed..b17e1b1cd4b 100644 --- a/tests/FSharp.Test.Utilities/XunitHelpers.fs +++ b/tests/FSharp.Test.Utilities/XunitHelpers.fs @@ -12,9 +12,9 @@ open TestFramework open FSharp.Compiler.Diagnostics -open OpenTelemetry open OpenTelemetry.Resources open OpenTelemetry.Trace +open OpenTelemetry.Metrics /// Disables custom internal parallelization added with XUNIT_EXTRAS. /// Execute test cases in a class or a module one by one instead of all at once. Allow other collections to run simultaneously. @@ -130,6 +130,45 @@ type CustomTheoryTestCase = #endif + +type OpenTelemetryExport(testRunName, enable) = + // On Windows forwarding localhost to wsl2 docker container sometimes does not work. Use IP address instead. + let otlpEndpoint = Uri("http://127.0.0.1:4317") + + // Configure OpenTelemetry export. + let providers : IDisposable list = + if not enable then [] else + [ + // Configure OpenTelemetry tracing export. Traces can be viewed in Jaeger or other compatible tools. + OpenTelemetry.Sdk.CreateTracerProviderBuilder() + .AddSource(ActivityNames.FscSourceName) + .ConfigureResource(fun r -> r.AddService("F#") |> ignore) + .AddOtlpExporter(fun o -> + o.Endpoint <- otlpEndpoint + o.Protocol <- OpenTelemetry.Exporter.OtlpExportProtocol.Grpc + // Empirical values to ensure no traces are lost and no significant delay at the end of test run. + o.TimeoutMilliseconds <- 200 + o.BatchExportProcessorOptions.MaxQueueSize <- 16384 + o.BatchExportProcessorOptions.ScheduledDelayMilliseconds <- 100 + ) + .Build() + + // Configure OpenTelemetry metrics export. Metrics can be viewed in Prometheus or other compatible tools. + OpenTelemetry.Sdk.CreateMeterProviderBuilder() + .AddMeter("System.Runtime") + .ConfigureResource(fun r -> r.AddService(testRunName) |> ignore) + .AddOtlpExporter(fun e m -> + e.Endpoint <- otlpEndpoint + e.Protocol <- OpenTelemetry.Exporter.OtlpExportProtocol.Grpc + m.PeriodicExportingMetricReaderOptions.ExportIntervalMilliseconds <- 1000 + ) + .Build() + ] + + interface IDisposable with + member this.Dispose() = + for p in providers do p.Dispose() + /// `XunitTestFramework` providing parallel console support and conditionally enabling optional xUnit customizations. type FSharpXunitFramework(sink: IMessageSink) = inherit XunitTestFramework(sink) @@ -145,33 +184,22 @@ type FSharpXunitFramework(sink: IMessageSink) = // We need AssemblyResolver already here, because OpenTelemetry loads some assemblies dynamically. AssemblyResolver.addResolver () #endif - - // Configure OpenTelemetry export. Traces can be viewed in Jaeger or other compatible tools. - use tracerProvider = - OpenTelemetry.Sdk.CreateTracerProviderBuilder() - .AddSource(ActivityNames.FscSourceName) - .ConfigureResource(fun r -> r.AddService("F#") |> ignore) - .AddOtlpExporter(fun o -> - // Empirical values to ensure no traces are lost and no significant delay at the end of test run. - o.TimeoutMilliseconds <- 200 - o.BatchExportProcessorOptions.MaxQueueSize <- 16384 - o.BatchExportProcessorOptions.ScheduledDelayMilliseconds <- 100 - ) - .Build() + let testRunName = $"RunTests_{assemblyName.Name} {Runtime.InteropServices.RuntimeInformation.FrameworkDescription}" + + use _ = new OpenTelemetryExport(testRunName, Environment.GetEnvironmentVariable("FSHARP_OTEL_EXPORT") <> null) + logConfig initialConfig log "Installing TestConsole redirection" TestConsole.install() begin - use _ = Activity.startNoTags $"RunTests_{assemblyName.Name} {Runtime.InteropServices.RuntimeInformation.FrameworkDescription}" + use _ = Activity.startNoTags testRunName // We can't just call base.RunTestCases here, because it's implementation is async void. use runner = new XunitTestAssemblyRunner (x.TestAssembly, testCases, x.DiagnosticMessageSink, executionMessageSink, executionOptions) runner.RunAsync().Wait() end - tracerProvider.ForceFlush() |> ignore - cleanUpTemporaryDirectoryOfThisTestRun () } From 34dbfc17eaea59e08286ccfb7d9b28b6b35269e2 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Wed, 30 Apr 2025 22:09:42 +0200 Subject: [PATCH 07/38] Code completion: fix getting qualifier expression in `do` statements in type decls (#18524) --- .../.FSharp.Compiler.Service/9.0.300.md | 1 + src/Compiler/Service/ServiceParseTreeWalk.fs | 2 + tests/FSharp.Compiler.Service.Tests/Common.fs | 10 ++ .../CompletionTests.fs | 113 ++++++++++++------ 4 files changed, 92 insertions(+), 34 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index 8b539ee2e56..7cb7eae4d6c 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -28,6 +28,7 @@ * Allow `_` in `use!` bindings values (lift FS1228 restriction) ([PR #18487](https://github.com/dotnet/fsharp/pull/18487)) * Make `[]` combination work([PR #18444](https://github.com/dotnet/fsharp/pull/18444/)) * Fix code completion considers types from own namespace non-imported ([PR #18518](https://github.com/dotnet/fsharp/issues/18518)) +* Code completion: fix getting qualifier expression in do statements in type decls ([PR #18524](https://github.com/dotnet/fsharp/pull/18524)) ### Added * Added missing type constraints in FCS. ([PR #18241](https://github.com/dotnet/fsharp/pull/18241)) diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index 659f4c4bc60..33734db9a62 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -1014,6 +1014,8 @@ module SyntaxTraversal = let path = SyntaxNode.SynBinding b :: origPath match b with + | SynBinding(kind = SynBindingKind.Do; expr = expr) -> traverseSynExpr path expr + | SynBinding(headPat = synPat; expr = synExpr; attributes = attributes; range = m) -> [ yield! attributeApplicationDives path attributes diff --git a/tests/FSharp.Compiler.Service.Tests/Common.fs b/tests/FSharp.Compiler.Service.Tests/Common.fs index dad4f489514..f1de5739d47 100644 --- a/tests/FSharp.Compiler.Service.Tests/Common.fs +++ b/tests/FSharp.Compiler.Service.Tests/Common.fs @@ -342,6 +342,16 @@ let rec allSymbolsInEntities compGen (entities: IList) = yield! allSymbolsInEntities compGen entity.NestedEntities ] +let getCursorPosAndPrepareSource (source: string) : string * string * pos = + let lines = source.Split([|"\r\n"; "\n"|], StringSplitOptions.None) + let line = lines |> Seq.findIndex _.Contains("{caret}") + let lineText = lines[line] + let column = lineText.IndexOf("{caret}") + + let source = source.Replace("{caret}", "") + let lineText = lineText.Replace("{caret}", "") + source, lineText, Position.mkPos (line + 1) (column - 1) + let getParseResults (source: string) = parseSourceCode("Test.fsx", source) diff --git a/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs b/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs index c4a924d25d9..2d70f5c58f6 100644 --- a/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs @@ -4,10 +4,11 @@ open FSharp.Compiler.Service.Tests.Common open FSharp.Compiler.EditorServices open Xunit -let getCompletionInfo lineText (line, column) source = +let getCompletionInfo source = + let source, lineText, pos = getCursorPosAndPrepareSource source let parseResults, checkResults = getParseAndCheckResultsPreview source - let plid = QuickParse.GetPartialLongNameEx(lineText, column) - checkResults.GetDeclarationListInfo(Some parseResults, line, lineText, plid) + let plid = QuickParse.GetPartialLongNameEx(lineText, pos.Column) + checkResults.GetDeclarationListInfo(Some parseResults, pos.Line, lineText, plid) let getCompletionItemNames (completionInfo: DeclarationListInfo) = completionInfo.Items |> Array.map (fun item -> item.NameInCode) @@ -19,92 +20,100 @@ let assertHasItemWithNames names (completionInfo: DeclarationListInfo) = Assert.True(Set.contains name itemNames, $"{name} not found in {itemNames}") [] -let ``Expr - After record decl`` () = - let info = getCompletionInfo "{ Fi }" (4, 0) """ +let ``Expr - After record decl 01`` () = + let info = getCompletionInfo """ type Record = { Field: int } +{ Fi{caret} } +""" + assertHasItemWithNames ["ignore"] info +[] +let ``Expr - After record decl 02`` () = + let info = getCompletionInfo """ +type Record = { Field: int } + +{caret} """ assertHasItemWithNames ["ignore"] info [] let ``Expr - record - field 01 - anon module`` () = - let info = getCompletionInfo "{ Fi }" (4, 3) """ + let info = getCompletionInfo """ type Record = { Field: int } -{ Fi } +{ Fi{caret} } """ assertHasItemWithNames ["Field"] info [] let ``Expr - record - field 02 - anon module`` () = - let info = getCompletionInfo "{ Fi }" (6, 3) """ + let info = getCompletionInfo """ type Record = { Field: int } let record = { Field = 1 } -{ Fi } +{ Fi{caret} } """ assertHasItemWithNames ["Field"] info [] let ``Expr - record - empty 01`` () = - let info = getCompletionInfo "{ }" (4, 2) """ + let info = getCompletionInfo """ type Record = { Field: int } -{ } +{ {caret} } """ assertHasItemWithNames ["Field"] info [] let ``Expr - record - empty 02`` () = - let info = getCompletionInfo "{ }" (6, 2) """ + let info = getCompletionInfo """ type Record = { Field: int } let record = { Field = 1 } -{ } +{ {caret} } """ assertHasItemWithNames ["Field"; "record"] info [] let ``Underscore dot lambda - completion`` () = - let info = getCompletionInfo " |> _.Len" (4, 11) """ + let info = getCompletionInfo """ let myFancyFunc (x:string) = x - |> _.Len""" + |> _.Len{caret}""" assertHasItemWithNames ["Length"] info [] let ``Underscore dot lambda - method completion`` () = - let info = getCompletionInfo " |> _.ToL" (4, 11) """ + let info = getCompletionInfo """ let myFancyFunc (x:string) = x - |> _.ToL""" + |> _.ToL{caret}""" assertHasItemWithNames ["ToLower"] info [] let ``Underscore dot lambda - No prefix`` () = - let info = getCompletionInfo "[s] |> List.map _. " (3, 18) """ + let info = getCompletionInfo """ let s = "" -[s] |> List.map _. +[s] |> List.map _.{caret} """ assertHasItemWithNames ["Length"] info [] let ``Type decl - Record - Field type 01`` () = - let info = getCompletionInfo "type Record = { Field: }" (2, 23) """ -type Record = { Field: } + let info = getCompletionInfo """ +type Record = { Field: {caret} } """ assertHasItemWithNames ["string"] info [] let ``Expr - Qualifier 01`` () = - let info = - getCompletionInfo "s.Trim(). " (3, 13) """ + let info = getCompletionInfo """ let f (s: string) = - s.Trim(). + s.Trim().{caret} s.Trim() s.Trim() () @@ -114,10 +123,10 @@ let f (s: string) = [] let ``Expr - Qualifier 02`` () = let info = - getCompletionInfo "s.Trim(). " (4, 13) """ + getCompletionInfo """ let f (s: string) = s.Trim() - s.Trim(). + s.Trim().{caret} s.Trim() () """ @@ -126,20 +135,56 @@ let f (s: string) = [] let ``Expr - Qualifier 03`` () = let info = - getCompletionInfo "s.Trim(). " (5, 13) """ + getCompletionInfo """ let f (s: string) = s.Trim() s.Trim() - s.Trim(). + s.Trim().{caret} () """ assertHasItemWithNames ["Length"] info +[] +let ``Expr - Qualifier 04`` () = + let info = + getCompletionInfo """ +type T() = + do + System.String.Empty.ToString().L{caret} +""" + assertHasItemWithNames ["Length"] info + +[] +let ``Expr - Qualifier 05`` () = + let info = + getCompletionInfo """ +System.String.Empty.ToString().{caret} +""" + assertHasItemWithNames ["Length"] info + +[] +let ``Expr - Qualifier 06`` () = + let info = + getCompletionInfo """ +System.String.Empty.ToString().L{caret} +""" + assertHasItemWithNames ["Length"] info + +[] +let ``Expr - Qualifier 07`` () = + let info = + getCompletionInfo """ +type T() = + do + System.String.Empty.ToString().L{caret} + () +""" + assertHasItemWithNames ["Length"] info [] let ``Import - Ns 01`` () = let info = - getCompletionInfo "let _: R " (14, 12) """ + getCompletionInfo """ namespace Ns type Rec1 = { F: int } @@ -153,14 +198,14 @@ module M = type Rec3 = { F: int } - let _: R = () + let _: R{caret} = () """ assertHasItemWithNames ["Rec1"; "Rec2"; "Rec3"] info [] let ``Import - Ns 02 - Rec`` () = let info = - getCompletionInfo "let _: R " (14, 12) """ + getCompletionInfo """ namespace Ns type Rec1 = { F: int } @@ -174,14 +219,14 @@ module M = type Rec3 = { F: int } - let _: R = () + let _: R{caret} = () """ assertHasItemWithNames ["Rec1"; "Rec2"; "Rec3"] info [] let ``Import - Ns 03 - Rec`` () = let info = - getCompletionInfo "let _: R " (14, 12) """ + getCompletionInfo """ namespace Ns type Rec1 = { F: int } @@ -195,6 +240,6 @@ module rec M = type Rec3 = { F: int } - let _: R = () + let _: R{caret} = () """ assertHasItemWithNames ["Rec1"; "Rec2"; "Rec3"] info \ No newline at end of file From 05500b8b5d64b324c57a28b9b991ede079df03f4 Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Thu, 1 May 2025 08:05:00 +0200 Subject: [PATCH 08/38] Enable TypeSubsumptionCache for IDE use (#18499) --- .../.FSharp.Compiler.Service/9.0.300.md | 1 + src/Compiler/Checking/TypeRelations.fs | 8 +- src/Compiler/Checking/import.fs | 42 +-- src/Compiler/Checking/import.fsi | 12 +- src/Compiler/FSharp.Compiler.Service.fsproj | 2 + src/Compiler/Utilities/Caches.fs | 316 ++++++++++++++++++ src/Compiler/Utilities/Caches.fsi | 44 +++ src/Compiler/Utilities/TypeHashing.fs | 82 ++++- .../CompilerService/Caches.fs | 90 +++++ .../FSharp.Compiler.ComponentTests.fsproj | 1 + tests/FSharp.Test.Utilities/XunitHelpers.fs | 5 + .../src/FSharp.Editor/Common/Logging.fs | 73 +++- .../LanguageService/LanguageService.fs | 18 +- .../FSharp.Editor.Tests.fsproj | 3 + .../tests/Salsa/VisualFSharp.Salsa.fsproj | 3 + .../UnitTests/VisualFSharp.UnitTests.fsproj | 3 + 16 files changed, 634 insertions(+), 69 deletions(-) create mode 100644 src/Compiler/Utilities/Caches.fs create mode 100644 src/Compiler/Utilities/Caches.fsi create mode 100644 tests/FSharp.Compiler.ComponentTests/CompilerService/Caches.fs diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index 7cb7eae4d6c..c39b44e1d7a 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -40,6 +40,7 @@ * Type parameter constraint `null` in generic code will now automatically imply `not struct` ([Issue #18320](https://github.com/dotnet/fsharp/issues/18320), [PR #18323](https://github.com/dotnet/fsharp/pull/18323)) * Add a switch to determine whether to generate a default implementation body for overridden method when completing. [PR #18341](https://github.com/dotnet/fsharp/pull/18341) * Use a more accurate range for CE Combine methods. [PR #18394](https://github.com/dotnet/fsharp/pull/18394) +* Enable TypeSubsumptionCache for IDE use. [PR #18499](https://github.com/dotnet/fsharp/pull/18499) ### Changed diff --git a/src/Compiler/Checking/TypeRelations.fs b/src/Compiler/Checking/TypeRelations.fs index 2cb5dd4057a..fddf6027875 100644 --- a/src/Compiler/Checking/TypeRelations.fs +++ b/src/Compiler/Checking/TypeRelations.fs @@ -102,7 +102,7 @@ let TypesFeasiblyEquivStripMeasures g amap m ty1 ty2 = TypesFeasiblyEquivalent true 0 g amap m ty1 ty2 let inline TryGetCachedTypeSubsumption (g: TcGlobals) (amap: ImportMap) key = - if g.compilationMode = CompilationMode.OneOff && g.langVersion.SupportsFeature LanguageFeature.UseTypeSubsumptionCache then + if g.langVersion.SupportsFeature LanguageFeature.UseTypeSubsumptionCache then match amap.TypeSubsumptionCache.TryGetValue(key) with | true, subsumes -> ValueSome subsumes @@ -112,8 +112,8 @@ let inline TryGetCachedTypeSubsumption (g: TcGlobals) (amap: ImportMap) key = ValueNone let inline UpdateCachedTypeSubsumption (g: TcGlobals) (amap: ImportMap) key subsumes : unit = - if g.compilationMode = CompilationMode.OneOff && g.langVersion.SupportsFeature LanguageFeature.UseTypeSubsumptionCache then - amap.TypeSubsumptionCache[key] <- subsumes + if g.langVersion.SupportsFeature LanguageFeature.UseTypeSubsumptionCache then + amap.TypeSubsumptionCache.TryAdd(key, subsumes) |> ignore /// The feasible coercion relation. Part of the language spec. let rec TypeFeasiblySubsumesType ndeep (g: TcGlobals) (amap: ImportMap) m (ty1: TType) (canCoerce: CanCoerce) (ty2: TType) = @@ -125,7 +125,7 @@ let rec TypeFeasiblySubsumesType ndeep (g: TcGlobals) (amap: ImportMap) m (ty1: let ty2 = stripTyEqns g ty2 // Check if language feature supported - let key = TTypeCacheKey.FromStrippedTypes (ty1, ty2, canCoerce, g) + let key = TTypeCacheKey.FromStrippedTypes (ty1, ty2, canCoerce) match TryGetCachedTypeSubsumption g amap key with | ValueSome subsumes -> diff --git a/src/Compiler/Checking/import.fs b/src/Compiler/Checking/import.fs index c87d6cdad03..f1f44090f19 100644 --- a/src/Compiler/Checking/import.fs +++ b/src/Compiler/Checking/import.fs @@ -6,22 +6,25 @@ module internal FSharp.Compiler.Import open System.Collections.Concurrent open System.Collections.Generic open System.Collections.Immutable -open FSharp.Compiler.Text.Range +open System.Diagnostics + open Internal.Utilities.Library open Internal.Utilities.Library.Extras open Internal.Utilities.TypeHashing -open Internal.Utilities.TypeHashing.HashTypes + open FSharp.Compiler open FSharp.Compiler.AbstractIL.IL open FSharp.Compiler.CompilerGlobalState open FSharp.Compiler.DiagnosticsLogger open FSharp.Compiler.SyntaxTreeOps open FSharp.Compiler.Text +open FSharp.Compiler.Text.Range open FSharp.Compiler.Xml open FSharp.Compiler.TypedTree open FSharp.Compiler.TypedTreeBasics open FSharp.Compiler.TypedTreeOps open FSharp.Compiler.TcGlobals +open FSharp.Compiler.Caches #if !NO_TYPEPROVIDERS open FSharp.Compiler.TypeProviders @@ -52,18 +55,18 @@ type CanCoerce = | CanCoerce | NoCoerce -type [] TTypeCacheKey = +[] +type TTypeCacheKey = val ty1: TType val ty2: TType val canCoerce: CanCoerce - val tcGlobals: TcGlobals - private new (ty1, ty2, canCoerce, tcGlobals) = - { ty1 = ty1; ty2 = ty2; canCoerce = canCoerce; tcGlobals = tcGlobals } + private new (ty1, ty2, canCoerce) = + { ty1 = ty1; ty2 = ty2; canCoerce = canCoerce } - static member FromStrippedTypes (ty1, ty2, canCoerce, tcGlobals) = - TTypeCacheKey(ty1, ty2, canCoerce, tcGlobals) + static member FromStrippedTypes (ty1, ty2, canCoerce) = + TTypeCacheKey(ty1, ty2, canCoerce) interface System.IEquatable with member this.Equals other = @@ -72,23 +75,24 @@ type [] TTypeCacheKey = elif this.ty1 === other.ty1 && this.ty2 === other.ty2 then true else - stampEquals this.tcGlobals this.ty1 other.ty1 - && stampEquals this.tcGlobals this.ty2 other.ty2 + HashStamps.stampEquals this.ty1 other.ty1 + && HashStamps.stampEquals this.ty2 other.ty2 override this.Equals(other:objnull) = match other with | :? TTypeCacheKey as p -> (this :> System.IEquatable).Equals p | _ -> false - override this.GetHashCode() : int = - let g = this.tcGlobals - - let ty1Hash = combineHash (hashStamp g this.ty1) (hashTType g this.ty1) - let ty2Hash = combineHash (hashStamp g this.ty2) (hashTType g this.ty2) + override this.GetHashCode () : int = + HashStamps.hashTType this.ty1 + |> pipeToHash (HashStamps.hashTType this.ty2) + |> pipeToHash (hash this.canCoerce) - let combined = combineHash (combineHash ty1Hash ty2Hash) (hash this.canCoerce) + override this.ToString () = $"{this.ty1.DebugText}-{this.ty2.DebugText}" - combined +let typeSubsumptionCache = + // Leave most of the capacity in reserve for bursts. + lazy Cache.Create({ TotalCapacity = 131072; HeadroomPercentage = 75 }, name = "TypeSubsumptionCache") //------------------------------------------------------------------------- // Import an IL types as F# types. @@ -106,15 +110,13 @@ type [] TTypeCacheKey = type ImportMap(g: TcGlobals, assemblyLoader: AssemblyLoader) = let typeRefToTyconRefCache = ConcurrentDictionary() - let typeSubsumptionCache = ConcurrentDictionary(System.Environment.ProcessorCount, 1024) - member _.g = g member _.assemblyLoader = assemblyLoader member _.ILTypeRefToTyconRefCache = typeRefToTyconRefCache - member _.TypeSubsumptionCache = typeSubsumptionCache + member val TypeSubsumptionCache: Cache = typeSubsumptionCache.Value let CanImportILScopeRef (env: ImportMap) m scoref = diff --git a/src/Compiler/Checking/import.fsi b/src/Compiler/Checking/import.fsi index c387558fcba..72611e12bf7 100644 --- a/src/Compiler/Checking/import.fsi +++ b/src/Compiler/Checking/import.fsi @@ -5,13 +5,12 @@ module internal FSharp.Compiler.Import open Internal.Utilities.Library open FSharp.Compiler.AbstractIL.IL +open FSharp.Compiler.Caches open FSharp.Compiler.TcGlobals open FSharp.Compiler.Text open FSharp.Compiler.Xml open FSharp.Compiler.TypedTree -open System.Collections.Concurrent - #if !NO_TYPEPROVIDERS open FSharp.Compiler.TypeProviders #endif @@ -45,15 +44,14 @@ type CanCoerce = [] type TTypeCacheKey = interface System.IEquatable - private new: ty1: TType * ty2: TType * canCoerce: CanCoerce * tcGlobals: TcGlobals -> TTypeCacheKey + private new: ty1: TType * ty2: TType * canCoerce: CanCoerce -> TTypeCacheKey - static member FromStrippedTypes: - ty1: TType * ty2: TType * canCoerce: CanCoerce * tcGlobals: TcGlobals -> TTypeCacheKey + static member FromStrippedTypes: ty1: TType * ty2: TType * canCoerce: CanCoerce -> TTypeCacheKey val ty1: TType val ty2: TType val canCoerce: CanCoerce - val tcGlobals: TcGlobals + override GetHashCode: unit -> int /// Represents a context used for converting AbstractIL .NET and provided types to F# internal compiler data structures. @@ -73,7 +71,7 @@ type ImportMap = member g: TcGlobals /// Type subsumption cache - member TypeSubsumptionCache: ConcurrentDictionary + member TypeSubsumptionCache: Cache module Nullness = diff --git a/src/Compiler/FSharp.Compiler.Service.fsproj b/src/Compiler/FSharp.Compiler.Service.fsproj index 74e59954e8f..bbddf424684 100644 --- a/src/Compiler/FSharp.Compiler.Service.fsproj +++ b/src/Compiler/FSharp.Compiler.Service.fsproj @@ -146,6 +146,8 @@ + + diff --git a/src/Compiler/Utilities/Caches.fs b/src/Compiler/Utilities/Caches.fs new file mode 100644 index 00000000000..04829d4d1f3 --- /dev/null +++ b/src/Compiler/Utilities/Caches.fs @@ -0,0 +1,316 @@ +// LinkedList uses nulls, so we need to disable the nullability warnings for this file. +namespace FSharp.Compiler.Caches + +open System +open System.Collections.Generic +open System.Collections.Concurrent +open System.Threading +open System.Diagnostics +open System.Diagnostics.Metrics + +[] +type CacheOptions = + { + /// Total capacity, determines the size of the underlying store. + TotalCapacity: int + + /// Safety margin size as a percentage of TotalCapacity. + HeadroomPercentage: int + } + + static member Default = + { + TotalCapacity = 128 + HeadroomPercentage = 50 + } + +// It is important that this is not a struct, because LinkedListNode holds a reference to it, +// and it holds the reference to that Node, in a circular way. +[] +[] +type CachedEntity<'Key, 'Value> = + val mutable Key: 'Key + val mutable Value: 'Value + val mutable AccessCount: int64 + val mutable Node: LinkedListNode> voption + + new(key, value) = + { + Key = key + Value = value + AccessCount = 0L + Node = ValueNone + } + + // This is one time initialization, outside of the constructor because of circular reference. + // The contract is that each CachedEntity that the EntityPool produces, has Node assigned. + member this.WithNode() = + this.Node <- ValueSome(LinkedListNode this) + this + + member this.ReUse(key, value) = + this.Key <- key + this.Value <- value + this.AccessCount <- 0L + this + + override this.ToString() = $"{this.Key}" + +// Currently the Cache itself exposes Metrics.Counters that count raw cache events: hits, misses, evictions etc. +// This class observes those counters and keeps a snapshot of readings. For now this is used only to print cache stats in debug mode. +// TODO: We could add some System.Diagnostics.Metrics.Gauge instruments to this class, to get computed stats also exposed as metrics. +type CacheMetrics(cacheId) = + static let meter = new Meter("FSharp.Compiler.Cache") + + static let observedCaches = ConcurrentDictionary() + + let readings = ConcurrentDictionary() + + let listener = new MeterListener() + + do + listener.InstrumentPublished <- + fun i l -> + if i.Meter = meter && i.Description = cacheId then + l.EnableMeasurementEvents(i) + + listener.SetMeasurementEventCallback(fun k v _ _ -> Interlocked.Add(readings.GetOrAdd(k.Name, ref 0L), v) |> ignore) + listener.Start() + + member this.Dispose() = listener.Dispose() + + member val CacheId = cacheId + + static member val Meter = meter + + member val RecentStats = "-" with get, set + + member this.TryUpdateStats(clearCounts) = + let ratio = + try + float readings["hits"].Value + / float (readings["hits"].Value + readings["misses"].Value) + * 100.0 + with _ -> + Double.NaN + + let stats = + [ + for name in readings.Keys do + let v = readings[name].Value + + if v > 0 then + $"{name}: {v}" + ] + |> String.concat ", " + |> sprintf "%s | hit ratio: %s %s" this.CacheId (if Double.IsNaN(ratio) then "-" else $"%.1f{ratio}%%") + + if clearCounts then + for r in readings.Values do + Interlocked.Exchange(r, 0L) |> ignore + + if stats <> this.RecentStats then + this.RecentStats <- stats + true + else + false + + // TODO: Should return a Map, not a string + static member GetStats(cacheId) = + observedCaches[cacheId].TryUpdateStats(false) |> ignore + observedCaches[cacheId].RecentStats + + static member GetStatsUpdateForAllCaches(clearCounts) = + [ + for i in observedCaches.Values do + if i.TryUpdateStats(clearCounts) then + i.RecentStats + ] + |> String.concat "\n" + + static member AddInstrumentation(cacheId) = + if observedCaches.ContainsKey cacheId then + invalidArg "cacheId" $"cache with name {cacheId} already exists" + + observedCaches[cacheId] <- new CacheMetrics(cacheId) + + static member RemoveInstrumentation(cacheId) = + observedCaches[cacheId].Dispose() + observedCaches.TryRemove(cacheId) |> ignore + +// Creates and after reclaiming holds entities for reuse. +// More than totalCapacity can be created, but it will hold for reuse at most totalCapacity. +type EntityPool<'Key, 'Value>(totalCapacity, cacheId) = + let pool = ConcurrentBag>() + let mutable created = 0 + + let overCapacity = + CacheMetrics.Meter.CreateCounter("over-capacity", "count", cacheId) + + member _.Acquire(key, value) = + match pool.TryTake() with + | true, entity -> entity.ReUse(key, value) + | _ -> + if Interlocked.Increment &created > totalCapacity then + overCapacity.Add 1L + + // Associate a LinkedListNode with freshly created entity. + // This is a one time initialization. + CachedEntity(key, value).WithNode() + + member _.Reclaim(entity: CachedEntity<'Key, 'Value>) = + if pool.Count < totalCapacity then + pool.Add(entity) + +module Cache = + // During testing a lot of compilations are started in app domains and subprocesses. + // This is a reliable way to pass the override to all of them. + [] + let private overrideVariable = "FSHARP_CACHE_OVERRIDE" + + /// Use for testing purposes to reduce memory consumption in testhost and its subprocesses. + let OverrideCapacityForTesting () = + Environment.SetEnvironmentVariable(overrideVariable, "true", EnvironmentVariableTarget.Process) + + let applyOverride (capacity: int) = + match Environment.GetEnvironmentVariable(overrideVariable) with + | NonNull _ when capacity > 4096 -> 4096 + | _ -> capacity + +[] +type EvictionQueueMessage<'Key, 'Value> = + | Add of CachedEntity<'Key, 'Value> + | Update of CachedEntity<'Key, 'Value> + +[] +[] +type Cache<'Key, 'Value when 'Key: not null and 'Key: equality> internal (totalCapacity, headroom, ?name, ?observeMetrics) = + + let instanceId = defaultArg name (Guid.NewGuid().ToString()) + + let observeMetrics = defaultArg observeMetrics false + + do + if observeMetrics then + CacheMetrics.AddInstrumentation instanceId + + let meter = CacheMetrics.Meter + let hits = meter.CreateCounter("hits", "count", instanceId) + let misses = meter.CreateCounter("misses", "count", instanceId) + let evictions = meter.CreateCounter("evictions", "count", instanceId) + + let evictionFails = + meter.CreateCounter("eviction-fails", "count", instanceId) + + let pool = EntityPool<'Key, 'Value>(totalCapacity, instanceId) + + let store = + ConcurrentDictionary<'Key, CachedEntity<'Key, 'Value>>(Environment.ProcessorCount, totalCapacity) + + let evictionQueue = LinkedList>() + + // Non-evictable capacity. + let capacity = totalCapacity - headroom + + let evicted = Event<_>() + + let cts = new CancellationTokenSource() + + let evictionProcessor = + MailboxProcessor.Start( + (fun mb -> + let rec processNext () = + async { + match! mb.Receive() with + | EvictionQueueMessage.Add entity -> + + assert entity.Node.IsSome + + evictionQueue.AddLast(entity.Node.Value) + + // Evict one immediately if necessary. + while evictionQueue.Count > capacity do + let first = nonNull evictionQueue.First + + match store.TryRemove(first.Value.Key) with + | true, removed -> + evictionQueue.Remove(first) + pool.Reclaim(removed) + evictions.Add 1L + evicted.Trigger() + | _ -> evictionFails.Add 1L + + | EvictionQueueMessage.Update entity -> + entity.AccessCount <- entity.AccessCount + 1L + + assert entity.Node.IsSome + + let node = entity.Node.Value + assert (node.List = evictionQueue) + // Just move this node to the end of the list. + evictionQueue.Remove(node) + evictionQueue.AddLast(node) + + return! processNext () + } + + processNext ()), + cts.Token + ) + + member val Evicted = evicted.Publish + + member val Name = instanceId + + member _.TryGetValue(key: 'Key, value: outref<'Value>) = + match store.TryGetValue(key) with + | true, cachedEntity -> + hits.Add 1L + evictionProcessor.Post(EvictionQueueMessage.Update cachedEntity) + value <- cachedEntity.Value + true + | _ -> + misses.Add 1L + value <- Unchecked.defaultof<'Value> + false + + member _.TryAdd(key: 'Key, value: 'Value) = + let cachedEntity = pool.Acquire(key, value) + + if store.TryAdd(key, cachedEntity) then + evictionProcessor.Post(EvictionQueueMessage.Add cachedEntity) + true + else + pool.Reclaim(cachedEntity) + false + + interface IDisposable with + member this.Dispose() = + cts.Cancel() + cts.Dispose() + evictionProcessor.Dispose() + store.Clear() + + if observeMetrics then + CacheMetrics.RemoveInstrumentation instanceId + + member this.Dispose() = (this :> IDisposable).Dispose() + + member this.GetStats() = CacheMetrics.GetStats(this.Name) + + static member Create<'Key, 'Value>(options: CacheOptions, ?name, ?observeMetrics) = + if options.TotalCapacity < 0 then + invalidArg "Capacity" "Capacity must be positive" + + if options.HeadroomPercentage < 0 then + invalidArg "HeadroomPercentage" "HeadroomPercentage must be positive" + + let totalCapacity = Cache.applyOverride options.TotalCapacity + // Determine evictable headroom as the percentage of total capcity, since we want to not resize the dictionary. + let headroom = + int (float options.TotalCapacity * float options.HeadroomPercentage / 100.0) + + let cache = + new Cache<_, _>(totalCapacity, headroom, ?name = name, ?observeMetrics = observeMetrics) + + cache diff --git a/src/Compiler/Utilities/Caches.fsi b/src/Compiler/Utilities/Caches.fsi new file mode 100644 index 00000000000..565342bf7f5 --- /dev/null +++ b/src/Compiler/Utilities/Caches.fsi @@ -0,0 +1,44 @@ +namespace FSharp.Compiler.Caches + +open System +open System.Diagnostics.Metrics +open System.Threading + +[] +type internal CacheOptions = + { + /// Total capacity, determines the size of the underlying store. + TotalCapacity: int + + /// Safety margin size as a percentage of TotalCapacity. + HeadroomPercentage: int + } + + static member Default: CacheOptions + +module internal Cache = + val OverrideCapacityForTesting: unit -> unit + +[] +type internal Cache<'Key, 'Value when 'Key: not null and 'Key: equality> = + new: totalCapacity: int * headroom: int * ?name: string * ?observeMetrics: bool -> Cache<'Key, 'Value> + + member TryGetValue: key: 'Key * value: outref<'Value> -> bool + member TryAdd: key: 'Key * value: 'Value -> bool + /// Cancels the background eviction task. + member Dispose: unit -> unit + + interface IDisposable + + /// For testing only + member Evicted: IEvent + + static member Create<'Key, 'Value> : + options: CacheOptions * ?name: string * ?observeMetrics: bool -> Cache<'Key, 'Value> + +[] +type internal CacheMetrics = + static member Meter: Meter + static member GetStats: cacheId: string -> string + /// Retrieves current hit ratio, hits, misses, evictions etc. formatted for printing or logging. + static member GetStatsUpdateForAllCaches: clearCounts: bool -> string diff --git a/src/Compiler/Utilities/TypeHashing.fs b/src/Compiler/Utilities/TypeHashing.fs index bcdface38be..7907c2148dc 100644 --- a/src/Compiler/Utilities/TypeHashing.fs +++ b/src/Compiler/Utilities/TypeHashing.fs @@ -126,22 +126,6 @@ module HashAccessibility = module rec HashTypes = open Microsoft.FSharp.Core.LanguagePrimitives - let stampEquals g ty1 ty2 = - match (stripTyEqns g ty1), (stripTyEqns g ty2) with - | TType_app(tcref1, _, _), TType_app(tcref2, _, _) -> tcref1.Stamp.Equals(tcref2.Stamp) - | TType_var(r1, _), TType_var(r2, _) -> r1.Stamp.Equals(r2.Stamp) - | _ -> false - - /// Get has for Stamp for TType_app tyconref and TType_var typar - let hashStamp g ty = - let v: Stamp = - match (stripTyEqns g ty) with - | TType_app(tcref, _, _) -> tcref.Stamp - | TType_var(r, _) -> r.Stamp - | _ -> GenericZero - - hash v - /// Hash a reference to a type let hashTyconRef tcref = hashTyconRefImpl tcref @@ -344,3 +328,69 @@ module HashTastMemberOrVals = hashNonMemberVal (g, obs) (tps, vref.Deref, tau, cxs) | Some _ -> hashMember (g, obs) emptyTyparInst vref.Deref + +/// Practical TType comparer strictly for the use with cache keys. +module HashStamps = + let rec typeInstStampsEqual (tys1: TypeInst) (tys2: TypeInst) = + tys1.Length = tys2.Length && (tys1, tys2) ||> Seq.forall2 stampEquals + + and inline typarStampEquals (t1: Typar) (t2: Typar) = t1.Stamp = t2.Stamp + + and typarsStampsEqual (tps1: Typars) (tps2: Typars) = + tps1.Length = tps2.Length && (tps1, tps2) ||> Seq.forall2 typarStampEquals + + and measureStampEquals (m1: Measure) (m2: Measure) = + match m1, m2 with + | Measure.Var(mv1), Measure.Var(mv2) -> mv1.Stamp = mv2.Stamp + | Measure.Const(t1, _), Measure.Const(t2, _) -> t1.Stamp = t2.Stamp + | Measure.Prod(m1, m2, _), Measure.Prod(m3, m4, _) -> measureStampEquals m1 m3 && measureStampEquals m2 m4 + | Measure.Inv m1, Measure.Inv m2 -> measureStampEquals m1 m2 + | Measure.One _, Measure.One _ -> true + | Measure.RationalPower(m1, r1), Measure.RationalPower(m2, r2) -> r1 = r2 && measureStampEquals m1 m2 + | _ -> false + + and nullnessEquals (n1: Nullness) (n2: Nullness) = + match n1, n2 with + | Nullness.Known k1, Nullness.Known k2 -> k1 = k2 + | Nullness.Variable _, Nullness.Variable _ -> true + | _ -> false + + and stampEquals ty1 ty2 = + match ty1, ty2 with + | TType_ucase(u, tys1), TType_ucase(v, tys2) -> u.CaseName = v.CaseName && typeInstStampsEqual tys1 tys2 + | TType_app(tcref1, tinst1, n1), TType_app(tcref2, tinst2, n2) -> + tcref1.Stamp = tcref2.Stamp + && nullnessEquals n1 n2 + && typeInstStampsEqual tinst1 tinst2 + | TType_anon(info1, tys1), TType_anon(info2, tys2) -> info1.Stamp = info2.Stamp && typeInstStampsEqual tys1 tys2 + | TType_tuple(c1, tys1), TType_tuple(c2, tys2) -> c1 = c2 && typeInstStampsEqual tys1 tys2 + | TType_forall(tps1, tau1), TType_forall(tps2, tau2) -> stampEquals tau1 tau2 && typarsStampsEqual tps1 tps2 + | TType_var(r1, n1), TType_var(r2, n2) -> r1.Stamp = r2.Stamp && nullnessEquals n1 n2 + | TType_measure m1, TType_measure m2 -> measureStampEquals m1 m2 + | _ -> false + + let inline hashStamp (x: Stamp) : Hash = uint x * 2654435761u |> int + + // The idea is to keep the illusion of immutability of TType. + // This hash must be stable during compilation, otherwise we won't be able to find keys or evict from the cache. + let rec hashTType ty : Hash = + match ty with + | TType_ucase(u, tinst) -> tinst |> hashListOrderMatters (hashTType) |> pipeToHash (hash u.CaseName) + | TType_app(tcref, tinst, Nullness.Known n) -> + tinst + |> hashListOrderMatters (hashTType) + |> pipeToHash (hashStamp tcref.Stamp) + |> pipeToHash (hash n) + | TType_app(tcref, tinst, Nullness.Variable _) -> tinst |> hashListOrderMatters (hashTType) |> pipeToHash (hashStamp tcref.Stamp) + | TType_anon(info, tys) -> tys |> hashListOrderMatters (hashTType) |> pipeToHash (hashStamp info.Stamp) + | TType_tuple(c, tys) -> tys |> hashListOrderMatters (hashTType) |> pipeToHash (hash c) + | TType_forall(tps, tau) -> + tps + |> Seq.map _.Stamp + |> hashListOrderMatters (hashStamp) + |> pipeToHash (hashTType tau) + | TType_fun(d, r, Nullness.Known n) -> hashTType d |> pipeToHash (hashTType r) |> pipeToHash (hash n) + | TType_fun(d, r, Nullness.Variable _) -> hashTType d |> pipeToHash (hashTType r) + | TType_var(r, Nullness.Known n) -> hashStamp r.Stamp |> pipeToHash (hash n) + | TType_var(r, Nullness.Variable _) -> hashStamp r.Stamp + | TType_measure _ -> 0 diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerService/Caches.fs b/tests/FSharp.Compiler.ComponentTests/CompilerService/Caches.fs new file mode 100644 index 00000000000..3849cd9addd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/CompilerService/Caches.fs @@ -0,0 +1,90 @@ +module CompilerService.Caches + +open FSharp.Compiler.Caches + +open System.Threading +open Xunit + +[] +let ``Create and dispose many`` () = + let caches = + [ + for _ in 1 .. 100 do + Cache.Create(CacheOptions.Default, observeMetrics = true) + ] + + for c in caches do c.Dispose() + +[] +let ``Create and dispose many named`` () = + let caches = + [ + for i in 1 .. 100 do + Cache.Create(CacheOptions.Default, name = $"testCache{i}", observeMetrics = true) + ] + + for c in caches do c.Dispose() + +[] +let ``Basic add and retrieve`` () = + use cache = Cache.Create(CacheOptions.Default, observeMetrics = true) + + cache.TryAdd("key1", 1) |> ignore + cache.TryAdd("key2", 2) |> ignore + + let mutable value = 0 + Assert.True(cache.TryGetValue("key1", &value), "Should retrieve key1") + Assert.Equal(1, value) + Assert.True(cache.TryGetValue("key2", &value), "Should retrieve key2") + Assert.Equal(2, value) + Assert.False(cache.TryGetValue("key3", &value), "Should not retrieve non-existent key3") + +[] +let ``Eviction of least recently used`` () = + use cache = Cache.Create({ TotalCapacity = 2; HeadroomPercentage = 0 }, observeMetrics = true) + + cache.TryAdd("key1", 1) |> ignore + cache.TryAdd("key2", 2) |> ignore + + // Make key1 recently used by accessing it + let mutable value = 0 + cache.TryGetValue("key1", &value) |> ignore + + let evicted = new ManualResetEvent(false) + cache.Evicted.Add(fun _ -> evicted.Set() |> ignore) + + // Add a third item, which should schedule key2 for eviction + cache.TryAdd("key3", 3) |> ignore + + // Wait for eviction to complete using the event + evicted.WaitOne() |> ignore + + Assert.False(cache.TryGetValue("key2", &value), "key2 should have been evicted") + Assert.True(cache.TryGetValue("key1", &value), "key1 should still be in cache") + Assert.Equal(1, value) + Assert.True(cache.TryGetValue("key3", &value), "key3 should be in cache") + Assert.Equal(3, value) + +[] +let ``Metrics can be retrieved`` () = + use cache = Cache.Create({ TotalCapacity = 2; HeadroomPercentage = 0 }, name = "test_metrics", observeMetrics = true) + + cache.TryAdd("key1", 1) |> ignore + cache.TryAdd("key2", 2) |> ignore + + // Make key1 recently used by accessing it + let mutable value = 0 + cache.TryGetValue("key1", &value) |> ignore + + let evicted = new ManualResetEvent(false) + cache.Evicted.Add(fun _ -> evicted.Set() |> ignore) + + // Add a third item, which should schedule key2 for eviction + cache.TryAdd("key3", 3) |> ignore + + // Wait for eviction to complete using the event + evicted.WaitOne() |> ignore + + let metrics = CacheMetrics.GetStats "test_metrics" + + Assert.Contains("test_metrics | hit ratio", metrics) diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 98eb8a9336c..812833e988c 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -301,6 +301,7 @@ + diff --git a/tests/FSharp.Test.Utilities/XunitHelpers.fs b/tests/FSharp.Test.Utilities/XunitHelpers.fs index b17e1b1cd4b..50deb42ea68 100644 --- a/tests/FSharp.Test.Utilities/XunitHelpers.fs +++ b/tests/FSharp.Test.Utilities/XunitHelpers.fs @@ -10,6 +10,7 @@ open Xunit.Abstractions open TestFramework +open FSharp.Compiler.Caches open FSharp.Compiler.Diagnostics open OpenTelemetry.Resources @@ -155,6 +156,7 @@ type OpenTelemetryExport(testRunName, enable) = // Configure OpenTelemetry metrics export. Metrics can be viewed in Prometheus or other compatible tools. OpenTelemetry.Sdk.CreateMeterProviderBuilder() + .AddMeter(CacheMetrics.Meter.Name) .AddMeter("System.Runtime") .ConfigureResource(fun r -> r.AddService(testRunName) |> ignore) .AddOtlpExporter(fun e m -> @@ -185,6 +187,9 @@ type FSharpXunitFramework(sink: IMessageSink) = AssemblyResolver.addResolver () #endif + // Override cache capacity to reduce memory usage in CI. + Cache.OverrideCapacityForTesting() + let testRunName = $"RunTests_{assemblyName.Name} {Runtime.InteropServices.RuntimeInformation.FrameworkDescription}" use _ = new OpenTelemetryExport(testRunName, Environment.GetEnvironmentVariable("FSHARP_OTEL_EXPORT") <> null) diff --git a/vsintegration/src/FSharp.Editor/Common/Logging.fs b/vsintegration/src/FSharp.Editor/Common/Logging.fs index b0f56df3234..de96d46e254 100644 --- a/vsintegration/src/FSharp.Editor/Common/Logging.fs +++ b/vsintegration/src/FSharp.Editor/Common/Logging.fs @@ -30,6 +30,8 @@ module Config = let fsharpOutputGuid = Guid fsharpOutputGuidString open Config +open System.Diagnostics.Metrics +open System.Text [] type Logger [] ([)>] serviceProvider: IServiceProvider) = @@ -118,11 +120,8 @@ module Logging = let logExceptionWithContext (ex: Exception, context) = logErrorf "Context: %s\nException Message: %s\nStack Trace: %s" context ex.Message ex.StackTrace -#if DEBUG -module Activity = - - open OpenTelemetry.Resources - open OpenTelemetry.Trace +module FSharpServiceTelemetry = + open FSharp.Compiler.Caches let listen filter = let indent (activity: Activity) = @@ -135,16 +134,15 @@ module Activity = String.replicate (loop activity 0) " " let collectTags (activity: Activity) = - [ for tag in activity.Tags -> $"{tag.Key}: %A{tag.Value}" ] - |> String.concat ", " + [ for tag in activity.Tags -> $"{tag.Key}: {tag.Value}" ] |> String.concat ", " let listener = new ActivityListener( - ShouldListenTo = (fun source -> source.Name = FSharp.Compiler.Diagnostics.ActivityNames.FscSourceName), + ShouldListenTo = (fun source -> source.Name = ActivityNames.FscSourceName), Sample = (fun context -> if context.Name.Contains(filter) then - ActivitySamplingResult.AllDataAndRecorded + ActivitySamplingResult.AllData else ActivitySamplingResult.None), ActivityStarted = (fun a -> logMsg $"{indent a}{a.OperationName} {collectTags a}") @@ -152,13 +150,56 @@ module Activity = ActivitySource.AddActivityListener(listener) - let export () = - OpenTelemetry.Sdk - .CreateTracerProviderBuilder() - .AddSource(ActivityNames.FscSourceName) - .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(serviceName = "F#", serviceVersion = "1.0.0")) - .AddOtlpExporter() - .Build() + let logCacheMetricsToOutput () = + + let timer = new System.Timers.Timer(1000.0, AutoReset = true) + + timer.Elapsed.Add(fun _ -> + let stats = CacheMetrics.GetStatsUpdateForAllCaches(clearCounts = true) + + if stats <> "" then + logMsg $"\n{stats}") + + timer.Start() + +#if DEBUG + open OpenTelemetry.Resources + open OpenTelemetry.Trace + open OpenTelemetry.Metrics + + let otelExport () = + // On Windows forwarding localhost to wsl2 docker container sometimes does not work. Use IP address instead. + let otlpEndpoint = Uri("http://127.0.0.1:4317") + + let meterProvider = + // Configure OpenTelemetry metrics. Metrics can be viewed in Prometheus or other compatible tools. + OpenTelemetry.Sdk + .CreateMeterProviderBuilder() + .ConfigureResource(fun r -> r.AddService("F#") |> ignore) + .AddMeter(CacheMetrics.Meter.Name) + .AddMeter("System.Runtime") + .AddOtlpExporter(fun e m -> + e.Endpoint <- otlpEndpoint + m.PeriodicExportingMetricReaderOptions.ExportIntervalMilliseconds <- 1000 + m.TemporalityPreference <- MetricReaderTemporalityPreference.Cumulative) + .Build() + + let tracerProvider = + // Configure OpenTelemetry export. Traces can be viewed in Jaeger or other compatible tools. + OpenTelemetry.Sdk + .CreateTracerProviderBuilder() + .AddSource(ActivityNames.FscSourceName) + .ConfigureResource(fun r -> r.AddService("F#") |> ignore) + .AddOtlpExporter(fun e -> e.Endpoint <- otlpEndpoint) + .Build() + + let a = Activity.startNoTags "FSharpPackage" + + fun () -> + a.Dispose() + tracerProvider.ForceFlush(5000) |> ignore + tracerProvider.Dispose() + meterProvider.Dispose() let listenToAll () = listen "" #endif diff --git a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs index 5cc9cec2943..4eb399a39f3 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs @@ -340,15 +340,21 @@ type internal FSharpPackage() as this = let mutable solutionEventsOpt = None -#if DEBUG - let _traceProvider = Logging.Activity.export () - let _logger = Logging.Activity.listenToAll () - // Logging.Activity.listen "IncrementalBuild" -#endif - // FSI-LINKAGE-POINT: unsited init do FSharp.Interactive.Hooks.fsiConsoleWindowPackageCtorUnsited (this :> Package) +#if DEBUG + do Logging.FSharpServiceTelemetry.logCacheMetricsToOutput () + + let flushTelemetry = Logging.FSharpServiceTelemetry.otelExport () + + override this.Dispose(disposing: bool) = + base.Dispose(disposing: bool) + + if disposing then + flushTelemetry () +#endif + override this.InitializeAsync(cancellationToken: CancellationToken, progress: IProgress) : Tasks.Task = // `base.` methods can't be called in the `async` builder, so we have to cache it let baseInitializeAsync = base.InitializeAsync(cancellationToken, progress) diff --git a/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj b/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj index 2a760da0f5e..c084fc6f06a 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj +++ b/vsintegration/tests/FSharp.Editor.Tests/FSharp.Editor.Tests.fsproj @@ -16,6 +16,9 @@ + + XunitSetup.fs + diff --git a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj index e1e657a651a..395400a795e 100644 --- a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj +++ b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj @@ -16,6 +16,9 @@ + + XunitSetup.fs + diff --git a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj index 30a871ad288..c02e6f1bfc7 100644 --- a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj +++ b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj @@ -17,6 +17,9 @@ + + XunitSetup.fs + From 172dc31e21548990663cc371915c3cb81875a6b5 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Fri, 2 May 2025 17:21:19 +0100 Subject: [PATCH 09/38] include accessibility range in `SynPat.Named` (#18526) --- .../.FSharp.Compiler.Service/9.0.300.md | 1 + src/Compiler/pars.fsy | 6 +++- .../data/SyntaxTree/SynType/Named 01.fs | 3 ++ .../data/SyntaxTree/SynType/Named 01.fs.bsl | 21 ++++++++++++ .../data/SyntaxTree/SynType/Named 02.fs | 3 ++ .../data/SyntaxTree/SynType/Named 02.fs.bsl | 23 +++++++++++++ .../data/SyntaxTree/SynType/Named 03.fs | 3 ++ .../data/SyntaxTree/SynType/Named 03.fs.bsl | 24 ++++++++++++++ .../data/SyntaxTree/SynType/Named 04.fs | 3 ++ .../data/SyntaxTree/SynType/Named 04.fs.bsl | 24 ++++++++++++++ .../data/SyntaxTree/SynType/Named 05.fs | 3 ++ .../data/SyntaxTree/SynType/Named 05.fs.bsl | 30 +++++++++++++++++ .../data/SyntaxTree/SynType/Named 06.fs | 3 ++ .../data/SyntaxTree/SynType/Named 06.fs.bsl | 32 +++++++++++++++++++ .../data/SyntaxTree/SynType/Named 07.fs | 3 ++ .../data/SyntaxTree/SynType/Named 07.fs.bsl | 31 ++++++++++++++++++ .../data/SyntaxTree/SynType/Named 08.fs | 3 ++ .../data/SyntaxTree/SynType/Named 08.fs.bsl | 28 ++++++++++++++++ .../data/SyntaxTree/SynType/Named 09.fs | 4 +++ .../data/SyntaxTree/SynType/Named 09.fs.bsl | 20 ++++++++++++ 20 files changed, 267 insertions(+), 1 deletion(-) create mode 100644 tests/service/data/SyntaxTree/SynType/Named 01.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Named 01.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Named 02.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Named 02.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Named 03.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Named 03.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Named 04.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Named 04.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Named 05.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Named 05.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Named 06.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Named 06.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Named 07.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Named 07.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Named 08.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Named 08.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Named 09.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Named 09.fs.bsl diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index c39b44e1d7a..2eeef97ffb1 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -25,6 +25,7 @@ * Fixed [#18433](https://github.com/dotnet/fsharp/issues/18433), a rare case of an internal error in xml comment processing. ([PR #18436](https://github.com/dotnet/fsharp/pull/18436)) * Fix confusing type inference error in task expression ([Issue #13789](https://github.com/dotnet/fsharp/issues/13789), [PR #18450](https://github.com/dotnet/fsharp/pull/18450)) * Fix missing `null` highlighting in tooltips ([PR #18457](https://github.com/dotnet/fsharp/pull/18457)) +* Fix range of SynPat.Named doesn't include accessibility ([PR #18526](https://github.com/dotnet/fsharp/pull/18526)) * Allow `_` in `use!` bindings values (lift FS1228 restriction) ([PR #18487](https://github.com/dotnet/fsharp/pull/18487)) * Make `[]` combination work([PR #18444](https://github.com/dotnet/fsharp/pull/18444/)) * Fix code completion considers types from own namespace non-imported ([PR #18518](https://github.com/dotnet/fsharp/issues/18518)) diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index e6e3a657592..e5e0bca6a29 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -3776,7 +3776,11 @@ atomicPattern: mkSynPatMaybeVar lidwd vis (lhs parseState) else let synIdent = List.head lidwd.IdentsWithTrivia - SynPat.Named(synIdent, false, vis, synIdent.Range) } + let m = + match vis with + | Some vis -> unionRanges vis.Range synIdent.Range + | _ -> synIdent.Range + SynPat.Named(synIdent, false, vis, m) } | constant { SynPat.Const(fst $1, snd $1) } diff --git a/tests/service/data/SyntaxTree/SynType/Named 01.fs b/tests/service/data/SyntaxTree/SynType/Named 01.fs new file mode 100644 index 00000000000..b3d177741da --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 01.fs @@ -0,0 +1,3 @@ +module Module + +let value = 42 \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Named 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 01.fs.bsl new file mode 100644 index 00000000000..0781e30ef03 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 01.fs.bsl @@ -0,0 +1,21 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Named 01.fs", false, QualifiedNameOfFile Module, [], [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Named (SynIdent (value, None), false, None, (3,4--3,9)), None, + Const (Int32 42, (3,12--3,14)), (3,4--3,9), Yes (3,0--3,14), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,10--3,11) })], (3,0--3,14))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,14), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 02.fs b/tests/service/data/SyntaxTree/SynType/Named 02.fs new file mode 100644 index 00000000000..d77886cd9dd --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 02.fs @@ -0,0 +1,3 @@ +module Module + +let private value = 42 \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Named 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 02.fs.bsl new file mode 100644 index 00000000000..524fced7a9a --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 02.fs.bsl @@ -0,0 +1,23 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Named 02.fs", false, QualifiedNameOfFile Module, [], [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Named + (SynIdent (value, None), false, Some (Private (3,4--3,11)), + (3,4--3,17)), None, Const (Int32 42, (3,20--3,22)), + (3,4--3,17), Yes (3,0--3,22), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,18--3,19) })], (3,0--3,22))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 03.fs b/tests/service/data/SyntaxTree/SynType/Named 03.fs new file mode 100644 index 00000000000..191fca6323c --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 03.fs @@ -0,0 +1,3 @@ +module Module + +let (|A|) = 0 \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Named 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 03.fs.bsl new file mode 100644 index 00000000000..6cddbf89cae --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 03.fs.bsl @@ -0,0 +1,24 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Named 03.fs", false, QualifiedNameOfFile Module, [], [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Named + (SynIdent + (|A|, Some (HasParenthesis ((3,4--3,5), (3,8--3,9)))), + false, None, (3,4--3,9)), None, + Const (Int32 0, (3,12--3,13)), (3,4--3,9), Yes (3,0--3,13), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,10--3,11) })], (3,0--3,13))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 04.fs b/tests/service/data/SyntaxTree/SynType/Named 04.fs new file mode 100644 index 00000000000..c1788fab9a0 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 04.fs @@ -0,0 +1,3 @@ +module Module + +let private (|A|) = 0 \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Named 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 04.fs.bsl new file mode 100644 index 00000000000..c205d9d5518 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 04.fs.bsl @@ -0,0 +1,24 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Named 04.fs", false, QualifiedNameOfFile Module, [], [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Named + (SynIdent + (|A|, Some (HasParenthesis ((3,12--3,13), (3,16--3,17)))), + false, Some (Private (3,4--3,11)), (3,4--3,17)), None, + Const (Int32 0, (3,20--3,21)), (3,4--3,17), Yes (3,0--3,21), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,18--3,19) })], (3,0--3,21))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 05.fs b/tests/service/data/SyntaxTree/SynType/Named 05.fs new file mode 100644 index 00000000000..710b9d60ce9 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 05.fs @@ -0,0 +1,3 @@ +module Module + +let a, private b = 1, 2 \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Named 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 05.fs.bsl new file mode 100644 index 00000000000..fafa4eb0a3f --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 05.fs.bsl @@ -0,0 +1,30 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Named 05.fs", false, QualifiedNameOfFile Module, [], [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Tuple + (false, + [Named (SynIdent (a, None), false, None, (3,4--3,5)); + Named + (SynIdent (b, None), false, Some (Private (3,7--3,14)), + (3,7--3,16))], [(3,5--3,6)], (3,4--3,16)), None, + Tuple + (false, + [Const (Int32 1, (3,19--3,20)); + Const (Int32 2, (3,22--3,23))], [(3,20--3,21)], + (3,19--3,23)), (3,4--3,16), Yes (3,0--3,23), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,17--3,18) })], (3,0--3,23))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 06.fs b/tests/service/data/SyntaxTree/SynType/Named 06.fs new file mode 100644 index 00000000000..31ee6a99e79 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 06.fs @@ -0,0 +1,3 @@ +module Module + +let private a, private b = 1, 2 \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Named 06.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 06.fs.bsl new file mode 100644 index 00000000000..75f20e20fdd --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 06.fs.bsl @@ -0,0 +1,32 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Named 06.fs", false, QualifiedNameOfFile Module, [], [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Tuple + (false, + [Named + (SynIdent (a, None), false, Some (Private (3,4--3,11)), + (3,4--3,13)); + Named + (SynIdent (b, None), false, Some (Private (3,15--3,22)), + (3,15--3,24))], [(3,13--3,14)], (3,4--3,24)), None, + Tuple + (false, + [Const (Int32 1, (3,27--3,28)); + Const (Int32 2, (3,30--3,31))], [(3,28--3,29)], + (3,27--3,31)), (3,4--3,24), Yes (3,0--3,31), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,25--3,26) })], (3,0--3,31))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,31), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 07.fs b/tests/service/data/SyntaxTree/SynType/Named 07.fs new file mode 100644 index 00000000000..ed76155a8ef --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 07.fs @@ -0,0 +1,3 @@ +module Module + +let private a, b = 1, 2 \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Named 07.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 07.fs.bsl new file mode 100644 index 00000000000..65e957b2058 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 07.fs.bsl @@ -0,0 +1,31 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Named 07.fs", false, QualifiedNameOfFile Module, [], [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Tuple + (false, + [Named + (SynIdent (a, None), false, Some (Private (3,4--3,11)), + (3,4--3,13)); + Named (SynIdent (b, None), false, None, (3,15--3,16))], + [(3,13--3,14)], (3,4--3,16)), None, + Tuple + (false, + [Const (Int32 1, (3,19--3,20)); + Const (Int32 2, (3,22--3,23))], [(3,20--3,21)], + (3,19--3,23)), (3,4--3,16), Yes (3,0--3,23), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,17--3,18) })], (3,0--3,23))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 08.fs b/tests/service/data/SyntaxTree/SynType/Named 08.fs new file mode 100644 index 00000000000..57c471b0631 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 08.fs @@ -0,0 +1,3 @@ +module Module + +let private (1, 2) = 0 \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Named 08.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 08.fs.bsl new file mode 100644 index 00000000000..c6f0d6cbd6d --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 08.fs.bsl @@ -0,0 +1,28 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Named 08.fs", false, QualifiedNameOfFile Module, [], [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Named + (SynIdent + (op_MultiplyMultiplyMultiplyMultiply, + Some (HasParenthesis ((3,12--3,13), (3,17--3,18)))), + false, Some (Private (3,4--3,11)), (3,4--3,18)), None, + Const (Int32 0, (3,21--3,22)), (3,4--3,18), Yes (3,0--3,22), + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,19--3,20) })], (3,0--3,22))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + CodeComments = [] }, set [])) + +(3,13)-(3,14) parse error Unexpected integer literal in binding +(3,12)-(3,18) parse error Attempted to parse this as an operator name, but failed diff --git a/tests/service/data/SyntaxTree/SynType/Named 09.fs b/tests/service/data/SyntaxTree/SynType/Named 09.fs new file mode 100644 index 00000000000..1158b0991b0 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 09.fs @@ -0,0 +1,4 @@ +module Module + +match 1 with +| private x -> () \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Named 09.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 09.fs.bsl new file mode 100644 index 00000000000..a97b6dd3461 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Named 09.fs.bsl @@ -0,0 +1,20 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Named 09.fs", false, QualifiedNameOfFile Module, [], [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (Match + (Yes (3,0--3,12), Const (Int32 1, (3,6--3,7)), + [SynMatchClause + (Named + (SynIdent (x, None), false, Some (Private (4,2--4,9)), + (4,2--4,11)), None, Const (Unit, (4,15--4,17)), + (4,2--4,17), Yes, { ArrowRange = Some (4,12--4,14) + BarRange = Some (4,0--4,1) })], + (3,0--4,17), { MatchKeyword = (3,0--3,5) + WithKeyword = (3,8--3,12) }), (3,0--4,17))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--4,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + CodeComments = [] }, set [])) From abffd375fc32cc23f01e02ceca9cf56fd7146722 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Mon, 5 May 2025 08:39:55 -0700 Subject: [PATCH 10/38] Fix mixed emit-multi+/- sessions (#18465) * Fix mixed emit-multi+/- sessions * fantomas * ilverify baseline --- .../.FSharp.Compiler.Service/9.0.300.md | 1 + src/Compiler/Interactive/fsi.fs | 25 +++++--- .../Scripting/Interactive.fs | 47 ++++++++++----- tests/FSharp.Test.Utilities/Compiler.fs | 59 ++++++++++++++----- tests/FSharp.Test.Utilities/CompilerAssert.fs | 5 +- ...y_FSharp.Compiler.Service_Debug_net9.0.bsl | 2 +- ....Compiler.Service_Debug_netstandard2.0.bsl | 2 +- ...FSharp.Compiler.Service_Release_net9.0.bsl | 2 +- ...ompiler.Service_Release_netstandard2.0.bsl | 2 +- 9 files changed, 102 insertions(+), 43 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index 2eeef97ffb1..e187f285d4b 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -30,6 +30,7 @@ * Make `[]` combination work([PR #18444](https://github.com/dotnet/fsharp/pull/18444/)) * Fix code completion considers types from own namespace non-imported ([PR #18518](https://github.com/dotnet/fsharp/issues/18518)) * Code completion: fix getting qualifier expression in do statements in type decls ([PR #18524](https://github.com/dotnet/fsharp/pull/18524)) +* Fixed: [#18441](https://github.com/dotnet/fsharp/issues/18441) FSI multi-emit unstable. ([PR #18465](https://github.com/dotnet/fsharp/pull/18465)) ### Added * Added missing type constraints in FCS. ([PR #18241](https://github.com/dotnet/fsharp/pull/18241)) diff --git a/src/Compiler/Interactive/fsi.fs b/src/Compiler/Interactive/fsi.fs index 78d5cb94dcd..98c62839018 100644 --- a/src/Compiler/Interactive/fsi.fs +++ b/src/Compiler/Interactive/fsi.fs @@ -1673,7 +1673,8 @@ let internal mkBoundValueTypedImpl tcGlobals m moduleName name ty = let qname = QualifiedNameOfFile.QualifiedNameOfFile(Ident(moduleName, m)) entity, v, CheckedImplFile.CheckedImplFile(qname, [], mty, contents, false, false, StampMap.Empty, Map.empty) -let dynamicCcuName = "FSI-ASSEMBLY" +let dynamicCcuName (isEmitMulti) = + $"""FSI-ASSEMBLY{if isEmitMulti then "-MULTI" else ""}""" /// Encapsulates the coordination of the typechecking, optimization and code generation /// components of the F# compiler for interactively executed fragments of code. @@ -1723,7 +1724,11 @@ type internal FsiDynamicCompiler None else let assemBuilder, moduleBuilder = - mkDynamicAssemblyAndModule (dynamicCcuName, tcConfigB.optSettings.LocalOptimizationsEnabled, fsiCollectible) + mkDynamicAssemblyAndModule ( + dynamicCcuName (tcConfigB.fsiMultiAssemblyEmit), + tcConfigB.optSettings.LocalOptimizationsEnabled, + fsiCollectible + ) dynamicAssemblies.Add(assemBuilder) Some(assemBuilder, moduleBuilder) @@ -1813,7 +1818,7 @@ type internal FsiDynamicCompiler let attrs = [ - tcGlobals.MakeInternalsVisibleToAttribute(dynamicCcuName) + tcGlobals.MakeInternalsVisibleToAttribute(dynamicCcuName (tcConfigB.fsiMultiAssemblyEmit)) yield! manifest.CustomAttrs.AsList() ] @@ -1960,7 +1965,9 @@ type internal FsiDynamicCompiler diagnosticsLogger.AbortOnError(fsiConsoleOutput) ReportTime tcConfig "Linking" - let ilxMainModule = CreateModuleFragment(tcConfigB, dynamicCcuName, codegenResults) + + let ilxMainModule = + CreateModuleFragment(tcConfigB, dynamicCcuName (tcConfigB.fsiMultiAssemblyEmit), codegenResults) diagnosticsLogger.AbortOnError(fsiConsoleOutput) @@ -2652,7 +2659,7 @@ type internal FsiDynamicCompiler let tcEnv, asms = try - RequireReferences(ctok, tcImports, tcState.TcEnvFromImpls, dynamicCcuName, resolutions) + RequireReferences(ctok, tcImports, tcState.TcEnvFromImpls, dynamicCcuName (tcConfigB.fsiMultiAssemblyEmit), resolutions) with _ -> for (path, _, _, m) in refs do tcConfigB.RemoveReferencedAssemblyByPath(m, path) @@ -3025,7 +3032,7 @@ type internal FsiDynamicCompiler let emEnv0 = if tcConfigB.fsiMultiAssemblyEmit then let emEnv = - ILMultiInMemoryAssemblyEmitEnv(ilGlobals, resolveAssemblyRef, dynamicCcuName) + ILMultiInMemoryAssemblyEmitEnv(ilGlobals, resolveAssemblyRef, dynamicCcuName (tcConfigB.fsiMultiAssemblyEmit)) MultipleInMemoryAssemblies emEnv else @@ -3041,10 +3048,10 @@ type internal FsiDynamicCompiler let emEnv = ILDynamicAssemblyWriter.emEnv0 SingleRefEmitAssembly(cenv, emEnv) - let tcEnv, openDecls0 = - GetInitialTcEnv(dynamicCcuName, rangeStdin0, tcConfig, tcImports, tcGlobals) + let ccuName = dynamicCcuName (tcConfigB.fsiMultiAssemblyEmit) - let ccuName = dynamicCcuName + let tcEnv, openDecls0 = + GetInitialTcEnv(ccuName, rangeStdin0, tcConfig, tcImports, tcGlobals) let tcState = GetInitialTcState(rangeStdin0, ccuName, tcConfig, tcGlobals, tcImports, tcEnv, openDecls0) diff --git a/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs b/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs index 4fab401b9c6..7580dae0925 100644 --- a/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs +++ b/tests/FSharp.Compiler.ComponentTests/Scripting/Interactive.fs @@ -7,6 +7,9 @@ open Xunit open System open FSharp.Test.Compiler open FSharp.Test.ScriptHelpers +open FSharp.Compiler.Interactive.Shell +open FSharp.Compiler.Diagnostics +open FSharp.Test.CompilerAssertHelpers module ``Interactive tests`` = @@ -35,34 +38,48 @@ module ``Interactive tests`` = ] [] - [] - [] - let ``Evaluation of multiple sessions should succeed`` (useMultiEmit) = + [] + [] + [] + [] + let ``Evaluation of multiple sessions should succeed`` (useMultiEmit1, useMultiEmit2) = - let args : string array = [| if useMultiEmit then "--multiemit+" else "--multiemit-"|] - use sessionOne = new FSharpScript(additionalArgs=args) - use sessionTwo = new FSharpScript(additionalArgs=args) + // This test is to check that we can have multiple sessions and that they can access each other - sessionOne.Eval(""" -module Test1 = + let AssertCanWeAccessTheOtherSession (session: FSharpScript) (script: string) (moduleName: string) (errorChoice: string) = - let test1 obj = sprintf "Execute - Test1.test1 - %A" obj""") |> ignore + let result: Result * FSharpDiagnostic[] = session.Eval(script) + let expected = + [ (Error 39, Line 1, Col 1, Line 1, Col 6, $"The value, namespace, type or module '{moduleName}' is not defined. Maybe you want one of the following:{errorChoice}") ] - let result1 = sessionOne.Eval("""Test1.test1 18""") |> getValue + match result with + | Result.Error _, diagnostics -> Assert.WithDiagnostics(0, diagnostics, expected) + | _ -> () + + // Initialize + let args useMultiEmit : string array = [| if useMultiEmit then "--multiemit+" else "--multiemit-"|] + use sessionOne = new FSharpScript(additionalArgs = args useMultiEmit1) + use sessionTwo = new FSharpScript(additionalArgs = args useMultiEmit2) + use sessionThree = new FSharpScript(additionalArgs = args useMultiEmit2) + + // First session + sessionOne.Eval("""module Test1 = let test1 obj = sprintf "Execute - Test1.test1 - %A" obj""") |> ignore + let result1 = sessionOne.Eval("Test1.test1 18") |> getValue let value1 = result1.Value Assert.Equal(typeof, value1.ReflectionType) Assert.Equal("Execute - Test1.test1 - 18", value1.ReflectionValue :?> string) - sessionTwo.Eval(""" -module Test2 = - - let test2 obj = sprintf "Execute - Test2.test2 - %A" obj""") |> ignore - + // Second session + sessionTwo.Eval("""module Test2 = let test2 obj = sprintf "Execute - Test2.test2 - %A" obj""") |> ignore let result2 = sessionTwo.Eval("""Test2.test2 27""") |> getValue let value2 = result2.Value Assert.Equal(typeof, value2.ReflectionType) Assert.Equal("Execute - Test2.test2 - 27", value2.ReflectionValue :?> string) + // Can I access the other session + AssertCanWeAccessTheOtherSession sessionOne "Test2.test2 19" "Test2" "\nTest1\nText" // Session 1 can't access values from session 2 + AssertCanWeAccessTheOtherSession sessionTwo "Test1.test1 13" "Test1" "\nTest2\nText" // Session 2 can't access values from session 1 + module ``External FSI tests`` = [] let ``Eval object value``() = diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 9cda28613dd..ba72ee42e29 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -1671,20 +1671,47 @@ Actual: let private withResultIgnoreNativeRange (expectedResult: ErrorInfo ) (result: CompilationResult) : CompilationResult = withResultsIgnoreNativeRange [expectedResult] result - let withDiagnostics (expected: (ErrorType * Line * Col * Line * Col * string) list) (result: CompilationResult) : CompilationResult = - let expectedResults: ErrorInfo list = - [ for e in expected do - let (error, Line startLine, Col startCol, Line endLine, Col endCol, message) = e - { Error = error - Range = - { StartLine = startLine - StartColumn = startCol - EndLine = endLine - EndColumn = endCol } - NativeRange = Unchecked.defaultof<_> - SubCategory = "" - Message = message } ] - withResultsIgnoreNativeRange expectedResults result + let private convertExpectedsToErrorInfos(expected: (ErrorType * Line * Col * Line * Col * string) list): ErrorInfo list = [ + for e in expected do + let (error, Line startLine, Col startCol, Line endLine, Col endCol, message) = e + { + Error = error + Range = { + StartLine = startLine + StartColumn = startCol + EndLine = endLine + EndColumn = endCol + } + NativeRange = Unchecked.defaultof<_> + SubCategory = "" + Message = message + } + ] + + let private convertDiagnosticsToErrorInfos (diagnostics: FSharpDiagnostic[]) : ErrorInfo list = + diagnostics + |> Array.map (fun diagnostic -> + let errorType = + match diagnostic.Severity with + | FSharpDiagnosticSeverity.Error -> Error diagnostic.ErrorNumber + | FSharpDiagnosticSeverity.Warning -> Warning diagnostic.ErrorNumber + | FSharpDiagnosticSeverity.Info -> Information diagnostic.ErrorNumber + | FSharpDiagnosticSeverity.Hidden -> Hidden diagnostic.ErrorNumber + { + Error = errorType + Range = { + StartLine = diagnostic.StartLine + StartColumn = diagnostic.StartColumn + EndLine = diagnostic.EndLine + EndColumn = diagnostic.EndColumn + } + NativeRange = diagnostic.Range + Message = diagnostic.Message + SubCategory = diagnostic.Subcategory + }) |> Array.toList + + let withDiagnostics expected (result: CompilationResult) : CompilationResult = + withResultsIgnoreNativeRange (convertExpectedsToErrorInfos expected) result let withSingleDiagnostic (expected: (ErrorType * Line * Col * Line * Col * string)) (result: CompilationResult) : CompilationResult = withDiagnostics [expected] result @@ -1695,6 +1722,10 @@ Actual: let withError (expectedError: ErrorInfo) (result: CompilationResult) : CompilationResult = withErrors [expectedError] result + type Assert = + static member WithDiagnostics(libAdjust, result, expected) = + assertErrors "Results" libAdjust (convertDiagnosticsToErrorInfos result) (convertExpectedsToErrorInfos expected) + module StructuredResultsAsserts = type SimpleErrorInfo = { Error: ErrorType diff --git a/tests/FSharp.Test.Utilities/CompilerAssert.fs b/tests/FSharp.Test.Utilities/CompilerAssert.fs index 0f7baf597fb..1ec26cb3769 100644 --- a/tests/FSharp.Test.Utilities/CompilerAssert.fs +++ b/tests/FSharp.Test.Utilities/CompilerAssert.fs @@ -466,7 +466,7 @@ module CompilerAssertHelpers = yield source.WithFileName(destFileName) ] rawCompile outputFilePath isExe options targetFramework sources - + let assertErrors libAdjust ignoreWarnings (errors: FSharpDiagnostic []) expectedErrors = let errorMessage (error: FSharpDiagnostic) = let errN, range, message = error.ErrorNumber, error.Range, error.Message @@ -694,6 +694,9 @@ Updated automatically, please check diffs in your pull request, changes must be compileCompilation ignoreWarnings cmpl (fun ((errors, _, _), _) -> assertErrors 0 ignoreWarnings errors expectedErrors) + static member assertWithErrors(libAdjust, ignoreWarnings, errors, expectedErrors) = + assertErrors libAdjust, ignoreWarnings, errors, expectedErrors + static member Compile(cmpl: Compilation, ?ignoreWarnings) = CompilerAssert.CompileWithErrors(cmpl, [||], defaultArg ignoreWarnings false) diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl index 69842b9e059..fd4b4d78bd0 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl @@ -21,7 +21,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3502-805::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3509-805::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@110::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 6e41547cd11..4eaf1633b58 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -28,7 +28,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3502-805::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3509-805::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x0000001B][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@110::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl index 4e7b5396676..0267e2b1bb0 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl @@ -21,7 +21,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3502-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3509-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index 431d4e5512a..37aaa79a6f2 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -28,7 +28,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3502-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3509-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x00000024][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. From 63dd8cae6a2f5e32b4c56290de05781b855546a7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 10:10:50 -0500 Subject: [PATCH 11/38] [main] Update dependencies from dotnet/arcade (#18535) * Update dependencies from https://github.com/dotnet/arcade build 20250505.3 Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.25225.6 -> To Version 9.0.0-beta.25255.3 * Disable report prebuilt usage Remove SB intermediates & prebuilt baseline file Fixes https://github.com/dotnet/source-build/issues/5085 --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Viktor Hofer --- eng/DotNetBuild.props | 4 ++++ eng/SourceBuildPrebuiltBaseline.xml | 33 ----------------------------- eng/Version.Details.xml | 21 ++---------------- global.json | 2 +- 4 files changed, 7 insertions(+), 53 deletions(-) delete mode 100644 eng/SourceBuildPrebuiltBaseline.xml diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props index 78286b23bab..8bdf6363873 100644 --- a/eng/DotNetBuild.props +++ b/eng/DotNetBuild.props @@ -1,9 +1,13 @@ + fsharp true + $(DotNetBuildOrchestrator) + false + false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3d486a94d20..ff7657a28c0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,17 +1,6 @@ - - https://github.com/dotnet/source-build-reference-packages - 19eb5ea4e5f9c4e5256843a92805c8c9e942207d - - - - - https://github.com/dotnet/msbuild - 7ad4e1c76585d0ed6e438da2d4f9394326934399 - - https://github.com/dotnet/msbuild 7ad4e1c76585d0ed6e438da2d4f9394326934399 @@ -42,15 +31,9 @@ - - https://github.com/dotnet/arcade - bfbc858ba868b60fffaf7b2150f1d2165b01e786 - - - + https://github.com/dotnet/arcade - bfbc858ba868b60fffaf7b2150f1d2165b01e786 - + dba26274ff5a0906a1880443fc3c0466d1a298ae https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/global.json b/global.json index 025b675460e..1c977b14b7c 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25225.6", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25255.3", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From aa4550ebdac1cb4099ea1c0f03fd3822a5561056 Mon Sep 17 00:00:00 2001 From: Alex Delepine Date: Wed, 7 May 2025 08:28:55 -0700 Subject: [PATCH 12/38] Update VisualFSharp.Core.targets (#18536) --- .../VisualFSharpFull/VisualFSharp.Core.targets | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets b/vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets index 16d69751fd7..674c3487ac7 100644 --- a/vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets +++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets @@ -30,7 +30,6 @@ FSharp.Build DebugSymbolsProjectOutputGroup%3b true - All 2 True TargetFramework=netstandard2.0 @@ -42,7 +41,6 @@ BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b DebugSymbolsProjectOutputGroup%3b true - All 2 True TargetFramework=netstandard2.0 @@ -54,7 +52,6 @@ BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b true - All 2 True TargetFramework=netstandard2.0 @@ -66,7 +63,6 @@ BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b true - All 2 True TargetFramework=netstandard2.0 @@ -117,7 +113,6 @@ ReferenceCopyLocalPathsOutputGroup%3bBuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b true - All 2 True @@ -128,7 +123,6 @@ BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b true - All 2 True @@ -147,7 +141,6 @@ BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b true - All 2 True @@ -158,7 +151,6 @@ BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b true - All 2 True @@ -169,7 +161,6 @@ BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b true - All 2 True @@ -180,7 +171,6 @@ BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b true - All 2 True @@ -191,7 +181,6 @@ BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b true - All 2 True @@ -202,7 +191,6 @@ BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b true - All 2 True @@ -276,4 +264,4 @@ - \ No newline at end of file + From 5a239f61f6f25909b8458d36877d9982cf5c3533 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 09:59:31 -0700 Subject: [PATCH 13/38] Update dependencies from https://github.com/dotnet/arcade build 20250505.5 (#18538) Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.25255.3 -> To Version 9.0.0-beta.25255.5 Co-authored-by: dotnet-maestro[bot] Co-authored-by: Kevin Ransom (msft) --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ff7657a28c0..08868123018 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -31,9 +31,9 @@ - + https://github.com/dotnet/arcade - dba26274ff5a0906a1880443fc3c0466d1a298ae + 1cfa39f82d00b3659a3d367bc344241946e10681 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/global.json b/global.json index 1c977b14b7c..809fed994d0 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25255.3", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25255.5", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From f78ce10d707b23ae8384a00de05d66e49df1338e Mon Sep 17 00:00:00 2001 From: Brian Rourke Boll Date: Mon, 12 May 2025 11:01:35 -0400 Subject: [PATCH 14/38] Keep parens around records in interpolated strings (#18534) --- .../.FSharp.Compiler.Service/9.0.300.md | 2 +- src/Compiler/Service/SynExpr.fs | 8 +++++++ .../RemoveUnnecessaryParenthesesTests.fs | 21 +++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index e187f285d4b..52cf5eb8350 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -16,7 +16,7 @@ * Unsafe downcast from `obj` to generic `T` no longer requires `not null` constraint on `T`([Issue #18275](https://github.com/dotnet/fsharp/issues/18275), [PR #18343](https://github.com/dotnet/fsharp/pull/18343)) * Fix "type inference problem too complicated" for SRTP with T:null and T:struct dummy constraint([Issue #18288](https://github.com/dotnet/fsharp/issues/18288), [PR #18345](https://github.com/dotnet/fsharp/pull/18345)) * Fix for missing parse diagnostics in TransparentCompiler.ParseAndCheckProject ([PR #18366](https://github.com/dotnet/fsharp/pull/18366)) -* Miscellanous parentheses analyzer fixes. ([PR #18350](https://github.com/dotnet/fsharp/pull/18350)) +* Miscellanous parentheses analyzer fixes. ([PR #18350](https://github.com/dotnet/fsharp/pull/18350), [PR #18534](https://github.com/dotnet/fsharp/pull/18534)) * Fix duplicate parse error reporting for GetBackgroundCheckResultsForFileInProject ([Issue #18379](https://github.com/dotnet/fsharp/issues/18379) [PR #18380](https://github.com/dotnet/fsharp/pull/18380)) * Fix MethodDefNotFound when compiling code invoking delegate with option parameter ([Issue #5171](https://github.com/dotnet/fsharp/issues/5171), [PR #18385](https://github.com/dotnet/fsharp/pull/18385)) * Fix #r nuget ..." downloads unneeded packages ([Issue #18231](https://github.com/dotnet/fsharp/issues/18231), [PR #18393](https://github.com/dotnet/fsharp/pull/18393)) diff --git a/src/Compiler/Service/SynExpr.fs b/src/Compiler/Service/SynExpr.fs index 5981dd5b286..52c10e8a7a5 100644 --- a/src/Compiler/Service/SynExpr.fs +++ b/src/Compiler/Service/SynExpr.fs @@ -1078,6 +1078,14 @@ module SynExpr = | SynExpr.Sequential(expr1 = SynExpr.Paren(expr = Is inner); expr2 = expr2), _ when innerBindingsWouldShadowOuter inner expr2 -> true + // $"{({ A = 3 })}" + // $"{({| A = 3 |})}" + // $"{({1..10})}" + // $"{(();1)}" + // $"{(1,2)}" + | SynExpr.InterpolatedString _, SynExpr.Record _ + | SynExpr.InterpolatedString _, SynExpr.AnonRecd _ + | SynExpr.InterpolatedString _, SynExpr.ComputationExpr _ | SynExpr.InterpolatedString _, SynExpr.Sequential _ | SynExpr.InterpolatedString _, SynExpr.Tuple(isStruct = false) -> true diff --git a/vsintegration/tests/FSharp.Editor.Tests/CodeFixes/RemoveUnnecessaryParenthesesTests.fs b/vsintegration/tests/FSharp.Editor.Tests/CodeFixes/RemoveUnnecessaryParenthesesTests.fs index 224849a59e2..a7b90207877 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/CodeFixes/RemoveUnnecessaryParenthesesTests.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/CodeFixes/RemoveUnnecessaryParenthesesTests.fs @@ -1390,6 +1390,27 @@ in x $"{3 + LanguagePrimitives.GenericZero :N0}" """ + """ + $"{({ A = 3 })}" + """, + """ + $"{({ A = 3 })}" + """ + + """ + $"{({| A = 3 |})}" + """, + """ + $"{({| A = 3 |})}" + """ + + """ + $"{({ 1..10 })}" + """, + """ + $"{({ 1..10 })}" + """ + // LibraryOnlyILAssembly """(# "ldlen.multi 2 0" array : int #)""", """(# "ldlen.multi 2 0" array : int #)""" From c4ed80c4466dcc7dbecb369d997c354835bdcece Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Mon, 12 May 2025 17:05:07 -0700 Subject: [PATCH 15/38] Clean up Conformance UnitsOfMeasure (#18537) --- .../CompilerOptions/fsc/checked/checked.fs | 2 +- .../Conformance/UnitsOfMeasure/Basic.fs | 64 ----- .../Conformance/UnitsOfMeasure/Basic/Basic.fs | 56 +++++ .../UnitsOfMeasure/Basic/Calculus.fsx} | 1 + .../UnitsOfMeasure/Basic/DynamicTypeTest.fsx} | 0 .../UnitsOfMeasure/Basic/E_MassForce.fsx} | 0 .../UnitsOfMeasure/Basic/Ints01.fsx} | 0 .../UnitsOfMeasure/Basic/Mars.fsx} | 0 .../UnitsOfMeasure/Basic/MassForce.fsx} | 0 .../UnitsOfMeasure/Basic/Misc01.fsx} | 0 .../UnitsOfMeasure/Basic/Misc02.fsx} | 2 +- .../UnitsOfMeasure/Basic/Misc03.fsx} | 0 .../UnitsOfMeasure/Basic/Misc04.fsx} | 0 .../UnitsOfMeasure/Basic/OnDecimals01.fsx} | 0 .../Basic/Quotation04_hidden.fsx} | 0 .../Basic/RationalExponents01.fsx} | 0 .../UnitsOfMeasure/Basic/SI.fsx} | 0 .../UnitsOfMeasure/Basic/Stats.fsx} | 0 .../UnitsOfMeasure/Bounds/Bounds.fs | 36 +++ .../UnitsOfMeasure/Bounds/infinity_01.fsx} | 0 .../UnitsOfMeasure/Bounds/nan_01.fsx} | 1 - .../UnitsOfMeasure/Constants/Constants.fs | 42 ++++ .../Constants/E_UnsupportedTypes01.fsx} | 0 .../Constants/SpecialSyntax_.fsx} | 0 .../UnitsOfMeasure/Constants/decimal.fsx} | 0 .../UnitsOfMeasure/Constants/ieee32.fsx} | 0 .../UnitsOfMeasure/Constants/ieee64.fsx} | 0 .../Conformance/UnitsOfMeasure/Diagnostics.fs | 21 -- .../UnitsOfMeasure/Diagnostics/Diagnostics.fs | 226 ++++++++++++++++++ .../E_CantBeUsedAsPrefixArgToAType01.fsx | 0 .../E_CantBeUsedAsPrefixArgToAType02.fsx | 0 .../E_CantBeUsedAsPrefixArgToAType03.fsx | 0 .../E_CantBeUsedAsPrefixArgToAType04.fsx | 0 .../E_CantBeUsedAsPrefixArgToAType05.fsx | 0 .../E_ExpectedTypeNotUnitOfMeasure01.fsx} | 0 .../E_ExplicitUnitOfMeasureParameters01.fsx} | 0 .../E_ExplicitUnitOfMeasureParameters02.fsx} | 0 .../E_ExplicitUnitOfMeasureParameters03.fsx} | 0 .../E_ExplicitUnitOfMeasureParameters04.fsx} | 0 .../E_NonGenVarInValueRestrictionWarning.fsx} | 0 .../E_ParsingRationalExponents.fsx} | 0 .../Diagnostics/E_RangeExpression01.fsx} | 0 .../Diagnostics/E_RangeOfDecimals01.fsx} | 0 .../Diagnostics/E_RangeOfDimensioned03.fsx} | 0 .../E_UnexpectedTypeParameter01.fsx} | 0 .../Diagnostics/E_UnsupportedType01.fsx} | 0 .../Diagnostics/E_ZeroDenominator.fsx} | 0 .../Diagnostics/IntTypes01.fsx} | 2 +- .../Diagnostics/RangeExpression01.fsx} | 1 - .../Diagnostics/RangeOfDimensioned01.fsx} | 2 +- .../Diagnostics/RangeOfDimensioned02.fsx} | 4 +- .../W_UnitOfMeasureCodeLessGeneric01.fsx} | 0 .../UnitsOfMeasure/Operators/Operators.fs | 24 ++ .../Operators/Operators_decimal_01.fsx} | 0 .../Operators/Operators_float32_01.fsx} | 0 .../Operators/Operators_float_01.fsx} | 0 .../UnitsOfMeasure/Parenthesis/E_Error02.fsx} | 0 .../UnitsOfMeasure/Parenthesis/E_Error03.fsx} | 0 .../UnitsOfMeasure/Parenthesis/E_Error04.fsx} | 0 .../UnitsOfMeasure/Parenthesis/E_Error05.fsx} | 0 .../UnitsOfMeasure/Parenthesis/E_Error06.fsx} | 0 .../Parenthesis/E_IncompleteParens01.fsx} | 0 .../Parenthesis/E_IncompleteParens02.fsx} | 0 .../UnitsOfMeasure/Parenthesis/Parenthesis.fs | 106 ++++++++ .../Parenthesis/W_ImplicitProduct01.fsx} | 0 .../Parenthesis/W_Positive01.fsx} | 0 .../Conformance/UnitsOfMeasure/Parsing.fs | 55 ----- .../Parsing/E_KnownTypeAsUnit01b.fsx} | 0 .../UnitsOfMeasure/Parsing/E_Nesting01.fsx} | 0 .../Parsing/GreaterBarRBrack01.fsx} | 0 .../UnitsOfMeasure/Parsing/Parsing.fs | 72 ++++++ .../UnitsOfMeasure/Parsing/PowerSynonym.fsx} | 0 .../UnitsOfMeasure/Parsing/Quotient.fsx} | 0 .../UnitsOfMeasure/Parsing/QuotientAssoc.fsx} | 0 .../UnitsOfMeasure/Parsing/Reciprocal01.fsx} | 0 .../UnitsOfMeasure/Parsing/W_find_gtdef.fsx} | 0 .../Conformance/UnitsOfMeasure/TypeChecker.fs | 19 -- ...terfaceWithDifferentGenInstantiations.fsx} | 0 .../TypeChecker/E_typechecker01.fsx} | 0 .../TypeChecker/Generalization01.fsx} | 2 +- .../TypeChecker/GenericSubType01.fsx} | 0 .../TypeChecker/Slash_InFunction01.fsx} | 0 .../TypeChecker/Slash_InMethod01.fsx} | 0 .../TypeAbbreviation_decimal_01.fsx} | 2 +- .../TypeAbbreviation_float32_01.fsx} | 2 +- .../TypeAbbreviation_float_01.fsx} | 2 +- .../UnitsOfMeasure/TypeChecker/TypeChecker.fs | 117 +++++++++ .../TypeChecker/TypeConstraint02.fsx} | 0 .../TypeChecker/ValueRestriction01.fsx} | 0 .../TypeChecker/W_LessGeneric01.fsx | 0 .../TypeChecker/W_LessGeneric02.fsx} | 2 +- .../TypeChecker/W_TypeConstraint01.fsx} | 0 .../TypeChecker/W_TypeConstraint03.fsx} | 4 +- .../WithOOP/E_GenericUOM01.fsx} | 0 .../WithOOP/E_NoConstructorOnMeasure01.fsx} | 2 +- .../WithOOP/E_NoInstanceOnMeasure01.fsx} | 2 +- .../WithOOP/E_OverloadsDifferByUOMAttr.fsx} | 0 .../WithOOP/E_Polymorphism01.fsx | 5 +- .../UnitsOfMeasure/WithOOP/GenericUOM01.fsx} | 4 +- .../UnitsOfMeasure/WithOOP/InInterface01.fsx} | 4 +- .../WithOOP/Polymorphism02.fsx} | 2 +- .../WithOOP/StaticsOnMeasure01.fsx} | 2 +- .../UnitsOfMeasure/WithOOP/WithOOP.fs | 86 +++++++ .../FSharp.Compiler.ComponentTests.fsproj | 13 +- tests/FSharp.Test.Utilities/Compiler.fs | 3 +- .../UnitsOfMeasure/Basic/Calculus.fs | 31 --- .../UnitsOfMeasure/Basic/Misc01.fs | 9 - .../UnitsOfMeasure/Basic/Misc03.fs | 25 -- .../Basic/RationalExponents01.fs | 35 --- .../Conformance/UnitsOfMeasure/Basic/SI.fs | 32 --- .../Conformance/UnitsOfMeasure/Basic/Stats.fs | 32 --- .../Conformance/UnitsOfMeasure/Basic/env.lst | 18 -- .../Conformance/UnitsOfMeasure/Bounds/env.lst | 2 - .../UnitsOfMeasure/Constants/env.lst | 8 - .../UnitsOfMeasure/Diagnostics/env.lst | 29 --- .../UnitsOfMeasure/Operators/env.lst | 7 - .../UnitsOfMeasure/Parenthesis/env.lst | 13 - .../Parsing/GreaterBarRBrack01.fs | 18 -- .../Parsing/KnownTypeAsUnit01.fs | 25 -- .../UnitsOfMeasure/Parsing/Quotient.fs | 19 -- .../UnitsOfMeasure/Parsing/QuotientAssoc.fs | 24 -- .../UnitsOfMeasure/Parsing/Reciprocal01.fs | 17 -- .../UnitsOfMeasure/Parsing/env.lst | 4 - .../UnitsOfMeasure/TypeChecker/env.lst | 19 -- .../UnitsOfMeasure/WithOOP/env.lst | 10 - tests/fsharpqa/Source/test.lst | 10 - 126 files changed, 799 insertions(+), 578 deletions(-) delete mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Basic.fs rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Basic/Calculus.fs => Conformance/UnitsOfMeasure/Basic/Calculus.fsx} (97%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/DynamicTypeTest.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/DynamicTypeTest.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/E_MassForce.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/E_MassForce.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Ints01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Ints01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Mars.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Mars.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/MassForce.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/MassForce.fsx} (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Basic/Misc01.fs => Conformance/UnitsOfMeasure/Basic/Misc01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc02.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc02.fsx} (97%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Basic/Misc03.fs => Conformance/UnitsOfMeasure/Basic/Misc03.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc04.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc04.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/OnDecimals01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/OnDecimals01.fsx} (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Basic/Quotation04_hidden.fs => Conformance/UnitsOfMeasure/Basic/Quotation04_hidden.fsx} (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fs => Conformance/UnitsOfMeasure/Basic/RationalExponents01.fsx} (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Basic/SI.fs => Conformance/UnitsOfMeasure/Basic/SI.fsx} (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Basic/Stats.fs => Conformance/UnitsOfMeasure/Basic/Stats.fsx} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Bounds/Bounds.fs rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Bounds/infinity_01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Bounds/infinity_01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Bounds/nan_01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Bounds/nan_01.fsx} (97%) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/Constants.fs rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/E_UnsupportedTypes01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/E_UnsupportedTypes01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/SpecialSyntax_.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/SpecialSyntax_.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/decimal.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/decimal.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/ieee32.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/ieee32.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/ieee64.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/ieee64.fsx} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/Diagnostics.fs rename tests/{fsharpqa/Source => FSharp.Compiler.ComponentTests}/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType01.fsx (100%) rename tests/{fsharpqa/Source => FSharp.Compiler.ComponentTests}/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType02.fsx (100%) rename tests/{fsharpqa/Source => FSharp.Compiler.ComponentTests}/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType03.fsx (100%) rename tests/{fsharpqa/Source => FSharp.Compiler.ComponentTests}/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType04.fsx (100%) rename tests/{fsharpqa/Source => FSharp.Compiler.ComponentTests}/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType05.fsx (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExpectedTypeNotUnitOfMeasure01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExpectedTypeNotUnitOfMeasure01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters02.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters02.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters03.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters03.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters04.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters04.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/W_NonGenVarInValueRestrictionWarning.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_NonGenVarInValueRestrictionWarning.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ParsingRationalExponents.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ParsingRationalExponents.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_RangeExpression01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_RangeExpression01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDecimals01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDecimals01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDimensioned03.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDimensioned03.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_UnexpectedTypeParameter01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_UnexpectedTypeParameter01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_UnsupportedType01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_UnsupportedType01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ZeroDenominator.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ZeroDenominator.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/IntTypes01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/IntTypes01.fsx} (97%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fs => Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fsx} (94%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned01.fsx} (86%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned02.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned02.fsx} (70%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/W_UnitOfMeasureCodeLessGeneric01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/W_UnitOfMeasureCodeLessGeneric01.fsx} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators.fs rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/Operators_decimal_01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators_decimal_01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/Operators_float32_01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators_float32_01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/Operators_float_01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators_float_01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error02.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error02.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error03.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error03.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error04.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error04.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error05.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error05.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error06.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error06.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens02.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens02.fsx} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/Parenthesis.fs rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/W_ImplicitProduct01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/W_ImplicitProduct01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/Positive01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/W_Positive01.fsx} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing.fs rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/KnownTypeAsUnit01b.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/E_KnownTypeAsUnit01b.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/E_Nesting01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/E_Nesting01.fsx} (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fs => Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fsx} (100%) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/Parsing.fs rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Parsing/PowerSynonym.fs => Conformance/UnitsOfMeasure/Parsing/PowerSynonym.fsx} (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Parsing/Quotient.fs => Conformance/UnitsOfMeasure/Parsing/Quotient.fsx} (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Parsing/QuotientAssoc.fs => Conformance/UnitsOfMeasure/Parsing/QuotientAssoc.fsx} (100%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fs => Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/find_gtdef.fsx => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/W_find_gtdef.fsx} (100%) delete mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker.fs rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/E_GenInterfaceWithDifferentGenInstantiations.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/E_GenInterfaceWithDifferentGenInstantiations.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/typechecker01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/E_typechecker01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/Generalization01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/Generalization01.fsx} (94%) rename tests/FSharp.Compiler.ComponentTests/{resources/tests/Conformance/UnitsOfMeasure/TypeChecker/GenericSubType01.fs => Conformance/UnitsOfMeasure/TypeChecker/GenericSubType01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/Slash_InFunction01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/Slash_InFunction01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/Slash_InMethod01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/Slash_InMethod01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_decimal_01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_decimal_01.fsx} (87%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float32_01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float32_01.fsx} (86%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float_01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float_01.fsx} (87%) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeChecker.fs rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeConstraint02.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeConstraint02.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/ValueRestriction01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/ValueRestriction01.fsx} (100%) rename tests/{fsharpqa/Source => FSharp.Compiler.ComponentTests}/Conformance/UnitsOfMeasure/TypeChecker/W_LessGeneric01.fsx (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/LessGeneric02.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_LessGeneric02.fsx} (99%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/W_TypeConstraint01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_TypeConstraint01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeConstraint03.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_TypeConstraint03.fsx} (88%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fsx} (100%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_NoConstructorOnMeasure01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_NoConstructorOnMeasure01.fsx} (97%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_NoInstanceOnMeasure01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_NoInstanceOnMeasure01.fsx} (97%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_OverloadsDifferByUOMAttr.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_OverloadsDifferByUOMAttr.fsx} (100%) rename tests/{fsharpqa/Source => FSharp.Compiler.ComponentTests}/Conformance/UnitsOfMeasure/WithOOP/E_Polymorphism01.fsx (94%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/GenericUOM01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/GenericUOM01.fsx} (95%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/InInterface01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/InInterface01.fsx} (96%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/Polymorphism02.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/Polymorphism02.fsx} (97%) rename tests/{fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/StaticsOnMeasure01.fs => FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/StaticsOnMeasure01.fsx} (96%) create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/WithOOP.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Calculus.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc01.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc03.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/SI.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Stats.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/env.lst delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Bounds/env.lst delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/env.lst delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/env.lst delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/env.lst delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/env.lst delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/KnownTypeAsUnit01.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/Quotient.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/QuotientAssoc.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fs delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/env.lst delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/env.lst delete mode 100644 tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/env.lst diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs index 8a0447a450e..b842f04de77 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/checked/checked.fs @@ -12,7 +12,7 @@ module Checked = [] let ``fsc-unchecked - unchecked01_fs`` compilation = compilation - |> getCompilation + |> getCompilation |> asFs |> compile |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic.fs deleted file mode 100644 index da86f949265..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic.fs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Conformance.UnitsOfMeasure - -open Xunit -open FSharp.Test -open FSharp.Test.Compiler - -module Basic = - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Basic) - [] - let ``Basic - Misc01_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Basic) - [] - let ``Basic - Misc03_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Basic) - [] - let ``Basic - Stats_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Basic) - [] - let ``Basic - SI_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Basic) - [] - let ``Basic - RationalExponents01_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Basic) - [] - let ``Basic - Quotation04_hidden_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Basic.fs new file mode 100644 index 00000000000..ddb3a9fb049 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Basic.fs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.UnitsOfMeasure + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module Basic = + let shouldFailWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldFail + |> withDiagnostics expectedDiagnostics + + let shouldSucceed compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldSucceed + + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + let ``Basic - shouldSucceed`` compilation = + compilation + |> getCompilation + |> shouldSucceed + + [] + let ``Basic - E_MassForce`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 1, Line 15, Col 27, Line 15, Col 32, "The unit of measure 'N' does not match the unit of measure 'kg'") + (Error 43, Line 15, Col 25, Line 15, Col 26, "The unit of measure 'N' does not match the unit of measure 'kg'") + ] + + [] + let ``Basic - Misc02_fs`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Warning 64, Line 36, Col 60, Line 36, Col 61, "This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable 'v has been constrained to be measure ''u/'w'.") + ] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/Calculus.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Calculus.fsx similarity index 97% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/Calculus.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Calculus.fsx index 0263135fc55..cd91c9f2d2b 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/Calculus.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Calculus.fsx @@ -18,6 +18,7 @@ let rec newton (f:float<_> -> float<_>) f' x xacc = else newton f f' x' xacc // Non-regular datatype: a list of derivatives of a function +[] type derivs<[] 'u, [] 'v> = Nil | Cons of (float<'u> -> float<'v>) * derivs<'u,'v/'u> diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/DynamicTypeTest.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/DynamicTypeTest.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/DynamicTypeTest.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/DynamicTypeTest.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/E_MassForce.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/E_MassForce.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/E_MassForce.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/E_MassForce.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Ints01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Ints01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Ints01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Ints01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Mars.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Mars.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Mars.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Mars.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/MassForce.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/MassForce.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/MassForce.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/MassForce.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/Misc01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc01.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/Misc01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc02.fsx similarity index 97% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc02.fsx index 87e1f8d6025..79b036bef91 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc02.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc02.fsx @@ -94,4 +94,4 @@ let r2 = (polyadd (new ComplexProd())) let weird(x:float<'u 'w>) (y:float<'v 'w>) (z:float<'w/'u 'v>) = 1 -if (r/1.0 = 14.0) && (r2/1.0 = 28.0) then exit 0 else 1 +(if (r/1.0 = 14.0) && (r2/1.0 = 28.0) then 0 else 1) |> ignore diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/Misc03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc03.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/Misc03.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc03.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc04.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc04.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc04.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Misc04.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/OnDecimals01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/OnDecimals01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/OnDecimals01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/OnDecimals01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/Quotation04_hidden.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Quotation04_hidden.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/Quotation04_hidden.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Quotation04_hidden.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/SI.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/SI.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/SI.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/SI.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/Stats.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Stats.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Basic/Stats.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Basic/Stats.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Bounds/Bounds.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Bounds/Bounds.fs new file mode 100644 index 00000000000..f2473d8a31e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Bounds/Bounds.fs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.UnitsOfMeasure + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module Bounds = + let shouldFailWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldFail + |> withDiagnostics expectedDiagnostics + + + [] + let ``infinity_01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 717, Line 12, Col 18, Line 12, Col 27, "Unexpected type arguments") + (Error 717, Line 13, Col 18, Line 13, Col 26, "Unexpected type arguments") + (Error 717, Line 14, Col 19, Line 14, Col 28, "Unexpected type arguments") + (Error 717, Line 15, Col 19, Line 15, Col 27, "Unexpected type arguments") + ] + + [] + let ``nan_01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 717, Line 7, Col 19, Line 7, Col 22, "Unexpected type arguments") + ] diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Bounds/infinity_01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Bounds/infinity_01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Bounds/infinity_01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Bounds/infinity_01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Bounds/nan_01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Bounds/nan_01.fsx similarity index 97% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Bounds/nan_01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Bounds/nan_01.fsx index 399089c85de..3272b6ad107 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Bounds/nan_01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Bounds/nan_01.fsx @@ -5,4 +5,3 @@ #light [] type kg let mysterymass = nan -exit 1 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/Constants.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/Constants.fs new file mode 100644 index 00000000000..fd1d8440aef --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/Constants.fs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.UnitsOfMeasure + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module Constants = + let shouldFailWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldFail + |> withDiagnostics expectedDiagnostics + + let shouldSucceed compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldSucceed + + [] + [] + [] + [] + [] + let ``Constants - shouldSucceed`` compilation = + compilation + |> getCompilation + |> shouldSucceed + + [] + let ``E_UnsupportedTypes01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 636, Line 22, Col 9, Line 22, Col 15, "Units-of-measure are only supported on float, float32, decimal, and integer types.") + (Error 636, Line 23, Col 9, Line 23, Col 15, "Units-of-measure are only supported on float, float32, decimal, and integer types.") + ] diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/E_UnsupportedTypes01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/E_UnsupportedTypes01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/E_UnsupportedTypes01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/E_UnsupportedTypes01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/SpecialSyntax_.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/SpecialSyntax_.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/SpecialSyntax_.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/SpecialSyntax_.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/decimal.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/decimal.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/decimal.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/decimal.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/ieee32.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/ieee32.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/ieee32.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/ieee32.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/ieee64.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/ieee64.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/ieee64.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Constants/ieee64.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics.fs deleted file mode 100644 index df101be4a31..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics.fs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Conformance.UnitsOfMeasure - -open Xunit -open FSharp.Test -open FSharp.Test.Compiler - -module Diagnostics = - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Diagnostics) - // - [] - let ``Diagnostics - RangeExpression01_fs - --test:ErrorRanges`` compilation = - compilation - |> asFsx - |> withOptions ["--test:ErrorRanges"] - |> compile - |> shouldSucceed - |> ignore - diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/Diagnostics.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/Diagnostics.fs new file mode 100644 index 00000000000..703dc3cb517 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/Diagnostics.fs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.UnitsOfMeasure + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module Diagnostics = + + let shouldFailWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> compile + |> shouldFail + |> withDiagnostics expectedDiagnostics + + let shouldSucceedWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> ignoreWarnings + |> compile + |> shouldSucceed + |> withDiagnostics expectedDiagnostics + + let shouldSucceed compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> compile + |> shouldSucceed + + [] + [] + [] + [] + [] + let ``Diagnostics - shouldSucceed`` compilation = + compilation + |> getCompilation + |> shouldSucceed + + [] + let ``E_CantBeUsedAsPrefixArgToAType01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 706, Line 9, Col 12, Line 9, Col 29, "Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets.") + ] + + [] + let ``E_CantBeUsedAsPrefixArgToAType02_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 706, Line 9, Col 12, Line 9, Col 24, "Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets.") + ] + + [] + let ``E_CantBeUsedAsPrefixArgToAType03_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 706, Line 9, Col 12, Line 9, Col 27, "Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets.") + ] + + [] + let ``E_CantBeUsedAsPrefixArgToAType04_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 706, Line 9, Col 12, Line 9, Col 21, "Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets.") + ] + + [] + let ``E_CantBeUsedAsPrefixArgToAType05_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 716, Line 10, Col 12, Line 10, Col 21, "Unexpected / in type") + (Error 704, Line 10, Col 12, Line 10, Col 13, "Expected type, not unit-of-measure") + (Error 706, Line 10, Col 14, Line 10, Col 21, "Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets.") + ] + + [] + let ``E_ExpectedTypeNotUnitOfMeasure01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 33, Line 11, Col 10, Line 11, Col 19, "The non-generic type 'Microsoft.FSharp.Core.string' does not expect any type arguments, but here is given 1 type argument(s)") + (Error 704, Line 12, Col 11, Line 12, Col 12, "Expected type, not unit-of-measure") + (Error 704, Line 13, Col 17, Line 13, Col 18, "Expected type, not unit-of-measure") + (Error 704, Line 14, Col 49, Line 14, Col 50, "Expected type, not unit-of-measure") + ] + + [] + let ``E_ExplicitUnitOfMeasureParameters01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 702, Line 6, Col 41, Line 6, Col 43, "Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [] attribute.") + ] + + [] + let ``E_ExplicitUnitOfMeasureParameters02_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 702, Line 6, Col 45, Line 6, Col 47, "Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [] attribute.") + ] + + [] + let ``E_ExplicitUnitOfMeasureParameters03_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 702, Line 6, Col 33, Line 6, Col 35, "Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [] attribute.") + (Warning 1178, Line 6, Col 6, Line 6, Col 12, "The struct, record or union type 'T_2920' is not structurally comparable because the type 'obj' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type 'T_2920' to clarify that the type is not comparable") + ] + + [] + let ``E_ExplicitUnitOfMeasureParameters04_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 702, Line 6, Col 27, Line 6, Col 29, "Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [] attribute.") + (Error 35, Line 6, Col 6, Line 6, Col 12, "This construct is deprecated: This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'.") + ] + + [] + let ``E_NonGenVarInValueRestrictionWarning_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 30, Line 6, Col 5, Line 6, Col 6, """Value restriction: The value 'x' has an inferred generic type + val x: float<'_u> list ref + However, values cannot have generic type variables like '_a in "let x: '_a". You can do one of the following: + - Define it as a simple data term like an integer literal, a string literal or a union case like "let x = 1" + - Add an explicit type annotation like "let x : int" + - Use the value as a non-generic type in later code for type inference like "do x" + or if you still want type-dependent results, you can define 'x' as a function instead by doing either: + - Add a unit parameter like "let x()" + - Write explicit type parameters like "let x<'a>". + This error is because a let binding without parameters defines a value, not a function. Values cannot be generic because reading a value is assumed to result in the same everywhere but generic type parameters may invalidate this assumption by enabling type-dependent results.""") + (Error 30, Line 7, Col 5, Line 7, Col 6, """Value restriction: The value 'y' has an inferred generic type + val y: '_a list ref + However, values cannot have generic type variables like '_a in "let x: '_a". You can do one of the following: + - Define it as a simple data term like an integer literal, a string literal or a union case like "let x = 1" + - Add an explicit type annotation like "let x : int" + - Use the value as a non-generic type in later code for type inference like "do x" + or if you still want type-dependent results, you can define 'y' as a function instead by doing either: + - Add a unit parameter like "let x()" + - Write explicit type parameters like "let x<'a>". + This error is because a let binding without parameters defines a value, not a function. Values cannot be generic because reading a value is assumed to result in the same everywhere but generic type parameters may invalidate this assumption by enabling type-dependent results.""") + ] + + [] + let ``E_ParsingRationalExponents_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 620, Line 11, Col 19, Line 11, Col 20, "Unexpected integer literal in unit-of-measure expression") + (Error 10, Line 12, Col 20, Line 12, Col 21, "Unexpected symbol ')' in binding. Expected integer literal or other token.") + (Error 10, Line 13, Col 18, Line 13, Col 19, "Unexpected infix operator in binding. Expected integer literal, '-' or other token.") + ] + + [] + let ``E_RangeOfDecimals01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 1, Line 8, Col 16, Line 8, Col 23, "The type 'decimal' does not match the type 'decimal'") + ] + + [] + let ``E_RangeOfDimensioned03_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 1, Line 7, Col 11, Line 7, Col 18, "The type 'float' does not match the type 'float'") + (Error 1, Line 7, Col 22, Line 7, Col 28, """Type mismatch. Expecting a +'float' +but given a +'float' +The unit of measure 'Kg' does not match the unit of measure 's'""") + (Error 1, Line 9, Col 22, Line 9, Col 28, "The unit of measure 's' does not match the unit of measure 'Kg'") + ] + + [] + let ``E_UnexpectedTypeParameter01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 634, Line 7, Col 15, Line 7, Col 17, "Non-zero constants cannot have generic units. For generic zero, write 0.0<_>.") + (Error 634, Line 8, Col 16, Line 8, Col 18, "Non-zero constants cannot have generic units. For generic zero, write 0.0<_>.") + (Error 634, Line 9, Col 16, Line 9, Col 18, "Non-zero constants cannot have generic units. For generic zero, write 0.0<_>.") + ] + + [] + let ``E_UnsupportedType01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 636, Line 9, Col 9, Line 9, Col 15, "Units-of-measure are only supported on float, float32, decimal, and integer types.") + ] + + [] + let ``E_ZeroDenominator_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 625, Line 8, Col 19, Line 8, Col 20, "Denominator must not be 0 in unit-of-measure exponent") + (Error 625, Line 9, Col 21, Line 9, Col 22, "Denominator must not be 0 in unit-of-measure exponent") + ] + + [] + let ``W_UnitOfMeasureCodeLessGeneric01_fsx`` compilation = + compilation + |> getCompilation + |> shouldSucceedWithDiagnostics [ + (Warning 64, Line 5, Col 30, Line 5, Col 31, "This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable 'a has been constrained to be measure '1'.") + ] + + diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType01.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType01.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType02.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType02.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType02.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType02.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType03.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType03.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType03.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType03.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType04.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType04.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType04.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType04.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType05.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType05.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType05.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_CantBeUsedAsPrefixArgToAType05.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExpectedTypeNotUnitOfMeasure01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExpectedTypeNotUnitOfMeasure01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExpectedTypeNotUnitOfMeasure01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExpectedTypeNotUnitOfMeasure01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters02.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters02.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters03.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters03.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters03.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters04.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters04.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters04.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ExplicitUnitOfMeasureParameters04.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/W_NonGenVarInValueRestrictionWarning.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_NonGenVarInValueRestrictionWarning.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/W_NonGenVarInValueRestrictionWarning.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_NonGenVarInValueRestrictionWarning.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ParsingRationalExponents.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ParsingRationalExponents.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ParsingRationalExponents.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ParsingRationalExponents.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_RangeExpression01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_RangeExpression01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_RangeExpression01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_RangeExpression01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDecimals01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDecimals01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDecimals01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDecimals01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDimensioned03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDimensioned03.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDimensioned03.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_RangeOfDimensioned03.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_UnexpectedTypeParameter01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_UnexpectedTypeParameter01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_UnexpectedTypeParameter01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_UnexpectedTypeParameter01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_UnsupportedType01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_UnsupportedType01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_UnsupportedType01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_UnsupportedType01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ZeroDenominator.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ZeroDenominator.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/E_ZeroDenominator.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/E_ZeroDenominator.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/IntTypes01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/IntTypes01.fsx similarity index 97% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/IntTypes01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/IntTypes01.fsx index aa6402c8405..486eec82180 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/IntTypes01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/IntTypes01.fsx @@ -9,4 +9,4 @@ let b = 1 * 1 // int=int32 let c = 1s / 1s // int16 let d = 1y + 1y // int8 -exit 0 +ignore 0 diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fsx similarity index 94% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fsx index c2ba1e3df38..5124be877c5 100644 --- a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/RangeExpression01.fsx @@ -10,4 +10,3 @@ type foo let m, n = 1, 10 [m .. 1 .. n] // OK -printfn "Finished" diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned01.fsx similarity index 86% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned01.fsx index 028d13cfb5d..940800dbe51 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned01.fsx @@ -7,4 +7,4 @@ let v1 = [1.0 .. 1.0 .. 3.0] |> Seq.sum -(if v1 = 6.0 then 0 else 1) |> exit +(if v1 = 6.0 then 0 else 1) |> ignore diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned02.fsx similarity index 70% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned02.fsx index 60007529f20..a692428ab3e 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned02.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/RangeOfDimensioned02.fsx @@ -5,8 +5,8 @@ [] type Kg -let v1 = [1.0 .. 2.0 .. 5.0] |> Seq.nth 1 +let v1 = [1.0 .. 2.0 .. 5.0] |> Seq.item 1 -(if v1 = 3.0 then 0 else 1) |> exit +(if v1 = 3.0 then 0 else 1) |> ignore diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/W_UnitOfMeasureCodeLessGeneric01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/W_UnitOfMeasureCodeLessGeneric01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/W_UnitOfMeasureCodeLessGeneric01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Diagnostics/W_UnitOfMeasureCodeLessGeneric01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators.fs new file mode 100644 index 00000000000..34b4f119447 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators.fs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.UnitsOfMeasure + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module Operators = + let shouldSucceed compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldSucceed + + [] + [] + [] + [] + let ``Operators - shouldSucceed`` compilation = + compilation + |> getCompilation + |> shouldSucceed diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/Operators_decimal_01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators_decimal_01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/Operators_decimal_01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators_decimal_01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/Operators_float32_01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators_float32_01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/Operators_float32_01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators_float32_01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/Operators_float_01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators_float_01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/Operators_float_01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Operators/Operators_float_01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error02.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error02.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error03.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error03.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error03.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error04.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error04.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error04.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error04.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error05.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error05.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error05.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error05.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error06.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error06.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_Error06.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_Error06.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens02.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens02.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/Parenthesis.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/Parenthesis.fs new file mode 100644 index 00000000000..16df852fb55 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/Parenthesis.fs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.UnitsOfMeasure + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module Parenthesis = + let shouldFailWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldFail + |> withDiagnostics expectedDiagnostics + + let shouldSucceedWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> ignoreWarnings + |> typecheck + |> shouldSucceed + |> withDiagnostics expectedDiagnostics + + let shouldSucceed compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldSucceed + + [] + let ``E_Error02_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 620, Line 11, Col 19, Line 11, Col 20, "Unexpected integer literal in unit-of-measure expression") + ] + + [] + let ``E_Error03_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 10, Line 11, Col 31, Line 11, Col 32, "Unexpected symbol ')' in binding") + ] + + [] + let ``E_Error04_fs`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 10, Line 11, Col 34, Line 11, Col 35, "Unexpected symbol '_' in binding") + ] + + [] + let ``E_Error05_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 10, Line 11, Col 28, Line 11, Col 29, "Unexpected symbol ')' in binding") + ] + + [] + let ``E_Error06_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 620, Line 11, Col 20, Line 11, Col 23, "Unexpected integer literal in unit-of-measure expression") + ] + + [] + let ``E_IncompleteParens01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 10, Line 11, Col 1, Line 11, Col 1, "Incomplete structured construct at or before this point in expression. Expected ')' or other token.") + (Error 583, Line 10, Col 26, Line 10, Col 27, "Unmatched '('") + ] + + [] + let ``E_IncompleteParens02_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 3156, Line 11, Col 24, Line 11, Col 25, "Unexpected token '/' or incomplete expression") + (Error 10, Line 11, Col 26, Line 11, Col 27, "Unexpected symbol ')' in binding. Expected incomplete structured construct at or before this point or other token.") + ] + + [] + let ``W_ImplicitProduct01_fsx`` compilation = + compilation + |> getCompilation + |> shouldSucceedWithDiagnostics [ + (Warning 632, Line 11, Col 25, Line 11, Col 32, "Implicit product of measures following /") + ] + + [] + let ``W_Positive01_fsx`` compilation = + compilation + |> getCompilation + |> shouldSucceedWithDiagnostics [ + (Warning 464, Line 24, Col 33, Line 24, Col 39, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + ] diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/W_ImplicitProduct01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/W_ImplicitProduct01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/W_ImplicitProduct01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/W_ImplicitProduct01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/Positive01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/W_Positive01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/Positive01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parenthesis/W_Positive01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing.fs deleted file mode 100644 index 6dc46f8013f..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing.fs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Conformance.UnitsOfMeasure - -open Xunit -open FSharp.Test -open FSharp.Test.Compiler - -module Parsing = - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Parsing) - [] - let ``Parsing - GreaterBarRBrack01_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Parsing) - [] - let ``Parsing - Reciprocal01_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Parsing) - [] - let ``Parsing - QuotientAssoc_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Parsing) - [] - let ``Parsing - Quotient_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/Parsing) - [] - let ``Parsing - PowerSynonym_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/KnownTypeAsUnit01b.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/E_KnownTypeAsUnit01b.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/KnownTypeAsUnit01b.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/E_KnownTypeAsUnit01b.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/E_Nesting01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/E_Nesting01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/E_Nesting01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/E_Nesting01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/Parsing.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/Parsing.fs new file mode 100644 index 00000000000..6b2b654517f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/Parsing.fs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.UnitsOfMeasure + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module Parsing = + let shouldFailWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldFail + |> withDiagnostics expectedDiagnostics + + let shouldSucceedWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> ignoreWarnings + |> typecheck + |> shouldSucceed + |> withDiagnostics expectedDiagnostics + + let shouldSucceed compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldSucceed + + [] + [] + [] + [] + [] + [] + let ``Parsing - shouldSucceed`` compilation = + compilation + |> getCompilation + |> shouldSucceed + + [] + let ``E_KnownTypeAsUnit01b_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 705, Line 14, Col 9, Line 14, Col 14, "Expected unit-of-measure, not type") + (Error 705, Line 17, Col 17, Line 17, Col 20, "Expected unit-of-measure, not type") + (Error 705, Line 20, Col 24, Line 20, Col 27, "Expected unit-of-measure, not type") + (Error 705, Line 23, Col 37, Line 23, Col 42, "Expected unit-of-measure, not type") + (Error 705, Line 26, Col 38, Line 26, Col 41, "Expected unit-of-measure, not type") + ] + + [] + let ``E_Nesting01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 714, Line 12, Col 19, Line 12, Col 20, "Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression") + (Error 707, Line 17, Col 17, Line 17, Col 21, "Unit-of-measure cannot be used in type constructor application") + ] + + [] + let ``W_find_gtdef_fsx`` compilation = + compilation + |> getCompilation + |> shouldSucceedWithDiagnostics [ + (Warning 64, Line 16, Col 21, Line 16, Col 22, "This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable 'u has been constrained to be measure 'Continuous'.") + ] diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/PowerSynonym.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/PowerSynonym.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/PowerSynonym.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/PowerSynonym.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/Quotient.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/Quotient.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/Quotient.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/Quotient.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/QuotientAssoc.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/QuotientAssoc.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/QuotientAssoc.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/QuotientAssoc.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/find_gtdef.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/W_find_gtdef.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/find_gtdef.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/Parsing/W_find_gtdef.fsx diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker.fs deleted file mode 100644 index 34d3de20940..00000000000 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker.fs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Conformance.UnitsOfMeasure - -open Xunit -open FSharp.Test -open FSharp.Test.Compiler - -module TypeChecker = - - // This test was automatically generated (moved from FSharpQA suite - Conformance/UnitsOfMeasure/TypeChecker) - [] - let ``TypeChecker - GenericSubType01_fs`` compilation = - compilation - |> asFsx - |> typecheck - |> shouldSucceed - |> ignore - diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/E_GenInterfaceWithDifferentGenInstantiations.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/E_GenInterfaceWithDifferentGenInstantiations.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/E_GenInterfaceWithDifferentGenInstantiations.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/E_GenInterfaceWithDifferentGenInstantiations.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/typechecker01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/E_typechecker01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/typechecker01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/E_typechecker01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/Generalization01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/Generalization01.fsx similarity index 94% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/Generalization01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/Generalization01.fsx index c46cefad1f4..53494495f23 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/Generalization01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/Generalization01.fsx @@ -14,4 +14,4 @@ type T = static member star ( y:'b when 'b :> M<'a>) = 0 let p = 1 let m = Unchecked.defaultof> -T.star(m) |> exit +T.star(m) |> ignore diff --git a/tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/TypeChecker/GenericSubType01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/GenericSubType01.fsx similarity index 100% rename from tests/FSharp.Compiler.ComponentTests/resources/tests/Conformance/UnitsOfMeasure/TypeChecker/GenericSubType01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/GenericSubType01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/Slash_InFunction01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/Slash_InFunction01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/Slash_InFunction01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/Slash_InFunction01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/Slash_InMethod01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/Slash_InMethod01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/Slash_InMethod01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/Slash_InMethod01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_decimal_01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_decimal_01.fsx similarity index 87% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_decimal_01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_decimal_01.fsx index bcb68704da5..b6231bdc933 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_decimal_01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_decimal_01.fsx @@ -10,4 +10,4 @@ module WithDecimal = let a = 100.0M let a_na = a * 2.0M // Bug #3427 let b : Ab = 100.0M - (if (b*2.0M = 200.0M) then 0 else 1) |> exit + (if (b*2.0M = 200.0M) then 0 else 1) |> ignore diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float32_01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float32_01.fsx similarity index 86% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float32_01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float32_01.fsx index 3a4b5c44f18..cf52976f431 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float32_01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float32_01.fsx @@ -10,5 +10,5 @@ module WithFloat32 = let a = 100.0f let a_na = a * 2.0f let b : Ab = 100.0f - (if (b*2.0f = 200.0f) then 0 else 1) |> exit + (if (b*2.0f = 200.0f) then 0 else 1) |> ignore diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float_01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float_01.fsx similarity index 87% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float_01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float_01.fsx index 015e097a977..5075586b4d2 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float_01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeAbbreviation_float_01.fsx @@ -12,5 +12,5 @@ module WithFloat = let a_na = a * 2.0 let b : Ab = 100.0 - (if (b*2.0 = 200.0) then 0 else 1) |> exit + (if (b*2.0 = 200.0) then 0 else 1) |> ignore diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeChecker.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeChecker.fs new file mode 100644 index 00000000000..7b511e22b41 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeChecker.fs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.UnitsOfMeasure + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module TypeChecker = + let shouldFailWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldFail + |> withDiagnostics expectedDiagnostics + + let shouldSucceedWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> ignoreWarnings + |> typecheck + |> shouldSucceed + |> withDiagnostics expectedDiagnostics + + let shouldSucceed compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldSucceed + + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + let ``TypeChecker - shouldSucceed`` compilation = + compilation + |> getCompilation + |> shouldSucceed + + + [] + let ``E_GenInterfaceWithDifferentGenInstantiations_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 3360, Line 13, Col 6, Line 13, Col 8, "'IB<'b>' cannot implement the interface 'IA<_>' with the two instantiations 'IA' and 'IA<'b>' because they may unify.") + ] + + [] + let ``E_typechecker01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 687, Line 8, Col 1, Line 8, Col 2, "This value, type or method expects 2 type parameter(s) but was given 1") + ] + + [] + let ``W_LessGeneric01_fsx`` compilation = + compilation + |> getCompilation + |> shouldSucceedWithDiagnostics [ + (Warning 64, Line 18, Col 17, Line 18, Col 19, "This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable 'u has been constrained to be measure '1'.") + ] + + [] + let ``W_LessGeneric02_fsx`` compilation = + compilation + |> getCompilation + |> shouldSucceedWithDiagnostics [ + (Warning 464, Line 9, Col 18, Line 9, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 10, Col 18, Line 10, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 11, Col 18, Line 11, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 12, Col 18, Line 12, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 13, Col 18, Line 13, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 14, Col 18, Line 14, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 15, Col 18, Line 15, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 16, Col 18, Line 16, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 17, Col 18, Line 17, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 18, Col 18, Line 18, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 19, Col 18, Line 19, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 20, Col 18, Line 20, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 21, Col 18, Line 21, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 22, Col 18, Line 22, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 23, Col 18, Line 23, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 24, Col 18, Line 24, Col 25, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + (Warning 464, Line 25, Col 21, Line 25, Col 28, "This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'.") + ] + + [] + let ``W_TypeConstraint01_fsx`` compilation = + compilation + |> getCompilation + |> shouldSucceedWithDiagnostics [ + (Warning 64, Line 11, Col 7, Line 11, Col 14, "This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable 'u has been constrained to be measure 'kg'.") + (Warning 64, Line 11, Col 19, Line 11, Col 26, "This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable 'v has been constrained to be measure 'kg'.") + ] + + [] + let ``W_TypeConstraint03_fsx`` compilation = + compilation + |> getCompilation + |> shouldSucceedWithDiagnostics [ +#if NETFRAMEWORK + (Warning 52, Line 10, Col 7, Line 10, Col 21, "The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed") +#endif + ] diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeConstraint02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeConstraint02.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeConstraint02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/TypeConstraint02.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/ValueRestriction01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/ValueRestriction01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/ValueRestriction01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/ValueRestriction01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/W_LessGeneric01.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_LessGeneric01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/W_LessGeneric01.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_LessGeneric01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/LessGeneric02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_LessGeneric02.fsx similarity index 99% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/LessGeneric02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_LessGeneric02.fsx index 51b928922a3..55fe6960ad4 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/LessGeneric02.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_LessGeneric02.fsx @@ -26,4 +26,4 @@ let sq = } |> Seq.sum -exit 0 +ignore 0 diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/W_TypeConstraint01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_TypeConstraint01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/W_TypeConstraint01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_TypeConstraint01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeConstraint03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_TypeConstraint03.fsx similarity index 88% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeConstraint03.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_TypeConstraint03.fsx index 4fe15a1481e..686f194055e 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/TypeConstraint03.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/TypeChecker/W_TypeConstraint03.fsx @@ -8,5 +8,5 @@ type x = System.Nullable> let x_obj = Unchecked.defaultof match x_obj.HasValue with -| false -> exit 0 -| _ -> exit 1 \ No newline at end of file +| false -> ignore 0 +| _ -> ignore 1 \ No newline at end of file diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_NoConstructorOnMeasure01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_NoConstructorOnMeasure01.fsx similarity index 97% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_NoConstructorOnMeasure01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_NoConstructorOnMeasure01.fsx index aa1a38aefd3..9149a410877 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_NoConstructorOnMeasure01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_NoConstructorOnMeasure01.fsx @@ -10,4 +10,4 @@ type kg = static member Foo() = 1 let objKg = 1.0f -exit 1 +ignore 1 diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_NoInstanceOnMeasure01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_NoInstanceOnMeasure01.fsx similarity index 97% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_NoInstanceOnMeasure01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_NoInstanceOnMeasure01.fsx index 4ff94cf8683..8a3a857491c 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_NoInstanceOnMeasure01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_NoInstanceOnMeasure01.fsx @@ -8,4 +8,4 @@ type kg = member this.Foo() = 5 -exit 1 +ignore 1 diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_OverloadsDifferByUOMAttr.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_OverloadsDifferByUOMAttr.fsx similarity index 100% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_OverloadsDifferByUOMAttr.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_OverloadsDifferByUOMAttr.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_Polymorphism01.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_Polymorphism01.fsx similarity index 94% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_Polymorphism01.fsx rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_Polymorphism01.fsx index 961af529c02..f33870b14f6 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_Polymorphism01.fsx +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_Polymorphism01.fsx @@ -14,8 +14,5 @@ type Meter() = type Value< [] 'a > = float<'a> * Unit<'a> -#if INTERACTIVE -;; -exit 1;; -#endif +ignore 1 diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/GenericUOM01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/GenericUOM01.fsx similarity index 95% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/GenericUOM01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/GenericUOM01.fsx index 3fd973024cd..30fe2cd9c98 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/GenericUOM01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/GenericUOM01.fsx @@ -23,6 +23,6 @@ let y = x.Foo 1.0 if y <> 5.0 then - exit 1 + ignore 1 -exit 0 +ignore 0 diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/InInterface01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/InInterface01.fsx similarity index 96% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/InInterface01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/InInterface01.fsx index ec5f4282007..42b23b9e271 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/InInterface01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/InInterface01.fsx @@ -31,6 +31,6 @@ let testResult = | _ -> true if testResult = false then - exit 1 + ignore 1 -exit 0 +ignore 0 diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/Polymorphism02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/Polymorphism02.fsx similarity index 97% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/Polymorphism02.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/Polymorphism02.fsx index ad94a9d4e1f..8161b0560f7 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/Polymorphism02.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/Polymorphism02.fsx @@ -13,4 +13,4 @@ type Unit<[] 'a >() = let objUnit = new Unit() if objUnit.Factor() <> 1.0 then exit 1 -exit 0 +ignore 0 diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/StaticsOnMeasure01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/StaticsOnMeasure01.fsx similarity index 96% rename from tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/StaticsOnMeasure01.fs rename to tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/StaticsOnMeasure01.fsx index ead91c1ad14..58047848f92 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/StaticsOnMeasure01.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/StaticsOnMeasure01.fsx @@ -11,4 +11,4 @@ type kg = if kg.Prop <> 5 then exit 1 if kg.Func 3 <> 4 then exit 1 -exit 0 +ignore 0 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/WithOOP.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/WithOOP.fs new file mode 100644 index 00000000000..3b416979e43 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/WithOOP.fs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.UnitsOfMeasure + +open Xunit +open FSharp.Test +open FSharp.Test.Compiler + +module WithOOP = + let shouldFailWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldFail + |> withDiagnostics expectedDiagnostics + + let shouldSucceedWithDiagnostics expectedDiagnostics compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> ignoreWarnings + |> typecheck + |> shouldSucceed + |> withDiagnostics expectedDiagnostics + + let shouldSucceed compilation = + compilation + |> asLibrary + |> withOptions ["--test:ErrorRanges"] + |> typecheck + |> shouldSucceed + + [] + [] + [] + [] + [] + let ``TypeChecker - shouldSucceed`` compilation = + compilation + |> getCompilation + |> shouldSucceed + + [] + let ``E_GenericUOM01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 842, Line 8, Col 36, Line 8, Col 51, "This attribute is not valid for use on this language element") + ] + + [] + let ``E_NoConstructorOnMeasure01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 904, Line 8, Col 5, Line 8, Col 18, "Measure declarations may have only static members: constructors are not available") + ] + + [] + let ``E_NoInstanceOnMeasure01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 897, Line 9, Col 5, Line 9, Col 26, "Measure declarations may have only static members") + ] + + + [] + let ``E_OverloadsDifferByUOMAttr_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 438, Line 10, Col 5, Line 10, Col 8, "Duplicate method. The method '.ctor' has the same name and signature as another method in type 'Foo<'a>' once tuples, functions, units of measure and/or provided types are erased.") + (Error 438, Line 9, Col 5, Line 9, Col 8, "Duplicate method. The method '.ctor' has the same name and signature as another method in type 'Foo<'a>' once tuples, functions, units of measure and/or provided types are erased.") + ] + + [] + let ``E_Polymorphism01_fsx`` compilation = + compilation + |> getCompilation + |> shouldFailWithDiagnostics [ + (Error 366, Line 12, Col 13, Line 12, Col 25, "No implementation was given for 'abstract Unit.Factor: unit -> float'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") + ] diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 812833e988c..df531ac0058 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -129,10 +129,15 @@ - - - - + + + + + + + + + diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index ba72ee42e29..e3c9269a5bd 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -1629,7 +1629,8 @@ Actual: (sourceErrors, expectedErrors) ||> List.iter2 (fun actual expected -> - Assert.Equal(expected, actual)) + try Assert.Equal(expected, actual) + with | _ -> failwith $"%s{what}:\nactual:\n %s{actual}\nexpected:\n %s{expected}") let adjust (adjust: int) (result: CompilationResult) : CompilationResult = match result with diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Calculus.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Calculus.fs deleted file mode 100644 index 0263135fc55..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Calculus.fs +++ /dev/null @@ -1,31 +0,0 @@ -// #Conformance #UnitsOfMeasure -#light - -let diff (h:float<_>) (f :_ -> float<_>) = fun x -> (f (x+h) - f (x-h)) / (2.0*h) - -let integrate (f:float<_> -> float<_>) (a:float<_>) (b:float<_>) n = - let h = (b-a) / (float n) - let rec iter x i = - if i=0 then 0.0<_> - else f x + iter (x+h) (i-1) - h * (f a / 2.0 + iter (a+h) (n-1) + f b / 2.0) - -let rec newton (f:float<_> -> float<_>) f' x xacc = - let dx = f x / f' x - let x' = x - dx - if abs dx / x' < xacc - then x' - else newton f f' x' xacc - -// Non-regular datatype: a list of derivatives of a function -type derivs<[] 'u, [] 'v> = - Nil -| Cons of (float<'u> -> float<'v>) * derivs<'u,'v/'u> - -// Essential use of polymorphic recursion! -// Given a step h, function f, and integer n, compute a list of n derivatives -// [f; f'; f''; ...] -// where f is the function itself, f' is the first derivative, f'' is the second, etc. - -let rec makeDerivs<[] 'u, [] 'v> (h:float<'u>, f:float<'u> -> float<'v>, n:int) : derivs<'u,'v> = - if n=0 then Nil else Cons(f, makeDerivs(h, diff h f, n-1)) diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc01.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc01.fs deleted file mode 100644 index a48edb12d9d..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc01.fs +++ /dev/null @@ -1,9 +0,0 @@ -// #Regression #Conformance #UnitsOfMeasure -// Regression test for FSHARP1.0:2869 -#light - -// Polymorphic recursion -let rec prodlists<[] 'u,[] 'v>(xs:float<'u> list,ys:float<'v> list) : float<'u 'v> list = - match xs,ys with - | x::xs,y::ys -> x*y :: prodlists<'v,'u>(ys,xs) - | _ -> [] diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc03.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc03.fs deleted file mode 100644 index 4f6b5a4429b..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Misc03.fs +++ /dev/null @@ -1,25 +0,0 @@ -// #Conformance #UnitsOfMeasure -let recip1 x = 1.0/x -let recip2 (x:float<_>) = 1.0/x - -let zero1 = 0.0 -let zero2 = 0.0<_> - -let halvelist0 xs = List.map ( (/) 2.0 : float -> float ) xs -let halvelist1 xs = List.map ( (/) 2.0 : float<_> -> float<_> ) xs -let halvelist2 (xs:float<_> list) = List.map ( (/) 2.0) xs -let halvelist3 xs = List.map ( (/) 2.0) xs - -let pr x y = printf "%f %s" x y -let pr2 (x:float<_>) = printf "%f" x - -// From thesis -let abs x = if x < 0.0<_> then 0.0<_> - x else x -let sqr (x:float<_>) = x*x -let cube x = x*sqr x -let powers x y z = sqr x + cube y + sqr z * cube z - -// Now let's test some explicit types -let sqr2< [] 'u>(x:float<'u>) = x*x -let cube2<[] 'v>(x) = sqr2<'v> x * x -let rec reccube1(x) = if x < 0.0<_> then x else - reccube1(x) diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fs deleted file mode 100644 index 79c649e564e..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/RationalExponents01.fs +++ /dev/null @@ -1,35 +0,0 @@ -// #Conformance #UnitsOfMeasure -// Rational exponents feature - -[] -type kg - -[] -type s - -[] -type m - -// Simple fractions -let test01() = 1.0 -let test02() = 2.0 -let test03() = sqrt (test01()) + test02() - -// Negative fractions -let test04() = 4.0 -let test05() = 5.0 -let test06() = 1.0 / (test04() * test05()) + 3.0 - -// More complex expressions -let test07() = 2.0 -let test08() = 4.0<(s^6 kg^3)^(1/4)> -let test09() = test07() * test08() + 3.0 - -// Generics -let test10(x:float<'u>) (y:float<'u^(1/2)>) = sqrt x + y -let test11(x:float<'u^-(1/4)>) (y:float<'u^(3/4)>) : float = (x*x*x + 1.0/y) * x -let test12(x:float<'u^(1/2)>) (y:float<'v^2>) :float<'u 'v> = x*x*sqrt y -let test13() = test12 4.0 2.0 + 3.0<(kg s)^(1/2)> - -exit 0 - diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/SI.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/SI.fs deleted file mode 100644 index 582f849d974..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/SI.fs +++ /dev/null @@ -1,32 +0,0 @@ -// #Conformance #UnitsOfMeasure -#light - -[] type kg // kilogram -[] type m // metre -[] type s // second -[] type A // ampere -[] type mol // mole -[] type K // kelvin -[] type cd // candela - -[] type rad = m/m // radian -[] type sr = m^2/m^2 // steradian -[] type Hz = s^-1 // hertz -[] type N = kg m / s^2 // newton -[] type Pa = N / m^2 // pascal -[] type J = N m // joule -[] type W = J / s // watt -[] type C = s A // coulomb -[] type V = W/A // watt -[] type F = C/V // farad -[] type ohm = V/A // ohm -[] type S = A/V // siemens -[] type Wb = V s // weber -[] type T = Wb/m^2 // tesla -[] type H = Wb/A // henry -[] type lm = cd sr // lumen -[] type lx = lm/m^2 // lux -[] type Bq = s^-1 // becquerel -[] type Gy = J/kg // gray -[] type Sv = J/kg // sievert -[] type kat = mol/s // katal diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Stats.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Stats.fs deleted file mode 100644 index 8bdb04c9dc1..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/Stats.fs +++ /dev/null @@ -1,32 +0,0 @@ -// #Conformance #UnitsOfMeasure -#light - -let rec sum xs = match xs with [] -> 0.0<_> | (x::xs) -> x + sum xs - -let rec sumMap f xs = match xs with [] -> 0.0<_> | (x::xs) -> f x + sumMap f xs -let rec sumMap2 f xs ys = match xs,ys with (x::xs,y::ys) -> f x y + sumMap2 f xs ys | _ -> 0.0<_> - -let mean xs = sum xs / float (List.length xs) - -let meanMap f xs = sumMap f xs / float (List.length xs) - -let sqr (x:float<_>) = x*x - -let cube x = x*sqr x - -let variance xs = let m = mean xs in meanMap (fun x -> sqr (x-m)) xs -let sdeviation xs = sqrt (variance xs) - -let skewness xs = - let n = float (List.length xs) - let m = mean xs - let s = sdeviation xs - meanMap (fun x -> cube(x-m)) xs / (cube s) - -let covariance xs ys = - let m = mean xs - let n = mean ys - sumMap2 (fun x y -> (x-m)*(y-n)) xs ys / (float n) - -let correlation xs ys = - covariance xs ys / (mean xs * mean ys) diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/env.lst b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/env.lst deleted file mode 100644 index 378c1aa2247..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Basic/env.lst +++ /dev/null @@ -1,18 +0,0 @@ - SOURCE=Calculus.fs COMPILE_ONLY=1 # Calculus.fs - - SOURCE=Mars.fs # Mars.fs - - SOURCE=MassForce.fs # MassForce.fs - SOURCE=E_MassForce.fs SCFLAGS="--test:ErrorRanges" # E_MassForce.fs - - SOURCE=Ints01.fs # Ints01.fs - - SOURCE=Misc02.fs # Misc02.fs - SOURCE=Misc04.fs # Misc04.fs - - - - - SOURCE=DynamicTypeTest.fs # DynamicTypeTest.fs - SOURCE=OnDecimals01.fs # OnDecimals01.fs - diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Bounds/env.lst b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Bounds/env.lst deleted file mode 100644 index ea51d725c9e..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Bounds/env.lst +++ /dev/null @@ -1,2 +0,0 @@ - SOURCE=infinity_01.fs SCFLAGS="--test:ErrorRanges" # infinity_01.fs - SOURCE=nan_01.fs SCFLAGS="--test:ErrorRanges" # nan_01.fs diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/env.lst b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/env.lst deleted file mode 100644 index 10221fc0251..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Constants/env.lst +++ /dev/null @@ -1,8 +0,0 @@ - SOURCE=decimal.fs SCFLAGS=-a # decimal.fs - SOURCE=E_UnsupportedTypes01.fs SCFLAGS=-a # E_UnsupportedTypes01.fs - SOURCE=ieee32.fs SCFLAGS=-a # ieee32.fs - SOURCE=ieee64.fs SCFLAGS=-a # ieee64.fs - SOURCE=SpecialSyntax_.fs SCFLAGS=-a # SpecialSyntax_.fs - - - diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/env.lst b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/env.lst deleted file mode 100644 index 8b92be2e707..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Diagnostics/env.lst +++ /dev/null @@ -1,29 +0,0 @@ - SOURCE=E_RangeExpression01.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_RangeExpression01.fs - - SOURCE=W_NonGenVarInValueRestrictionWarning.fs SCFLAGS="--test:ErrorRanges --flaterrors" # W_NonGenVarInValueRestrictionWarning.fs - SOURCE=E_CantBeUsedAsPrefixArgToAType01.fsx SCFLAGS="--test:ErrorRanges" # E_CantBeUsedAsPrefixArgToAType01.fsx - SOURCE=E_CantBeUsedAsPrefixArgToAType02.fsx SCFLAGS="--test:ErrorRanges" # E_CantBeUsedAsPrefixArgToAType02.fsx - SOURCE=E_CantBeUsedAsPrefixArgToAType03.fsx SCFLAGS="--test:ErrorRanges" # E_CantBeUsedAsPrefixArgToAType03.fsx - SOURCE=E_CantBeUsedAsPrefixArgToAType04.fsx SCFLAGS="--test:ErrorRanges" # E_CantBeUsedAsPrefixArgToAType04.fsx - SOURCE=E_CantBeUsedAsPrefixArgToAType05.fsx SCFLAGS="--test:ErrorRanges" # E_CantBeUsedAsPrefixArgToAType05.fsx - - SOURCE=E_UnexpectedTypeParameter01.fs SCFLAGS="--test:ErrorRanges" # E_UnexpectedTypeParameter01.fs - SOURCE=E_ZeroDenominator.fs SCFLAGS="--test:ErrorRanges" # E_ZeroDenominator.fs - SOURCE=E_ParsingRationalExponents.fs SCFLAGS="--test:ErrorRanges" # E_ParsingRationalExponents.fs - - SOURCE=W_UnitOfMeasureCodeLessGeneric01.fs SCFLAGS="--test:ErrorRanges -a" # W_UnitOfMeasureCodeLessGeneric01.fs - - SOURCE=E_ExplicitUnitOfMeasureParameters01.fs SCFLAGS="--test:ErrorRanges" # E_ExplicitUnitOfMeasureParameters01.fs - SOURCE=E_ExplicitUnitOfMeasureParameters02.fs SCFLAGS="--test:ErrorRanges" # E_ExplicitUnitOfMeasureParameters02.fs - SOURCE=E_ExplicitUnitOfMeasureParameters03.fs SCFLAGS="--test:ErrorRanges" # E_ExplicitUnitOfMeasureParameters03.fs - SOURCE=E_ExplicitUnitOfMeasureParameters04.fs SCFLAGS="--test:ErrorRanges" # E_ExplicitUnitOfMeasureParameters04.fs - - SOURCE=E_RangeOfDimensioned03.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_RangeOfDimensioned03.fs - SOURCE=RangeOfDimensioned01.fs SCFLAGS="--test:ErrorRanges" # RangeOfDimensioned01.fs - SOURCE=RangeOfDimensioned02.fs SCFLAGS="--test:ErrorRanges" # RangeOfDimensioned02.fs - - SOURCE=E_ExpectedTypeNotUnitOfMeasure01.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_ExpectedTypeNotUnitOfMeasure01.fs - SOURCE=E_UnsupportedType01.fs SCFLAGS="--test:ErrorRanges" # E_UnsupportedType01.fs - SOURCE=E_RangeOfDecimals01.fs SCFLAGS="--test:ErrorRanges" # E_RangeOfDecimals01.fs - - SOURCE=IntTypes01.fs SCFLAGS="--test:ErrorRanges -a" # IntTypes01.fs diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/env.lst b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/env.lst deleted file mode 100644 index 30b2960759c..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Operators/env.lst +++ /dev/null @@ -1,7 +0,0 @@ - SOURCE=Operators_decimal_01.fs SCFLAGS=-a # Operators_decimal_01.fs - SOURCE=Operators_float32_01.fs SCFLAGS=-a # Operators_float32_01.fs - SOURCE=Operators_float_01.fs SCFLAGS=-a # Operators_float_01.fs - - - - diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/env.lst b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/env.lst deleted file mode 100644 index 07058de7ec7..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/env.lst +++ /dev/null @@ -1,13 +0,0 @@ -SOURCE=Positive01.fs SCFLAGS="--test:ErrorRanges -a" # Positive01.fs - -SOURCE=W_ImplicitProduct01.fs SCFLAGS="--test:ErrorRanges" # W_ImplicitProduct01.fs - -SOURCE=E_Error02.fs SCFLAGS="--test:ErrorRanges" # E_Error02.fs -SOURCE=E_Error03.fs SCFLAGS="--test:ErrorRanges" # E_Error03.fs -SOURCE=E_Error04.fs SCFLAGS="--test:ErrorRanges" # E_Error04.fs -SOURCE=E_Error05.fs SCFLAGS="--test:ErrorRanges" # E_Error05.fs -SOURCE=E_Error06.fs SCFLAGS="--test:ErrorRanges" # E_Error06.fs - -SOURCE=E_IncompleteParens01.fs SCFLAGS="--test:ErrorRanges" # E_IncompleteParens01.fs -SOURCE=E_IncompleteParens02.fs SCFLAGS="--test:ErrorRanges" # E_IncompleteParens02.fs - diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fs deleted file mode 100644 index dced37284cd..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/GreaterBarRBrack01.fs +++ /dev/null @@ -1,18 +0,0 @@ -// #Regression #Conformance #UnitsOfMeasure -// Regression test for FSHARP1.0:2791 -// Make sure we can parse arrays of dimensioned numbers without needing a space between > and |] -// -#light - -[] -type m - -let l1 = [|10.0|] // ok -let l2 = [|10.0 |] // ok - -// This was not really specific to Units of Measure, we while we are here -// we check that care too. -let p1 = [|Array.empty|] // ok -let p2 = [|Array.empty |] // ok - -exit 0 diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/KnownTypeAsUnit01.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/KnownTypeAsUnit01.fs deleted file mode 100644 index 57dee6b46b4..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/KnownTypeAsUnit01.fs +++ /dev/null @@ -1,25 +0,0 @@ -// #Regression #Conformance #UnitsOfMeasure -// Regression test for FSHARP1.0:2708 -// ICE when using a known type (int, decimal, etc...) as a unit of measure -//Expected unit-of-measure, not type -//Expected unit-of-measure, not type -//Expected unit-of-measure, not type -//Expected unit-of-measure, not type -//Expected unit-of-measure, not type -[] type Kg - -module M1 = - 1.0 // error - -module M2 = - let x = 1.0 // error - -module M3 = - let f2 ( x : float) = x // error - -module M4 = - let f4 (x : 'a when 'a :> float) = x // error - -module M5 = - type T<[] 'a>(x : float, y : float<_>) = class end // error - diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/Quotient.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/Quotient.fs deleted file mode 100644 index 4c8458ed935..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/Quotient.fs +++ /dev/null @@ -1,19 +0,0 @@ -// #Regression #Conformance #UnitsOfMeasure -// Regression test for FSHARP1.0:6157 - Units of measure containing "/" get rejected in arguments to method invocation - -[] type m -[] type s - -let sqr<[] 'u>(x:float<'u>) = x*x - -type T() = - member this.sqr<[] 'u>(x:float<'u>) = x*x - - -let t = new T() -let a = sqr(5.0) -let b = sqr(2.0) -let c = sqr(3.0) -let d = t.sqr(5.0) -let e = t.sqr(2.0) -let f = t.sqr(3.0) diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/QuotientAssoc.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/QuotientAssoc.fs deleted file mode 100644 index fe3aecf7e94..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/QuotientAssoc.fs +++ /dev/null @@ -1,24 +0,0 @@ -// #Regression #Conformance #UnitsOfMeasure -// Regression test for FSHARP1.0:4124 - Units of measure: division should be left-associative in both types and constants -// Regression test for FSHARP1.0:4188 - Type parameters for units of measure parsed inconsistently. - -#light - -[] type s -[] type m -[] type A = m / s / s -[] type AA = m / s^2 -[] type B = m^2 / m s / s^2 / s^-1 -[] type B' = m / s / s / s / s / s / s / s / s^-5 -[] type C = m / s * s / s * s / s / s - -let (x : float) = 1.0 -let y = 2.0 -let z = x+y -let a = 1.0 -let aa = 2.0 -let (b : float) = 3.0 -let b' = 4.0 -let (c : float) = 5.0 - -let res = a + aa + b + b' + c diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fs deleted file mode 100644 index dcac1cb1c50..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/Reciprocal01.fs +++ /dev/null @@ -1,17 +0,0 @@ -// #Regression #Conformance #UnitsOfMeasure -// Regression test for FSHARP1.0:2748 -// Units or measures: we should not require a space between < and \ when using a reciprocal of a unit - -// Regression test for FSHARP1.0:4195 -// Reciprocals parsed incorrectly for Measure definitions. - -#light - -[] type s // [] type s -[] type s' = / s / s // [] type s' = /s ^ 2 -let oneHertz = 1.0 // OK -let twoHertz = 2.0f< /s> // OK - -if (1.0 + 2.0 <> 3.0) then exit 1 - -exit 0 diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/env.lst b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/env.lst deleted file mode 100644 index fcc63fee947..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parsing/env.lst +++ /dev/null @@ -1,4 +0,0 @@ - SOURCE=KnownTypeAsUnit01.fs SCFLAGS="--test:ErrorRanges" # KnownTypeAsUnit01.fs - SOURCE=KnownTypeAsUnit01b.fs SCFLAGS="--test:ErrorRanges" # KnownTypeAsUnit01b.fs - SOURCE=E_Nesting01.fs SCFLAGS="--test:ErrorRanges" # E_Nesting01.fs.fs -NoMT SOURCE=find_gtdef.fsx FSIMODE=EXEC COMPILE_ONLY=1 # find_gtdef.fsx diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/env.lst b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/env.lst deleted file mode 100644 index caf239bf3f8..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/TypeChecker/env.lst +++ /dev/null @@ -1,19 +0,0 @@ - - SOURCE=Slash_InFunction01.fs SCFLAGS=--warnaserror+ # Slash_InFunction01.fs - SOURCE=Slash_InMethod01.fs SCFLAGS=--warnaserror+ # Slash_InMethod01.fs - - SOURCE=Generalization01.fs SCFLAGS=--warnaserror # Generalization01.fs - - SOURCE=E_GenInterfaceWithDifferentGenInstantiations.fs SCFLAGS="--test:ErrorRanges --langversion:5.0" # E_GenInterfaceWithDifferentGenInstantiations.fs - - SOURCE=TypeAbbreviation_decimal_01.fs # TypeAbbreviation_decimal_01.fs - SOURCE=TypeAbbreviation_float32_01.fs # TypeAbbreviation_float32_01.fs - SOURCE=TypeAbbreviation_float_01.fs # TypeAbbreviation_float_01.fs - - SOURCE=typechecker01.fs SCFLAGS="--test:ErrorRanges" # typechecker01.fs - SOURCE=W_TypeConstraint01.fs SCFLAGS="--test:ErrorRanges" # W_TypeConstraint01.fs - SOURCE=TypeConstraint02.fs # TypeConstraint02.fs - SOURCE=TypeConstraint03.fs # TypeConstraint03.fs -NoMT SOURCE=W_LessGeneric01.fsx COMPILE_ONLY=1 SCFLAGS="--nologo" FSIMODE=PIPE # W_LessGeneric01.fsx - SOURCE=LessGeneric02.fs # LessGeneric02.fs - SOURCE=ValueRestriction01.fs # ValueRestriction01.fs diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/env.lst b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/env.lst deleted file mode 100644 index d30059c87fe..00000000000 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/env.lst +++ /dev/null @@ -1,10 +0,0 @@ - SOURCE=InInterface01.fs # InInterface01.fs - SOURCE=E_NoInstanceOnMeasure01.fs SCFFLAGS="--test:ErrorRanges" # E_NoInstanceOnMeasure01.fs - SOURCE=StaticsOnMeasure01.fs # StaticsOnMeasure01.fs - SOURCE=E_OverloadsDifferByUOMAttr.fs SCFFLAGS="--test:ErrorRanges" # E_OverloadsDifferByUOMAttr.fs - SOURCE=GenericUOM01.fs # GenericUOM01.fs -NoMT SOURCE=E_Polymorphism01.fsx FSIMODE=PIPE SCFLAGS="--test:ErrorRanges" COMPILE_ONLY=1 # E_Polymorphism01.fsx - SOURCE=Polymorphism02.fs # Polymorphism02.fs - SOURCE=E_NoConstructorOnMeasure01.fs SCFLAGS="--test:ErrorRanges" # E_NoConstructorOnMeasure01.fs - SOURCE=E_GenericUOM01.fs # E_GenericUOM01.fs - diff --git a/tests/fsharpqa/Source/test.lst b/tests/fsharpqa/Source/test.lst index 31b787ef41e..f0ae0203c87 100644 --- a/tests/fsharpqa/Source/test.lst +++ b/tests/fsharpqa/Source/test.lst @@ -140,16 +140,6 @@ Conformance08 Conformance\TypesAndTypeConstraints\LogicalPropertiesOfTypes Conformance08 Conformance\TypesAndTypeConstraints\TypeConstraints Conformance08 Conformance\TypesAndTypeConstraints\TypeParameterDefinitions -Conformance08 Conformance\UnitsOfMeasure\Basic -Conformance08 Conformance\UnitsOfMeasure\Bounds -Conformance08 Conformance\UnitsOfMeasure\Constants -Conformance08 Conformance\UnitsOfMeasure\Diagnostics -Conformance08 Conformance\UnitsOfMeasure\Operators -Conformance08 Conformance\UnitsOfMeasure\Parenthesis -Conformance08 Conformance\UnitsOfMeasure\Parsing -Conformance08 Conformance\UnitsOfMeasure\TypeChecker -Conformance08 Conformance\UnitsOfMeasure\WithOOP - Misc01 Diagnostics\async Misc01,Diagnostics Diagnostics\General Misc01 Diagnostics\NONTERM From 66e16371e6a592293597e5a3a97a53189de55a81 Mon Sep 17 00:00:00 2001 From: Martin <29605222+Martin521@users.noreply.github.com> Date: Wed, 14 May 2025 09:51:36 +0200 Subject: [PATCH 16/38] Scoped nowarn (#18049) --- .../.FSharp.Compiler.Service/9.0.300.md | 2 +- docs/release-notes/.Language/preview.md | 1 + src/Compiler/Checking/CheckDeclarations.fs | 4 +- src/Compiler/CodeGen/IlxGen.fs | 2 +- src/Compiler/Driver/CompilerDiagnostics.fs | 58 +-- src/Compiler/Driver/CompilerDiagnostics.fsi | 8 +- src/Compiler/Driver/ParseAndCheckInputs.fs | 288 +++++------- src/Compiler/Driver/ParseAndCheckInputs.fsi | 9 +- src/Compiler/Driver/ScriptClosure.fs | 64 +-- src/Compiler/Driver/ScriptClosure.fsi | 3 - src/Compiler/Driver/fsc.fs | 16 +- src/Compiler/FSComp.txt | 5 + src/Compiler/FSharp.Compiler.Service.fsproj | 2 + src/Compiler/Facilities/DiagnosticOptions.fs | 2 + src/Compiler/Facilities/DiagnosticOptions.fsi | 3 +- src/Compiler/Facilities/LanguageFeatures.fs | 3 + src/Compiler/Facilities/LanguageFeatures.fsi | 1 + src/Compiler/Interactive/fsi.fs | 57 +-- .../Optimize/InnerLambdasToTopLevelFuncs.fs | 4 +- src/Compiler/Optimize/Optimizer.fs | 4 +- src/Compiler/Service/BackgroundCompiler.fs | 12 +- src/Compiler/Service/FSharpCheckerResults.fs | 21 +- src/Compiler/Service/IncrementalBuild.fs | 6 +- src/Compiler/Service/ServiceLexing.fs | 25 +- src/Compiler/Service/ServiceLexing.fsi | 1 + src/Compiler/Service/TransparentCompiler.fs | 52 +-- src/Compiler/Symbols/Exprs.fs | 2 +- src/Compiler/SyntaxTree/LexHelpers.fs | 5 +- src/Compiler/SyntaxTree/LexerStore.fs | 38 +- src/Compiler/SyntaxTree/LexerStore.fsi | 2 +- src/Compiler/SyntaxTree/ParseHelpers.fs | 2 +- src/Compiler/SyntaxTree/SyntaxTree.fs | 20 +- src/Compiler/SyntaxTree/SyntaxTree.fsi | 23 +- src/Compiler/SyntaxTree/SyntaxTrivia.fs | 20 +- src/Compiler/SyntaxTree/SyntaxTrivia.fsi | 23 +- src/Compiler/SyntaxTree/UnicodeLexing.fs | 15 + src/Compiler/SyntaxTree/UnicodeLexing.fsi | 4 + src/Compiler/SyntaxTree/WarnScopes.fs | 441 ++++++++++++++++++ src/Compiler/SyntaxTree/WarnScopes.fsi | 33 ++ src/Compiler/TypedTree/TypedTree.fs | 3 - src/Compiler/TypedTree/TypedTree.fsi | 3 - src/Compiler/TypedTree/TypedTreeOps.fs | 8 +- src/Compiler/lex.fsl | 11 +- src/Compiler/pars.fsy | 4 +- src/Compiler/xlf/FSComp.txt.cs.xlf | 25 + src/Compiler/xlf/FSComp.txt.de.xlf | 25 + src/Compiler/xlf/FSComp.txt.es.xlf | 25 + src/Compiler/xlf/FSComp.txt.fr.xlf | 25 + src/Compiler/xlf/FSComp.txt.it.xlf | 25 + src/Compiler/xlf/FSComp.txt.ja.xlf | 25 + src/Compiler/xlf/FSComp.txt.ko.xlf | 25 + src/Compiler/xlf/FSComp.txt.pl.xlf | 25 + src/Compiler/xlf/FSComp.txt.pt-BR.xlf | 25 + src/Compiler/xlf/FSComp.txt.ru.xlf | 25 + src/Compiler/xlf/FSComp.txt.tr.xlf | 25 + src/Compiler/xlf/FSComp.txt.zh-Hans.xlf | 25 + src/Compiler/xlf/FSComp.txt.zh-Hant.xlf | 25 + .../CompilerDirectives/NonStringArgs.fs | 51 +- .../CompilerDirectives/Nowarn.fs | 184 ++++++++ .../FSharp.Compiler.ComponentTests.fsproj | 1 + .../ExprTests.fs | 48 -- ...ervice.SurfaceArea.netstandard20.debug.bsl | 103 ++-- ...vice.SurfaceArea.netstandard20.release.bsl | 103 ++-- .../FSharp.Compiler.Service.Tests.fsproj | 1 + .../SyntaxTreeTests.fs | 5 +- .../WarnScopeTests.fs | 210 +++++++++ tests/FSharp.Test.Utilities/CompilerAssert.fs | 6 +- ...y_FSharp.Compiler.Service_Debug_net9.0.bsl | 18 +- ....Compiler.Service_Debug_netstandard2.0.bsl | 18 +- ...FSharp.Compiler.Service_Release_net9.0.bsl | 20 +- ...ompiler.Service_Release_netstandard2.0.bsl | 20 +- .../fsharp/core/load-script/ProjectDriver.fsx | 3 +- .../Attribute/RangeOfAttribute.fs.bsl | 3 +- .../Attribute/RangeOfAttributeWithPath.fs.bsl | 3 +- .../RangeOfAttributeWithTarget.fs.bsl | 3 +- ...ColonBeforeReturnTypeIsPartOfTrivia.fs.bsl | 3 +- ...eturnTypeIsPartOfTriviaInProperties.fs.bsl | 2 +- ...itionalDirectiveAroundInlineKeyword.fs.bsl | 3 +- .../Binding/InlineKeywordInBinding.fs.bsl | 3 +- ...nShouldBeIncludedInSynModuleDeclLet.fs.bsl | 3 +- ...BeIncludedInBindingOfSynExprObjExpr.fs.bsl | 3 +- ...dedInConstructorSynMemberDefnMember.fs.bsl | 3 +- ...tructorSynMemberDefnMemberOptAsSpec.fs.bsl | 3 +- ...edInFullSynMemberDefnMemberProperty.fs.bsl | 2 +- ...uldBeIncludedInSecondaryConstructor.fs.bsl | 3 +- ...eIncludedInSynMemberDefnLetBindings.fs.bsl | 3 +- ...ouldBeIncludedInSynMemberDefnMember.fs.bsl | 3 +- ...eShouldBeIncludedInSynModuleDeclLet.fs.bsl | 2 +- ...riteOnlySynMemberDefnMemberProperty.fs.bsl | 3 +- ...ignShouldBePresentInLocalLetBinding.fs.bsl | 2 +- ...ouldBePresentInLocalLetBindingTyped.fs.bsl | 3 +- ...lSignShouldBePresentInMemberBinding.fs.bsl | 3 +- ...resentInMemberBindingWithParameters.fs.bsl | 3 +- ...resentInMemberBindingWithReturnType.fs.bsl | 3 +- ...fEqualSignShouldBePresentInProperty.fs.bsl | 3 +- ...dBePresentInSynModuleDeclLetBinding.fs.bsl | 3 +- ...esentInSynModuleDeclLetBindingTyped.fs.bsl | 3 +- ...ldBePresentInSynExprLetOrUseBinding.fs.bsl | 3 +- ...dBePresentInSynModuleDeclLetBinding.fs.bsl | 3 +- ...nModuleDeclLetBindingWithAttributes.fs.bsl | 3 +- ...turnTypeOfBindingShouldContainStars.fs.bsl | 3 +- .../BlockCommentInSourceCode.fs.bsl | 3 +- ...ckCommentInSourceCodeSignatureFile.fsi.bsl | 3 +- .../CodeComment/CommentAfterSourceCode.fs.bsl | 3 +- ...ommentAfterSourceCodeSignatureFile.fsi.bsl | 3 +- .../CodeComment/CommentAtEndOfFile.fs.bsl | 3 +- .../CodeComment/CommentOnSingleLine.fs.bsl | 3 +- .../CommentOnSingleLineSignatureFile.fsi.bsl | 3 +- ...BeCapturedIfUsedInAnInvalidLocation.fs.bsl | 3 +- ...ipleSlashCommentShouldNotBeCaptured.fs.bsl | 3 +- ...atStartsAtAndAndEndsAfterExpression.fs.bsl | 2 +- ...geStartsAtAndAndEndsAfterExpression.fs.bsl | 3 +- ...tilineCommentAreNotReportedAsTrivia.fs.bsl | 2 +- ...reNotReportedAsTriviaSignatureFile.fsi.bsl | 3 +- ...ltilineStringAreNotReportedAsTrivia.fs.bsl | 2 +- ...reNotReportedAsTriviaSignatureFile.fsi.bsl | 3 +- .../NestedIfElseEndif.fs.bsl | 3 +- .../NestedIfElseEndifSignatureFile.fsi.bsl | 3 +- ...NestedIfEndifWithComplexExpressions.fs.bsl | 3 +- ...ithComplexExpressionsSignatureFile.fsi.bsl | 2 +- .../SingleIfElseEndif.fs.bsl | 3 +- .../SingleIfElseEndifSignatureFile.fsi.bsl | 3 +- .../ConditionalDirective/SingleIfEndif.fs.bsl | 3 +- .../SingleIfEndifSignatureFile.fsi.bsl | 3 +- .../MultipleSynEnumCasesHaveBarRange.fs.bsl | 3 +- .../SingleSynEnumCaseHasBarRange.fs.bsl | 3 +- .../SingleSynEnumCaseWithoutBar.fs.bsl | 3 +- .../Exception/Missing name 01.fs.bsl | 3 +- .../Exception/Missing name 02.fs.bsl | 3 +- .../Exception/Missing name 03.fs.bsl | 3 +- .../Exception/Recover Function Type 01.fs.bsl | 3 +- ...uldContainsTheRangeOfTheWithKeyword.fs.bsl | 3 +- .../Expression/AnonymousRecords-01.fs.bsl | 3 +- .../Expression/AnonymousRecords-02.fs.bsl | 3 +- .../Expression/AnonymousRecords-03.fs.bsl | 3 +- .../Expression/AnonymousRecords-04.fs.bsl | 3 +- .../Expression/AnonymousRecords-05.fs.bsl | 3 +- .../Expression/AnonymousRecords-06.fs.bsl | 3 +- .../Expression/Binary - Eq 01.fs.bsl | 3 +- .../Expression/Binary - Eq 02.fs.bsl | 3 +- .../Expression/Binary - Eq 03.fs.bsl | 3 +- .../Expression/Binary - Eq 04.fs.bsl | 3 +- .../Expression/Binary - Eq 05.fs.bsl | 3 +- .../Expression/Binary - Eq 06.fs.bsl | 3 +- .../Expression/Binary - Eq 07.fs.bsl | 3 +- .../Expression/Binary - Plus 01.fs.bsl | 3 +- .../Expression/Binary - Plus 02.fs.bsl | 3 +- .../Expression/Binary - Plus 03.fs.bsl | 3 +- .../Expression/Binary - Plus 04.fs.bsl | 3 +- .../Expression/Binary - Plus 05.fs.bsl | 3 +- .../SyntaxTree/Expression/Binary 01.fs.bsl | 3 +- .../SyntaxTree/Expression/Binary 02.fs.bsl | 3 +- ...OfTheEqualsSignInSynExprRecordField.fs.bsl | 2 +- .../data/SyntaxTree/Expression/Do 01.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Do 02.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Do 03.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Do 04.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Do 05.fs.bsl | 3 +- .../DotLambda - _ Recovery - Casts.fsx.bsl | 3 +- .../DotLambda - _ Recovery - Eof.fsx.bsl | 3 +- .../Expression/DotLambda - _ Recovery.fsx.bsl | 3 +- .../DotLambda - _. Recovery - Eof.fsx.bsl | 3 +- .../DotLambda - _. Recovery.fsx.bsl | 3 +- ...umentExpressionInInnerAppExpression.fs.bsl | 2 +- ...bda_FunctionWithUnderscoreDotLambda.fs.bsl | 3 +- ...bda_NestedPropertiesAfterUnderscore.fs.bsl | 3 +- ...NotAllowedFunctionExpressionWithArg.fs.bsl | 3 +- .../Expression/DotLambda_TopLevelLet.fs.bsl | 3 +- ...tLambda_TopLevelStandaloneDotLambda.fs.bsl | 3 +- ...tionCallWithSpaceAndUnitApplication.fs.bsl | 3 +- .../DotLambda_UnderscoreToString.fs.bsl | 3 +- ...DotLambda_WithNonTupledFunctionCall.fs.bsl | 3 +- .../Expression/DotLambda_WithoutDot.fs.bsl | 3 +- .../DotLambda_WithoutUnderscore.fs.bsl | 3 +- .../SyntaxTree/Expression/Downcast 01.fs.bsl | 2 +- .../SyntaxTree/Expression/Downcast 02.fs.bsl | 2 +- .../SyntaxTree/Expression/Downcast 03.fs.bsl | 2 +- .../data/SyntaxTree/Expression/For 01.fs.bsl | 3 +- .../data/SyntaxTree/Expression/For 02.fs.bsl | 3 +- .../data/SyntaxTree/Expression/For 03.fs.bsl | 3 +- .../data/SyntaxTree/Expression/For 04.fs.bsl | 3 +- .../data/SyntaxTree/Expression/For 05.fs.bsl | 3 +- .../Expression/GlobalKeywordAsSynExpr.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Id 01.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Id 02.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Id 03.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Id 04.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Id 05.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Id 06.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Id 07.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 01.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 02.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 03.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 04.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 05.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 06.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 07.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 08.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 09.fs.bsl | 3 +- .../data/SyntaxTree/Expression/If 10.fs.bsl | 3 +- ...OfTheEqualsSignInSynExprRecordField.fs.bsl | 3 +- .../Lambda - Missing expr 01.fs.bsl | 3 +- .../Lambda - Missing expr 02.fs.bsl | 3 +- .../SyntaxTree/Expression/Lambda 01.fs.bsl | 3 +- .../SyntaxTree/Expression/Lambda 02.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Lazy 01.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Lazy 02.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Lazy 03.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Let 01.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Let 02.fs.bsl | 3 +- .../Expression/List - Comprehension 01.fs.bsl | 3 +- .../Expression/List - Comprehension 02.fs.bsl | 3 +- ...LetOrUseContainsTheRangeOfInKeyword.fs.bsl | 2 +- .../Expression/Object - Class 01.fs.bsl | 3 +- .../Expression/Object - Class 02.fs.bsl | 3 +- .../Expression/Object - Class 03.fs.bsl | 3 +- .../Expression/Object - Class 04.fs.bsl | 3 +- .../Expression/Object - Class 05.fs.bsl | 3 +- .../Expression/Object - Class 06.fs.bsl | 3 +- .../Expression/Object - Class 07.fs.bsl | 3 +- .../Expression/Object - Class 08.fs.bsl | 3 +- .../Expression/Object - Class 09.fs.bsl | 3 +- .../Expression/Object - Class 10.fs.bsl | 3 +- .../Expression/Object - Class 11.fs.bsl | 3 +- .../Expression/Object - Class 12.fs.bsl | 3 +- .../Expression/Object - Class 13.fs.bsl | 3 +- .../Expression/Object - Class 14.fs.bsl | 3 +- .../Expression/Object - Class 15.fs.bsl | 3 +- .../SyntaxTree/Expression/Rarrow 01.fs.bsl | 3 +- .../SyntaxTree/Expression/Rarrow 02.fs.bsl | 3 +- .../SyntaxTree/Expression/Rarrow 03.fs.bsl | 3 +- .../Expression/Record - Anon 01.fs.bsl | 3 +- .../Expression/Record - Anon 02.fs.bsl | 3 +- .../Expression/Record - Anon 03.fs.bsl | 3 +- .../Expression/Record - Anon 04.fs.bsl | 3 +- .../Expression/Record - Anon 05.fs.bsl | 3 +- .../Expression/Record - Anon 06.fs.bsl | 3 +- .../Expression/Record - Anon 07.fs.bsl | 3 +- .../Expression/Record - Anon 08.fs.bsl | 3 +- .../Expression/Record - Anon 09.fs.bsl | 3 +- .../Expression/Record - Anon 10.fs.bsl | 3 +- .../Expression/Record - Anon 11.fs.bsl | 3 +- .../Expression/Record - Anon 12.fs.bsl | 3 +- .../Expression/Record - Field 01.fs.bsl | 3 +- .../Expression/Record - Field 02.fs.bsl | 3 +- .../Expression/Record - Field 03.fs.bsl | 3 +- .../Expression/Record - Field 04.fs.bsl | 3 +- .../Expression/Record - Field 05.fs.bsl | 3 +- .../Expression/Record - Field 06.fs.bsl | 3 +- .../Expression/Record - Field 07.fs.bsl | 3 +- .../Expression/Record - Field 08.fs.bsl | 3 +- .../Expression/Record - Field 09.fs.bsl | 3 +- .../Expression/Record - Field 10.fs.bsl | 3 +- .../Expression/Record - Field 11.fs.bsl | 3 +- .../Expression/Record - Field 12.fs.bsl | 3 +- .../Expression/Record - Field 13.fs.bsl | 3 +- .../Expression/Record - Field 14.fs.bsl | 3 +- .../Expression/Sequential 01.fs.bsl | 3 +- .../Expression/Sequential 02.fs.bsl | 3 +- .../Expression/Sequential 03.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Set 01.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Set 02.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Set 03.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Set 04.fs.bsl | 3 +- .../SynExprAnonRecdWithStructKeyword.fs.bsl | 3 +- ...sTheRangeOfTheEqualsSignInTheFields.fs.bsl | 3 +- ...xprDoContainsTheRangeOfTheDoKeyword.fs.bsl | 3 +- .../SynExprDynamicDoesContainIdent.fs.bsl | 3 +- ...ynExprDynamicDoesContainParentheses.fs.bsl | 3 +- ...rForContainsTheRangeOfTheEqualsSign.fs.bsl | 3 +- ...BangContainsTheRangeOfTheEqualsSign.fs.bsl | 2 +- ...LetOrUseContainsTheRangeOfInKeyword.fs.bsl | 3 +- ...seDoesNotContainTheRangeOfInKeyword.fs.bsl | 2 +- ...rsDoesNotContainTheRangeOfInKeyword.fs.bsl | 3 +- ...eBindingContainsTheRangeOfInKeyword.fs.bsl | 3 +- ...insTheRangeOfTheMatchAndWithKeyword.fs.bsl | 3 +- ...insTheRangeOfTheMatchAndWithKeyword.fs.bsl | 3 +- ...bjExprContainsTheRangeOfWithKeyword.fs.bsl | 3 +- .../Expression/SynExprObjWithSetter.fs.bsl | 3 +- ...OfTheEqualsSignInSynExprRecordField.fs.bsl | 3 +- ...dFieldsContainCorrectAmountOfTrivia.fs.bsl | 3 +- .../SynExprSetWithSynExprDynamic.fs.bsl | 3 +- ...tainsTheRangeOfTheTryAndWithKeyword.fs.bsl | 3 +- ...tainsTheRangeOfTheTryAndWithKeyword.fs.bsl | 3 +- .../Expression/Try - Finally 01.fs.bsl | 3 +- .../Expression/Try - Finally 02.fs.bsl | 3 +- .../Expression/Try - Finally 03.fs.bsl | 3 +- .../Expression/Try - Finally 04.fs.bsl | 3 +- .../Expression/Try - With 01.fs.bsl | 2 +- .../Expression/Try - With 02.fs.bsl | 2 +- .../Expression/Try - With 03.fs.bsl | 2 +- .../Expression/Try - With 04.fs.bsl | 2 +- .../Expression/Try - With 05.fs.bsl | 2 +- .../Expression/Try - With 06.fs.bsl | 2 +- .../Expression/Try - With 07.fs.bsl | 2 +- .../Expression/Try - With 08.fs.bsl | 2 +- .../Expression/Try - With 09.fs.bsl | 2 +- .../data/SyntaxTree/Expression/Try 01.fs.bsl | 3 +- .../data/SyntaxTree/Expression/Try 02.fs.bsl | 3 +- .../Try with - Missing expr 01.fs.bsl | 3 +- .../Try with - Missing expr 02.fs.bsl | 3 +- .../Try with - Missing expr 03.fs.bsl | 3 +- .../Try with - Missing expr 04.fs.bsl | 3 +- .../Try with - Missing expr 05.fs.bsl | 3 +- .../SyntaxTree/Expression/Try with 01.fs.bsl | 2 +- .../Expression/Tuple - Missing item 01.fs.bsl | 3 +- .../Expression/Tuple - Missing item 02.fs.bsl | 3 +- .../Expression/Tuple - Missing item 03.fs.bsl | 3 +- .../Expression/Tuple - Missing item 04.fs.bsl | 3 +- .../Expression/Tuple - Missing item 05.fs.bsl | 3 +- .../Expression/Tuple - Missing item 06.fs.bsl | 3 +- .../Expression/Tuple - Missing item 07.fs.bsl | 3 +- .../Expression/Tuple - Missing item 08.fs.bsl | 3 +- .../Expression/Tuple - Missing item 09.fs.bsl | 3 +- .../Expression/Tuple - Missing item 10.fs.bsl | 3 +- .../Expression/Tuple - Missing item 11.fs.bsl | 3 +- .../SyntaxTree/Expression/Tuple 01.fs.bsl | 3 +- .../SyntaxTree/Expression/Tuple 02.fs.bsl | 3 +- .../SyntaxTree/Expression/Type test 01.fs.bsl | 2 +- .../SyntaxTree/Expression/Type test 02.fs.bsl | 2 +- .../SyntaxTree/Expression/Type test 03.fs.bsl | 2 +- .../SyntaxTree/Expression/Type test 04.fs.bsl | 2 +- .../SyntaxTree/Expression/Typed 01.fs.bsl | 3 +- .../SyntaxTree/Expression/Typed 02.fs.bsl | 3 +- .../SyntaxTree/Expression/Typed 03.fs.bsl | 3 +- .../SyntaxTree/Expression/Typed 04.fs.bsl | 3 +- .../Expression/Unary - Reserved 01.fs.bsl | 3 +- .../Expression/Unary - Reserved 02.fs.bsl | 3 +- .../Unfinished escaped ident 01.fs.bsl | 3 +- .../Unfinished escaped ident 02.fs.bsl | 3 +- .../Unfinished escaped ident 03.fs.bsl | 3 +- .../SyntaxTree/Expression/Upcast 01.fs.bsl | 3 +- .../SyntaxTree/Expression/Upcast 02.fs.bsl | 3 +- .../SyntaxTree/Expression/Upcast 03.fs.bsl | 3 +- .../SyntaxTree/Expression/Upcast 04.fs.bsl | 3 +- .../SyntaxTree/Expression/Upcast 05.fs.bsl | 3 +- .../SyntaxTree/Expression/While 01.fs.bsl | 3 +- .../SyntaxTree/Expression/While 02.fs.bsl | 3 +- .../SyntaxTree/Expression/While 03.fs.bsl | 3 +- .../SyntaxTree/Expression/While 04.fs.bsl | 3 +- .../SyntaxTree/Expression/While 05.fs.bsl | 3 +- .../SyntaxTree/Expression/While 06.fs.bsl | 3 +- .../SyntaxTree/Expression/WhileBang 01.fs.bsl | 2 +- .../SyntaxTree/Expression/WhileBang 02.fs.bsl | 2 +- .../SyntaxTree/Expression/WhileBang 03.fs.bsl | 2 +- .../SyntaxTree/Expression/WhileBang 04.fs.bsl | 2 +- .../SyntaxTree/Expression/WhileBang 05.fs.bsl | 2 +- .../SyntaxTree/Expression/WhileBang 06.fs.bsl | 2 +- .../data/SyntaxTree/Extern/Extern 01.fs.bsl | 3 +- .../ExternKeywordIsPresentInTrivia.fs.bsl | 3 +- .../IfThenElse/Comment after else 01.fs.bsl | 3 +- .../IfThenElse/Comment after else 02.fs.bsl | 3 +- .../IfThenElse/DeeplyNestedIfThenElse.fs.bsl | 3 +- .../ElseKeywordInSimpleIfThenElse.fs.bsl | 3 +- .../IfThenElse/IfKeywordInIfThenElse.fs.bsl | 3 +- ...IfThenAndElseKeywordOnSeparateLines.fs.bsl | 3 +- .../IfThenElse/NestedElifInIfThenElse.fs.bsl | 3 +- .../NestedElseIfInIfThenElse.fs.bsl | 3 +- ...stedElseIfOnTheSameLineInIfThenElse.fs.bsl | 3 +- ...ComplexArgumentsLambdaHasArrowRange.fs.bsl | 3 +- .../DestructedLambdaHasArrowRange.fs.bsl | 3 +- ...rameterWithWildCardGivesCorrectBody.fs.bsl | 3 +- ...daWithTwoParametersGivesCorrectBody.fs.bsl | 3 +- ...thWildCardParameterGivesCorrectBody.fs.bsl | 3 +- ...dThatReturnsALambdaGivesCorrectBody.fs.bsl | 3 +- .../MultilineLambdaHasArrowRange.fs.bsl | 3 +- .../Lambda/Param - Missing type 01.fs.bsl | 3 +- .../Lambda/Param - Missing type 02.fs.bsl | 3 +- .../Lambda/Param - Missing type 03.fs.bsl | 3 +- .../Lambda/Param - Missing type 04.fs.bsl | 3 +- .../Lambda/SimpleLambdaHasArrowRange.fs.bsl | 3 +- .../Lambda/TupleInLambdaHasArrowRange.fs.bsl | 3 +- .../LeadingKeyword/AbstractKeyword.fs.bsl | 3 +- .../AbstractMemberKeyword.fs.bsl | 3 +- .../LeadingKeyword/AndKeyword.fs.bsl | 3 +- .../LeadingKeyword/DefaultKeyword.fsi.bsl | 3 +- .../LeadingKeyword/DefaultValKeyword.fs.bsl | 3 +- .../LeadingKeyword/DoKeyword.fs.bsl | 3 +- .../LeadingKeyword/DoStaticKeyword.fs.bsl | 3 +- .../LeadingKeyword/ExternKeyword.fs.bsl | 3 +- .../LeadingKeyword/LetKeyword.fs.bsl | 3 +- .../LeadingKeyword/LetRecKeyword.fs.bsl | 3 +- .../LeadingKeyword/MemberKeyword.fs.bsl | 3 +- .../LeadingKeyword/MemberValKeyword.fs.bsl | 3 +- .../LeadingKeyword/NewKeyword.fs.bsl | 3 +- .../LeadingKeyword/OverrideKeyword.fs.bsl | 3 +- .../LeadingKeyword/OverrideValKeyword.fs.bsl | 3 +- .../StaticAbstractKeyword.fs.bsl | 3 +- .../StaticAbstractMemberKeyword.fs.bsl | 3 +- .../LeadingKeyword/StaticLetKeyword.fs.bsl | 3 +- .../LeadingKeyword/StaticLetRecKeyword.fs.bsl | 3 +- .../LeadingKeyword/StaticMemberKeyword.fs.bsl | 3 +- .../StaticMemberValKeyword.fs.bsl | 3 +- .../LeadingKeyword/StaticValKeyword.fsi.bsl | 3 +- .../LeadingKeyword/SyntheticKeyword.fs.bsl | 3 +- .../LeadingKeyword/UseKeyword.fs.bsl | 3 +- .../LeadingKeyword/UseRecKeyword.fs.bsl | 3 +- .../LeadingKeyword/ValKeyword.fsi.bsl | 2 +- .../MatchClause/Missing expr 01.fs.bsl | 3 +- .../MatchClause/Missing expr 02.fs.bsl | 3 +- .../MatchClause/Missing expr 03.fs.bsl | 3 +- .../MatchClause/Missing expr 04.fs.bsl | 3 +- .../MatchClause/Missing expr 05.fs.bsl | 3 +- .../MatchClause/Missing pat 01.fs.bsl | 3 +- .../MatchClause/Missing pat 02.fs.bsl | 3 +- .../MatchClause/Missing pat 03.fs.bsl | 3 +- .../MatchClause/Missing pat 04.fs.bsl | 3 +- .../MatchClause/Missing pat 05.fs.bsl | 3 +- ...ingleSynMatchClauseInSynExprTryWith.fs.bsl | 3 +- .../RangeOfArrowInSynMatchClause.fs.bsl | 3 +- ...ArrowInSynMatchClauseWithWhenClause.fs.bsl | 3 +- ...ipleSynMatchClausesInSynExprTryWith.fs.bsl | 3 +- ...ASingleSynMatchClauseInSynExprMatch.fs.bsl | 3 +- ...ingleSynMatchClauseInSynExprTryWith.fs.bsl | 2 +- ...ltipleSynMatchClausesInSynExprMatch.fs.bsl | 2 +- .../RangeOfMultipleSynMatchClause.fs.bsl | 3 +- .../RangeOfSingleSynMatchClause.fs.bsl | 3 +- ...OfSingleSynMatchClauseFollowedByBar.fs.bsl | 3 +- .../SyntaxTree/Measure/Constant - 01.fs.bsl | 3 +- .../SyntaxTree/Measure/Constant - 02.fs.bsl | 3 +- .../SyntaxTree/Measure/Constant - 03.fs.bsl | 3 +- .../SyntaxTree/Measure/Constant - 04.fs.bsl | 3 +- .../SyntaxTree/Measure/Constant - 05.fs.bsl | 3 +- .../SyntaxTree/Measure/Constant - 06.fs.bsl | 3 +- .../SyntaxTree/Measure/Constant - 07.fs.bsl | 3 +- .../SyntaxTree/Measure/Constant - 08.fs.bsl | 3 +- .../SyntaxTree/Measure/Constant - 09.fs.bsl | 3 +- .../SyntaxTree/Measure/Constant - 10.fs.bsl | 3 +- ...easureContainsTheRangeOfTheConstant.fs.bsl | 3 +- .../SynMeasureParenHasCorrectRange.fs.bsl | 3 +- ...eTupleInMeasureTypeWithLeadingSlash.fs.bsl | 3 +- ...TypeTupleInMeasureTypeWithNoSlashes.fs.bsl | 3 +- ...TupleInMeasureTypeWithStartAndSlash.fs.bsl | 3 +- .../Member/Abstract - Property 01.fs.bsl | 3 +- .../Member/Abstract - Property 02.fs.bsl | 3 +- .../Member/Abstract - Property 03.fs.bsl | 3 +- .../Member/Abstract - Property 04.fs.bsl | 3 +- .../Member/Abstract - Property 05.fs.bsl | 3 +- .../SyntaxTree/Member/Auto property 01.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 02.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 03.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 04.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 05.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 06.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 07.fs.bsl | 3 +- .../SyntaxTree/Member/Auto property 08.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 09.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 10.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 11.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 12.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 13.fs.bsl | 2 +- .../SyntaxTree/Member/Auto property 14.fs.bsl | 3 +- .../SyntaxTree/Member/Auto property 15.fs.bsl | 3 +- .../data/SyntaxTree/Member/Do 01.fs.bsl | 3 +- .../data/SyntaxTree/Member/Do 02.fs.bsl | 3 +- .../data/SyntaxTree/Member/Do 03.fs.bsl | 3 +- .../data/SyntaxTree/Member/Do 04.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 01.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 02.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 03.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 04.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 05.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 06.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 07.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 08.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 09.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 10.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 11.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 12.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 13.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 14.fs.bsl | 3 +- .../data/SyntaxTree/Member/Field 15.fs.bsl | 3 +- .../SyntaxTree/Member/GetSetMember 01.fs.bsl | 3 +- .../GetSetMemberWithInlineKeyword.fs.bsl | 3 +- .../Implicit ctor - Missing type 01.fs.bsl | 3 +- .../Implicit ctor - Missing type 02.fs.bsl | 3 +- .../Implicit ctor - Pat - Tuple 01.fs.bsl | 3 +- .../Implicit ctor - Pat - Tuple 02.fs.bsl | 3 +- .../Implicit ctor - Type - Fun 01.fs.bsl | 3 +- .../Implicit ctor - Type - Fun 02.fs.bsl | 3 +- .../Implicit ctor - Type - Fun 03.fs.bsl | 3 +- .../Implicit ctor - Type - Fun 04.fs.bsl | 3 +- .../Implicit ctor - Type - Fun 05.fs.bsl | 3 +- .../Implicit ctor - Type - Fun 06.fs.bsl | 3 +- .../Implicit ctor - Type - Tuple 01.fs.bsl | 3 +- .../Implicit ctor - Type - Tuple 02.fs.bsl | 3 +- .../Implicit ctor - Type - Tuple 03.fs.bsl | 3 +- .../Implicit ctor - Type - Tuple 04.fs.bsl | 3 +- .../Implicit ctor - Type - Tuple 05.fs.bsl | 3 +- .../Member/ImplicitCtorWithAsKeyword.fs.bsl | 3 +- .../data/SyntaxTree/Member/Inherit 01.fs.bsl | 3 +- .../data/SyntaxTree/Member/Inherit 02.fs.bsl | 3 +- .../data/SyntaxTree/Member/Inherit 03.fs.bsl | 3 +- .../data/SyntaxTree/Member/Inherit 04.fs.bsl | 3 +- .../data/SyntaxTree/Member/Inherit 05.fs.bsl | 3 +- .../data/SyntaxTree/Member/Inherit 06.fsi.bsl | 3 +- .../data/SyntaxTree/Member/Inherit 07.fsi.bsl | 3 +- .../data/SyntaxTree/Member/Inherit 08.fs.bsl | 3 +- .../SyntaxTree/Member/Interface 01.fs.bsl | 3 +- .../SyntaxTree/Member/Interface 02.fs.bsl | 3 +- .../SyntaxTree/Member/Interface 03.fs.bsl | 3 +- .../SyntaxTree/Member/Interface 04.fs.bsl | 3 +- .../SyntaxTree/Member/Interface 05.fs.bsl | 3 +- .../SyntaxTree/Member/Interface 06.fs.bsl | 3 +- .../SyntaxTree/Member/Interface 07.fs.bsl | 3 +- .../SyntaxTree/Member/Interface 08.fs.bsl | 3 +- .../SyntaxTree/Member/Interface 09.fs.bsl | 3 +- .../SyntaxTree/Member/Interface 10.fs.bsl | 3 +- .../data/SyntaxTree/Member/Let 01.fs.bsl | 3 +- .../data/SyntaxTree/Member/Let 02.fs.bsl | 3 +- .../data/SyntaxTree/Member/Let 03.fs.bsl | 3 +- .../data/SyntaxTree/Member/Let 04.fs.bsl | 3 +- .../Member/Member - Attributes 01.fs.bsl | 3 +- .../Member - Param - Missing type 01.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 01.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 02.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 03.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 04.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 05.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 06.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 07.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 08.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 09.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 10.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 11.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 12.fs.bsl | 3 +- .../data/SyntaxTree/Member/Member 13.fs.bsl | 3 +- .../Member/MemberMispelledToMeme.fs.bsl | 3 +- .../Member/MemberWithInlineKeyword.fs.bsl | 3 +- ...berContainsTheRangeOfTheWithKeyword.fs.bsl | 3 +- ...berContainsTheRangeOfTheWithKeyword.fs.bsl | 3 +- .../Member/SignatureMemberWithGet.fsi.bsl | 3 +- .../Member/SignatureMemberWithSet.fsi.bsl | 3 +- .../Member/SignatureMemberWithSetget.fsi.bsl | 2 +- .../data/SyntaxTree/Member/Static 01.fs.bsl | 3 +- .../data/SyntaxTree/Member/Static 02.fs.bsl | 3 +- .../data/SyntaxTree/Member/Static 03.fs.bsl | 3 +- ...lotContainsTheRangeOfTheWithKeyword.fs.bsl | 3 +- ...ertyContainsTheRangeOfTheEqualsSign.fs.bsl | 3 +- ...rtyContainsTheRangeOfTheWithKeyword.fs.bsl | 3 +- ...eDefnWithMemberWithGetHasXmlComment.fs.bsl | 3 +- .../SynTypeDefnWithMemberWithSetget.fs.bsl | 3 +- ...nTypeDefnWithStaticMemberWithGetset.fs.bsl | 3 +- ...berContainsTheRangeOfTheWithKeyword.fs.bsl | 3 +- ...ynExprObjMembersHaveCorrectKeywords.fs.bsl | 3 +- ...erDefnAbstractSlotHasCorrectKeyword.fs.bsl | 3 +- ...erDefnAutoPropertyHasCorrectKeyword.fs.bsl | 3 +- ...fnMemberSynValDataHasCorrectKeyword.fs.bsl | 3 +- ...nMemberSigMemberHasCorrectKeywords.fsi.bsl | 3 +- .../data/SyntaxTree/ModuleMember/Do 01.fs.bsl | 3 +- .../data/SyntaxTree/ModuleMember/Do 02.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Let 01.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Let 02.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Let 03.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Let 04.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Let 05.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Open 01.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Open 02.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Open 03.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Open 04.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Open 05.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Open 06.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Open 07.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Open 08.fs.bsl | 3 +- .../SyntaxTree/ModuleMember/Val 01.fsi.bsl | 3 +- .../ModuleOrNamespace/Anon module 01.fs.bsl | 3 +- .../ModuleOrNamespace/Anon module 02.fsx.bsl | 3 +- ...eRangeShouldStartAtNamespaceKeyword.fs.bsl | 3 +- ...GlobalInOpenPathShouldContainTrivia.fs.bsl | 3 +- ...espaceShouldStartAtNamespaceKeyword.fs.bsl | 3 +- .../Module - Attribute 01.fs.bsl | 3 +- .../ModuleOrNamespace/Module 01.fs.bsl | 3 +- .../ModuleOrNamespace/Module 02.fs.bsl | 3 +- .../ModuleOrNamespace/Module 03.fs.bsl | 3 +- .../ModuleOrNamespace/Module 04.fs.bsl | 3 +- .../ModuleOrNamespace/Module 05.fs.bsl | 2 +- .../ModuleOrNamespace/Module 06.fs.bsl | 2 +- .../ModuleOrNamespace/Module 07.fs.bsl | 2 +- .../ModuleShouldContainModuleKeyword.fs.bsl | 3 +- ...angeThatStartsAtTheNamespaceKeyword.fs.bsl | 3 +- .../ModuleOrNamespace/Namespace 01.fs.bsl | 3 +- .../ModuleOrNamespace/Namespace 02.fs.bsl | 3 +- .../ModuleOrNamespace/Namespace 03.fs.bsl | 3 +- .../ModuleOrNamespace/Namespace 04.fs.bsl | 3 +- .../ModuleOrNamespace/Namespace 05.fs.bsl | 3 +- .../ModuleOrNamespace/Namespace 06.fs.bsl | 3 +- .../ModuleOrNamespace/Namespace 07.fs.bsl | 3 +- .../ModuleOrNamespace/Namespace 08.fs.bsl | 3 +- .../ModuleOrNamespace/Namespace 09.fs.bsl | 3 +- ...espaceShouldContainNamespaceKeyword.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 01.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 02.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 03.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 04.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 05.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 06.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 07.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 08.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 09.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 10.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 11.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 12.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 13.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 14.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 15.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 16.fs.bsl | 3 +- .../ModuleOrNamespace/Nested module 17.fs.bsl | 3 +- ...spaceShouldStartAtNamespaceKeyword.fsi.bsl | 3 +- .../ModuleAbbreviation.fsi.bsl | 3 +- ...leRangeShouldStartAtFirstAttribute.fsi.bsl | 3 +- .../ModuleShouldContainModuleKeyword.fsi.bsl | 3 +- .../Namespace - Keyword 01.fsi.bsl | 3 +- .../Nested module 01.fsi.bsl | 3 +- ...urnsRangeOfSynModuleOrNamespaceSig.fsi.bsl | 2 +- ...leteNestedModuleSigShouldBePresent.fsi.bsl | 3 +- .../NestedModuleWithBeginEndAndDecls.fs.bsl | 3 +- .../NestedModuleWithBeginEndAndDecls.fsi.bsl | 3 +- ...IncludedInSynModuleDeclNestedModule.fs.bsl | 3 +- ...udedInSynModuleSigDeclNestedModule.fsi.bsl | 3 +- .../NestedModule/RangeOfBeginEnd.fs.bsl | 3 +- .../NestedModule/RangeOfBeginEnd.fsi.bsl | 3 +- .../RangeOfEqualSignShouldBePresent.fs.bsl | 3 +- ...alSignShouldBePresentSignatureFile.fsi.bsl | 3 +- ...ShouldEndAtTheLastSynModuleSigDecl.fsi.bsl | 2 +- .../Nullness/AbstractClassProperty.fs.bsl | 3 +- .../Nullness/DuCaseStringOrNull.fs.bsl | 3 +- .../Nullness/DuCaseTuplePrecedence.fs.bsl | 3 +- .../SyntaxTree/Nullness/ExplicitField.fs.bsl | 3 +- .../FunctionArgAsPatternWithNullCase.fs.bsl | 3 +- ...ericFunctionReturnTypeNotStructNull.fs.bsl | 3 +- .../GenericFunctionTyparNotNull.fs.bsl | 3 +- .../Nullness/GenericFunctionTyparNull.fs.bsl | 3 +- .../Nullness/GenericTypeNotNull.fs.bsl | 3 +- ...enericTypeNotNullAndOtherConstraint.fs.bsl | 3 +- ...tAndOtherConstraint-I_am_Still_Sane.fs.bsl | 3 +- .../Nullness/GenericTypeNull.fs.bsl | 3 +- ...icTypeOtherConstraintAndThenNotNull.fs.bsl | 3 +- .../SyntaxTree/Nullness/IntListOrNull.fs.bsl | 3 +- .../Nullness/IntListOrNullOrNullOrNull.fs.bsl | 3 +- .../Nullness/MatchWithTypeCast.fs.bsl | 3 +- .../Nullness/MatchWithTypeCastParens.fs.bsl | 3 +- ...thTypeCastParensAndSeparateNullCase.fs.bsl | 3 +- .../Nullness/NullAnnotatedExpression.fs.bsl | 3 +- ...gressionAnnotatedInlinePatternMatch.fs.bsl | 3 +- .../Nullness/RegressionChoiceType.fs.bsl | 3 +- .../Nullness/RegressionListType.fs.bsl | 3 +- .../RegressionOneLinerOptionType.fs.bsl | 3 +- .../Nullness/RegressionOptionType.fs.bsl | 3 +- .../Nullness/RegressionOrPattern.fs.bsl | 3 +- .../Nullness/RegressionResultType.fs.bsl | 3 +- .../Nullness/SignatureInAbstractMember.fs.bsl | 3 +- .../SyntaxTree/Nullness/StringOrNull.fs.bsl | 3 +- .../Nullness/StringOrNullInFunctionArg.fs.bsl | 3 +- .../TypeAbbreviationAddingWithNull.fs.bsl | 3 +- .../OperatorName/ActivePatternAnd 01.fs.bsl | 3 +- .../OperatorName/ActivePatternAnd 02.fs.bsl | 3 +- .../OperatorName/ActivePatternAnd 03.fs.bsl | 3 +- .../OperatorName/ActivePatternAnd 04.fs.bsl | 3 +- .../OperatorName/ActivePatternAnd 05.fs.bsl | 3 +- .../OperatorName/ActivePatternAnd 06.fs.bsl | 3 +- .../OperatorName/ActivePatternAnd 07.fs.bsl | 3 +- .../OperatorName/ActivePatternAnd 08.fs.bsl | 3 +- .../ActivePatternAsFunction.fs.bsl | 3 +- .../ActivePatternDefinition.fs.bsl | 3 +- .../ActivePatternExceptionAnd 01.fs.bsl | 3 +- .../ActivePatternExceptionAnd 02.fs.bsl | 3 +- .../ActivePatternExceptionAnd 03.fs.bsl | 3 +- .../ActivePatternExceptionAnd 04.fs.bsl | 3 +- .../ActivePatternExceptionAnd 05.fs.bsl | 3 +- .../ActivePatternExceptionAnd 06.fs.bsl | 3 +- .../ActivePatternExceptionAnd 07.fs.bsl | 3 +- .../ActivePatternExceptionAnd 08.fs.bsl | 3 +- ...ivePatternIdentifierInPrivateMember.fs.bsl | 3 +- .../CustomOperatorDefinition.fs.bsl | 3 +- ...tDifferenceBetweenCompiledOperators.fs.bsl | 3 +- .../OperatorName/InfixOperation.fs.bsl | 3 +- .../OperatorName/NamedParameter.fs.bsl | 3 +- .../OperatorName/NameofOperator.fs.bsl | 3 +- .../ObjectModelWithTwoMembers.fs.bsl | 3 +- .../OperatorName/OperatorAsFunction.fs.bsl | 3 +- .../OperatorInMemberDefinition.fs.bsl | 3 +- .../OperatorNameInSynValSig.fsi.bsl | 3 +- .../OperatorNameInValConstraint.fsi.bsl | 3 +- .../OperatorName/OptionalExpression.fs.bsl | 3 +- .../PartialActivePatternAsFunction.fs.bsl | 3 +- .../PartialActivePatternDefinition.fs.bsl | 3 +- ...ePatternDefinitionWithoutParameters.fs.bsl | 3 +- .../OperatorName/PrefixOperation.fs.bsl | 3 +- .../PrefixOperationWithTwoCharacters.fs.bsl | 3 +- .../QualifiedOperatorExpression.fs.bsl | 3 +- ...StringAsParsedHashDirectiveArgument.fs.bsl | 2 +- ...tifierAsParsedHashDirectiveArgument.fs.bsl | 3 +- ...StringAsParsedHashDirectiveArgument.fs.bsl | 13 +- ...StringAsParsedHashDirectiveArgument.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/And 01.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/And 02.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/And 03.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/And 04.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 01.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 02.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 03.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 04.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 05.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 06.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 07.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 08.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 09.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 10.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 11.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/As 12.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Cons 01.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Cons 02.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Cons 03.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Cons 04.fs.bsl | 3 +- .../SyntaxTree/Pattern/InHeadPattern.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/IsInst 01.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/IsInst 02.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/IsInst 03.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/IsInst 04.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/IsInst 05.fs.bsl | 3 +- .../SyntaxTree/Pattern/Named field 01.fs.bsl | 2 +- .../SyntaxTree/Pattern/Named field 02.fs.bsl | 2 +- .../SyntaxTree/Pattern/Named field 03.fs.bsl | 2 +- .../SyntaxTree/Pattern/Named field 04.fs.bsl | 2 +- .../SyntaxTree/Pattern/Named field 05.fs.bsl | 2 +- .../Pattern/OperatorInMatchPattern.fs.bsl | 3 +- .../Pattern/OperatorInSynPatLongIdent.fs.bsl | 3 +- ...ParenthesesOfSynArgPatsNamePatPairs.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Record 01.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Record 02.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Record 03.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Record 04.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Record 05.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Record 06.fs.bsl | 3 +- ...airsContainsTheRangeOfTheEqualsSign.fs.bsl | 3 +- .../SynPatOrContainsTheRangeOfTheBar.fs.bsl | 3 +- .../Pattern/Tuple - HeadPat 01.fs.bsl | 3 +- .../Pattern/Tuple - HeadPat 02.fs.bsl | 3 +- .../Pattern/Tuple - Recover 01.fs.bsl | 3 +- .../Pattern/Tuple - Recover 02.fs.bsl | 3 +- .../Pattern/Tuple - Recover 03.fs.bsl | 3 +- .../Pattern/Tuple - Recover 04.fs.bsl | 3 +- .../Pattern/Tuple - Struct 01.fs.bsl | 2 +- .../Pattern/Typed - Missing type 01.fs.bsl | 3 +- .../Pattern/Typed - Missing type 02.fs.bsl | 3 +- .../Pattern/Typed - Missing type 03.fs.bsl | 3 +- .../Pattern/Typed - Missing type 04.fs.bsl | 3 +- .../Pattern/Typed - Missing type 05.fs.bsl | 3 +- .../Pattern/Typed - Missing type 06.fs.bsl | 3 +- .../Pattern/Typed - Missing type 07.fs.bsl | 3 +- .../Pattern/Typed - Missing type 08.fs.bsl | 3 +- .../Pattern/Typed - Missing type 09.fs.bsl | 3 +- .../Pattern/Typed - Missing type 10.fs.bsl | 3 +- .../Pattern/Typed - Missing type 11.fs.bsl | 3 +- .../Pattern/Typed - Missing type 12.fs.bsl | 3 +- ...alsTokenIsPresentInSynValSigMember.fsi.bsl | 3 +- ...ualsTokenIsPresentInSynValSigValue.fsi.bsl | 3 +- .../LeadingKeywordInRecursiveTypes.fsi.bsl | 3 +- ...ldContainsTheRangeOfTheWithKeyword.fsi.bsl | 2 +- ...dTypeHasStaticTypeAsLeadingKeyword.fsi.bsl | 3 +- ...xceptionDefnReprAndSynExceptionSig.fsi.bsl | 3 +- ...teShouldBeIncludedInSynTypeDefnSig.fsi.bsl | 2 +- ...uldBeIncludedInSynValSpfnAndMember.fsi.bsl | 3 +- ...esShouldBeIncludedInRecursiveTypes.fsi.bsl | 2 +- ...ionSigAndSynModuleSigDeclException.fsi.bsl | 3 +- ...fnSigDelegateOfShouldStartFromName.fsi.bsl | 2 +- ...igObjectModelShouldEndAtLastMember.fsi.bsl | 3 +- ...DefnSigRecordShouldEndAtLastMember.fsi.bsl | 2 +- ...ypeDefnSigSimpleShouldEndAtLastVal.fsi.bsl | 3 +- .../RangeOfTypeShouldEndAtEndKeyword.fsi.bsl | 3 +- ...ldContainsTheRangeOfTheWithKeyword.fsi.bsl | 3 +- ...numContainsTheRangeOfTheEqualsSign.fsi.bsl | 3 +- ...assContainsTheRangeOfTheEqualsSign.fsi.bsl | 2 +- ...ateContainsTheRangeOfTheEqualsSign.fsi.bsl | 2 +- ...ionContainsTheRangeOfTheEqualsSign.fsi.bsl | 3 +- .../SynValSigContainsParameterNames.fsi.bsl | 3 +- .../TriviaIsPresentInSynTypeDefnSig.fsi.bsl | 3 +- .../ValKeywordIsPresentInSynValSig.fsi.bsl | 3 +- .../SyntaxTree/SignatureType/With 01.fsi.bsl | 3 +- .../SimplePats/SimplePats - Recover 01.fs.bsl | 3 +- .../SimplePats/SimplePats 01.fs.bsl | 3 +- .../SimplePats/SimplePats 02.fs.bsl | 3 +- .../SyntaxTree/SourceIdentifier/_LINE_.fs.bsl | 2 +- .../SourceIdentifier/_SOURCEDIRECTORY_.fs.bsl | 3 +- .../SourceIdentifier/_SOURCEFILE_.fs.bsl | 3 +- .../InterpolatedStringOffsideInModule.fs.bsl | 3 +- ...nterpolatedStringOffsideInNestedLet.fs.bsl | 3 +- ...stBytesWithSynByteStringKindRegular.fs.bsl | 3 +- ...tBytesWithSynByteStringKindVerbatim.fs.bsl | 3 +- ...ConstStringWithSynStringKindRegular.fs.bsl | 3 +- ...tStringWithSynStringKindTripleQuote.fs.bsl | 3 +- ...onstStringWithSynStringKindVerbatim.fs.bsl | 3 +- ...latedStringWithSynStringKindRegular.fs.bsl | 2 +- ...dStringWithSynStringKindTripleQuote.fs.bsl | 3 +- ...atedStringWithSynStringKindVerbatim.fs.bsl | 2 +- ...tringWithTripleQuoteMultipleDollars.fs.bsl | 3 +- ...ringWithTripleQuoteMultipleDollars2.fs.bsl | 3 +- .../SynIdent/IncompleteLongIdent 01.fs.bsl | 3 +- .../SynIdent/IncompleteLongIdent 02.fs.bsl | 3 +- .../Constraint intersection 01.fs.bsl | 3 +- .../SynType/Constraint intersection 01.fs.bsl | 3 +- .../SynType/Constraint intersection 02.fs.bsl | 3 +- .../SynType/Constraint intersection 03.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Div 01.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Div 02.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Div 03.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Div 04.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Div 05.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Div 06.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Fun 01.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Fun 02.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Fun 03.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Fun 04.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Fun 05.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Fun 06.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Fun 07.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Fun 08.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Fun 09.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Fun 10.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Named 01.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Named 02.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Named 03.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Named 04.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Named 05.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Named 06.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Named 07.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Named 08.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Named 09.fs.bsl | 3 +- ...stedSynTypeOrInsideSynExprTraitCall.fs.bsl | 3 +- ...SingleSynTypeInsideSynExprTraitCall.fs.bsl | 3 +- .../SynTypeOrInsideSynExprTraitCall.fs.bsl | 3 +- ...eConstraintWhereTyparSupportsMember.fs.bsl | 3 +- ...TypeOrWithAppTypeOnTheRightHandSide.fs.bsl | 3 +- ...sIncludeLeadingParameterAttributes.fsi.bsl | 2 +- ...pleDoesIncludeLeadingParameterName.fsi.bsl | 3 +- .../SynType/Tuple - Nested 01.fs.bsl | 3 +- .../SynType/Tuple - Nested 02.fs.bsl | 3 +- .../SynType/Tuple - Nested 03.fs.bsl | 3 +- .../SynType/Tuple - Nested 04.fs.bsl | 3 +- .../SynType/Tuple - Nested 05.fs.bsl | 3 +- .../SynType/Tuple - Nested 06.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 01.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 02.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 03.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 04.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 05.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 06.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 07.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 08.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 09.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 10.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 11.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 12.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 13.fs.bsl | 3 +- .../data/SyntaxTree/SynType/Tuple 14.fs.bsl | 3 +- .../SyntaxTree/Type/Abbreviation 01.fs.bsl | 3 +- .../SyntaxTree/Type/Abbreviation 02.fs.bsl | 3 +- .../SyntaxTree/Type/Abbreviation 03.fs.bsl | 3 +- .../SyntaxTree/Type/Abbreviation 04.fs.bsl | 3 +- .../data/SyntaxTree/Type/And 01.fs.bsl | 3 +- .../data/SyntaxTree/Type/And 02.fs.bsl | 3 +- .../data/SyntaxTree/Type/And 03.fs.bsl | 3 +- .../data/SyntaxTree/Type/And 04.fs.bsl | 3 +- .../data/SyntaxTree/Type/And 05.fs.bsl | 3 +- .../data/SyntaxTree/Type/And 06.fs.bsl | 3 +- .../service/data/SyntaxTree/Type/As 01.fs.bsl | 3 +- .../service/data/SyntaxTree/Type/As 02.fs.bsl | 3 +- .../service/data/SyntaxTree/Type/As 03.fs.bsl | 3 +- .../service/data/SyntaxTree/Type/As 04.fs.bsl | 3 +- .../service/data/SyntaxTree/Type/As 05.fs.bsl | 3 +- .../service/data/SyntaxTree/Type/As 06.fs.bsl | 3 +- .../service/data/SyntaxTree/Type/As 07.fs.bsl | 3 +- .../service/data/SyntaxTree/Type/As 08.fs.bsl | 3 +- ...butesInOptionalNamedMemberParameter.fs.bsl | 3 +- .../data/SyntaxTree/Type/Class 01.fs.bsl | 3 +- .../data/SyntaxTree/Type/Class 02.fs.bsl | 3 +- .../data/SyntaxTree/Type/Class 03.fs.bsl | 3 +- .../data/SyntaxTree/Type/Class 04.fs.bsl | 3 +- .../data/SyntaxTree/Type/Class 05.fs.bsl | 3 +- .../data/SyntaxTree/Type/Enum 01.fs.bsl | 3 +- .../data/SyntaxTree/Type/Enum 02.fs.bsl | 3 +- .../data/SyntaxTree/Type/Enum 03.fs.bsl | 3 +- .../data/SyntaxTree/Type/Enum 04.fs.bsl | 3 +- .../data/SyntaxTree/Type/Enum 05.fs.bsl | 3 +- .../data/SyntaxTree/Type/Enum 06.fs.bsl | 3 +- .../data/SyntaxTree/Type/Enum 07 - Eof.fs.bsl | 3 +- .../data/SyntaxTree/Type/Enum 08 - Eof.fs.bsl | 3 +- .../data/SyntaxTree/Type/Enum 09 - Eof.fs.bsl | 3 +- .../data/SyntaxTree/Type/Enum 10 - Eof.fs.bsl | 3 +- .../data/SyntaxTree/Type/Interface 01.fs.bsl | 3 +- .../data/SyntaxTree/Type/Interface 02.fs.bsl | 3 +- .../data/SyntaxTree/Type/Interface 03.fs.bsl | 3 +- .../data/SyntaxTree/Type/Interface 04.fs.bsl | 3 +- .../data/SyntaxTree/Type/Interface 05.fs.bsl | 2 +- .../data/SyntaxTree/Type/Interface 06.fs.bsl | 2 +- .../data/SyntaxTree/Type/Interface 07.fs.bsl | 3 +- ...eSynEnumCaseContainsRangeOfConstant.fs.bsl | 3 +- .../Type/NamedParametersInDelegateType.fs.bsl | 3 +- ...edTypeHasStaticTypeAsLeadingKeyword.fs.bsl | 3 +- .../SyntaxTree/Type/Primary ctor 01.fs.bsl | 3 +- .../SyntaxTree/Type/Primary ctor 02.fs.bsl | 3 +- .../SyntaxTree/Type/Primary ctor 03.fs.bsl | 3 +- .../SyntaxTree/Type/Primary ctor 04.fs.bsl | 3 +- .../SyntaxTree/Type/Primary ctor 05.fs.bsl | 3 +- ...ributeShouldBeIncludedInSynTypeDefn.fs.bsl | 3 +- ...tesShouldBeIncludedInRecursiveTypes.fs.bsl | 2 +- .../SyntaxTree/Type/Record - Access 01.fs.bsl | 2 +- .../SyntaxTree/Type/Record - Access 02.fs.bsl | 2 +- .../SyntaxTree/Type/Record - Access 03.fs.bsl | 2 +- .../SyntaxTree/Type/Record - Access 04.fs.bsl | 2 +- .../Type/Record - Mutable 01.fs.bsl | 2 +- .../Type/Record - Mutable 02.fs.bsl | 2 +- .../Type/Record - Mutable 03.fs.bsl | 2 +- .../Type/Record - Mutable 04.fs.bsl | 2 +- .../Type/Record - Mutable 05.fs.bsl | 2 +- .../data/SyntaxTree/Type/Record 01.fs.bsl | 3 +- .../data/SyntaxTree/Type/Record 02.fs.bsl | 3 +- .../data/SyntaxTree/Type/Record 03.fs.bsl | 3 +- .../data/SyntaxTree/Type/Record 04.fs.bsl | 3 +- .../data/SyntaxTree/Type/Record 05.fs.bsl | 3 +- ...eSynEnumCaseContainsRangeOfConstant.fs.bsl | 3 +- .../data/SyntaxTree/Type/Struct 01.fs.bsl | 3 +- .../data/SyntaxTree/Type/Struct 02.fs.bsl | 3 +- ...aceContainsTheRangeOfTheWithKeyword.fs.bsl | 3 +- ...uteContainsTheRangeOfTheTypeKeyword.fs.bsl | 3 +- ...ionContainsTheRangeOfTheWithKeyword.fs.bsl | 3 +- ...EnumContainsTheRangeOfTheEqualsSign.fs.bsl | 2 +- ...gateContainsTheRangeOfTheEqualsSign.fs.bsl | 2 +- ...ordContainsTheRangeOfTheWithKeyword.fs.bsl | 3 +- ...nionContainsTheRangeOfTheEqualsSign.fs.bsl | 3 +- ...DocContainsTheRangeOfTheTypeKeyword.fs.bsl | 3 +- .../Type/SynTypeFunHasRangeOfArrow.fs.bsl | 3 +- .../Type/SynTypeTupleWithStruct.fs.bsl | 3 +- .../SynTypeTupleWithStructRecovery.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 01.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 02.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 03.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 04.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 05.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 06.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 07.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 08.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 09.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 10.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 11.fs.bsl | 3 +- .../data/SyntaxTree/Type/Type 12.fs.bsl | 3 +- .../SyntaxTree/Type/Union - Field 01.fs.bsl | 2 +- .../SyntaxTree/Type/Union - Field 02.fs.bsl | 2 +- .../SyntaxTree/Type/Union - Field 03.fs.bsl | 2 +- .../data/SyntaxTree/Type/Union 01.fs.bsl | 3 +- .../data/SyntaxTree/Type/Union 02.fs.bsl | 3 +- .../data/SyntaxTree/Type/Union 03.fs.bsl | 3 +- .../data/SyntaxTree/Type/Union 04.fs.bsl | 3 +- .../data/SyntaxTree/Type/Union 05.fs.bsl | 3 +- .../data/SyntaxTree/Type/Union 06.fs.bsl | 3 +- .../data/SyntaxTree/Type/Union 07.fs.bsl | 3 +- .../data/SyntaxTree/Type/With 01.fs.bsl | 3 +- .../data/SyntaxTree/Type/With 02.fs.bsl | 3 +- .../data/SyntaxTree/Type/With 03.fs.bsl | 3 +- .../data/SyntaxTree/Type/With 04.fs.bsl | 3 +- .../data/SyntaxTree/Type/With 05.fs.bsl | 3 +- .../UnionCase/Missing keyword of.fs.bsl | 3 +- .../UnionCase/Missing name 01.fs.bsl | 3 +- .../UnionCase/Missing name 02.fs.bsl | 3 +- .../UnionCase/Missing name 03.fs.bsl | 3 +- .../UnionCase/Missing name 04.fs.bsl | 3 +- .../UnionCase/Missing name 05.fs.bsl | 3 +- .../UnionCase/Missing name 06.fs.bsl | 3 +- .../UnionCase/Missing name 07.fs.bsl | 3 +- .../UnionCase/Missing name 08.fs.bsl | 3 +- .../UnionCase/Missing name 09.fs.bsl | 3 +- .../MultipleSynUnionCasesHaveBarRange.fs.bsl | 3 +- .../UnionCase/PrivateKeywordHasRange.fs.bsl | 3 +- .../UnionCase/Recover Function Type 01.fs.bsl | 3 +- .../UnionCase/Recover Function Type 02.fs.bsl | 3 +- .../UnionCase/Recover Function Type 03.fs.bsl | 3 +- .../SingleSynUnionCaseHasBarRange.fs.bsl | 3 +- .../SingleSynUnionCaseWithoutBar.fs.bsl | 3 +- .../UnionCase/SynUnionCaseKindFullType.fs.bsl | 3 +- .../UnionCaseFieldsCanHaveComments.fs.bsl | 3 +- .../data/SyntaxTree/Val/InlineKeyword.fsi.bsl | 3 +- .../data/SyntaxTree/WarnScope/WarnScope.fs | 4 + .../SyntaxTree/WarnScope/WarnScope.fs.bsl | 12 + .../WarnScope/WarnScopeInSubmodule.fs | 7 + .../WarnScope/WarnScopeInSubmodule.fs.bsl | 22 + .../Tests.LanguageService.ErrorList.fs | 2 +- .../Tests.LanguageService.Script.fs | 5 +- 987 files changed, 3474 insertions(+), 1648 deletions(-) create mode 100644 src/Compiler/SyntaxTree/WarnScopes.fs create mode 100644 src/Compiler/SyntaxTree/WarnScopes.fsi create mode 100644 tests/FSharp.Compiler.ComponentTests/CompilerDirectives/Nowarn.fs mode change 100755 => 100644 tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl mode change 100755 => 100644 tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl create mode 100644 tests/FSharp.Compiler.Service.Tests/WarnScopeTests.fs create mode 100644 tests/service/data/SyntaxTree/WarnScope/WarnScope.fs create mode 100644 tests/service/data/SyntaxTree/WarnScope/WarnScope.fs.bsl create mode 100644 tests/service/data/SyntaxTree/WarnScope/WarnScopeInSubmodule.fs create mode 100644 tests/service/data/SyntaxTree/WarnScope/WarnScopeInSubmodule.fs.bsl diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index 52cf5eb8350..14bb14be5a3 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -43,7 +43,7 @@ * Add a switch to determine whether to generate a default implementation body for overridden method when completing. [PR #18341](https://github.com/dotnet/fsharp/pull/18341) * Use a more accurate range for CE Combine methods. [PR #18394](https://github.com/dotnet/fsharp/pull/18394) * Enable TypeSubsumptionCache for IDE use. [PR #18499](https://github.com/dotnet/fsharp/pull/18499) - +* Scoped Nowarn: Add the #warnon compiler directive ([Language suggestion #278](https://github.com/fsharp/fslang-suggestions/issues/278), [RFC FS-1146 PR](https://github.com/fsharp/fslang-design/pull/782), [PR #18049](https://github.com/dotnet/fsharp/pull/18049)) ### Changed * FSharpCheckFileResults.ProjectContext.ProjectOptions will not be available when using the experimental Transparent Compiler feature. ([PR #18205](https://github.com/dotnet/fsharp/pull/18205)) diff --git a/docs/release-notes/.Language/preview.md b/docs/release-notes/.Language/preview.md index d1576a84eca..4a420016a14 100644 --- a/docs/release-notes/.Language/preview.md +++ b/docs/release-notes/.Language/preview.md @@ -6,6 +6,7 @@ * Support ValueOption + Struct attribute as optional parameter for methods ([Language suggestion #1136](https://github.com/fsharp/fslang-suggestions/issues/1136), [PR #18098](https://github.com/dotnet/fsharp/pull/18098)) * Allow `_` in `use!` bindings values (lift FS1228 restriction) ([PR #18487](https://github.com/dotnet/fsharp/pull/18487)) * Warn when `unit` is passed to an `obj`-typed argument ([PR #18330](https://github.com/dotnet/fsharp/pull/18330)) +* Scoped Nowarn: added the #warnon compiler directive ([Language suggestion #278](https://github.com/fsharp/fslang-suggestions/issues/278), [RFC FS-1146 PR](https://github.com/fsharp/fslang-design/pull/782), [PR #18049](https://github.com/dotnet/fsharp/pull/18049)) ### Fixed diff --git a/src/Compiler/Checking/CheckDeclarations.fs b/src/Compiler/Checking/CheckDeclarations.fs index 92368118f3a..7d8a0e0764e 100644 --- a/src/Compiler/Checking/CheckDeclarations.fs +++ b/src/Compiler/Checking/CheckDeclarations.fs @@ -5752,7 +5752,7 @@ let CheckOneImplFile synImplFile, diagnosticOptions) = - let (ParsedImplFileInput (fileName, isScript, qualNameOfFile, scopedPragmas, _, implFileFrags, isLastCompiland, _, _)) = synImplFile + let (ParsedImplFileInput (fileName, isScript, qualNameOfFile, _, implFileFrags, isLastCompiland, _, _)) = synImplFile let infoReader = InfoReader(g, amap) cancellable { @@ -5891,7 +5891,7 @@ let CheckOneImplFile |> Array.map (fun (KeyValue(k,v)) -> (k,v)) |> Map - let implFile = CheckedImplFile (qualNameOfFile, scopedPragmas, implFileTy, implFileContents, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) + let implFile = CheckedImplFile (qualNameOfFile, implFileTy, implFileContents, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) return (topAttrs, implFile, envAtEnd, cenv.createsGeneratedProvidedTypes) } diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 1be3b7be3a2..258346b9104 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -10391,7 +10391,7 @@ and GenModuleBinding cenv (cgbuf: CodeGenBuffer) (qname: QualifiedNameOfFile) la /// Generate the namespace fragments in a single file and GenImplFile cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (implFile: CheckedImplFileAfterOptimization) = - let (CheckedImplFile(qname, _, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypes, _)) = + let (CheckedImplFile(qname, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypes, _)) = implFile.ImplFile let optimizeDuringCodeGen = implFile.OptimizeDuringCodeGen diff --git a/src/Compiler/Driver/CompilerDiagnostics.fs b/src/Compiler/Driver/CompilerDiagnostics.fs index 68813e69a83..2bdb5fe6923 100644 --- a/src/Compiler/Driver/CompilerDiagnostics.fs +++ b/src/Compiler/Driver/CompilerDiagnostics.fs @@ -379,7 +379,7 @@ type PhasedDiagnostic with // Level 2 | _ -> 2 - member x.IsEnabled(severity, options) = + member private x.IsEnabled(severity, options) = let level = options.WarnLevel let specificWarnOn = options.WarnOn let n = x.Number @@ -412,19 +412,25 @@ type PhasedDiagnostic with member x.AdjustSeverity(options, severity) = let n = x.Number - let warnOff () = List.contains n options.WarnOff + let localWarnon () = WarnScopes.IsWarnon options n x.Range + + let localNowarn () = WarnScopes.IsNowarn options n x.Range + + let warnOff () = + List.contains n options.WarnOff && not (localWarnon ()) || localNowarn () match severity with | FSharpDiagnosticSeverity.Error -> FSharpDiagnosticSeverity.Error | FSharpDiagnosticSeverity.Warning when x.IsEnabled(severity, options) && ((options.GlobalWarnAsError && not (warnOff ())) - || List.contains n options.WarnAsError) + || List.contains n options.WarnAsError && not (localNowarn ())) && not (List.contains n options.WarnAsWarn) -> FSharpDiagnosticSeverity.Error + | FSharpDiagnosticSeverity.Info when List.contains n options.WarnAsError && not (localNowarn ()) -> FSharpDiagnosticSeverity.Error | FSharpDiagnosticSeverity.Warning when x.IsEnabled(severity, options) && not (warnOff ()) -> FSharpDiagnosticSeverity.Warning - | FSharpDiagnosticSeverity.Info when List.contains n options.WarnAsError -> FSharpDiagnosticSeverity.Error + | FSharpDiagnosticSeverity.Warning when localWarnon () -> FSharpDiagnosticSeverity.Warning | FSharpDiagnosticSeverity.Info when List.contains n options.WarnOn && not (warnOff ()) -> FSharpDiagnosticSeverity.Warning | FSharpDiagnosticSeverity.Info when x.IsEnabled(severity, options) && not (warnOff ()) -> FSharpDiagnosticSeverity.Info | _ -> FSharpDiagnosticSeverity.Hidden @@ -2274,51 +2280,25 @@ type PhasedDiagnostic with diagnostic.OutputContext(buf, prefix, fileLineFunction) diagnostic.Output(buf, tcConfig, severity)) -//---------------------------------------------------------------------------- -// Scoped #nowarn pragmas - -/// Build an DiagnosticsLogger that delegates to another DiagnosticsLogger but filters warnings turned off by the given pragma declarations -// -// NOTE: we allow a flag to turn of strict file checking. This is because file names sometimes don't match due to use of -// #line directives, e.g. for pars.fs/pars.fsy. In this case we just test by line number - in most cases this is sufficient -// because we install a filtering error handler on a file-by-file basis for parsing and type-checking. -// However this is indicative of a more systematic problem where source-line -// sensitive operations (lexfilter and warning filtering) do not always -// interact well with #line directives. -type DiagnosticsLoggerFilteringByScopedPragmas - (checkFile, scopedPragmas, diagnosticOptions: FSharpDiagnosticOptions, diagnosticsLogger: DiagnosticsLogger) = - inherit DiagnosticsLogger("DiagnosticsLoggerFilteringByScopedPragmas") +/// Build an DiagnosticsLogger that delegates to another DiagnosticsLogger but filters warnings +type DiagnosticsLoggerFilteringByScopedNowarn(diagnosticOptions: FSharpDiagnosticOptions, diagnosticsLogger: DiagnosticsLogger) = + inherit DiagnosticsLogger("DiagnosticsLoggerFilteringByScopedNowarn") let mutable realErrorPresent = false override _.DiagnosticSink(diagnostic: PhasedDiagnostic, severity) = + if severity = FSharpDiagnosticSeverity.Error then realErrorPresent <- true diagnosticsLogger.DiagnosticSink(diagnostic, severity) else - let report = - let warningNum = diagnostic.Number - - match diagnostic.Range with - | Some m -> - scopedPragmas - |> List.exists (fun pragma -> - let (ScopedPragma.WarningOff(pragmaRange, warningNumFromPragma)) = pragma - - warningNum = warningNumFromPragma - && (not checkFile || m.FileIndex = pragmaRange.FileIndex) - && posGeq m.Start pragmaRange.Start) - |> not - | None -> true - - if report then - match diagnostic.AdjustSeverity(diagnosticOptions, severity) with - | FSharpDiagnosticSeverity.Hidden -> () - | s -> diagnosticsLogger.DiagnosticSink(diagnostic, s) + match diagnostic.AdjustSeverity(diagnosticOptions, severity) with + | FSharpDiagnosticSeverity.Hidden -> () + | s -> diagnosticsLogger.DiagnosticSink(diagnostic, s) override _.ErrorCount = diagnosticsLogger.ErrorCount override _.CheckForRealErrorsIgnoringWarnings = realErrorPresent -let GetDiagnosticsLoggerFilteringByScopedPragmas (checkFile, scopedPragmas, diagnosticOptions, diagnosticsLogger) = - DiagnosticsLoggerFilteringByScopedPragmas(checkFile, scopedPragmas, diagnosticOptions, diagnosticsLogger) :> DiagnosticsLogger +let GetDiagnosticsLoggerFilteringByScopedNowarn (diagnosticOptions, diagnosticsLogger) = + DiagnosticsLoggerFilteringByScopedNowarn(diagnosticOptions, diagnosticsLogger) :> DiagnosticsLogger diff --git a/src/Compiler/Driver/CompilerDiagnostics.fsi b/src/Compiler/Driver/CompilerDiagnostics.fsi index cdf559c301a..1f6e91d0012 100644 --- a/src/Compiler/Driver/CompilerDiagnostics.fsi +++ b/src/Compiler/Driver/CompilerDiagnostics.fsi @@ -77,12 +77,8 @@ type PhasedDiagnostic with unit /// Get a diagnostics logger that filters the reporting of warnings based on scoped pragma information -val GetDiagnosticsLoggerFilteringByScopedPragmas: - checkFile: bool * - scopedPragmas: ScopedPragma list * - diagnosticOptions: FSharpDiagnosticOptions * - diagnosticsLogger: DiagnosticsLogger -> - DiagnosticsLogger +val GetDiagnosticsLoggerFilteringByScopedNowarn: + diagnosticOptions: FSharpDiagnosticOptions * diagnosticsLogger: DiagnosticsLogger -> DiagnosticsLogger /// Remove 'implicitIncludeDir' from a file name before output val SanitizeFileName: fileName: string -> implicitIncludeDir: string -> string diff --git a/src/Compiler/Driver/ParseAndCheckInputs.fs b/src/Compiler/Driver/ParseAndCheckInputs.fs index 3d9884b2cef..1ce85b734fa 100644 --- a/src/Compiler/Driver/ParseAndCheckInputs.fs +++ b/src/Compiler/Driver/ParseAndCheckInputs.fs @@ -4,7 +4,6 @@ module internal FSharp.Compiler.ParseAndCheckInputs open System -open System.Diagnostics open System.IO open System.Threading open System.Collections.Generic @@ -41,7 +40,6 @@ open FSharp.Compiler.Text.Range open FSharp.Compiler.Xml open FSharp.Compiler.TypedTree open FSharp.Compiler.TypedTreeOps -open FSharp.Compiler.TypedTreeBasics open FSharp.Compiler.TcGlobals let CanonicalizeFilename fileName = @@ -96,13 +94,13 @@ let PrependPathToSpec x (SynModuleOrNamespaceSig(longId, isRecursive, kind, decl let PrependPathToInput x inp = match inp with - | ParsedInput.ImplFile(ParsedImplFileInput(b, c, q, d, hd, impls, e, trivia, i)) -> + | ParsedInput.ImplFile(ParsedImplFileInput(b, c, q, hd, impls, e, trivia, i)) -> ParsedInput.ImplFile( - ParsedImplFileInput(b, c, PrependPathToQualFileName x q, d, hd, List.map (PrependPathToImpl x) impls, e, trivia, i) + ParsedImplFileInput(b, c, PrependPathToQualFileName x q, hd, List.map (PrependPathToImpl x) impls, e, trivia, i) ) - | ParsedInput.SigFile(ParsedSigFileInput(b, q, d, hd, specs, trivia, i)) -> - ParsedInput.SigFile(ParsedSigFileInput(b, PrependPathToQualFileName x q, d, hd, List.map (PrependPathToSpec x) specs, trivia, i)) + | ParsedInput.SigFile(ParsedSigFileInput(b, q, hd, specs, trivia, i)) -> + ParsedInput.SigFile(ParsedSigFileInput(b, PrependPathToQualFileName x q, hd, List.map (PrependPathToSpec x) specs, trivia, i)) let IsValidAnonModuleName (modname: string) = modname |> String.forall (fun c -> Char.IsLetterOrDigit c || c = '_') @@ -217,36 +215,55 @@ let PostParseModuleSpec (_i, defaultNamespace, isLastCompiland, fileName, intf) SynModuleOrNamespaceSig(lid, isRecursive, kind, decls, xmlDoc, attributes, None, range, trivia) -let GetScopedPragmasForHashDirective hd (langVersion: LanguageVersion) = - [ - match hd with - | ParsedHashDirective("nowarn", args, _) -> - for arg in args do - let rangeAndDescription = - match arg with - | ParsedHashDirectiveArgument.Int32(n, m) -> Some(m, WarningDescription.Int32 n) - | ParsedHashDirectiveArgument.Ident(ident, m) -> Some(m, WarningDescription.Ident ident) - | ParsedHashDirectiveArgument.String(s, _, m) -> Some(m, WarningDescription.String s) - | _ -> None - - match rangeAndDescription with - | None -> () - | Some(m, description) -> - match GetWarningNumber(m, description, langVersion, WarningNumberSource.CompilerDirective) with - | None -> () - | Some n -> ScopedPragma.WarningOff(m, n) - | _ -> () - ] +let private collectCodeComments (lexbuf: UnicodeLexing.Lexbuf) = + let tripleSlashComments = XmlDocStore.ReportInvalidXmlDocPositions(lexbuf) -let private collectCodeComments (lexbuf: UnicodeLexing.Lexbuf) (tripleSlashComments: range list) = [ yield! CommentStore.GetComments(lexbuf) yield! (List.map CommentTrivia.LineComment tripleSlashComments) + yield! WarnScopes.getCommentTrivia lexbuf ] |> List.sortBy (function | CommentTrivia.LineComment r | CommentTrivia.BlockComment r -> r.StartLine, r.StartColumn) +let private collectParsedInputTrivia lexbuf diagnosticOptions isScript submoduleRanges = + WarnScopes.MergeInto diagnosticOptions isScript submoduleRanges lexbuf + + { + ConditionalDirectives = IfdefStore.GetTrivia(lexbuf) + WarnDirectives = WarnScopes.getDirectiveTrivia (lexbuf) + CodeComments = collectCodeComments lexbuf + } + +let private getImplSubmoduleRanges (impls: ParsedImplFileFragment list) = + let getDecls (impl: ParsedImplFileFragment) = + match impl with + | ParsedImplFileFragment.AnonModule(decls, _) -> decls + | ParsedImplFileFragment.NamedModule(SynModuleOrNamespace(decls = decls)) -> decls + | ParsedImplFileFragment.NamespaceFragment(decls = decls) -> decls + + let getSubmoduleRange decl = + match decl with + | SynModuleDecl.NestedModule(range = m) -> Some m + | _ -> None + + impls |> List.collect getDecls |> List.choose getSubmoduleRange + +let private getSpecSubmoduleRanges (specs: ParsedSigFileFragment list) = + let getDecls (spec: ParsedSigFileFragment) = + match spec with + | ParsedSigFileFragment.AnonModule(decls, _) -> decls + | ParsedSigFileFragment.NamedModule(SynModuleOrNamespaceSig(decls = decls)) -> decls + | ParsedSigFileFragment.NamespaceFragment(decls = decls) -> decls + + let getSubmoduleRange decl = + match decl with + | SynModuleSigDecl.NestedModule(range = m) -> Some m + | _ -> None + + specs |> List.collect getDecls |> List.choose getSubmoduleRange + let PostParseModuleImpls ( defaultNamespace, @@ -254,9 +271,15 @@ let PostParseModuleImpls isLastCompiland, ParsedImplFile(hashDirectives, impls), lexbuf: UnicodeLexing.Lexbuf, - tripleSlashComments: range list, + diagnosticOptions: FSharpDiagnosticOptions, identifiers: Set ) = + + let isScript = IsScript fileName + + let trivia = + collectParsedInputTrivia lexbuf diagnosticOptions isScript (getImplSubmoduleRanges impls) + let othersWithSameName = impls |> List.rev @@ -273,31 +296,8 @@ let PostParseModuleImpls |> List.mapi (fun i x -> PostParseModuleImpl(i, defaultNamespace, isLastCompiland, fileName, x)) let qualName = QualFileNameOfImpls fileName impls - let isScript = IsScript fileName - let scopedPragmas = - [ - for SynModuleOrNamespace(decls = decls) in impls do - for d in decls do - match d with - | SynModuleDecl.HashDirective(hd, _) -> yield! GetScopedPragmasForHashDirective hd lexbuf.LanguageVersion - | _ -> () - for hd in hashDirectives do - yield! GetScopedPragmasForHashDirective hd lexbuf.LanguageVersion - ] - - let conditionalDirectives = IfdefStore.GetTrivia(lexbuf) - let codeComments = collectCodeComments lexbuf tripleSlashComments - - let trivia: ParsedImplFileInputTrivia = - { - ConditionalDirectives = conditionalDirectives - CodeComments = codeComments - } - - ParsedInput.ImplFile( - ParsedImplFileInput(fileName, isScript, qualName, scopedPragmas, hashDirectives, impls, isLastCompiland, trivia, identifiers) - ) + ParsedInput.ImplFile(ParsedImplFileInput(fileName, isScript, qualName, hashDirectives, impls, isLastCompiland, trivia, identifiers)) let PostParseModuleSpecs ( @@ -306,9 +306,13 @@ let PostParseModuleSpecs isLastCompiland, ParsedSigFile(hashDirectives, specs), lexbuf: UnicodeLexing.Lexbuf, - tripleSlashComments: range list, + diagnosticOptions: FSharpDiagnosticOptions, identifiers: Set ) = + + let trivia = + collectParsedInputTrivia lexbuf diagnosticOptions false (getSpecSubmoduleRanges specs) + let othersWithSameName = specs |> List.rev @@ -326,27 +330,7 @@ let PostParseModuleSpecs let qualName = QualFileNameOfSpecs fileName specs - let scopedPragmas = - [ - for SynModuleOrNamespaceSig(decls = decls) in specs do - for d in decls do - match d with - | SynModuleSigDecl.HashDirective(hd, _) -> yield! GetScopedPragmasForHashDirective hd lexbuf.LanguageVersion - | _ -> () - for hd in hashDirectives do - yield! GetScopedPragmasForHashDirective hd lexbuf.LanguageVersion - ] - - let conditionalDirectives = IfdefStore.GetTrivia(lexbuf) - let codeComments = collectCodeComments lexbuf tripleSlashComments - - let trivia: ParsedSigFileInputTrivia = - { - ConditionalDirectives = conditionalDirectives - CodeComments = codeComments - } - - ParsedInput.SigFile(ParsedSigFileInput(fileName, qualName, scopedPragmas, hashDirectives, specs, trivia, identifiers)) + ParsedInput.SigFile(ParsedSigFileInput(fileName, qualName, hashDirectives, specs, trivia, identifiers)) type ModuleNamesDict = Map> @@ -391,26 +375,26 @@ let DeduplicateModuleName (moduleNamesDict: ModuleNamesDict) (fileName: string) let DeduplicateParsedInputModuleName (moduleNamesDict: ModuleNamesDict) input = match input with | ParsedInput.ImplFile implFile -> - let (ParsedImplFileInput(fileName, isScript, qualNameOfFile, scopedPragmas, hashDirectives, modules, flags, trivia, identifiers)) = + let (ParsedImplFileInput(fileName, isScript, qualNameOfFile, hashDirectives, modules, flags, trivia, identifiers)) = implFile let qualNameOfFileR, moduleNamesDictR = DeduplicateModuleName moduleNamesDict fileName qualNameOfFile let implFileR = - ParsedImplFileInput(fileName, isScript, qualNameOfFileR, scopedPragmas, hashDirectives, modules, flags, trivia, identifiers) + ParsedImplFileInput(fileName, isScript, qualNameOfFileR, hashDirectives, modules, flags, trivia, identifiers) let inputR = ParsedInput.ImplFile implFileR inputR, moduleNamesDictR | ParsedInput.SigFile sigFile -> - let (ParsedSigFileInput(fileName, qualNameOfFile, scopedPragmas, hashDirectives, modules, trivia, identifiers)) = + let (ParsedSigFileInput(fileName, qualNameOfFile, hashDirectives, modules, trivia, identifiers)) = sigFile let qualNameOfFileR, moduleNamesDictR = DeduplicateModuleName moduleNamesDict fileName qualNameOfFile let sigFileR = - ParsedSigFileInput(fileName, qualNameOfFileR, scopedPragmas, hashDirectives, modules, trivia, identifiers) + ParsedSigFileInput(fileName, qualNameOfFileR, hashDirectives, modules, trivia, identifiers) let inputT = ParsedInput.SigFile sigFileR inputT, moduleNamesDictR @@ -449,66 +433,54 @@ let ParseInput use _ = UseDiagnosticsLogger delayLogger use _ = UseBuildPhase BuildPhase.Parse - let mutable scopedPragmas = [] - try - let input = - let identStore = HashSet() - - let lexer = - if identCapture then - (fun x -> - let token = lexer x - - match token with - | Parser.token.PERCENT_OP ident - | Parser.token.FUNKY_OPERATOR_NAME ident - | Parser.token.ADJACENT_PREFIX_OP ident - | Parser.token.PLUS_MINUS_OP ident - | Parser.token.INFIX_AMP_OP ident - | Parser.token.INFIX_STAR_DIV_MOD_OP ident - | Parser.token.PREFIX_OP ident - | Parser.token.INFIX_BAR_OP ident - | Parser.token.INFIX_AT_HAT_OP ident - | Parser.token.INFIX_COMPARE_OP ident - | Parser.token.INFIX_STAR_STAR_OP ident - | Parser.token.IDENT ident -> identStore.Add ident |> ignore - | _ -> () - - token) - else - lexer - - if FSharpMLCompatFileSuffixes |> List.exists (FileSystemUtils.checkSuffix fileName) then - if lexbuf.SupportsFeature LanguageFeature.MLCompatRevisions then - errorR (Error(FSComp.SR.buildInvalidSourceFileExtensionML fileName, rangeStartup)) - else - mlCompatWarning (FSComp.SR.buildCompilingExtensionIsForML ()) rangeStartup - - // Call the appropriate parser - for signature files or implementation files - if FSharpImplFileSuffixes |> List.exists (FileSystemUtils.checkSuffix fileName) then - let impl = Parser.implementationFile lexer lexbuf - - let tripleSlashComments = XmlDocStore.ReportInvalidXmlDocPositions(lexbuf) - - PostParseModuleImpls(defaultNamespace, fileName, isLastCompiland, impl, lexbuf, tripleSlashComments, Set identStore) - elif FSharpSigFileSuffixes |> List.exists (FileSystemUtils.checkSuffix fileName) then - let intfs = Parser.signatureFile lexer lexbuf - - let tripleSlashComments = XmlDocStore.ReportInvalidXmlDocPositions(lexbuf) + let identStore = HashSet() + + let lexer = + if identCapture then + (fun x -> + let token = lexer x + + match token with + | Parser.token.PERCENT_OP ident + | Parser.token.FUNKY_OPERATOR_NAME ident + | Parser.token.ADJACENT_PREFIX_OP ident + | Parser.token.PLUS_MINUS_OP ident + | Parser.token.INFIX_AMP_OP ident + | Parser.token.INFIX_STAR_DIV_MOD_OP ident + | Parser.token.PREFIX_OP ident + | Parser.token.INFIX_BAR_OP ident + | Parser.token.INFIX_AT_HAT_OP ident + | Parser.token.INFIX_COMPARE_OP ident + | Parser.token.INFIX_STAR_STAR_OP ident + | Parser.token.IDENT ident -> identStore.Add ident |> ignore + | _ -> () - PostParseModuleSpecs(defaultNamespace, fileName, isLastCompiland, intfs, lexbuf, tripleSlashComments, Set identStore) - else if lexbuf.SupportsFeature LanguageFeature.MLCompatRevisions then - error (Error(FSComp.SR.buildInvalidSourceFileExtensionUpdated fileName, rangeStartup)) + token) else - error (Error(FSComp.SR.buildInvalidSourceFileExtension fileName, rangeStartup)) + lexer - scopedPragmas <- input.ScopedPragmas - input + if FSharpMLCompatFileSuffixes |> List.exists (FileSystemUtils.checkSuffix fileName) then + if lexbuf.SupportsFeature LanguageFeature.MLCompatRevisions then + errorR (Error(FSComp.SR.buildInvalidSourceFileExtensionML fileName, rangeStartup)) + else + mlCompatWarning (FSComp.SR.buildCompilingExtensionIsForML ()) rangeStartup + + // Call the appropriate parser - for signature files or implementation files + if FSharpImplFileSuffixes |> List.exists (FileSystemUtils.checkSuffix fileName) then + let impl = Parser.implementationFile lexer lexbuf + PostParseModuleImpls(defaultNamespace, fileName, isLastCompiland, impl, lexbuf, diagnosticOptions, Set identStore) + elif FSharpSigFileSuffixes |> List.exists (FileSystemUtils.checkSuffix fileName) then + let intfs = Parser.signatureFile lexer lexbuf + PostParseModuleSpecs(defaultNamespace, fileName, isLastCompiland, intfs, lexbuf, diagnosticOptions, Set identStore) + else if lexbuf.SupportsFeature LanguageFeature.MLCompatRevisions then + error (Error(FSComp.SR.buildInvalidSourceFileExtensionUpdated fileName, rangeStartup)) + else + error (Error(FSComp.SR.buildInvalidSourceFileExtension fileName, rangeStartup)) finally // OK, now commit the errors, since the ScopedPragmas will (hopefully) have been scraped let filteringDiagnosticsLogger = - GetDiagnosticsLoggerFilteringByScopedPragmas(false, scopedPragmas, diagnosticOptions, diagnosticsLogger) + GetDiagnosticsLoggerFilteringByScopedNowarn(diagnosticOptions, diagnosticsLogger) delayLogger.CommitDelayedDiagnostics filteringDiagnosticsLogger @@ -572,20 +544,7 @@ let ReportParsingStatistics res = let EmptyParsedInput (fileName, isLastCompiland) = if FSharpSigFileSuffixes |> List.exists (FileSystemUtils.checkSuffix fileName) then - ParsedInput.SigFile( - ParsedSigFileInput( - fileName, - QualFileNameOfImpls fileName [], - [], - [], - [], - { - ConditionalDirectives = [] - CodeComments = [] - }, - Set.empty - ) - ) + ParsedInput.SigFile(ParsedSigFileInput(fileName, QualFileNameOfImpls fileName [], [], [], ParsedInputTrivia.Empty, Set.empty)) else ParsedInput.ImplFile( ParsedImplFileInput( @@ -594,12 +553,8 @@ let EmptyParsedInput (fileName, isLastCompiland) = QualFileNameOfImpls fileName [], [], [], - [], isLastCompiland, - { - ConditionalDirectives = [] - CodeComments = [] - }, + ParsedInputTrivia.Empty, Set.empty ) ) @@ -836,11 +791,7 @@ let ParseInputFiles (tcConfig: TcConfig, lexResourceManager, sourceFiles, diagno tcConfig.exiter.Exit 1 let ProcessMetaCommandsFromInput - ( - nowarnF: 'state -> range * string -> 'state, - hashReferenceF: 'state -> range * string * Directive -> 'state, - loadSourceF: 'state -> range * string -> unit - ) + (hashReferenceF: 'state -> range * string * Directive -> 'state, loadSourceF: 'state -> range * string -> unit) (tcConfig: TcConfigBuilder, inp: ParsedInput, pathOfMetaCommandSource, state0) = @@ -884,11 +835,6 @@ let ProcessMetaCommandsFromInput state - | ParsedHashDirective("nowarn", hashArguments, m) -> - let arguments = parsedHashDirectiveArgumentsNoCheck hashArguments - - List.fold (fun state d -> nowarnF state (m, d)) state arguments - | ParsedHashDirective(("reference" | "r") as c, [], m) -> if not canHaveScriptMetaCommands then errorR (HashDirectiveNotAllowedInNonScript m) @@ -1009,19 +955,9 @@ let ProcessMetaCommandsFromInput let state = List.fold ProcessMetaCommandsFromModuleImpl state implFile.Contents state -let ApplyNoWarnsToTcConfig (tcConfig: TcConfig, inp: ParsedInput, pathOfMetaCommandSource) = - // Clone - let tcConfigB = tcConfig.CloneToBuilder() - let addNoWarn = fun () (m, s) -> tcConfigB.TurnWarningOff(m, s) - let addReference = fun () (_m, _s, _) -> () - let addLoadedSource = fun () (_m, _s) -> () - ProcessMetaCommandsFromInput (addNoWarn, addReference, addLoadedSource) (tcConfigB, inp, pathOfMetaCommandSource, ()) - TcConfig.Create(tcConfigB, validate = false) - let ApplyMetaCommandsFromInputToTcConfig (tcConfig: TcConfig, inp: ParsedInput, pathOfMetaCommandSource, dependencyProvider) = // Clone let tcConfigB = tcConfig.CloneToBuilder() - let getWarningNumber = fun () _ -> () let addReferenceDirective = fun () (m, path, directive) -> tcConfigB.AddReferenceDirective(dependencyProvider, m, path, directive) @@ -1029,7 +965,7 @@ let ApplyMetaCommandsFromInputToTcConfig (tcConfig: TcConfig, inp: ParsedInput, let addLoadedSource = fun () (m, s) -> tcConfigB.AddLoadedSource(m, s, pathOfMetaCommandSource) - ProcessMetaCommandsFromInput (getWarningNumber, addReferenceDirective, addLoadedSource) (tcConfigB, inp, pathOfMetaCommandSource, ()) + ProcessMetaCommandsFromInput (addReferenceDirective, addLoadedSource) (tcConfigB, inp, pathOfMetaCommandSource, ()) TcConfig.Create(tcConfigB, validate = false) /// Build the initial type checking environment @@ -1269,7 +1205,7 @@ let SkippedImplFilePlaceholder (tcConfig: TcConfig, tcImports: TcImports, tcGlob tcState let emptyImplFile = - CheckedImplFile(qualNameOfFile, [], rootSigTy, ModuleOrNamespaceContents.TMDefs [], false, false, StampMap [], Map.empty) + CheckedImplFile(qualNameOfFile, rootSigTy, ModuleOrNamespaceContents.TMDefs [], false, false, StampMap [], Map.empty) let tcEnvAtEnd = tcStateForImplFile.TcEnvFromImpls Some((tcEnvAtEnd, EmptyTopAttrs, Some emptyImplFile, ccuSigForFile), tcState) @@ -1402,15 +1338,15 @@ let CheckOneInput } // Within a file, equip loggers to locally filter w.r.t. scope pragmas in each input -let DiagnosticsLoggerForInput (tcConfig: TcConfig, input: ParsedInput, oldLogger) = - GetDiagnosticsLoggerFilteringByScopedPragmas(false, input.ScopedPragmas, tcConfig.diagnosticsOptions, oldLogger) +let DiagnosticsLoggerForInput (tcConfig: TcConfig, oldLogger) = + GetDiagnosticsLoggerFilteringByScopedNowarn(tcConfig.diagnosticsOptions, oldLogger) /// Typecheck a single file (or interactive entry into F# Interactive) let CheckOneInputEntry (ctok, checkForErrors, tcConfig: TcConfig, tcImports, tcGlobals, prefixPathOpt) tcState input = cancellable { // Equip loggers to locally filter w.r.t. scope pragmas in each input use _ = - UseTransformedDiagnosticsLogger(fun oldLogger -> DiagnosticsLoggerForInput(tcConfig, input, oldLogger)) + UseTransformedDiagnosticsLogger(fun oldLogger -> DiagnosticsLoggerForInput(tcConfig, oldLogger)) use _ = UseBuildPhase BuildPhase.TypeCheck @@ -1915,7 +1851,7 @@ let CheckMultipleInputsUsingGraphMode inputsWithLoggers |> List.toArray |> Array.map (fun (input, oldLogger) -> - let logger = DiagnosticsLoggerForInput(tcConfig, input, oldLogger) + let logger = DiagnosticsLoggerForInput(tcConfig, oldLogger) input, logger) let processFile (node: NodeToTypeCheck) (state: State) : Finisher = diff --git a/src/Compiler/Driver/ParseAndCheckInputs.fsi b/src/Compiler/Driver/ParseAndCheckInputs.fsi index fb32a4557cd..281638b5685 100644 --- a/src/Compiler/Driver/ParseAndCheckInputs.fsi +++ b/src/Compiler/Driver/ParseAndCheckInputs.fsi @@ -7,12 +7,12 @@ open System.IO open Internal.Utilities.Library open FSharp.Compiler.CheckBasics open FSharp.Compiler.CheckDeclarations -open FSharp.Compiler.CompilerGlobalState open FSharp.Compiler.CompilerConfig open FSharp.Compiler.CompilerImports open FSharp.Compiler.Diagnostics open FSharp.Compiler.DependencyManager open FSharp.Compiler.DiagnosticsLogger +open FSharp.Compiler.Features open FSharp.Compiler.GraphChecking open FSharp.Compiler.NameResolution open FSharp.Compiler.Syntax @@ -78,16 +78,13 @@ val ParseInput: /// A general routine to process hash directives val ProcessMetaCommandsFromInput: - ('T -> range * string -> 'T) * ('T -> range * string * Directive -> 'T) * ('T -> range * string -> unit) -> + ('T -> range * string * Directive -> 'T) * ('T -> range * string -> unit) -> TcConfigBuilder * ParsedInput * string * 'T -> 'T -/// Process all the #r, #I etc. in an input. For non-scripts report warnings about ignored directives. +/// Process all the #r, #I etc. in an input. val ApplyMetaCommandsFromInputToTcConfig: TcConfig * ParsedInput * string * DependencyProvider -> TcConfig -/// Process the #nowarn in an input and integrate them into the TcConfig -val ApplyNoWarnsToTcConfig: TcConfig * ParsedInput * string -> TcConfig - /// Parse one input stream val ParseOneInputStream: tcConfig: TcConfig * diff --git a/src/Compiler/Driver/ScriptClosure.fs b/src/Compiler/Driver/ScriptClosure.fs index b45049627cf..a9dd5442626 100644 --- a/src/Compiler/Driver/ScriptClosure.fs +++ b/src/Compiler/Driver/ScriptClosure.fs @@ -63,9 +63,6 @@ type LoadClosure = /// The #load, including those that didn't resolve OriginalLoadReferences: (range * string * string) list - /// The #nowarns - NoWarns: (string * range list) list - /// Diagnostics seen while processing resolutions ResolutionDiagnostics: (PhasedDiagnostic * FSharpDiagnosticSeverity) list @@ -95,8 +92,7 @@ module ScriptPreprocessClosure = range: range * parsedInput: ParsedInput option * parseDiagnostics: (PhasedDiagnostic * FSharpDiagnosticSeverity) list * - metaDiagnostics: (PhasedDiagnostic * FSharpDiagnosticSeverity) list * - nowarns: (string * range) list + metaDiagnostics: (PhasedDiagnostic * FSharpDiagnosticSeverity) list type Observed() = let seen = Dictionary<_, bool>() @@ -262,13 +258,9 @@ module ScriptPreprocessClosure = errorRecovery exn m [] - let ApplyMetaCommandsFromInputToTcConfigAndGatherNoWarn - (tcConfig: TcConfig, inp: ParsedInput, pathOfMetaCommandSource, dependencyProvider) - = + let ApplyMetaCommandsFromInputToTcConfig (tcConfig: TcConfig, inp: ParsedInput, pathOfMetaCommandSource, dependencyProvider) = let tcConfigB = tcConfig.CloneToBuilder() - let mutable nowarns = [] - let getWarningNumber () (m, s) = nowarns <- (s, m) :: nowarns let addReferenceDirective () (m, s, directive) = tcConfigB.AddReferenceDirective(dependencyProvider, m, s, directive) @@ -277,19 +269,17 @@ module ScriptPreprocessClosure = tcConfigB.AddLoadedSource(m, s, pathOfMetaCommandSource) try - ProcessMetaCommandsFromInput - (getWarningNumber, addReferenceDirective, addLoadedSource) - (tcConfigB, inp, pathOfMetaCommandSource, ()) + ProcessMetaCommandsFromInput (addReferenceDirective, addLoadedSource) (tcConfigB, inp, pathOfMetaCommandSource, ()) with ReportedError _ -> // Recover by using whatever did end up in the tcConfig () try - TcConfig.Create(tcConfigB, validate = false), nowarns + TcConfig.Create(tcConfigB, validate = false) with ReportedError _ -> // Recover by using a default TcConfig. let tcConfigB = tcConfig.CloneToBuilder() - TcConfig.Create(tcConfigB, validate = false), nowarns + TcConfig.Create(tcConfigB, validate = false) let getDirective d = match d with @@ -474,13 +464,8 @@ module ScriptPreprocessClosure = let pathOfMetaCommandSource = !!Path.GetDirectoryName(fileName) let preSources = tcConfig.GetAvailableLoadedSources() - let tcConfigResult, noWarns = - ApplyMetaCommandsFromInputToTcConfigAndGatherNoWarn( - tcConfig, - parseResult, - pathOfMetaCommandSource, - dependencyProvider - ) + let tcConfigResult = + ApplyMetaCommandsFromInputToTcConfig(tcConfig, parseResult, pathOfMetaCommandSource, dependencyProvider) tcConfig <- tcConfigResult // We accumulate the tcConfig in order to collect assembly references @@ -501,14 +486,14 @@ module ScriptPreprocessClosure = for subSource in ClosureSourceOfFilename(subFile, m, tcConfigResult.inputCodePage, false) do yield! processClosureSource subSource else - ClosureFile(subFile, m, None, [], [], []) + ClosureFile(subFile, m, None, [], []) - ClosureFile(fileName, m, Some parseResult, parseDiagnostics, diagnosticsLogger.Diagnostics, noWarns) + ClosureFile(fileName, m, Some parseResult, parseDiagnostics, diagnosticsLogger.Diagnostics) else // Don't traverse into .fs leafs. printfn "yielding non-script source %s" fileName - ClosureFile(fileName, m, None, [], [], []) + ClosureFile(fileName, m, None, [], []) ] let sources = closureSources |> List.collect processClosureSource @@ -520,32 +505,22 @@ module ScriptPreprocessClosure = /// Mark the last file as isLastCompiland. let MarkLastCompiland (tcConfig: TcConfig, lastClosureFile) = - let (ClosureFile(fileName, m, lastParsedInput, parseDiagnostics, metaDiagnostics, nowarns)) = + let (ClosureFile(fileName, m, lastParsedInput, parseDiagnostics, metaDiagnostics)) = lastClosureFile match lastParsedInput with | Some(ParsedInput.ImplFile lastParsedImplFile) -> - let (ParsedImplFileInput(name, isScript, qualNameOfFile, scopedPragmas, hashDirectives, implFileFlags, _, trivia, identifiers)) = + let (ParsedImplFileInput(name, isScript, qualNameOfFile, hashDirectives, implFileFlags, _, trivia, identifiers)) = lastParsedImplFile let isLastCompiland = (true, tcConfig.target.IsExe) let lastParsedImplFileR = - ParsedImplFileInput( - name, - isScript, - qualNameOfFile, - scopedPragmas, - hashDirectives, - implFileFlags, - isLastCompiland, - trivia, - identifiers - ) + ParsedImplFileInput(name, isScript, qualNameOfFile, hashDirectives, implFileFlags, isLastCompiland, trivia, identifiers) let lastClosureFileR = - ClosureFile(fileName, m, Some(ParsedInput.ImplFile lastParsedImplFileR), parseDiagnostics, metaDiagnostics, nowarns) + ClosureFile(fileName, m, Some(ParsedInput.ImplFile lastParsedImplFileR), parseDiagnostics, metaDiagnostics) lastClosureFileR | _ -> lastClosureFile @@ -563,12 +538,12 @@ module ScriptPreprocessClosure = // Get all source files. let sourceFiles = - [ for ClosureFile(fileName, m, _, _, _, _) in closureFiles -> (fileName, m) ] + [ for ClosureFile(fileName, m, _, _, _) in closureFiles -> (fileName, m) ] let sourceInputs = [ for closureFile in closureFiles -> - let (ClosureFile(fileName, _, input, parseDiagnostics, metaDiagnostics, _nowarns)) = + let (ClosureFile(fileName, _, input, parseDiagnostics, metaDiagnostics)) = closureFile let closureInput: LoadClosureInput = @@ -582,10 +557,6 @@ module ScriptPreprocessClosure = closureInput ] - let globalNoWarns = - closureFiles - |> List.collect (fun (ClosureFile(_, _, _, _, _, noWarns)) -> noWarns) - // Resolve all references. let references, unresolvedReferences, resolutionDiagnostics = let diagnosticsLogger = CapturingDiagnosticsLogger("GetLoadClosure") @@ -601,7 +572,7 @@ module ScriptPreprocessClosure = // Root errors and warnings - look at the last item in the closureFiles list let loadClosureRootDiagnostics, allRootDiagnostics = match List.rev closureFiles with - | ClosureFile(_, _, _, parseDiagnostics, metaDiagnostics, _) :: _ -> + | ClosureFile(_, _, _, parseDiagnostics, metaDiagnostics) :: _ -> (earlierDiagnostics @ metaDiagnostics @ resolutionDiagnostics), (parseDiagnostics @ earlierDiagnostics @ metaDiagnostics @ resolutionDiagnostics) | _ -> [], [] // When no file existed. @@ -632,7 +603,6 @@ module ScriptPreprocessClosure = SdkDirOverride = tcConfig.sdkDirOverride UnresolvedReferences = unresolvedReferences Inputs = sourceInputs - NoWarns = List.groupBy fst globalNoWarns |> List.map (map2Of2 (List.map snd)) OriginalLoadReferences = tcConfig.loadedSources ResolutionDiagnostics = resolutionDiagnostics AllRootFileDiagnostics = allRootDiagnostics diff --git a/src/Compiler/Driver/ScriptClosure.fsi b/src/Compiler/Driver/ScriptClosure.fsi index 249885036cd..b54b9b2f0d0 100644 --- a/src/Compiler/Driver/ScriptClosure.fsi +++ b/src/Compiler/Driver/ScriptClosure.fsi @@ -60,9 +60,6 @@ type LoadClosure = /// The original #load references, including those that didn't resolve OriginalLoadReferences: (range * string * string) list - /// The #nowarns - NoWarns: (string * range list) list - /// Diagnostics seen while processing resolutions ResolutionDiagnostics: (PhasedDiagnostic * FSharpDiagnosticSeverity) list diff --git a/src/Compiler/Driver/fsc.fs b/src/Compiler/Driver/fsc.fs index 3518d9d4884..2ef07e66e6b 100644 --- a/src/Compiler/Driver/fsc.fs +++ b/src/Compiler/Driver/fsc.fs @@ -77,7 +77,7 @@ type DiagnosticsLoggerUpToMaxErrors(tcConfigB: TcConfigBuilder, exiter: Exiter, override x.DiagnosticSink(diagnostic, severity) = let tcConfig = TcConfig.Create(tcConfigB, validate = false) - match diagnostic.AdjustSeverity(tcConfigB.diagnosticsOptions, severity) with + match diagnostic.AdjustSeverity(tcConfig.diagnosticsOptions, severity) with | FSharpDiagnosticSeverity.Error -> if errors >= tcConfig.maxErrors then x.HandleTooManyErrors(FSComp.SR.fscTooManyErrors ()) @@ -225,11 +225,6 @@ let AdjustForScriptCompile (tcConfigB: TcConfigBuilder, commandLineSourceFiles, references |> List.iter (fun r -> tcConfigB.AddReferencedAssemblyByPath(r.originalReference.Range, r.resolvedPath)) - // Also record the other declarations from the script. - closure.NoWarns - |> List.collect (fun (n, ms) -> ms |> List.map (fun m -> m, n)) - |> List.iter (fun (x, m) -> tcConfigB.TurnWarningOff(x, m)) - closure.SourceFiles |> List.map fst |> List.iter AddIfNotPresent closure.AllRootFileDiagnostics |> List.iter diagnosticSink @@ -644,7 +639,6 @@ let main1 if not tcConfig.continueAfterParseFailure then AbortOnError(diagnosticsLogger, exiter) - // Apply any nowarn flags let tcConfig = (tcConfig, inputs) ||> List.fold (fun z (input, sourceFileDirectory) -> @@ -735,13 +729,7 @@ let main2 let oldLogger = diagnosticsLogger let diagnosticsLogger = - let scopedPragmas = - [ - for CheckedImplFile(pragmas = pragmas) in typedImplFiles do - yield! pragmas - ] - - GetDiagnosticsLoggerFilteringByScopedPragmas(true, scopedPragmas, tcConfig.diagnosticsOptions, oldLogger) + GetDiagnosticsLoggerFilteringByScopedNowarn(tcConfig.diagnosticsOptions, oldLogger) SetThreadDiagnosticsLoggerNoUnwind diagnosticsLogger diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index aab4de2a554..010088e958e 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -1799,3 +1799,8 @@ featureDeprecatePlacesWhereSeqCanBeOmitted,"Deprecate places where 'seq' can be featureSupportValueOptionsAsOptionalParameters,"Support ValueOption as valid type for optional member parameters" featureSupportWarnWhenUnitPassedToObjArg,"Warn when unit is passed to a member accepting `obj` argument, e.g. `Method(o:obj)` will warn if called via `Method()`." featureUseBangBindingValueDiscard,"Allows use! _ = ... in computation expressions" +featureScopedNowarn,"Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules" +3874,lexWarnDirectiveMustBeFirst,"#nowarn/#warnon directives must appear as the first non-whitespace characters on a line" +3875,lexWarnDirectiveMustHaveArgs,"Warn directives must have warning number(s) as argument(s)" +3876,lexWarnDirectivesMustMatch,"There is another %s for this warning already in line %d." +3877,lexLineDirectiveMappingIsNotUnique,"The file '%s' was also pointed to in a line directive in '%s'. Proper warn directive application may not be possible." \ No newline at end of file diff --git a/src/Compiler/FSharp.Compiler.Service.fsproj b/src/Compiler/FSharp.Compiler.Service.fsproj index bbddf424684..6c087fa99fe 100644 --- a/src/Compiler/FSharp.Compiler.Service.fsproj +++ b/src/Compiler/FSharp.Compiler.Service.fsproj @@ -280,6 +280,8 @@ + + diff --git a/src/Compiler/Facilities/DiagnosticOptions.fs b/src/Compiler/Facilities/DiagnosticOptions.fs index 2a3a6ffe742..b5f87d482ad 100644 --- a/src/Compiler/Facilities/DiagnosticOptions.fs +++ b/src/Compiler/Facilities/DiagnosticOptions.fs @@ -20,6 +20,7 @@ type FSharpDiagnosticOptions = WarnOn: int list WarnAsError: int list WarnAsWarn: int list + mutable WarnScopeData: obj option } static member Default = @@ -30,6 +31,7 @@ type FSharpDiagnosticOptions = WarnOn = [] WarnAsError = [] WarnAsWarn = [] + WarnScopeData = None } member x.CheckXmlDocs = diff --git a/src/Compiler/Facilities/DiagnosticOptions.fsi b/src/Compiler/Facilities/DiagnosticOptions.fsi index 8ff6b3d2f88..a6f041c7ed9 100644 --- a/src/Compiler/Facilities/DiagnosticOptions.fsi +++ b/src/Compiler/Facilities/DiagnosticOptions.fsi @@ -19,7 +19,8 @@ type FSharpDiagnosticOptions = WarnOff: int list WarnOn: int list WarnAsError: int list - WarnAsWarn: int list } + WarnAsWarn: int list + mutable WarnScopeData: obj option } static member Default: FSharpDiagnosticOptions diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index 874b709d658..763452592a4 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -100,6 +100,7 @@ type LanguageFeature = | SupportValueOptionsAsOptionalParameters | WarnWhenUnitPassedToObjArg | UseBangBindingValueDiscard + | ScopedNowarn /// LanguageVersion management type LanguageVersion(versionText) = @@ -231,6 +232,7 @@ type LanguageVersion(versionText) = LanguageFeature.SupportValueOptionsAsOptionalParameters, previewVersion LanguageFeature.WarnWhenUnitPassedToObjArg, previewVersion LanguageFeature.UseBangBindingValueDiscard, previewVersion + LanguageFeature.ScopedNowarn, previewVersion ] static let defaultLanguageVersion = LanguageVersion("default") @@ -394,6 +396,7 @@ type LanguageVersion(versionText) = | LanguageFeature.SupportValueOptionsAsOptionalParameters -> FSComp.SR.featureSupportValueOptionsAsOptionalParameters () | LanguageFeature.WarnWhenUnitPassedToObjArg -> FSComp.SR.featureSupportWarnWhenUnitPassedToObjArg () | LanguageFeature.UseBangBindingValueDiscard -> FSComp.SR.featureUseBangBindingValueDiscard () + | LanguageFeature.ScopedNowarn -> FSComp.SR.featureScopedNowarn () /// Get a version string associated with the given feature. static member GetFeatureVersionString feature = diff --git a/src/Compiler/Facilities/LanguageFeatures.fsi b/src/Compiler/Facilities/LanguageFeatures.fsi index f50357f3fe0..a452205765e 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fsi +++ b/src/Compiler/Facilities/LanguageFeatures.fsi @@ -91,6 +91,7 @@ type LanguageFeature = | SupportValueOptionsAsOptionalParameters | WarnWhenUnitPassedToObjArg | UseBangBindingValueDiscard + | ScopedNowarn /// LanguageVersion management type LanguageVersion = diff --git a/src/Compiler/Interactive/fsi.fs b/src/Compiler/Interactive/fsi.fs index 98c62839018..662ba9752e7 100644 --- a/src/Compiler/Interactive/fsi.fs +++ b/src/Compiler/Interactive/fsi.fs @@ -41,11 +41,8 @@ open FSharp.Compiler.CompilerOptions open FSharp.Compiler.CompilerConfig open FSharp.Compiler.CompilerDiagnostics open FSharp.Compiler.CompilerImports -open FSharp.Compiler.CompilerGlobalState -open FSharp.Compiler.CreateILModule open FSharp.Compiler.DependencyManager open FSharp.Compiler.Diagnostics -open FSharp.Compiler.EditorServices open FSharp.Compiler.DiagnosticsLogger open FSharp.Compiler.Features open FSharp.Compiler.IlxGen @@ -70,7 +67,6 @@ open FSharp.Compiler.Xml open FSharp.Compiler.Tokenization open FSharp.Compiler.TypedTree open FSharp.Compiler.TypedTreeOps -open FSharp.Compiler.BuildGraph open FSharp.Compiler.CheckExpressionsOps //---------------------------------------------------------------------------- @@ -1671,7 +1667,7 @@ let internal mkBoundValueTypedImpl tcGlobals m moduleName name ty = let contents = TMDefs([ TMDefs[TMDefRec(false, [], [], [ mbinding ], m)] ]) let qname = QualifiedNameOfFile.QualifiedNameOfFile(Ident(moduleName, m)) - entity, v, CheckedImplFile.CheckedImplFile(qname, [], mty, contents, false, false, StampMap.Empty, Map.empty) + entity, v, CheckedImplFile.CheckedImplFile(qname, mty, contents, false, false, StampMap.Empty, Map.empty) let dynamicCcuName (isEmitMulti) = $"""FSI-ASSEMBLY{if isEmitMulti then "-MULTI" else ""}""" @@ -2482,13 +2478,9 @@ type internal FsiDynamicCompiler true, ComputeQualifiedNameOfFileFromUniquePath(m, prefixPath), [], - [], [ impl ], (isLastCompiland, isExe), - { - ConditionalDirectives = [] - CodeComments = [] - }, + ParsedInputTrivia.Empty, Set.empty ) ) @@ -2829,14 +2821,11 @@ type internal FsiDynamicCompiler = WithImplicitHome (tcConfigB, directoryName sourceFile) (fun () -> ProcessMetaCommandsFromInput - ((fun st (m, nm) -> - tcConfigB.TurnWarningOff(m, nm) - st), - (fun st (m, path, directive) -> - let st, _ = - fsiDynamicCompiler.PartiallyProcessReferenceOrPackageIncludePathDirective(ctok, st, directive, path, false, m) + ((fun st (m, path, directive) -> + let st, _ = + fsiDynamicCompiler.PartiallyProcessReferenceOrPackageIncludePathDirective(ctok, st, directive, path, false, m) - st), + st), (fun _ _ -> ())) (tcConfigB, input, !!Path.GetDirectoryName(sourceFile), istate)) @@ -2875,10 +2864,6 @@ type internal FsiDynamicCompiler fsiConsoleOutput.uprintfn "]" - for (warnNum, ranges) in closure.NoWarns do - for m in ranges do - tcConfigB.TurnWarningOff(m, warnNum) - // Play errors and warnings from resolution closure.ResolutionDiagnostics |> List.iter diagnosticSink @@ -3686,7 +3671,7 @@ type FsiInteractionProcessor error (Error(FSIstrings.SR.fsiDirectoryDoesNotExist (path), m)) /// Parse one interaction. Called on the parser thread. - let ParseInteraction (tokenizer: LexFilter.LexFilter) = + let ParseInteraction diagnosticOptions (tokenizer: LexFilter.LexFilter) = let mutable lastToken = Parser.ELSE // Any token besides SEMICOLON_SEMICOLON will do for initial value try @@ -3702,6 +3687,8 @@ type FsiInteractionProcessor Parser.interaction lexerWhichSavesLastToken tokenizer.LexBuffer) + WarnScopes.MergeInto diagnosticOptions false [] tokenizer.LexBuffer + Some input with e -> // On error, consume tokens until to ;; or EOF. @@ -3730,7 +3717,7 @@ type FsiInteractionProcessor let tokenizer = fsiStdinLexerProvider.CreateBufferLexer("hdummy.fsx", lexbuf, diagnosticsLogger) - let parsedInteraction = ParseInteraction tokenizer + let parsedInteraction = ParseInteraction tcConfigB.diagnosticsOptions tokenizer match parsedInteraction with | Some(ParsedScriptInteraction.Definitions([ SynModuleDecl.Expr(e, _) ], _)) -> @@ -3839,12 +3826,6 @@ type FsiInteractionProcessor istate, Completed None - | ParsedHashDirective("nowarn", nowarnArguments, m) -> - let numbers = (parsedHashDirectiveArgumentsNoCheck nowarnArguments) - - List.iter (fun (d: string) -> tcConfigB.TurnWarningOff(m, d)) numbers - istate, Completed None - | ParsedHashDirective("terms", [], _) -> tcConfigB.showTerms <- not tcConfigB.showTerms istate, Completed None @@ -4147,6 +4128,7 @@ type FsiInteractionProcessor runCodeOnMainThread, istate: FsiDynamicCompilerState, tokenizer: LexFilter.LexFilter, + diagnosticOptions, diagnosticsLogger, ?cancellationToken: CancellationToken ) = @@ -4173,7 +4155,7 @@ type FsiInteractionProcessor // Parse the interaction. When FSI.EXE is waiting for input from the console the // parser thread is blocked somewhere deep this call. - let action = ParseInteraction tokenizer + let action = ParseInteraction diagnosticOptions tokenizer if progress then fprintfn fsiConsoleOutput.Out "returned from ParseInteraction...calling runCodeOnMainThread..." @@ -4211,7 +4193,13 @@ type FsiInteractionProcessor let rec run istate = let status = - processor.ParseAndExecuteInteractionFromLexbuf((fun f istate -> f ctok istate), istate, tokenizer, diagnosticsLogger) + processor.ParseAndExecuteInteractionFromLexbuf( + (fun f istate -> f ctok istate), + istate, + tokenizer, + tcConfigB.diagnosticsOptions, + diagnosticsLogger + ) ProcessStepStatus status None (fun _ istate -> run istate) @@ -4291,7 +4279,7 @@ type FsiInteractionProcessor currState |> InteractiveCatch diagnosticsLogger (fun istate -> - let expr = ParseInteraction tokenizer + let expr = ParseInteraction tcConfigB.diagnosticsOptions tokenizer ExecuteParsedInteractionOnMainThread(ctok, diagnosticsLogger, expr, istate, cancellationToken)) |> commitResult @@ -4344,7 +4332,7 @@ type FsiInteractionProcessor // mainForm.Invoke to pipe a message back through the form's main event loop. (The message // is a delegate to execute on the main Thread) // - member processor.StartStdinReadAndProcessThread diagnosticsLogger = + member processor.StartStdinReadAndProcessThread(diagnosticOptions, diagnosticsLogger) = if progress then fprintfn fsiConsoleOutput.Out "creating stdinReaderThread" @@ -4378,6 +4366,7 @@ type FsiInteractionProcessor runCodeOnMainThread, currState, currTokenizer, + diagnosticOptions, diagnosticsLogger ) @@ -4985,7 +4974,7 @@ type FsiEvaluationSession | _ -> ()) fsiInteractionProcessor.LoadInitialFiles(ctokRun, diagnosticsLogger) - fsiInteractionProcessor.StartStdinReadAndProcessThread(diagnosticsLogger) + fsiInteractionProcessor.StartStdinReadAndProcessThread(tcConfigB.diagnosticsOptions, diagnosticsLogger) DriveFsiEventLoop(fsi, fsiInterruptController, fsiConsoleOutput) diff --git a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs index f03db8f5e6f..0e2ced16da4 100644 --- a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs +++ b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs @@ -1332,9 +1332,9 @@ module Pass4_RewriteAssembly = let rhs, z = TransModuleContents penv z rhs ModuleOrNamespaceBinding.Module(nm, rhs), z - let TransImplFile penv z (CheckedImplFile (fragName, pragmas, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = + let TransImplFile penv z (CheckedImplFile (fragName, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = let contentsR, z = TransModuleContents penv z contents - (CheckedImplFile (fragName, pragmas, signature, contentsR, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)), z + (CheckedImplFile (fragName, signature, contentsR, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)), z //------------------------------------------------------------------------- // pass5: copyExpr diff --git a/src/Compiler/Optimize/Optimizer.fs b/src/Compiler/Optimize/Optimizer.fs index 2840331f54b..52e404cea3e 100644 --- a/src/Compiler/Optimize/Optimizer.fs +++ b/src/Compiler/Optimize/Optimizer.fs @@ -4367,7 +4367,7 @@ and OptimizeModuleDefs cenv (env, bindInfosColl) defs = (defs, UnionOptimizationInfos minfos), (env, bindInfosColl) and OptimizeImplFileInternal cenv env isIncrementalFragment hidden implFile = - let (CheckedImplFile (qname, pragmas, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = implFile + let (CheckedImplFile (qname, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = implFile let env, contentsR, minfo, hidden = // FSI compiles interactive fragments as if you're typing incrementally into one module. // @@ -4389,7 +4389,7 @@ and OptimizeImplFileInternal cenv env isIncrementalFragment hidden implFile = let env = BindValsInModuleOrNamespace cenv minfo env env, mexprR, minfoExternal, hidden - let implFileR = CheckedImplFile (qname, pragmas, signature, contentsR, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) + let implFileR = CheckedImplFile (qname, signature, contentsR, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) env, implFileR, minfo, hidden diff --git a/src/Compiler/Service/BackgroundCompiler.fs b/src/Compiler/Service/BackgroundCompiler.fs index 5eb8bd35f99..29d73f63617 100644 --- a/src/Compiler/Service/BackgroundCompiler.fs +++ b/src/Compiler/Service/BackgroundCompiler.fs @@ -1350,8 +1350,6 @@ type internal BackgroundCompiler yield! otherFlags for r in loadClosure.References do yield "-r:" + fst r - for code, _ in loadClosure.NoWarns do - yield "--nowarn:" + code |] let options = @@ -1479,7 +1477,7 @@ type internal BackgroundCompiler member _.BeforeBackgroundFileCheck = self.BeforeBackgroundFileCheck - member _.CheckFileInProject + member this.CheckFileInProject ( parseResults: FSharpParseFileResults, fileName: string, @@ -1488,7 +1486,13 @@ type internal BackgroundCompiler options: FSharpProjectOptions, userOpName: string ) : Async = - self.CheckFileInProject(parseResults, fileName, fileVersion, sourceText, options, userOpName) + async { + ignore parseResults + + let! _, result = this.ParseAndCheckFileInProject(fileName, fileVersion, sourceText, options, userOpName) + + return result + } member _.CheckFileInProjectAllowingStaleCachedResults ( diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index 57d322c81a8..a169b4a6a56 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -3102,8 +3102,14 @@ module internal ParseAndCheckFile = errHandler.CollectedDiagnostics(None), parseResult, errHandler.AnyErrors let ApplyLoadClosure - (tcConfig, parsedMainInput, mainInputFileName: string, loadClosure: LoadClosure option, tcImports: TcImports, backgroundDiagnostics) - = + ( + tcConfig: TcConfig, + parsedMainInput, + mainInputFileName: string, + loadClosure: LoadClosure option, + tcImports: TcImports, + backgroundDiagnostics + ) = // If additional references were brought in by the preprocessor then we need to process them match loadClosure with @@ -3240,13 +3246,6 @@ module internal ParseAndCheckFile = use _unwindBP = UseBuildPhase BuildPhase.TypeCheck - // Apply nowarns to tcConfig (may generate errors, so ensure diagnosticsLogger is installed) - let tcConfig = - ApplyNoWarnsToTcConfig(tcConfig, parsedMainInput, !!Path.GetDirectoryName(mainInputFileName)) - - // update the error handler with the modified tcConfig - errHandler.DiagnosticOptions <- tcConfig.diagnosticsOptions - // If additional references were brought in by the preprocessor then we need to process them ApplyLoadClosure(tcConfig, parsedMainInput, mainInputFileName, loadClosure, tcImports, backgroundDiagnostics) @@ -3293,7 +3292,9 @@ module internal ParseAndCheckFile = // Play background errors and warnings for this file. do for err, severity in backgroundDiagnostics do - diagnosticSink (err, severity) + match err.AdjustSeverity(tcConfig.diagnosticsOptions, severity) with + | FSharpDiagnosticSeverity.Hidden -> () + | s -> diagnosticSink (err, s) let (tcEnvAtEnd, _, implFiles, ccuSigsForFiles), tcState = resOpt diff --git a/src/Compiler/Service/IncrementalBuild.fs b/src/Compiler/Service/IncrementalBuild.fs index 0cdc4b9235e..f98ccd09a12 100644 --- a/src/Compiler/Service/IncrementalBuild.fs +++ b/src/Compiler/Service/IncrementalBuild.fs @@ -30,6 +30,7 @@ open FSharp.Compiler.NameResolution open FSharp.Compiler.ParseAndCheckInputs open FSharp.Compiler.ScriptClosure open FSharp.Compiler.Syntax +open FSharp.Compiler.SyntaxTrivia open FSharp.Compiler.TcGlobals open FSharp.Compiler.Text open FSharp.Compiler.Text.Range @@ -128,9 +129,8 @@ module IncrementalBuildSyntaxTree = sigName, [], [], - [], isLastCompiland, - { ConditionalDirectives = []; CodeComments = [] }, + ParsedInputTrivia.Empty, Set.empty ) ), sourceRange, fileName, [||] @@ -254,7 +254,7 @@ type BoundModel private ( IncrementalBuilderEventTesting.MRU.Add(IncrementalBuilderEventTesting.IBETypechecked fileName) let capturingDiagnosticsLogger = CapturingDiagnosticsLogger("TypeCheck") - let diagnosticsLogger = GetDiagnosticsLoggerFilteringByScopedPragmas(false, input.ScopedPragmas, tcConfig.diagnosticsOptions, capturingDiagnosticsLogger) + let diagnosticsLogger = GetDiagnosticsLoggerFilteringByScopedNowarn(tcConfig.diagnosticsOptions, capturingDiagnosticsLogger) use _ = new CompilationGlobalsScope(diagnosticsLogger, BuildPhase.TypeCheck) beforeFileChecked.Trigger fileName diff --git a/src/Compiler/Service/ServiceLexing.fs b/src/Compiler/Service/ServiceLexing.fs index 8e97816290f..bc07224d70b 100644 --- a/src/Compiler/Service/ServiceLexing.fs +++ b/src/Compiler/Service/ServiceLexing.fs @@ -404,6 +404,7 @@ module internal TokenClassifications = | HASH_LIGHT _ | HASH_LINE _ + | WARN_DIRECTIVE _ | HASH_IF _ | HASH_ELSE _ | HASH_ENDIF _ -> (FSharpTokenColorKind.PreprocessorKeyword, FSharpTokenCharKind.WhiteSpace, FSharpTokenTriggerClass.None) @@ -935,6 +936,21 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, maxLength: int option, fi let offset = beforeIdent + identLength processWhiteAndComment str offset delay cont) + let processWarnDirective (str: string) leftc rightc cont = + let hashIdx = str.IndexOf("#", StringComparison.Ordinal) + let commentIdx = str.IndexOf("//", StringComparison.Ordinal) + + if commentIdx > 0 then + delayToken (COMMENT cont, leftc + commentIdx - 1, rightc) + + let rightc = if commentIdx > 0 then leftc + commentIdx else rightc + + if (hashIdx > 0) then + delayToken (WARN_DIRECTIVE(range0, "", cont), hashIdx, rightc) + WHITESPACE cont, leftc, leftc + hashIdx - 1 + else + WARN_DIRECTIVE(range0, "", cont), leftc, rightc + // Set up the initial file position do match fileName with @@ -1035,7 +1051,8 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, maxLength: int option, fi | HASH_IF(m, lineStr, cont) when lineStr <> "" -> false, processHashIfLine m.StartColumn lineStr cont | HASH_ELSE(m, lineStr, cont) when lineStr <> "" -> false, processHashEndElse m.StartColumn lineStr 4 cont | HASH_ENDIF(m, lineStr, cont) when lineStr <> "" -> false, processHashEndElse m.StartColumn lineStr 5 cont - | HASH_IDENT(ident) -> + | WARN_DIRECTIVE(_, s, cont) -> false, processWarnDirective s leftc rightc cont + | HASH_IDENT ident -> delayToken (IDENT ident, leftc + 1, rightc) false, (HASH, leftc, leftc) | RQUOTE_DOT(s, raw) -> @@ -1173,9 +1190,7 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, maxLength: int option, fi | true, "silentCd" | true, "q" | true, "quit" - | true, "help" - // These are for script and non-script - | _, "nowarn" -> + | true, "help" -> // Merge both tokens into one. let lexcontFinal = if isCached then @@ -1286,6 +1301,7 @@ type FSharpTokenKind = | HashIf | HashElse | HashEndIf + | WarnDirective | CommentTrivia | WhitespaceTrivia | HashLine @@ -1497,6 +1513,7 @@ type FSharpToken = | HASH_IF _ -> FSharpTokenKind.HashIf | HASH_ELSE _ -> FSharpTokenKind.HashElse | HASH_ENDIF _ -> FSharpTokenKind.HashEndIf + | WARN_DIRECTIVE _ -> FSharpTokenKind.WarnDirective | COMMENT _ -> FSharpTokenKind.CommentTrivia | WHITESPACE _ -> FSharpTokenKind.WhitespaceTrivia | HASH_LINE _ -> FSharpTokenKind.HashLine diff --git a/src/Compiler/Service/ServiceLexing.fsi b/src/Compiler/Service/ServiceLexing.fsi index ee2ab7411d5..261c7c6764e 100755 --- a/src/Compiler/Service/ServiceLexing.fsi +++ b/src/Compiler/Service/ServiceLexing.fsi @@ -371,6 +371,7 @@ type public FSharpTokenKind = | HashIf | HashElse | HashEndIf + | WarnDirective | CommentTrivia | WhitespaceTrivia | HashLine diff --git a/src/Compiler/Service/TransparentCompiler.fs b/src/Compiler/Service/TransparentCompiler.fs index 4385ca4f1e3..57bf639a224 100644 --- a/src/Compiler/Service/TransparentCompiler.fs +++ b/src/Compiler/Service/TransparentCompiler.fs @@ -299,7 +299,9 @@ type CacheSizes = { ParseFileKeepStrongly = 50 * sizeFactor - ParseFileKeepWeakly = 20 * sizeFactor + // Since ParseFile version is just a content hash, we keep only one version + // in order to ensure that we re-parse after undo for the sake of WarnScopes + ParseFileKeepWeakly = 0 // 20 * sizeFactor ParseFileWithoutProjectKeepStrongly = 5 * sizeFactor ParseFileWithoutProjectKeepWeakly = 2 * sizeFactor ParseAndCheckFileInProjectKeepStrongly = sizeFactor @@ -341,7 +343,9 @@ type internal CompilerCaches(cacheSizes: CacheSizes) = member _.CacheSizes = cs - member val ParseFile = AsyncMemoize(keepStrongly = cs.ParseFileKeepStrongly, keepWeakly = cs.ParseFileKeepWeakly, name = "ParseFile") + member val ParseFile = + AsyncMemoize(keepStrongly = cs.ParseFileKeepStrongly, keepWeakly = cs.ParseFileKeepWeakly, name = "ParseFile") + : AsyncMemoize<(FSharpProjectIdentifier * string), (string * string * bool), ProjectSnapshot.FSharpParsedFile> member val ParseFileWithoutProject = AsyncMemoize( @@ -1379,7 +1383,6 @@ type internal TransparentCompiler let mainInputFileName = file.FileName let sourceText = file.SourceText - let parsedMainInput = file.ParsedInput // Initialize the error handler let errHandler = @@ -1392,14 +1395,10 @@ type internal TransparentCompiler tcConfig.flatErrors ) - // Apply nowarns to tcConfig (may generate errors, so ensure diagnosticsLogger is installed) - let tcConfig = - ApplyNoWarnsToTcConfig(tcConfig, parsedMainInput, !!Path.GetDirectoryName(mainInputFileName)) - let diagnosticsLogger = errHandler.DiagnosticsLogger let diagnosticsLogger = - GetDiagnosticsLoggerFilteringByScopedPragmas(false, input.ScopedPragmas, tcConfig.diagnosticsOptions, diagnosticsLogger) + GetDiagnosticsLoggerFilteringByScopedNowarn(tcConfig.diagnosticsOptions, diagnosticsLogger) use _ = new CompilationGlobalsScope(diagnosticsLogger, BuildPhase.TypeCheck) @@ -1644,9 +1643,7 @@ type internal TransparentCompiler let extraLogger = CapturingDiagnosticsLogger("DiagnosticsWhileCreatingDiagnostics") use _ = new CompilationGlobalsScope(extraLogger, BuildPhase.TypeCheck) - // Apply nowarns to tcConfig (may generate errors, so ensure diagnosticsLogger is installed) - let tcConfig = - ApplyNoWarnsToTcConfig(bootstrapInfo.TcConfig, parseResults.ParseTree, Path.GetDirectoryName fileName |> (!!)) + let tcConfig = bootstrapInfo.TcConfig let diagnosticsOptions = tcConfig.diagnosticsOptions @@ -2077,22 +2074,20 @@ type internal TransparentCompiler // TODO: might need to deal with exceptions here: use _ = new CompilationGlobalsScope(DiscardErrorsLogger, BuildPhase.Parse) - let! tcConfigB, sourceFileNames, _ = ComputeTcConfigBuilder projectSnapshot - - let tcConfig = TcConfig.Create(tcConfigB, validate = true) - let _index, fileSnapshot = - projectSnapshot.SourceFiles - |> Seq.mapi pair - |> Seq.tryFind (fun (_, f) -> f.FileName = fileName) - |> Option.defaultWith (fun () -> failwith $"File not found: {fileName}") + match! ComputeBootstrapInfo projectSnapshot with + | None, creationDiags -> return emptyParseResult fileName creationDiags + | Some bootstrapInfo, _ -> + let tcConfig = bootstrapInfo.TcConfig - let isExe = tcConfig.target.IsExe - let isLastCompiland = fileName = (sourceFileNames |> List.last) + let fileSnapshot = + projectSnapshot.SourceFiles |> List.find (fun f -> f.FileName = fileName) - let! file = LoadSource fileSnapshot isExe isLastCompiland - let! parseResult = getParseResult projectSnapshot Seq.empty file tcConfig - return parseResult + let isExe = tcConfig.target.IsExe + let isLastCompiland = fileName = List.last projectSnapshot.SourceFileNames + let! file = LoadSource fileSnapshot isExe isLastCompiland + let! parseResult = getParseResult projectSnapshot Seq.empty file tcConfig + return parseResult } member _.ParseFileWithoutProject @@ -2417,14 +2412,7 @@ type internal TransparentCompiler assumeDotNetFramework otherFlags - let otherFlags = - [ - yield "--noframework" - yield "--warn:3" - yield! otherFlags - for code, _ in loadClosure.NoWarns do - yield "--nowarn:" + code - ] + let otherFlags = [ yield "--noframework"; yield "--warn:3"; yield! otherFlags ] // Once we do have the script closure, we can populate the cache to re-use can later. let loadClosureKey = diff --git a/src/Compiler/Symbols/Exprs.fs b/src/Compiler/Symbols/Exprs.fs index 5ec81f6861d..33c87edb597 100644 --- a/src/Compiler/Symbols/Exprs.fs +++ b/src/Compiler/Symbols/Exprs.fs @@ -1353,7 +1353,7 @@ and FSharpImplementationFileDeclaration = and FSharpImplementationFileContents(cenv, mimpl) = let g = cenv.g - let (CheckedImplFile (qname, _pragmas, _, contents, hasExplicitEntryPoint, isScript, _anonRecdTypes, _)) = mimpl + let (CheckedImplFile (qname, _, contents, hasExplicitEntryPoint, isScript, _anonRecdTypes, _)) = mimpl let rec getBind (bind: Binding) = let v = bind.Var assert v.IsCompiledAsTopLevel diff --git a/src/Compiler/SyntaxTree/LexHelpers.fs b/src/Compiler/SyntaxTree/LexHelpers.fs index faf85ad811d..dddaaa37a94 100644 --- a/src/Compiler/SyntaxTree/LexHelpers.fs +++ b/src/Compiler/SyntaxTree/LexHelpers.fs @@ -9,17 +9,16 @@ open Internal.Utilities open Internal.Utilities.Library open Internal.Utilities.Text.Lexing -open FSharp.Compiler.IO open FSharp.Compiler.DiagnosticsLogger open FSharp.Compiler.Features -open FSharp.Compiler.LexerStore +open FSharp.Compiler.IO open FSharp.Compiler.ParseHelpers -open FSharp.Compiler.UnicodeLexing open FSharp.Compiler.Parser open FSharp.Compiler.Syntax open FSharp.Compiler.Syntax.PrettyNaming open FSharp.Compiler.Text open FSharp.Compiler.Text.Range +open FSharp.Compiler.UnicodeLexing /// The "mock" file name used by fsi.exe when reading from stdin. /// Has special treatment by the lexer, i.e. __SOURCE_DIRECTORY__ becomes GetCurrentDirectory() diff --git a/src/Compiler/SyntaxTree/LexerStore.fs b/src/Compiler/SyntaxTree/LexerStore.fs index 2914d944c20..e2c6010a561 100644 --- a/src/Compiler/SyntaxTree/LexerStore.fs +++ b/src/Compiler/SyntaxTree/LexerStore.fs @@ -4,40 +4,18 @@ module internal FSharp.Compiler.LexerStore open FSharp.Compiler.SyntaxTreeOps open FSharp.Compiler.SyntaxTrivia -open FSharp.Compiler.UnicodeLexing open FSharp.Compiler.Text open FSharp.Compiler.Text.Position open FSharp.Compiler.Text.Range +open FSharp.Compiler.UnicodeLexing open FSharp.Compiler.Xml -//------------------------------------------------------------------------ -// Lexbuf.BufferLocalStore is used during lexing/parsing of a file for different purposes. -// All access happens through the functions and modules below. -//------------------------------------------------------------------------ - -let private getStoreData<'T when 'T: not null> (lexbuf: Lexbuf) key (getInitialData: unit -> 'T) = - let store = lexbuf.BufferLocalStore - - match store.TryGetValue key with - | true, data -> data :?> 'T - | _ -> - let data = getInitialData () - store[key] <- data - data - -let private tryGetStoreData<'T when 'T: not null> (lexbuf: Lexbuf) key = - let store = lexbuf.BufferLocalStore - - match store.TryGetValue key with - | true, data -> Some(data :?> 'T) - | _ -> None - //------------------------------------------------------------------------ // A SynArgNameGenerator for the current file, used by the parser //------------------------------------------------------------------------ let getSynArgNameGenerator (lexbuf: Lexbuf) = - getStoreData lexbuf "SynArgNameGenerator" SynArgNameGenerator + lexbuf.GetLocalData("SynArgNameGenerator", SynArgNameGenerator) //------------------------------------------------------------------------ // A XmlDocCollector, used to hold the current accumulated Xml doc lines, and related access functions @@ -47,8 +25,8 @@ let getSynArgNameGenerator (lexbuf: Lexbuf) = module XmlDocStore = let private xmlDocKey = "XmlDoc" - let private getCollector (lexbuf: Lexbuf) = - getStoreData lexbuf xmlDocKey XmlDocCollector + let private getCollector (lexbuf: Lexbuf) : XmlDocCollector = + lexbuf.GetLocalData(xmlDocKey, XmlDocCollector) /// Called from the lexer to save a single line of XML doc comment. let SaveXmlDocLine (lexbuf: Lexbuf, lineText, range: range) = @@ -78,9 +56,9 @@ module XmlDocStore = /// Called from the parser each time we parse a construct that marks the end of an XML doc comment range, /// e.g. a 'type' declaration. The markerRange is the range of the keyword that delimits the construct. let GrabXmlDocBeforeMarker (lexbuf: Lexbuf, markerRange: range) = - match tryGetStoreData lexbuf xmlDocKey with + match lexbuf.TryGetLocalData xmlDocKey with | Some collector -> PreXmlDoc.CreateFromGrabPoint(collector, markerRange.Start) - | _ -> PreXmlDoc.Empty + | None -> PreXmlDoc.Empty let ReportInvalidXmlDocPositions (lexbuf: Lexbuf) = let collector = getCollector lexbuf @@ -106,7 +84,7 @@ let rec LexerIfdefEval (lookup: string -> bool) = [] module IfdefStore = let private getStore (lexbuf: Lexbuf) = - getStoreData lexbuf "Ifdef" ResizeArray + lexbuf.GetLocalData("Ifdef", ResizeArray) let private mkRangeWithoutLeadingWhitespace (lexed: string) (m: range) : range = let startColumn = lexed.Length - lexed.TrimStart().Length @@ -150,7 +128,7 @@ module IfdefStore = [] module CommentStore = let private getStore (lexbuf: Lexbuf) = - getStoreData lexbuf "Comments" ResizeArray + lexbuf.GetLocalData("Comments", ResizeArray) let SaveSingleLineComment (lexbuf: Lexbuf, startRange: range, endRange: range) = let store = getStore lexbuf diff --git a/src/Compiler/SyntaxTree/LexerStore.fsi b/src/Compiler/SyntaxTree/LexerStore.fsi index 952a0cc6f81..e6bda944438 100644 --- a/src/Compiler/SyntaxTree/LexerStore.fsi +++ b/src/Compiler/SyntaxTree/LexerStore.fsi @@ -4,8 +4,8 @@ module internal FSharp.Compiler.LexerStore open FSharp.Compiler.SyntaxTreeOps open FSharp.Compiler.SyntaxTrivia -open FSharp.Compiler.UnicodeLexing open FSharp.Compiler.Text +open FSharp.Compiler.UnicodeLexing open FSharp.Compiler.Xml val getSynArgNameGenerator: Lexbuf -> SynArgNameGenerator diff --git a/src/Compiler/SyntaxTree/ParseHelpers.fs b/src/Compiler/SyntaxTree/ParseHelpers.fs index a8a8724f58b..62eb2159081 100644 --- a/src/Compiler/SyntaxTree/ParseHelpers.fs +++ b/src/Compiler/SyntaxTree/ParseHelpers.fs @@ -85,7 +85,7 @@ type LexerIfdefStack = LexerIfdefStackEntries /// Specifies how the 'endline' function in the lexer should continue after /// it reaches end of line or eof. The options are to continue with 'token' function -/// or to continue with 'skip' function. +/// or to continue with 'ifdefSkip' function. [] type LexerEndlineContinuation = | Token diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index bd918e8848a..978a75ab6cc 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -1759,9 +1759,6 @@ type ParsedImplFile = ParsedImplFile of hashDirectives: ParsedHashDirective list [] type ParsedSigFile = ParsedSigFile of hashDirectives: ParsedHashDirective list * fragments: ParsedSigFileFragment list -[] -type ScopedPragma = WarningOff of range: range * warningNumber: int - [] type QualifiedNameOfFile = | QualifiedNameOfFile of Ident @@ -1778,19 +1775,15 @@ type ParsedImplFileInput = fileName: string * isScript: bool * qualifiedNameOfFile: QualifiedNameOfFile * - scopedPragmas: ScopedPragma list * hashDirectives: ParsedHashDirective list * contents: SynModuleOrNamespace list * flags: (bool * bool) * - trivia: ParsedImplFileInputTrivia * + trivia: ParsedInputTrivia * identifiers: Set member x.QualifiedName = (let (ParsedImplFileInput(qualifiedNameOfFile = qualNameOfFile)) = x in qualNameOfFile) - member x.ScopedPragmas = - (let (ParsedImplFileInput(scopedPragmas = scopedPragmas)) = x in scopedPragmas) - member x.HashDirectives = (let (ParsedImplFileInput(hashDirectives = hashDirectives)) = x in hashDirectives) @@ -1812,18 +1805,14 @@ type ParsedSigFileInput = | ParsedSigFileInput of fileName: string * qualifiedNameOfFile: QualifiedNameOfFile * - scopedPragmas: ScopedPragma list * hashDirectives: ParsedHashDirective list * contents: SynModuleOrNamespaceSig list * - trivia: ParsedSigFileInputTrivia * + trivia: ParsedInputTrivia * identifiers: Set member x.QualifiedName = (let (ParsedSigFileInput(qualifiedNameOfFile = qualNameOfFile)) = x in qualNameOfFile) - member x.ScopedPragmas = - (let (ParsedSigFileInput(scopedPragmas = scopedPragmas)) = x in scopedPragmas) - member x.HashDirectives = (let (ParsedSigFileInput(hashDirectives = hashDirectives)) = x in hashDirectives) @@ -1844,11 +1833,6 @@ type ParsedInput = | ParsedInput.ImplFile file -> file.FileName | ParsedInput.SigFile file -> file.FileName - member inp.ScopedPragmas = - match inp with - | ParsedInput.ImplFile file -> file.ScopedPragmas - | ParsedInput.SigFile file -> file.ScopedPragmas - member inp.QualifiedName = match inp with | ParsedInput.ImplFile file -> file.QualifiedName diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index f50adfa289d..30ecc56c166 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -1933,12 +1933,6 @@ type ParsedImplFile = [] type ParsedSigFile = ParsedSigFile of hashDirectives: ParsedHashDirective list * fragments: ParsedSigFileFragment list -/// Represents a scoped pragma -[] -type ScopedPragma = - /// A pragma to turn a warning off - | WarningOff of range: range * warningNumber: int - /// Represents a qualifying name for anonymous module specifications and implementations, [] type QualifiedNameOfFile = @@ -1960,11 +1954,10 @@ type ParsedImplFileInput = fileName: string * isScript: bool * qualifiedNameOfFile: QualifiedNameOfFile * - scopedPragmas: ScopedPragma list * hashDirectives: ParsedHashDirective list * contents: SynModuleOrNamespace list * flags: (bool * bool) * - trivia: ParsedImplFileInputTrivia * + trivia: ParsedInputTrivia * identifiers: Set member FileName: string @@ -1973,13 +1966,11 @@ type ParsedImplFileInput = member QualifiedName: QualifiedNameOfFile - member ScopedPragmas: ScopedPragma list - member HashDirectives: ParsedHashDirective list member Contents: SynModuleOrNamespace list - member Trivia: ParsedImplFileInputTrivia + member Trivia: ParsedInputTrivia member IsLastCompiland: bool @@ -1991,23 +1982,20 @@ type ParsedSigFileInput = | ParsedSigFileInput of fileName: string * qualifiedNameOfFile: QualifiedNameOfFile * - scopedPragmas: ScopedPragma list * hashDirectives: ParsedHashDirective list * contents: SynModuleOrNamespaceSig list * - trivia: ParsedSigFileInputTrivia * + trivia: ParsedInputTrivia * identifiers: Set member FileName: string member QualifiedName: QualifiedNameOfFile - member ScopedPragmas: ScopedPragma list - member HashDirectives: ParsedHashDirective list member Contents: SynModuleOrNamespaceSig list - member Trivia: ParsedSigFileInputTrivia + member Trivia: ParsedInputTrivia /// Represents the syntax tree for a parsed implementation or signature file [] @@ -2027,8 +2015,5 @@ type ParsedInput = /// Gets the qualified name used to help match signature and implementation files member QualifiedName: QualifiedNameOfFile - /// Gets the #nowarn and other scoped pragmas - member ScopedPragmas: ScopedPragma list - /// Gets a set of all identifiers used in this parsed input. Only populated if captureIdentifiersWhenParsing option was used. member Identifiers: Set diff --git a/src/Compiler/SyntaxTree/SyntaxTrivia.fs b/src/Compiler/SyntaxTree/SyntaxTrivia.fs index 2cd42701e70..2137ffe4275 100644 --- a/src/Compiler/SyntaxTree/SyntaxTrivia.fs +++ b/src/Compiler/SyntaxTree/SyntaxTrivia.fs @@ -22,24 +22,30 @@ and [] IfDirectiveExpression = | Not of IfDirectiveExpression | Ident of string +[] +type WarnDirectiveTrivia = + | Nowarn of warnNumbers: int list * range + | Warnon of warnNumbers: int list * range + [] type CommentTrivia = | LineComment of range: range | BlockComment of range: range [] -type ParsedImplFileInputTrivia = +type ParsedInputTrivia = { ConditionalDirectives: ConditionalDirectiveTrivia list + WarnDirectives: WarnDirectiveTrivia list CodeComments: CommentTrivia list } -[] -type ParsedSigFileInputTrivia = - { - ConditionalDirectives: ConditionalDirectiveTrivia list - CodeComments: CommentTrivia list - } + static member Empty = + { + ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] + } [] type SynExprTryWithTrivia = diff --git a/src/Compiler/SyntaxTree/SyntaxTrivia.fsi b/src/Compiler/SyntaxTree/SyntaxTrivia.fsi index ab6525bc010..9d4e50ce1f4 100644 --- a/src/Compiler/SyntaxTree/SyntaxTrivia.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTrivia.fsi @@ -34,33 +34,32 @@ type IfDirectiveExpression = | Not of IfDirectiveExpression | Ident of string +[] +type WarnDirectiveTrivia = + | Nowarn of warnNumbers: int list * range + | Warnon of warnNumbers: int list * range + [] type CommentTrivia = | LineComment of range: range | BlockComment of range: range -/// Represents additional information for ParsedImplFileInput +/// Represents additional information for ParsedInput [] -type ParsedImplFileInputTrivia = +type ParsedInputTrivia = { /// Preprocessor directives of type #if, #else or #endif ConditionalDirectives: ConditionalDirectiveTrivia list - /// Represent code comments found in the source file - CodeComments: CommentTrivia list - } - -/// Represents additional information for ParsedSigFileInputTrivia -[] -type ParsedSigFileInputTrivia = - { - /// Preprocessor directives of type #if, #else or #endif - ConditionalDirectives: ConditionalDirectiveTrivia list + /// Warn directives (#nowarn / #warnon) + WarnDirectives: WarnDirectiveTrivia list /// Represent code comments found in the source file CodeComments: CommentTrivia list } + static member internal Empty: ParsedInputTrivia + /// Represents additional information for SynExpr.TryWith [] type SynExprTryWithTrivia = diff --git a/src/Compiler/SyntaxTree/UnicodeLexing.fs b/src/Compiler/SyntaxTree/UnicodeLexing.fs index abb3d0e3d83..4ea41cbcf84 100644 --- a/src/Compiler/SyntaxTree/UnicodeLexing.fs +++ b/src/Compiler/SyntaxTree/UnicodeLexing.fs @@ -8,6 +8,21 @@ open Internal.Utilities.Text.Lexing type Lexbuf = LexBuffer +type LexBuffer<'char> with + + member lexbuf.GetLocalData<'T when 'T: not null>(key: string, initializer) = + match lexbuf.BufferLocalStore.TryGetValue key with + | true, data -> data :?> 'T + | _ -> + let data = initializer () + lexbuf.BufferLocalStore[key] <- data + data + + member lexbuf.TryGetLocalData<'T when 'T: not null>(key: string) = + match lexbuf.BufferLocalStore.TryGetValue key with + | true, data -> Some(data :?> 'T) + | _ -> None + let StringAsLexbuf (reportLibraryOnlyFeatures, langVersion, strictIndentation, s: string) = LexBuffer.FromChars(reportLibraryOnlyFeatures, langVersion, strictIndentation, s.ToCharArray()) diff --git a/src/Compiler/SyntaxTree/UnicodeLexing.fsi b/src/Compiler/SyntaxTree/UnicodeLexing.fsi index 80d772e03e1..ee722ee08c3 100644 --- a/src/Compiler/SyntaxTree/UnicodeLexing.fsi +++ b/src/Compiler/SyntaxTree/UnicodeLexing.fsi @@ -9,6 +9,10 @@ open Internal.Utilities.Text.Lexing type Lexbuf = LexBuffer +type LexBuffer<'char> with + member GetLocalData<'T when 'T: not null> : key: string * initializer: (unit -> 'T) -> 'T + member TryGetLocalData<'T when 'T: not null> : key: string -> 'T option + val StringAsLexbuf: reportLibraryOnlyFeatures: bool * langVersion: LanguageVersion * strictIndentation: bool option * string -> Lexbuf diff --git a/src/Compiler/SyntaxTree/WarnScopes.fs b/src/Compiler/SyntaxTree/WarnScopes.fs new file mode 100644 index 00000000000..2efab44f5de --- /dev/null +++ b/src/Compiler/SyntaxTree/WarnScopes.fs @@ -0,0 +1,441 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler + +open FSharp.Compiler.Diagnostics +open FSharp.Compiler.DiagnosticsLogger +open FSharp.Compiler.Features +open FSharp.Compiler.SyntaxTrivia +open FSharp.Compiler.Text +open FSharp.Compiler.Text.Position +open FSharp.Compiler.Text.Range +open FSharp.Compiler.UnicodeLexing +open Internal.Utilities.Library +open System.Text.RegularExpressions + +[] +module internal WarnScopes = + + // ************************************* + // Temporary storage (during lexing one file) for warn scope related data + // ************************************* + + type private FileIndex = int + type private WarningNumber = int + type private LineNumber = int + + [] + type private WarnCmd = + | Nowarn of WarningNumber * range + | Warnon of WarningNumber * range + + member w.WarningNumber = + match w with + | Nowarn(n, _) + | Warnon(n, _) -> n + + type private WarnDirective = + { + DirectiveRange: range + CommentRange: range option + WarnCmds: WarnCmd list + } + + let private isWarnonDirective (w: WarnDirective) = + match w.WarnCmds with + | [] -> false + | h :: _ -> h.IsWarnon + + type private LineDirective = + { + SurrogateFileIndex: FileIndex + SurrogateLine: LineNumber + OriginalLine: LineNumber + } + + type private LexbufData = + { + OriginalFileIndex: int + mutable WarnDirectives: WarnDirective list + mutable LineDirectives: LineDirective list + } + + let private initialData (lexbuf: Lexbuf) = + { + OriginalFileIndex = lexbuf.StartPos.FileIndex + WarnDirectives = [] + LineDirectives = [] + } + + let private getLexbufData (lexbuf: Lexbuf) = + lexbuf.GetLocalData("WarnScopeData", (fun () -> initialData lexbuf)) + + // ************************************* + // Collect the line directives during lexing + // ************************************* + + let RegisterLineDirective (lexbuf, fileIndex, line: int) = //TODO: send OriginalLine i.o. lexbuf + let data = getLexbufData lexbuf + + let lineDirective = + { + SurrogateFileIndex = fileIndex + SurrogateLine = line + OriginalLine = lexbuf.StartPos.OriginalLine + 1 + } + + data.LineDirectives <- lineDirective :: data.LineDirectives + + // ************************************* + // Collect the warn scopes during lexing + // ************************************* + + let private getNumber (langVersion: LanguageVersion) m (ns: string) = + let argFeature = LanguageFeature.ParsedHashDirectiveArgumentNonQuotes + + let removeQuotes (s: string) = + if s.StartsWithOrdinal "\"" && s.EndsWithOrdinal "\"" then + if s.StartsWithOrdinal "\"\"\"" && s.EndsWithOrdinal "\"\"\"" then + Some(s.Substring(3, s.Length - 6)) + else + Some(s.Substring(1, s.Length - 2)) + elif tryCheckLanguageFeatureAndRecover langVersion argFeature m then + Some s + else + None + + let removePrefix (s: string) = + match s.StartsWithOrdinal "FS", langVersion.SupportsFeature argFeature with + | true, true -> Some(s.Substring 2, s) + | true, false -> + warning (Error(FSComp.SR.buildInvalidWarningNumber s, m)) + None + | false, _ -> Some(s, s) + + let parseInt (intString: string, argString) = + match System.Int32.TryParse intString with + | true, i -> Some i + | false, _ -> + if langVersion.SupportsFeature LanguageFeature.ScopedNowarn then + errorR (Error(FSComp.SR.buildInvalidWarningNumber argString, m)) + elif langVersion.SupportsFeature argFeature then + warning (Error(FSComp.SR.buildInvalidWarningNumber argString, m)) + + None + + ns |> removeQuotes |> Option.bind removePrefix |> Option.bind parseInt + + let private regex = + // This regex is matching the following lexer pattern that brought us here: + // anywhite* ("#nowarn" | "#warnon") anystring newline + // while extracting from "anystring" the directive arguments and the comment. + // A directive argument is any group of characters that is not a space, a newline, a slash or a semicolon. + // Both the presence and syntactic correctness of the directive arguments are checked later. + // For compatibility reasons, the arguments are allowed to be followed by a double semicolon. + // The comment is optional and starts with "//". + // The "(?: ...)?" is just a way to make the arguments optional while not interfering with the capturing. + // Matching a directive with this regex creates 5 groups (next to the full match): + // 1. The leading whitespace. + // 2. The directive identifier ("nowarn" or "warnon", possibly followed by additional characters). + // 3. The directive arguments (if any), with each argument in a separate capture. + // 4. The trailing whitespace. + // 5. The comment (if any). + + Regex("""( *)#(\S+)(?: +([^ \r\n/;]+))*(?:;;)?( *)(\/\/.*)?$""", RegexOptions.CultureInvariant) + + let private parseDirective originalFileIndex lexbuf = + let text = Lexbuf.LexemeString lexbuf + let startPos = lexbuf.StartPos + + let mGroups = (regex.Match text).Groups + let dIdentGroup = mGroups[2] + let dIdent = dIdentGroup.Value + let argsGroup = mGroups[3] + let argCaptures = [ for c in argsGroup.Captures -> c ] + let commentGroup = mGroups[5] + + let positions line offset length = + mkPos line (startPos.Column + offset), mkPos line (startPos.Column + offset + length) + // "normal" ranges (i.e. taking #line directives into account), for errors in the warn directive + let mkRange offset length = + positions lexbuf.StartPos.Line offset length + ||> mkFileIndexRange startPos.FileIndex + // "original" ranges, for the warn scopes + let mkOriginalRange offset length = + positions lexbuf.StartPos.OriginalLine offset length + ||> mkFileIndexRange originalFileIndex + + let directiveLength = + if argsGroup.Success then + argsGroup.Index - (dIdentGroup.Index - 1) + argsGroup.Length + else + dIdentGroup.Length + 1 + + let directiveRange = mkRange (dIdentGroup.Index - 1) directiveLength + + let commentRange = + if commentGroup.Success then + Some(mkRange commentGroup.Index commentGroup.Length) + else + None + + if argCaptures.IsEmpty then + errorR (Error(FSComp.SR.lexWarnDirectiveMustHaveArgs (), directiveRange)) + + let mkDirective ctor (c: Capture) = + getNumber lexbuf.LanguageVersion (mkRange c.Index c.Length) c.Value + |> Option.map (fun n -> ctor (n, mkOriginalRange c.Index c.Length)) + + let warnCmds = + match dIdent with + | "warnon" -> argCaptures |> List.choose (mkDirective WarnCmd.Warnon) + | "nowarn" -> argCaptures |> List.choose (mkDirective WarnCmd.Nowarn) + | _ -> + errorR (Error(FSComp.SR.fsiInvalidDirective ($"#{dIdent}", ""), directiveRange)) + [] + + { + DirectiveRange = directiveRange + CommentRange = commentRange + WarnCmds = warnCmds + } + + let ParseAndRegisterWarnDirective (lexbuf: Lexbuf) = + let data = getLexbufData lexbuf + let warnDirective = parseDirective data.OriginalFileIndex lexbuf + data.WarnDirectives <- warnDirective :: data.WarnDirectives + + // ************************************* + // After lexing, the (processed) warn scope data are kept in diagnosticOptions + // ************************************* + + [] + type private WarnScope = + | Off of range + | On of range + | OpenOff of range + | OpenOn of range + + /// Information about the mapping implied by the #line directives. + /// The Map key is the file index of the surrogate source (the source file pointed to by the line directive). + /// The Map value contains the file index of the original source (the one just being parsed) and + /// a list of mapped sections (surrogate and original start lines). + type private LineMaps = Map + + type private WarnScopeData = + { + ScopedNowarnFeatureIsSupported: bool + ScriptNowarns: WarningNumber list // only needed to avoid breaking changes for previous language versions + WarnScopes: Map> + LineMaps: LineMaps + } + + let private getWarnScopeData (diagnosticOptions: FSharpDiagnosticOptions) = + match diagnosticOptions.WarnScopeData with + | None -> + { + ScopedNowarnFeatureIsSupported = true + ScriptNowarns = [] + WarnScopes = Map.empty + LineMaps = Map.empty + } + | Some data -> data :?> WarnScopeData + + let private setWarnScopeData (diagnosticOptions: FSharpDiagnosticOptions) data = + diagnosticOptions.WarnScopeData <- Some data + + // ************************************* + // Create the warn scopes from the directives and store them in diagnosticOptions. + // ************************************* + + let MergeInto diagnosticOptions isScript subModuleRanges lexbuf = + let lexbufData = getLexbufData lexbuf + let fileIndex = lexbufData.OriginalFileIndex + + let scopedNowarnFeatureIsSupported = + lexbuf.LanguageVersion.SupportsFeature LanguageFeature.ScopedNowarn + + let fileWarnCmds, fileScriptNowarns = + let warnDirectives = lexbufData.WarnDirectives |> List.rev + + if scopedNowarnFeatureIsSupported then + List.collect _.WarnCmds warnDirectives, [] + else + let isInSubmodule (warnDirective: WarnDirective) = + List.exists (fun mRange -> rangeContainsRange mRange warnDirective.DirectiveRange) subModuleRanges + + let subModuleWarnDirectives, topLevelWarnDirectives = + List.partition isInSubmodule warnDirectives + + // Warn about and ignore directives in submodules + subModuleWarnDirectives + |> List.iter (fun wd -> warning (Error(FSComp.SR.buildDirectivesInModulesAreIgnored (), wd.DirectiveRange))) + + let topLevelWarnonDirectives, topLevelNowarnDirectives = + List.partition isWarnonDirective topLevelWarnDirectives + + // "feature not available in this language version" error for top-level #nowarn + topLevelWarnonDirectives + |> List.iter (fun wd -> errorR (languageFeatureError lexbuf.LanguageVersion LanguageFeature.ScopedNowarn wd.DirectiveRange)) + + let nowarnCmds = List.collect _.WarnCmds topLevelNowarnDirectives + + nowarnCmds, + if isScript then + nowarnCmds |> List.map _.WarningNumber + else + [] + + let processWarnCmd warnScopeMap warnCmd = + let getScopes warningNumber warnScopes = + Map.tryFind warningNumber warnScopes |> Option.defaultValue [] + + let mkScope (m1: range) (m2: range) = + mkFileIndexRange m1.FileIndex m1.Start m2.End + + match warnCmd with + | WarnCmd.Nowarn(n, m) -> + match getScopes n warnScopeMap with + | WarnScope.OpenOn m' :: t -> warnScopeMap.Add(n, WarnScope.On(mkScope m' m) :: t) + | WarnScope.OpenOff m' :: _ + | WarnScope.On m' :: _ -> + if scopedNowarnFeatureIsSupported then + informationalWarning (Error(FSComp.SR.lexWarnDirectivesMustMatch ("#nowarn", m'.StartLine), m)) + + warnScopeMap + | scopes -> warnScopeMap.Add(n, WarnScope.OpenOff(mkScope m m) :: scopes) + | WarnCmd.Warnon(n, m) -> + match getScopes n warnScopeMap with + | WarnScope.OpenOff m' :: t -> warnScopeMap.Add(n, WarnScope.Off(mkScope m' m) :: t) + | WarnScope.OpenOn m' :: _ + | WarnScope.Off m' :: _ -> + warning (Error(FSComp.SR.lexWarnDirectivesMustMatch ("#warnon", m'.EndLine), m)) + warnScopeMap + | scopes -> warnScopeMap.Add(n, WarnScope.OpenOn(mkScope m m) :: scopes) + + let fileWarnScopes = fileWarnCmds |> List.fold processWarnCmd Map.empty + + let fileLineMaps: LineMaps = + let sortedSectionMaps = + List.map (fun ld -> ld.SurrogateLine, ld.OriginalLine) >> List.sortBy fst + + lexbufData.LineDirectives + |> List.groupBy _.SurrogateFileIndex + |> List.map (fun (surrIdx, lineDirectives) -> surrIdx, (fileIndex, sortedSectionMaps lineDirectives)) + |> Map + + let merge () = + let projectData = getWarnScopeData diagnosticOptions + + // If the same file is parsed again (same fileIndex), we replace the warn scopes. + let projectWarnScopes = projectData.WarnScopes.Add(fileIndex, fileWarnScopes) + + // If the same surrogate file has entries already (from another parse), we replace the line maps. + // However, if it was referred to from a different original file before, we issue a warning. + // (Because it means the maps are not reliable.) + let projectLineMaps = + let checkAndAdd previousLinemaps surrIdx (newOrigIdx, linePairList as newLinemaps) = + match Map.tryFind surrIdx previousLinemaps with + | Some(origIdx, _) when origIdx <> newOrigIdx -> + let _, origLine = List.head linePairList + let m = mkFileIndexRange origIdx (mkPos origLine 0) (mkPos origLine 4) + + let getName idx = + FileIndex.fileOfFileIndex idx |> System.IO.Path.GetFileName |> string + + warning (Error(FSComp.SR.lexLineDirectiveMappingIsNotUnique (getName surrIdx, getName origIdx), m)) + | _ -> () + + Map.add surrIdx newLinemaps previousLinemaps + + Map.fold checkAndAdd projectData.LineMaps fileLineMaps + + let newWarnScopeData = + { + ScopedNowarnFeatureIsSupported = scopedNowarnFeatureIsSupported + ScriptNowarns = List.distinct (projectData.ScriptNowarns @ fileScriptNowarns) + WarnScopes = projectWarnScopes + LineMaps = projectLineMaps + } + + setWarnScopeData diagnosticOptions newWarnScopeData + + lock diagnosticOptions merge + + let getDirectiveTrivia (lexbuf: Lexbuf) = + let mkTrivia d = + if isWarnonDirective d then + WarnDirectiveTrivia.Warnon(d.WarnCmds |> List.map _.WarningNumber, d.DirectiveRange) + else + WarnDirectiveTrivia.Nowarn(d.WarnCmds |> List.map _.WarningNumber, d.DirectiveRange) + + (getLexbufData lexbuf).WarnDirectives |> List.rev |> List.map mkTrivia + + let getCommentTrivia (lexbuf: Lexbuf) = + (getLexbufData lexbuf).WarnDirectives + |> List.rev + |> List.choose _.CommentRange + |> List.map CommentTrivia.LineComment + + // ************************************* + // Apply the warn scopes after lexing + // ************************************* + + let private getScopes fileIndex warningNumber warnScopes = + Map.tryFind fileIndex warnScopes + |> Option.bind (Map.tryFind warningNumber) + |> Option.defaultValue [] + + let private originalRange lineMaps (m: range) = + match Map.tryFind m.FileIndex lineMaps with + | None -> m + | Some(origFileIndex, sectionMaps) -> + let surrLine, origLine = + if List.isEmpty sectionMaps || m.StartLine < fst sectionMaps.Head then + (1, 1) + else + sectionMaps |> List.skipWhile (fun (s, _) -> m.StartLine < s) |> List.head + + let origStart = mkPos (m.StartLine + origLine - surrLine) m.StartColumn + let origEnd = mkPos (m.EndLine + origLine - surrLine) m.EndColumn + mkFileIndexRange origFileIndex origStart origEnd + + // true if m1 contains the *start* of m2 + // i.e. if the error range encloses the closing warn directive, we still say it is in scope + let private contains (m2: range) (m1: range) = + m2.StartLine > m1.StartLine && m2.StartLine < m1.EndLine + + let private isEnclosingWarnonScope m scope = + match scope with + | WarnScope.On wm when contains m wm -> true + | WarnScope.OpenOn wm when m.StartLine > wm.StartLine -> true + | _ -> false + + let private isEnclosingNowarnScope m scope = + match scope with + | WarnScope.Off wm when contains m wm -> true + | WarnScope.OpenOff wm when m.StartLine > wm.StartLine -> true + | _ -> false + + let IsWarnon (diagnosticOptions: FSharpDiagnosticOptions) warningNumber (mo: range option) = + let data = getWarnScopeData diagnosticOptions + + match mo, data.ScopedNowarnFeatureIsSupported with + | Some m, true -> + let mOrig = originalRange data.LineMaps m + let scopes = getScopes mOrig.FileIndex warningNumber data.WarnScopes + List.exists (isEnclosingWarnonScope mOrig) scopes + | _ -> false + + let IsNowarn (diagnosticOptions: FSharpDiagnosticOptions) warningNumber (mo: range option) = + let data = getWarnScopeData diagnosticOptions + + if List.contains warningNumber data.ScriptNowarns then // this happens only for legacy language versions + true + else + match mo with + | Some m -> + let mOrig = originalRange data.LineMaps m + let scopes = getScopes mOrig.FileIndex warningNumber data.WarnScopes + List.exists (isEnclosingNowarnScope mOrig) scopes + | None -> false diff --git a/src/Compiler/SyntaxTree/WarnScopes.fsi b/src/Compiler/SyntaxTree/WarnScopes.fsi new file mode 100644 index 00000000000..1cdecc76149 --- /dev/null +++ b/src/Compiler/SyntaxTree/WarnScopes.fsi @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler + +open FSharp.Compiler.Diagnostics +open FSharp.Compiler.SyntaxTrivia +open FSharp.Compiler.Text +open FSharp.Compiler.UnicodeLexing + +module internal WarnScopes = + + /// To be called during lexing to register the line directives for warn scope processing. + val internal RegisterLineDirective: lexbuf: Lexbuf * fileIndex: int * line: int -> unit + + /// To be called during lexing to save #nowarn / #warnon directives. + val ParseAndRegisterWarnDirective: lexbuf: Lexbuf -> unit + + /// To be called after lexing a file to create warn scopes from the stored line and + /// warn directives and to add them to the warn scopes from other files in the diagnostics options. + /// Note that isScript and subModuleRanges are needed only to avoid breaking changes for previous language versions. + val MergeInto: FSharpDiagnosticOptions -> isScript: bool -> subModuleRanges: range list -> Lexbuf -> unit + + /// Get the collected ranges of the warn directives + val getDirectiveTrivia: Lexbuf -> WarnDirectiveTrivia list + + /// Get the ranges of comments after warn directives + val getCommentTrivia: Lexbuf -> CommentTrivia list + + /// Check if the range is inside a "warnon" scope for the given warning number. + val IsWarnon: FSharpDiagnosticOptions -> warningNumber: int -> mo: range option -> bool + + /// Check if the range is inside a "nowarn" scope for the given warning number. + val IsNowarn: FSharpDiagnosticOptions -> warningNumber: int -> mo: range option -> bool diff --git a/src/Compiler/TypedTree/TypedTree.fs b/src/Compiler/TypedTree/TypedTree.fs index 817730ec6ea..47815bed680 100644 --- a/src/Compiler/TypedTree/TypedTree.fs +++ b/src/Compiler/TypedTree/TypedTree.fs @@ -5609,7 +5609,6 @@ type NamedDebugPointKey = type CheckedImplFile = | CheckedImplFile of qualifiedNameOfFile: QualifiedNameOfFile * - pragmas: ScopedPragma list * signature: ModuleOrNamespaceType * contents: ModuleOrNamespaceContents * hasExplicitEntryPoint: bool * @@ -5623,8 +5622,6 @@ type CheckedImplFile = member x.QualifiedNameOfFile = let (CheckedImplFile (qualifiedNameOfFile=res)) = x in res - member x.Pragmas = let (CheckedImplFile (pragmas=res)) = x in res - member x.HasExplicitEntryPoint = let (CheckedImplFile (hasExplicitEntryPoint=res)) = x in res member x.IsScript = let (CheckedImplFile (isScript=res)) = x in res diff --git a/src/Compiler/TypedTree/TypedTree.fsi b/src/Compiler/TypedTree/TypedTree.fsi index 28ef5776e5a..d9216efbe5e 100644 --- a/src/Compiler/TypedTree/TypedTree.fsi +++ b/src/Compiler/TypedTree/TypedTree.fsi @@ -4059,7 +4059,6 @@ type NamedDebugPointKey = type CheckedImplFile = | CheckedImplFile of qualifiedNameOfFile: Syntax.QualifiedNameOfFile * - pragmas: Syntax.ScopedPragma list * signature: ModuleOrNamespaceType * contents: ModuleOrNamespaceContents * hasExplicitEntryPoint: bool * @@ -4078,8 +4077,6 @@ type CheckedImplFile = member IsScript: bool - member Pragmas: Syntax.ScopedPragma list - member QualifiedNameOfFile: Syntax.QualifiedNameOfFile member Signature: ModuleOrNamespaceType diff --git a/src/Compiler/TypedTree/TypedTreeOps.fs b/src/Compiler/TypedTree/TypedTreeOps.fs index 4b41db72349..a1258657e78 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.fs +++ b/src/Compiler/TypedTree/TypedTreeOps.fs @@ -6495,10 +6495,10 @@ and remapAndRenameModBind ctxt compgen tmenv x = ModuleOrNamespaceBinding.Module(mspec, def) and remapImplFile ctxt compgen tmenv implFile = - let (CheckedImplFile (fragName, pragmas, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = implFile + let (CheckedImplFile (fragName, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = implFile let contentsR = copyAndRemapModDef ctxt compgen tmenv contents let signatureR, tmenv = copyAndRemapAndBindModTy ctxt compgen tmenv signature - let implFileR = CheckedImplFile (fragName, pragmas, signatureR, contentsR, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) + let implFileR = CheckedImplFile (fragName, signatureR, contentsR, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) implFileR, tmenv // Entry points @@ -9868,9 +9868,9 @@ and rewriteModuleOrNamespaceBindings env mbinds = List.map (rewriteModuleOrNamespaceBinding env) mbinds and RewriteImplFile env implFile = - let (CheckedImplFile (fragName, pragmas, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = implFile + let (CheckedImplFile (fragName, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = implFile let contentsR = rewriteModuleOrNamespaceContents env contents - let implFileR = CheckedImplFile (fragName, pragmas, signature, contentsR, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) + let implFileR = CheckedImplFile (fragName, signature, contentsR, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) implFileR //-------------------------------------------------------------------------- diff --git a/src/Compiler/lex.fsl b/src/Compiler/lex.fsl index 34bfe4bfe17..2d52ec029f7 100644 --- a/src/Compiler/lex.fsl +++ b/src/Compiler/lex.fsl @@ -817,7 +817,9 @@ rule token (args: LexArgs) (skip: bool) = parse // Construct the new position if args.applyLineDirectives then - lexbuf.EndPos <- pos.ApplyLineDirective((match file with Some f -> FileIndex.fileIndexOfFile f | None -> pos.FileIndex), line) + let fileIndex = match file with Some f -> FileIndex.fileIndexOfFile f | None -> pos.FileIndex + WarnScopes.RegisterLineDirective(lexbuf, fileIndex, line) + lexbuf.EndPos <- pos.ApplyLineDirective(fileIndex, line) else // add a newline when we don't apply a directive since we consumed a newline getting here incrLine lexbuf @@ -1080,6 +1082,13 @@ rule token (args: LexArgs) (skip: bool) = parse lexbuf.StartPos <- lexbuf.StartPos.ShiftColumnBy(n) HASH_IDENT(lexemeTrimLeft lexbuf (n+1)) } + | anywhite* ("#nowarn" | "#warnon") anystring + { let m = lexbuf.LexemeRange + shouldStartLine args lexbuf m (FSComp.SR.lexWarnDirectiveMustBeFirst()) + WarnScopes.ParseAndRegisterWarnDirective lexbuf + let tok = WARN_DIRECTIVE(m, lexeme lexbuf, LexCont.EndLine(args.ifdefStack, args.stringNest, LexerEndlineContinuation.Token)) + if skip then endline LexerEndlineContinuation.Token args skip lexbuf else tok } + | surrogateChar surrogateChar | _ diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index e5e0bca6a29..7326c4a6a12 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -152,7 +152,7 @@ let parse_error_rich = Some(fun (ctxt: ParseErrorContext<_>) -> /* These are artificial */ %token LEX_FAILURE %token COMMENT WHITESPACE HASH_LINE HASH_LIGHT INACTIVECODE LINE_COMMENT STRING_TEXT EOF -%token HASH_IF HASH_ELSE HASH_ENDIF +%token HASH_IF HASH_ELSE HASH_ENDIF WARN_DIRECTIVE %start signatureFile implementationFile interaction typedSequentialExprEOF typEOF %type typedSequentialExprEOF @@ -474,7 +474,7 @@ interactiveSeparator: | OBLOCKSEP { } /*--------------------------------------------------------------------------*/ -/* #directives - used by both F# Interactive directives and #nowarn etc. */ +/* #directives - used by F# Interactive directives */ /* A #directive in a module, namespace or an interaction */ diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index adb2b01d334..de5b2815fdc 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -597,6 +597,11 @@ Sdílení podkladových polí v rozlišeném sjednocení [<Struct>] za předpokladu, že mají stejný název a typ + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints omezení vlastního typu @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. Znak }} musí být v interpolovaném řetězci uvozený (zdvojeným znakem). @@ -867,6 +877,21 @@ Interpolovaný řetězec obsahuje nespárované složené závorky. + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n Všechny prvky seznamu musí být implicitně převoditelné na typ prvního prvku, což je řazená kolekce členů o délce {0} typu\n {1} \nTento element je řazená kolekce členů o délce {2} typu\n {3} \n diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 7deaf880012..53bf24ff3e9 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -597,6 +597,11 @@ Teilen sie zugrunde liegende Felder in einen [<Struct>]-diskriminierten Union, solange sie denselben Namen und Typ aufweisen. + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints Selbsttypeinschränkungen @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. Ein }}-Zeichen muss in einer interpolierten Zeichenfolge (durch Verdoppeln) mit Escapezeichen versehen werden. @@ -867,6 +877,21 @@ Die interpolierte Zeichenfolge enthält schließende geschweifte Klammern ohne Entsprechung. + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n Alle Elemente einer Liste müssen implizit in den Typ des ersten Elements konvertiert werden. Hierbei handelt es sich um ein Tupel der Länge {0} vom Typ\n {1} \nDieses Element ist ein Tupel der Länge {2} vom Typ\n {3}. \n diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index e8090e5579e..483e820ed5c 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -597,6 +597,11 @@ Compartir campos subyacentes en una unión discriminada [<Struct>] siempre y cuando tengan el mismo nombre y tipo + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints restricciones de tipo propio @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. El carácter "}}" se debe escapar (duplicándose) en las cadenas interpoladas. @@ -867,6 +877,21 @@ La cadena interpolada contiene llaves de cierre no coincidentes. + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n Todos los elementos de una lista deben convertirse implícitamente en el tipo del primer elemento, que aquí es una tupla de longitud {0} de tipo\n {1} \nEste elemento es una tupla de longitud {2} de tipo\n {3} \n diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index 25faaecb3a4..f003166db2d 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -597,6 +597,11 @@ Partager les champs sous-jacents dans une union discriminée [<Struct>] tant qu’ils ont le même nom et le même type + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints contraintes d’auto-type @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. Un caractère '}}' doit faire l'objet d'une séquence d'échappement (par doublement) dans une chaîne interpolée. @@ -867,6 +877,21 @@ La chaîne interpolée contient des accolades fermantes sans correspondance. + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n Tous les éléments d’une liste doivent être implicitement convertibles en type du premier élément, qui est ici un tuple de longueur {0} de type\n {1} \nCet élément est un tuple de longueur {2} de type\n {3} \n diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index 30d68a3330b..e4c08f83cb2 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -597,6 +597,11 @@ Condividi i campi sottostanti in un'unione discriminata di [<Struct>] purché abbiano lo stesso nome e tipo + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints vincoli di tipo automatico @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. In una stringa interpolata è necessario specificare il carattere di escape di un carattere '}}' raddoppiandolo. @@ -867,6 +877,21 @@ La stringa interpolata contiene parentesi graffe di chiusura non corrispondenti. + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n Tutti gli elementi di un elenco devono essere convertibili in modo implicito nel tipo del primo elemento, che qui è una tupla di lunghezza {0} di tipo\n {1} \nQuesto elemento è una tupla di lunghezza {2} di tipo\n {3} \n diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index 9f2709fa559..7d56499a955 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -597,6 +597,11 @@ 名前と型が同じである限り、[<Struct>] 判別可能な共用体で基になるフィールドを共有する + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints 自己型制約 @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. 文字 '}}' は、補間された文字列内で (二重にすることで) エスケープする必要があります。 @@ -867,6 +877,21 @@ 補間された文字列には、一致しない閉じかっこが含まれています。 + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n リストのすべての要素は、最初の要素の型に暗黙的に変換できる必要があります。これは、型の長さ {0} のタプルです\n {1} \nこの要素は、型の長さ {2} のタプルです\n {3} \n diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index 2c80d361ef6..887f0f199f1 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -597,6 +597,11 @@ 이름과 형식이 같으면 [<Struct>] 구분된 공용 구조체에서 기본 필드 공유 + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints 자체 형식 제약 조건 @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. '}}' 문자는 보간된 문자열에서 이중으로 사용하여 이스케이프해야 합니다. @@ -867,6 +877,21 @@ 보간된 문자열에 일치하지 않는 닫는 중괄호가 포함되어 있습니다. + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n 목록의 모든 요소는 첫 번째 요소의 형식으로 암시적으로 변환할 수 있어야 합니다. 여기서는 형식이 \n {1}이고 길이가 {0}인 튜플입니다. \n이 요소는 형식이 \n {3}이고 길이가 {2}인 튜플입니다. \n diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index 0bd80d75a72..589e0f8535e 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -597,6 +597,11 @@ Udostępnij pola źródłowe w unii rozłącznej [<Struct>], o ile mają taką samą nazwę i ten sam typ + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints ograniczenia typu własnego @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. W przypadku znaku „}}” należy zastosować ucieczkę (przez wpisanie dwóch takich znaków) w ciągu interpolowanym. @@ -867,6 +877,21 @@ Ciąg interpolowany zawiera niedopasowane zamykające nawiasy klamrowe. + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n Wszystkie elementy tablicy muszą być niejawnie konwertowalne na typ pierwszego elementu, który w tym miejscu jest krotką o długości {0} typu\n {1} \nTen element jest krotką o długości {2} typu\n {3} \n diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index c0e79885fed..5af5b7fcd34 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -597,6 +597,11 @@ Compartilhar campos subjacentes em uma união discriminada [<Struct>], desde que tenham o mesmo nome e tipo + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints restrições de auto-tipo @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. Um caractere ''}}' precisa ser de escape (ao duplicar) em uma cadeia de caracteres interpolada. @@ -867,6 +877,21 @@ A cadeia de caracteres interpolada contém chaves de fechamento sem correspondência. + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n Todos os elementos de uma lista devem ser implicitamente conversíveis ao tipo do primeiro elemento, que aqui é uma tupla de comprimento {0} do tipo\n {1} \nEste elemento é uma tupla de comprimento {2} do tipo\n {3} \n diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index 3a4610e93df..e8747be3f5c 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -597,6 +597,11 @@ Совместное использование базовых полей в дискриминируемом объединении [<Struct>], если они имеют одинаковое имя и тип. + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints ограничения самостоятельного типа @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. Символ "}}" необходимо экранировать (путем дублирования) в интерполированной строке. @@ -867,6 +877,21 @@ Интерполированная строка содержит непарные закрывающие фигурные скобки. + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n Все элементы списка должны поддерживать неявное преобразование в тип первого элемента, который здесь является кортежем длиной {0} типа\n {1} \nЭтот элемент является кортежем длиной {2} типа\n {3} \n diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index 6d1bee2476b..a2d6e89305c 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -597,6 +597,11 @@ Aynı ada ve türe sahip oldukları sürece temel alınan alanları [<Struct>] ayırt edici birleşim biçiminde paylaşın + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints kendi kendine tür kısıtlamaları @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. Bir '}}' karakteri, düz metin arasına kod eklenmiş bir dizede kaçış dizisi ile (yineleme yapılarak) belirtilir. @@ -867,6 +877,21 @@ İlişkilendirilmiş dize, eşleşmeyen kapatma küme ayraçları içeriyor. + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n Bir listenin tüm öğeleri örtük olarak ilk öğenin türüne dönüştürülebilir olmalıdır. Burada ilk öğe {0} uzunluğunda türü\n {1} \nolan bir demet. Bu öğe ise {2} uzunluğunda türü\n {3} \nolan bir demet. diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index a60e3188af7..fce23f29c9a 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -597,6 +597,11 @@ 只要它们具有相同的名称和类型,即可在 [<Struct>] 中共享基础字段 + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints 自类型约束 @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. 在内插字符串中,必需对 "}}" 字符进行转义(通过加倍)。 @@ -867,6 +877,21 @@ 内插字符串包含不匹配的右大括号。 + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n 列表的所有元素必须可隐式转换为第一个元素的类型,这是一个长度为 {0} 的类型的元组\n {1} \n此元素是长度为 {2} 类型的元组\n {3} \n diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index 3253c4e45f7..d2563922fc3 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -597,6 +597,11 @@ 只要 [<Struct>] 具有相同名稱和類型,就以強制聯集共用基礎欄位 + + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules + + self type constraints 自我類型限制式 @@ -837,6 +842,11 @@ This is not a valid byte character literal. The value must be less than or equal to '\127'B.\nNote: In a future F# version this warning will be promoted to an error. + + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + The file '{0}' was also pointed to in a line directive in '{1}'. Proper warn directive application may not be possible. + + A '}}' character must be escaped (by doubling) in an interpolated string. 在插補字串中,必須將 '}}' 字元逸出 (重複一次)。 @@ -867,6 +877,21 @@ 差補字串包含不成對的右大括弧。 + + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + #nowarn/#warnon directives must appear as the first non-whitespace characters on a line + + + + Warn directives must have warning number(s) as argument(s) + Warn directives must have warning number(s) as argument(s) + + + + There is another {0} for this warning already in line {1}. + There is another {0} for this warning already in line {1}. + + All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length {0} of type\n {1} \nThis element is a tuple of length {2} of type\n {3} \n 清單的所有元素必須以隱含方式轉換成第一個元素的類型,這是類型為\n {1} \n的元組長度 {0}此元素是類型為\n {3} \n的元組長度 {2} diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerDirectives/NonStringArgs.fs b/tests/FSharp.Compiler.ComponentTests/CompilerDirectives/NonStringArgs.fs index 32f40de89d2..a28132266be 100644 --- a/tests/FSharp.Compiler.ComponentTests/CompilerDirectives/NonStringArgs.fs +++ b/tests/FSharp.Compiler.ComponentTests/CompilerDirectives/NonStringArgs.fs @@ -9,7 +9,7 @@ module NonStringArgs = [] [] [] - let ``#nowarn - errors`` (languageVersion) = + let ``#nowarn - errors - separate`` (languageVersion) = FSharp """ #nowarn "988" @@ -43,42 +43,7 @@ module NonStringArgs = [] [] - [] - let ``#nowarn - errors - collected`` (languageVersion) = - - FSharp """ -#nowarn - "988" - FS - FSBLAH - ACME - "FS" - "FSBLAH" - "ACME" - """ - |> withLangVersion languageVersion - |> asExe - |> compile - |> shouldFail - |> withDiagnostics [ - if languageVersion = "8.0" then - (Error 3350, Line 4, Col 5, Line 4, Col 7, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") - (Error 3350, Line 5, Col 5, Line 5, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") - (Error 3350, Line 6, Col 5, Line 6, Col 9, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") - (Warning 203, Line 7, Col 5, Line 7, Col 9, "Invalid warning number 'FS'"); - (Warning 203, Line 8, Col 5, Line 8, Col 13, "Invalid warning number 'FSBLAH'"); - else - (Warning 203, Line 4, Col 5, Line 4, Col 7, "Invalid warning number 'FS'"); - (Warning 203, Line 5, Col 5, Line 5, Col 11, "Invalid warning number 'FSBLAH'"); - (Warning 203, Line 6, Col 5, Line 6, Col 9, "Invalid warning number 'ACME'"); - (Warning 203, Line 7, Col 5, Line 7, Col 9, "Invalid warning number 'FS'"); - (Warning 203, Line 8, Col 5, Line 8, Col 13, "Invalid warning number 'FSBLAH'"); - (Warning 203, Line 9, Col 5, Line 9, Col 11, "Invalid warning number 'ACME'") - ] - - - [] - [] + [] [] let ``#nowarn - errors - inline`` (languageVersion) = @@ -97,18 +62,26 @@ module NonStringArgs = (Error 3350, Line 3, Col 19, Line 3, Col 23, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") (Warning 203, Line 3, Col 24, Line 3, Col 28, "Invalid warning number 'FS'"); (Warning 203, Line 3, Col 29, Line 3, Col 37, "Invalid warning number 'FSBLAH'"); - else + elif languageVersion = "9.0" then (Warning 203, Line 3, Col 9, Line 3, Col 11, "Invalid warning number 'FS'"); (Warning 203, Line 3, Col 12, Line 3, Col 18, "Invalid warning number 'FSBLAH'"); (Warning 203, Line 3, Col 19, Line 3, Col 23, "Invalid warning number 'ACME'"); (Warning 203, Line 3, Col 24, Line 3, Col 28, "Invalid warning number 'FS'"); (Warning 203, Line 3, Col 29, Line 3, Col 37, "Invalid warning number 'FSBLAH'"); (Warning 203, Line 3, Col 38, Line 3, Col 44, "Invalid warning number 'ACME'") + else // preview + (Error 203, Line 3, Col 9, Line 3, Col 11, "Invalid warning number 'FS'"); + (Error 203, Line 3, Col 12, Line 3, Col 18, "Invalid warning number 'FSBLAH'"); + (Error 203, Line 3, Col 19, Line 3, Col 23, "Invalid warning number 'ACME'"); + (Error 203, Line 3, Col 24, Line 3, Col 28, "Invalid warning number 'FS'"); + (Error 203, Line 3, Col 29, Line 3, Col 37, "Invalid warning number 'FSBLAH'"); + (Error 203, Line 3, Col 38, Line 3, Col 44, "Invalid warning number 'ACME'") ] [] [] + [] [] let ``#nowarn - realcode`` (langVersion) = @@ -142,10 +115,10 @@ module DoBinding = compileResult |> shouldFail |> withDiagnostics [ - (Warning 1104, Line 5, Col 15, Line 5, Col 31, "Identifiers containing '@' are reserved for use in F# code generation") (Error 3350, Line 2, Col 9, Line 2, Col 11, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") (Error 3350, Line 2, Col 12, Line 2, Col 18, "Feature '# directives with non-quoted string arguments' is not available in F# 8.0. Please use language version 9.0 or greater.") (Warning 203, Line 2, Col 26, Line 2, Col 34, "Invalid warning number 'FS3221'") + (Warning 1104, Line 5, Col 15, Line 5, Col 31, "Identifiers containing '@' are reserved for use in F# code generation") ] else compileResult diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerDirectives/Nowarn.fs b/tests/FSharp.Compiler.ComponentTests/CompilerDirectives/Nowarn.fs new file mode 100644 index 00000000000..dfbb6d3a735 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/CompilerDirectives/Nowarn.fs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +namespace CompilerDirectives + +open Xunit +open FSharp.Test.Compiler +open FSharp.Test +open System +open System.Text + +module Nowarn = + + let private nowarn n = $"#nowarn {n}" + let private warnon n = $"#warnon {n}" + let private line1 = """#line 1 "some.fsy" """ + let private line10 = """#line 10 "some.fsy" """ + let private make20 = "1" + let private make25 = "match None with None -> ()" + let private W20 = Warning 20 + let private vp = "PREVIEW" + let private v9 = "9.0" + let private fs = String.concat Environment.NewLine >> FsSource + let private fsMod lines = fs ("module A" :: lines) + let private fsSub lines = fs ("namespace A" :: "module B =" :: (lines |> List.map (fun s -> " " + s))) + let private fsi = String.concat Environment.NewLine >> FsiSource + let private fsx = String.concat Environment.NewLine >> FsxSourceCode + + let private fsiSource44 = [ + "namespace A" + "[]" + "type T = class end" + "type T2 = T" + "#nowarn 44" + "type T3 = T" + "#warnon 44" + "type T4 = T" + "#nowarn 44" + "type T5 = T" + ] + + let private fsSource44 = [ + "namespace A" + "#nowarn 44" + "[]" + "type T = class end" + "type T2 = T" + "type T3 = T" + "type T4 = T" + "type T5 = T" + ] + + let private testData = + [ + vp, [], [fsMod [make20]], [W20, 2] + vp, [], [fsMod [nowarn 20; make20]], [] + vp, [], [fsMod ["#nowarn 20;;"; make20]], [] + vp, [], [fsMod [make20; nowarn 20; make20; warnon 20; make20]], [W20, 2; W20, 6] + v9, [], [fsMod [make20; nowarn 20; make20; warnon 20; make20]], [Error 3350, 5] + vp, [], [fsMod [nowarn 20; line1; make20]], [] + v9, [], [fsMod [nowarn 20; line1; make20]], [] // real v9 shows a warning here + vp, [], [fsMod [nowarn 20; line10; make20]], [] + v9, [], [fsMod [nowarn 20; line10; make20]], [] + vp, [], [fsMod [nowarn 20; line1; make20; warnon 20; make20]], [W20, 3] + v9, [], [fsMod [nowarn 20; line1; make20; warnon 20; make20]], [Error 3350, 2] + vp, ["--nowarn:20"], [fsMod [make20]], [] + v9, ["--nowarn:20"], [fsMod [make20]], [] + vp, ["--nowarn:20"], [fsMod [warnon 20; make20]], [W20, 3] + v9, ["--nowarn:20"], [fsMod [warnon 20; make20]], [Error 3350, 2] + vp, ["--warnon:3579"], [fsMod ["""ignore $"{1}" """]], [Warning 3579, 2] + v9, ["--warnon:3579"], [fsMod ["""ignore $"{1}" """]], [Warning 3579, 2] + vp, [], [fsMod ["#warnon 3579"; """ignore $"{1}" """]], [Warning 3579, 3] + v9, [], [fsMod ["#warnon 3579"; """ignore $"{1}" """]], [Error 3350, 2] + vp, ["--warnaserror"], [fsMod [make20]], [Error 20, 2] + vp, ["--warnaserror"; "--nowarn:20"], [fsMod [make20]], [] + vp, ["--warnaserror"; "--nowarn:20"], [fsMod [warnon 20; make20]], [Error 20, 3] + v9, ["--warnaserror"; "--nowarn:20"], [fsMod [warnon 20; make20]], [Error 3350, 2] + vp, ["--warnaserror"], [fsMod [nowarn 20; make20]], [] + vp, ["--warnaserror"; "--warnaserror-:20"], [fsMod [make20]], [W20, 2] + vp, ["--warnaserror:20"], [fsMod [nowarn 20; make20]], [] + vp, [], [fsSub [nowarn 20; make20]], [] + v9, [], [fsSub [nowarn 20; make20]], [Warning 236, 3; W20, 4] + vp, [], [fsSub [make20; nowarn 20; make20; warnon 20; make20]], [W20, 3; W20, 7] + v9, [], [fsSub [make20; nowarn 20; make20; warnon 20; make20]], [Warning 236, 4; Warning 236, 6; W20, 3; W20, 5; W20, 7] + vp, [], [fsi fsiSource44; fs fsSource44], [Warning 44, 4; Warning 44, 8] + v9, [], [fsi fsiSource44; fs fsSource44], [Error 3350, 7] + vp, [], [fsx ["module A"; make20; nowarn 20; make20; warnon 20; make20]], [] // 20 is not checked in scripts + vp, [], [fsx ["module A"; make25; nowarn 25; make25; warnon 25; make25]], [Warning 25, 2; Warning 25, 6] + v9, [], [fsx ["module A"; make25; nowarn 25; make25; warnon 25; make25]], [Error 3350, 5] + v9, [], [fsx ["module A"; make25; nowarn 25; make25]], [] + vp, [], [fsMod ["let x ="; nowarn 20; " 1"; warnon 20; " 2"; " 3"; "4"]], [W20, 6; W20, 8] + vp, [], [fsMod [nowarn 20; nowarn 20; warnon 20; make20]], [Information 3876, 3; W20, 5] + vp, [], [fsMod [nowarn 20; warnon 20; warnon 20; make20]], [Warning 3876, 4; W20, 5] + vp, ["--warnon:3876"], [fsMod [nowarn 20; nowarn 20; warnon 20; make20]], [Warning 3876, 3; W20, 5] + vp, [], [fsMod ["#nowarn \"\"\"20\"\"\" "; make20]], [] + vp, [], [fsMod ["#nowarnx 20"; make20]], [Error 3353, 2] + vp, [], [fsMod ["#nowarn 20 // comment"; make20]], [] + vp, [], [fsMod ["#nowarn"; make20]], [Error 3875, 2] + vp, [], [fsMod ["let a = 1; #nowarn 20"; make20]], [Error 3874, 2] + ] + |> List.mapi (fun i (v, fl, sources, diags) -> [| + box (i + 1) + box v + box fl + box (List.toArray sources) + box (List.toArray diags) |]) + + let testMemberData = + match System.Int32.TryParse(System.Environment.GetEnvironmentVariable("NowarnSingleTest")) with + | true, n when n > 0 && n <= testData.Length -> [testData[n-1]] + | _ -> testData + + let private testFailed (expected: (ErrorType * int) list) (actual: ErrorInfo list) = + expected.Length <> actual.Length + || (List.zip expected actual |> List.exists(fun((error, line), d) -> error <> d.Error || line <> d.Range.StartLine)) + + let private withDiags testId langVersion flags (sources: SourceCodeFileKind list) (expected: (ErrorType * int) list) (result: CompilationResult) = + let actual = result.Output.Diagnostics + if testFailed expected actual then + let sb = new StringBuilder() + let print (s: string) = sb.AppendLine s |> ignore + print "" + print $"test {testId} of {testData.Length}" + print " language version:" + print $" {langVersion}" + print " added compiler options:" + for flag in flags do print $" {flag}" + for source in sources do + print $" source code %s{source.GetSourceFileName}:" + let text = source.GetSourceText |> Option.defaultValue "" + let lines = text.Split(Environment.NewLine |> Seq.toArray) |> Array.toList + for line in lines do print $" {line}" + print $" expected diagnostics:" + for (error, line) in expected do print $" {error} in line {line}" + print $" actual diagnostics:" + for d in actual do print $" {d.Error} in line {d.Range.StartLine}" + Assert.Fail(string sb) + + [] + [] + let testWarnScopes testId langVersion flags (sourceArray: SourceCodeFileKind array) expectedDiags = + let sources = Array.toList sourceArray + sources.Head + |> fsFromString + |> FS + |> withAdditionalSourceFiles sources.Tail + |> withLangVersion langVersion + |> withOptions flags + |> compile + |> withDiags testId langVersion flags sources (Array.toList expectedDiags) + + [] + let testBadLineDirectiveInteraction() = + let sources = + [ + "test1.fs", "module A1 \n#line 10 \"test.fsy\" \n()" + "test2.fs", "module A2 \n#line 20 \"test.fsy\" \n()" + ] + |> List.map (fun (name, text) -> {FileName = name; SourceText = Some text}) + |> List.map SourceCodeFileKind.Fs + let result = + sources.Head + |> fsFromString + |> FS + |> withAdditionalSourceFiles sources.Tail + |> compile + let actual = result.Output.Diagnostics + if actual.Length <> 1 then Assert.Fail $"expected 1 warning, got {actual.Length}" + let errorInfo = actual.Head + if errorInfo.Error <> Warning 3877 then Assert.Fail $"expected Warning 3877, got {errorInfo.Error}" + if errorInfo.Range.StartLine <> 3 then Assert.Fail $"expected warning in line 3, got line {errorInfo.Range.StartLine}" + if not <| errorInfo.Message.StartsWith "The file 'test.fsy' was also pointed to" then Assert.Fail $"unexpected message {errorInfo.Message}" + + [] + let warnDirectiveArgRange() = + FSharp """ +module A +#nowarn xy "abx" +let a = 1; #nowarn 20 +""" + |> compile + |> withDiagnostics [ + Error 3874, Line 4, Col 11, Line 4, Col 22, "#nowarn/#warnon directives must appear as the first non-whitespace characters on a line" + Warning 203, Line 3, Col 9, Line 3, Col 11, "Invalid warning number 'xy'" + Warning 203, Line 3, Col 12, Line 3, Col 17, "Invalid warning number 'abx'" + ] diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index df531ac0058..36754f92217 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -30,6 +30,7 @@ XunitSetup.fs + diff --git a/tests/FSharp.Compiler.Service.Tests/ExprTests.fs b/tests/FSharp.Compiler.Service.Tests/ExprTests.fs index 71de89dfd42..eac5d3f1774 100644 --- a/tests/FSharp.Compiler.Service.Tests/ExprTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/ExprTests.fs @@ -3504,51 +3504,3 @@ let ``Test ProjectForWitnesses4 GetWitnessPassingInfo`` () = printfn "actual:\n\n%A" actual actual |> shouldEqual expected - -module internal ProjectForNoWarnHashDirective = - - let fileSource1 = """ -module N.M -#nowarn "40" -let rec f = new System.EventHandler(fun _ _ -> f.Invoke(null,null)) -""" - - let createOptions() = createProjectOptions [fileSource1] [] - -[] -let ``Test NoWarn HashDirective`` () = - let options = ProjectForNoWarnHashDirective.createOptions() - let exprChecker = FSharpChecker.Create(keepAssemblyContents=true, useTransparentCompiler=CompilerAssertHelpers.UseTransparentCompiler) - let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunImmediate - - for e in wholeProjectResults.Diagnostics do - printfn "ProjectForNoWarnHashDirective error: <<<%s>>>" e.Message - - wholeProjectResults.Diagnostics.Length |> shouldEqual 0 - -let private sourceForParseError = """ -module N.M -#nowarn 0xy -() -""" - -[] -let ``RegressionTestForMissingParseError(TransparentCompiler)`` () = - let options = createProjectOptions [sourceForParseError] [] - let exprChecker = FSharpChecker.Create(keepAssemblyContents=true, useTransparentCompiler=CompilerAssertHelpers.UseTransparentCompiler) - let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunImmediate - wholeProjectResults.Diagnostics.Length |> shouldEqual 1 - wholeProjectResults.Diagnostics.[0].ErrorNumber |> shouldEqual 1156 - wholeProjectResults.Diagnostics.[0].Range.StartLine |> shouldEqual 3 - -[] -let ``RegressionTestForDuplicateParseError(BackgroundCompiler)`` () = - let options = createProjectOptions [sourceForParseError] [] - let exprChecker = FSharpChecker.Create(keepAssemblyContents=true, useTransparentCompiler=CompilerAssertHelpers.UseTransparentCompiler) - let sourceName = options.SourceFiles[0] - let _wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunImmediate - let _, checkResults = exprChecker.GetBackgroundCheckResultsForFileInProject(sourceName, options) |> Async.RunImmediate - checkResults.Diagnostics.Length |> shouldEqual 1 - checkResults.Diagnostics.[0].ErrorNumber |> shouldEqual 1156 - checkResults.Diagnostics.[0].Range.StartLine |> shouldEqual 3 - diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl old mode 100755 new mode 100644 index f89f7a406be..bb0389f5021 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -2208,9 +2208,6 @@ FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: FSharp.Compiler.CodeAnalysis. FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: FSharp.Compiler.CodeAnalysis.FSharpParsingOptions get_Default() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions DiagnosticOptions FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions get_DiagnosticOptions() -FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Int32 CompareTo(FSharp.Compiler.CodeAnalysis.FSharpParsingOptions) -FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Int32 CompareTo(System.Object) -FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Int32 CompareTo(System.Object, System.Collections.IComparer) FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Int32 GetHashCode() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Int32 GetHashCode(System.Collections.IEqualityComparer) FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Microsoft.FSharp.Collections.FSharpList`1[System.String] ConditionalDefines @@ -2940,9 +2937,6 @@ FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Boolean get_CheckXmlDocs() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Boolean get_GlobalWarnAsError() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions Default FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions get_Default() -FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 CompareTo(FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions) -FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 CompareTo(System.Object) -FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 CompareTo(System.Object, System.Collections.IComparer) FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 GetHashCode() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 GetHashCode(System.Collections.IEqualityComparer) FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 WarnLevel @@ -2955,8 +2949,12 @@ FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Collection FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] get_WarnAsWarn() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] get_WarnOff() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] get_WarnOn() +FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Core.FSharpOption`1[System.Object] WarnScopeData +FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Core.FSharpOption`1[System.Object] WarnScopeData@ +FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Core.FSharpOption`1[System.Object] get_WarnScopeData() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: System.String ToString() -FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Void .ctor(Int32, Boolean, Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32]) +FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Void .ctor(Int32, Boolean, Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Object]) +FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Void set_WarnScopeData(Microsoft.FSharp.Core.FSharpOption`1[System.Object]) FSharp.Compiler.Diagnostics.FSharpDiagnosticSeverity+Tags: Int32 Error FSharp.Compiler.Diagnostics.FSharpDiagnosticSeverity+Tags: Int32 Hidden FSharp.Compiler.Diagnostics.FSharpDiagnosticSeverity+Tags: Int32 Info @@ -6274,25 +6272,21 @@ FSharp.Compiler.Syntax.ParsedImplFileInput: Boolean get_IsLastCompiland() FSharp.Compiler.Syntax.ParsedImplFileInput: Boolean get_IsScript() FSharp.Compiler.Syntax.ParsedImplFileInput: Boolean get_isScript() FSharp.Compiler.Syntax.ParsedImplFileInput: Boolean isScript -FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.ParsedImplFileInput NewParsedImplFileInput(System.String, Boolean, FSharp.Compiler.Syntax.QualifiedNameOfFile, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespace], System.Tuple`2[System.Boolean,System.Boolean], FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia, Microsoft.FSharp.Collections.FSharpSet`1[System.String]) +FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.ParsedImplFileInput NewParsedImplFileInput(System.String, Boolean, FSharp.Compiler.Syntax.QualifiedNameOfFile, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespace], System.Tuple`2[System.Boolean,System.Boolean], FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia, Microsoft.FSharp.Collections.FSharpSet`1[System.String]) FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile QualifiedName FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile get_QualifiedName() FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile get_qualifiedNameOfFile() FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile qualifiedNameOfFile -FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia Trivia -FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia get_Trivia() -FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia get_trivia() -FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia trivia +FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia Trivia +FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia get_Trivia() +FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia get_trivia() +FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia trivia FSharp.Compiler.Syntax.ParsedImplFileInput: Int32 Tag FSharp.Compiler.Syntax.ParsedImplFileInput: Int32 get_Tag() FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] HashDirectives FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] get_HashDirectives() FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] get_hashDirectives() FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] hashDirectives -FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] ScopedPragmas -FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] get_ScopedPragmas() -FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] get_scopedPragmas() -FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] scopedPragmas FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespace] Contents FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespace] contents FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespace] get_Contents() @@ -6327,8 +6321,6 @@ FSharp.Compiler.Syntax.ParsedInput: FSharp.Compiler.Text.Range Range FSharp.Compiler.Syntax.ParsedInput: FSharp.Compiler.Text.Range get_Range() FSharp.Compiler.Syntax.ParsedInput: Int32 Tag FSharp.Compiler.Syntax.ParsedInput: Int32 get_Tag() -FSharp.Compiler.Syntax.ParsedInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] ScopedPragmas -FSharp.Compiler.Syntax.ParsedInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] get_ScopedPragmas() FSharp.Compiler.Syntax.ParsedInput: Microsoft.FSharp.Collections.FSharpSet`1[System.String] Identifiers FSharp.Compiler.Syntax.ParsedInput: Microsoft.FSharp.Collections.FSharpSet`1[System.String] get_Identifiers() FSharp.Compiler.Syntax.ParsedInput: System.String FileName @@ -6397,25 +6389,21 @@ FSharp.Compiler.Syntax.ParsedSigFileFragment: FSharp.Compiler.Syntax.ParsedSigFi FSharp.Compiler.Syntax.ParsedSigFileFragment: Int32 Tag FSharp.Compiler.Syntax.ParsedSigFileFragment: Int32 get_Tag() FSharp.Compiler.Syntax.ParsedSigFileFragment: System.String ToString() -FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.ParsedSigFileInput NewParsedSigFileInput(System.String, FSharp.Compiler.Syntax.QualifiedNameOfFile, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespaceSig], FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia, Microsoft.FSharp.Collections.FSharpSet`1[System.String]) +FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.ParsedSigFileInput NewParsedSigFileInput(System.String, FSharp.Compiler.Syntax.QualifiedNameOfFile, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespaceSig], FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia, Microsoft.FSharp.Collections.FSharpSet`1[System.String]) FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile QualifiedName FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile get_QualifiedName() FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile get_qualifiedNameOfFile() FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile qualifiedNameOfFile -FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia Trivia -FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia get_Trivia() -FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia get_trivia() -FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia trivia +FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia Trivia +FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia get_Trivia() +FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia get_trivia() +FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia trivia FSharp.Compiler.Syntax.ParsedSigFileInput: Int32 Tag FSharp.Compiler.Syntax.ParsedSigFileInput: Int32 get_Tag() FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] HashDirectives FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] get_HashDirectives() FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] get_hashDirectives() FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] hashDirectives -FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] ScopedPragmas -FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] get_ScopedPragmas() -FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] get_scopedPragmas() -FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] scopedPragmas FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespaceSig] Contents FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespaceSig] contents FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespaceSig] get_Contents() @@ -6483,20 +6471,6 @@ FSharp.Compiler.Syntax.QualifiedNameOfFile: Int32 get_Tag() FSharp.Compiler.Syntax.QualifiedNameOfFile: System.String Text FSharp.Compiler.Syntax.QualifiedNameOfFile: System.String ToString() FSharp.Compiler.Syntax.QualifiedNameOfFile: System.String get_Text() -FSharp.Compiler.Syntax.ScopedPragma: Boolean Equals(FSharp.Compiler.Syntax.ScopedPragma) -FSharp.Compiler.Syntax.ScopedPragma: Boolean Equals(FSharp.Compiler.Syntax.ScopedPragma, System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.ScopedPragma: Boolean Equals(System.Object) -FSharp.Compiler.Syntax.ScopedPragma: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.ScopedPragma: FSharp.Compiler.Syntax.ScopedPragma NewWarningOff(FSharp.Compiler.Text.Range, Int32) -FSharp.Compiler.Syntax.ScopedPragma: FSharp.Compiler.Text.Range get_range() -FSharp.Compiler.Syntax.ScopedPragma: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.ScopedPragma: Int32 GetHashCode() -FSharp.Compiler.Syntax.ScopedPragma: Int32 GetHashCode(System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.ScopedPragma: Int32 Tag -FSharp.Compiler.Syntax.ScopedPragma: Int32 get_Tag() -FSharp.Compiler.Syntax.ScopedPragma: Int32 get_warningNumber() -FSharp.Compiler.Syntax.ScopedPragma: Int32 warningNumber -FSharp.Compiler.Syntax.ScopedPragma: System.String ToString() FSharp.Compiler.Syntax.SeqExprOnly: Boolean Equals(FSharp.Compiler.Syntax.SeqExprOnly) FSharp.Compiler.Syntax.SeqExprOnly: Boolean Equals(FSharp.Compiler.Syntax.SeqExprOnly, System.Collections.IEqualityComparer) FSharp.Compiler.Syntax.SeqExprOnly: Boolean Equals(System.Object) @@ -10281,18 +10255,14 @@ FSharp.Compiler.SyntaxTrivia.IfDirectiveExpression: FSharp.Compiler.SyntaxTrivia FSharp.Compiler.SyntaxTrivia.IfDirectiveExpression: Int32 Tag FSharp.Compiler.SyntaxTrivia.IfDirectiveExpression: Int32 get_Tag() FSharp.Compiler.SyntaxTrivia.IfDirectiveExpression: System.String ToString() -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] CodeComments -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] get_CodeComments() -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] ConditionalDirectives -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] get_ConditionalDirectives() -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: System.String ToString() -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: Void .ctor(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia]) -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] CodeComments -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] get_CodeComments() -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] ConditionalDirectives -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] get_ConditionalDirectives() -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: System.String ToString() -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: Void .ctor(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia]) +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] CodeComments +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] get_CodeComments() +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] ConditionalDirectives +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] get_ConditionalDirectives() +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia] WarnDirectives +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia] get_WarnDirectives() +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: System.String ToString() +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Void .ctor(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia]) FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia: FSharp.Compiler.Text.Range ParenRange FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia: FSharp.Compiler.Text.Range get_ParenRange() FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia: System.String ToString() @@ -10857,6 +10827,28 @@ FSharp.Compiler.SyntaxTrivia.SynValSigTrivia: Microsoft.FSharp.Core.FSharpOption FSharp.Compiler.SyntaxTrivia.SynValSigTrivia: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_WithKeyword() FSharp.Compiler.SyntaxTrivia.SynValSigTrivia: System.String ToString() FSharp.Compiler.SyntaxTrivia.SynValSigTrivia: Void .ctor(FSharp.Compiler.SyntaxTrivia.SynLeadingKeyword, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range]) +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Nowarn: FSharp.Compiler.Text.Range Item2 +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Nowarn: FSharp.Compiler.Text.Range get_Item2() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Nowarn: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] get_warnNumbers() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Nowarn: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] warnNumbers +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Tags: Int32 Nowarn +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Tags: Int32 Warnon +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Warnon: FSharp.Compiler.Text.Range Item2 +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Warnon: FSharp.Compiler.Text.Range get_Item2() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Warnon: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] get_warnNumbers() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Warnon: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] warnNumbers +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Boolean IsNowarn +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Boolean IsWarnon +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Boolean get_IsNowarn() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Boolean get_IsWarnon() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia NewNowarn(Microsoft.FSharp.Collections.FSharpList`1[System.Int32], FSharp.Compiler.Text.Range) +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia NewWarnon(Microsoft.FSharp.Collections.FSharpList`1[System.Int32], FSharp.Compiler.Text.Range) +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Nowarn +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Tags +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Warnon +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Int32 Tag +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Int32 get_Tag() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: System.String ToString() FSharp.Compiler.Text.ISourceText: Boolean ContentEquals(FSharp.Compiler.Text.ISourceText) FSharp.Compiler.Text.ISourceText: Boolean SubTextEquals(System.String, Int32) FSharp.Compiler.Text.ISourceText: Char Item [Int32] @@ -11423,6 +11415,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Underscore FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Upcast FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Val FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Void +FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 WarnDirective FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 When FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 While FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 WhileBang @@ -11618,6 +11611,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsUnderscore FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsUpcast FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsVal FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsVoid +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsWarnDirective FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsWhen FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsWhile FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsWhileBang @@ -11809,6 +11803,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsUnderscore() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsUpcast() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsVal() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsVoid() +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsWarnDirective() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsWhen() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsWhile() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsWhileBang() @@ -12000,6 +11995,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Upcast FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Val FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Void +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind WarnDirective FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind When FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind While FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind WhileBang @@ -12191,6 +12187,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Upcast() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Val() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Void() +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_WarnDirective() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_When() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_While() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_WhileBang() diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl old mode 100755 new mode 100644 index f89f7a406be..bb0389f5021 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -2208,9 +2208,6 @@ FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: FSharp.Compiler.CodeAnalysis. FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: FSharp.Compiler.CodeAnalysis.FSharpParsingOptions get_Default() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions DiagnosticOptions FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions get_DiagnosticOptions() -FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Int32 CompareTo(FSharp.Compiler.CodeAnalysis.FSharpParsingOptions) -FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Int32 CompareTo(System.Object) -FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Int32 CompareTo(System.Object, System.Collections.IComparer) FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Int32 GetHashCode() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Int32 GetHashCode(System.Collections.IEqualityComparer) FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Microsoft.FSharp.Collections.FSharpList`1[System.String] ConditionalDefines @@ -2940,9 +2937,6 @@ FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Boolean get_CheckXmlDocs() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Boolean get_GlobalWarnAsError() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions Default FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions get_Default() -FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 CompareTo(FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions) -FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 CompareTo(System.Object) -FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 CompareTo(System.Object, System.Collections.IComparer) FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 GetHashCode() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 GetHashCode(System.Collections.IEqualityComparer) FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Int32 WarnLevel @@ -2955,8 +2949,12 @@ FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Collection FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] get_WarnAsWarn() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] get_WarnOff() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] get_WarnOn() +FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Core.FSharpOption`1[System.Object] WarnScopeData +FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Core.FSharpOption`1[System.Object] WarnScopeData@ +FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Microsoft.FSharp.Core.FSharpOption`1[System.Object] get_WarnScopeData() FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: System.String ToString() -FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Void .ctor(Int32, Boolean, Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32]) +FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Void .ctor(Int32, Boolean, Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Collections.FSharpList`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Object]) +FSharp.Compiler.Diagnostics.FSharpDiagnosticOptions: Void set_WarnScopeData(Microsoft.FSharp.Core.FSharpOption`1[System.Object]) FSharp.Compiler.Diagnostics.FSharpDiagnosticSeverity+Tags: Int32 Error FSharp.Compiler.Diagnostics.FSharpDiagnosticSeverity+Tags: Int32 Hidden FSharp.Compiler.Diagnostics.FSharpDiagnosticSeverity+Tags: Int32 Info @@ -6274,25 +6272,21 @@ FSharp.Compiler.Syntax.ParsedImplFileInput: Boolean get_IsLastCompiland() FSharp.Compiler.Syntax.ParsedImplFileInput: Boolean get_IsScript() FSharp.Compiler.Syntax.ParsedImplFileInput: Boolean get_isScript() FSharp.Compiler.Syntax.ParsedImplFileInput: Boolean isScript -FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.ParsedImplFileInput NewParsedImplFileInput(System.String, Boolean, FSharp.Compiler.Syntax.QualifiedNameOfFile, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespace], System.Tuple`2[System.Boolean,System.Boolean], FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia, Microsoft.FSharp.Collections.FSharpSet`1[System.String]) +FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.ParsedImplFileInput NewParsedImplFileInput(System.String, Boolean, FSharp.Compiler.Syntax.QualifiedNameOfFile, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespace], System.Tuple`2[System.Boolean,System.Boolean], FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia, Microsoft.FSharp.Collections.FSharpSet`1[System.String]) FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile QualifiedName FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile get_QualifiedName() FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile get_qualifiedNameOfFile() FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile qualifiedNameOfFile -FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia Trivia -FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia get_Trivia() -FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia get_trivia() -FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia trivia +FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia Trivia +FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia get_Trivia() +FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia get_trivia() +FSharp.Compiler.Syntax.ParsedImplFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia trivia FSharp.Compiler.Syntax.ParsedImplFileInput: Int32 Tag FSharp.Compiler.Syntax.ParsedImplFileInput: Int32 get_Tag() FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] HashDirectives FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] get_HashDirectives() FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] get_hashDirectives() FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] hashDirectives -FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] ScopedPragmas -FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] get_ScopedPragmas() -FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] get_scopedPragmas() -FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] scopedPragmas FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespace] Contents FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespace] contents FSharp.Compiler.Syntax.ParsedImplFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespace] get_Contents() @@ -6327,8 +6321,6 @@ FSharp.Compiler.Syntax.ParsedInput: FSharp.Compiler.Text.Range Range FSharp.Compiler.Syntax.ParsedInput: FSharp.Compiler.Text.Range get_Range() FSharp.Compiler.Syntax.ParsedInput: Int32 Tag FSharp.Compiler.Syntax.ParsedInput: Int32 get_Tag() -FSharp.Compiler.Syntax.ParsedInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] ScopedPragmas -FSharp.Compiler.Syntax.ParsedInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] get_ScopedPragmas() FSharp.Compiler.Syntax.ParsedInput: Microsoft.FSharp.Collections.FSharpSet`1[System.String] Identifiers FSharp.Compiler.Syntax.ParsedInput: Microsoft.FSharp.Collections.FSharpSet`1[System.String] get_Identifiers() FSharp.Compiler.Syntax.ParsedInput: System.String FileName @@ -6397,25 +6389,21 @@ FSharp.Compiler.Syntax.ParsedSigFileFragment: FSharp.Compiler.Syntax.ParsedSigFi FSharp.Compiler.Syntax.ParsedSigFileFragment: Int32 Tag FSharp.Compiler.Syntax.ParsedSigFileFragment: Int32 get_Tag() FSharp.Compiler.Syntax.ParsedSigFileFragment: System.String ToString() -FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.ParsedSigFileInput NewParsedSigFileInput(System.String, FSharp.Compiler.Syntax.QualifiedNameOfFile, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespaceSig], FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia, Microsoft.FSharp.Collections.FSharpSet`1[System.String]) +FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.ParsedSigFileInput NewParsedSigFileInput(System.String, FSharp.Compiler.Syntax.QualifiedNameOfFile, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespaceSig], FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia, Microsoft.FSharp.Collections.FSharpSet`1[System.String]) FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile QualifiedName FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile get_QualifiedName() FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile get_qualifiedNameOfFile() FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.Syntax.QualifiedNameOfFile qualifiedNameOfFile -FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia Trivia -FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia get_Trivia() -FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia get_trivia() -FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia trivia +FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia Trivia +FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia get_Trivia() +FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia get_trivia() +FSharp.Compiler.Syntax.ParsedSigFileInput: FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia trivia FSharp.Compiler.Syntax.ParsedSigFileInput: Int32 Tag FSharp.Compiler.Syntax.ParsedSigFileInput: Int32 get_Tag() FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] HashDirectives FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] get_HashDirectives() FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] get_hashDirectives() FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirective] hashDirectives -FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] ScopedPragmas -FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] get_ScopedPragmas() -FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] get_scopedPragmas() -FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ScopedPragma] scopedPragmas FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespaceSig] Contents FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespaceSig] contents FSharp.Compiler.Syntax.ParsedSigFileInput: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynModuleOrNamespaceSig] get_Contents() @@ -6483,20 +6471,6 @@ FSharp.Compiler.Syntax.QualifiedNameOfFile: Int32 get_Tag() FSharp.Compiler.Syntax.QualifiedNameOfFile: System.String Text FSharp.Compiler.Syntax.QualifiedNameOfFile: System.String ToString() FSharp.Compiler.Syntax.QualifiedNameOfFile: System.String get_Text() -FSharp.Compiler.Syntax.ScopedPragma: Boolean Equals(FSharp.Compiler.Syntax.ScopedPragma) -FSharp.Compiler.Syntax.ScopedPragma: Boolean Equals(FSharp.Compiler.Syntax.ScopedPragma, System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.ScopedPragma: Boolean Equals(System.Object) -FSharp.Compiler.Syntax.ScopedPragma: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.ScopedPragma: FSharp.Compiler.Syntax.ScopedPragma NewWarningOff(FSharp.Compiler.Text.Range, Int32) -FSharp.Compiler.Syntax.ScopedPragma: FSharp.Compiler.Text.Range get_range() -FSharp.Compiler.Syntax.ScopedPragma: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.ScopedPragma: Int32 GetHashCode() -FSharp.Compiler.Syntax.ScopedPragma: Int32 GetHashCode(System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.ScopedPragma: Int32 Tag -FSharp.Compiler.Syntax.ScopedPragma: Int32 get_Tag() -FSharp.Compiler.Syntax.ScopedPragma: Int32 get_warningNumber() -FSharp.Compiler.Syntax.ScopedPragma: Int32 warningNumber -FSharp.Compiler.Syntax.ScopedPragma: System.String ToString() FSharp.Compiler.Syntax.SeqExprOnly: Boolean Equals(FSharp.Compiler.Syntax.SeqExprOnly) FSharp.Compiler.Syntax.SeqExprOnly: Boolean Equals(FSharp.Compiler.Syntax.SeqExprOnly, System.Collections.IEqualityComparer) FSharp.Compiler.Syntax.SeqExprOnly: Boolean Equals(System.Object) @@ -10281,18 +10255,14 @@ FSharp.Compiler.SyntaxTrivia.IfDirectiveExpression: FSharp.Compiler.SyntaxTrivia FSharp.Compiler.SyntaxTrivia.IfDirectiveExpression: Int32 Tag FSharp.Compiler.SyntaxTrivia.IfDirectiveExpression: Int32 get_Tag() FSharp.Compiler.SyntaxTrivia.IfDirectiveExpression: System.String ToString() -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] CodeComments -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] get_CodeComments() -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] ConditionalDirectives -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] get_ConditionalDirectives() -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: System.String ToString() -FSharp.Compiler.SyntaxTrivia.ParsedImplFileInputTrivia: Void .ctor(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia]) -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] CodeComments -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] get_CodeComments() -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] ConditionalDirectives -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] get_ConditionalDirectives() -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: System.String ToString() -FSharp.Compiler.SyntaxTrivia.ParsedSigFileInputTrivia: Void .ctor(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia]) +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] CodeComments +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia] get_CodeComments() +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] ConditionalDirectives +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia] get_ConditionalDirectives() +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia] WarnDirectives +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia] get_WarnDirectives() +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: System.String ToString() +FSharp.Compiler.SyntaxTrivia.ParsedInputTrivia: Void .ctor(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.ConditionalDirectiveTrivia], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.SyntaxTrivia.CommentTrivia]) FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia: FSharp.Compiler.Text.Range ParenRange FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia: FSharp.Compiler.Text.Range get_ParenRange() FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia: System.String ToString() @@ -10857,6 +10827,28 @@ FSharp.Compiler.SyntaxTrivia.SynValSigTrivia: Microsoft.FSharp.Core.FSharpOption FSharp.Compiler.SyntaxTrivia.SynValSigTrivia: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_WithKeyword() FSharp.Compiler.SyntaxTrivia.SynValSigTrivia: System.String ToString() FSharp.Compiler.SyntaxTrivia.SynValSigTrivia: Void .ctor(FSharp.Compiler.SyntaxTrivia.SynLeadingKeyword, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range]) +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Nowarn: FSharp.Compiler.Text.Range Item2 +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Nowarn: FSharp.Compiler.Text.Range get_Item2() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Nowarn: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] get_warnNumbers() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Nowarn: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] warnNumbers +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Tags: Int32 Nowarn +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Tags: Int32 Warnon +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Warnon: FSharp.Compiler.Text.Range Item2 +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Warnon: FSharp.Compiler.Text.Range get_Item2() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Warnon: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] get_warnNumbers() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Warnon: Microsoft.FSharp.Collections.FSharpList`1[System.Int32] warnNumbers +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Boolean IsNowarn +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Boolean IsWarnon +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Boolean get_IsNowarn() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Boolean get_IsWarnon() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia NewNowarn(Microsoft.FSharp.Collections.FSharpList`1[System.Int32], FSharp.Compiler.Text.Range) +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia NewWarnon(Microsoft.FSharp.Collections.FSharpList`1[System.Int32], FSharp.Compiler.Text.Range) +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Nowarn +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Tags +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia+Warnon +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Int32 Tag +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: Int32 get_Tag() +FSharp.Compiler.SyntaxTrivia.WarnDirectiveTrivia: System.String ToString() FSharp.Compiler.Text.ISourceText: Boolean ContentEquals(FSharp.Compiler.Text.ISourceText) FSharp.Compiler.Text.ISourceText: Boolean SubTextEquals(System.String, Int32) FSharp.Compiler.Text.ISourceText: Char Item [Int32] @@ -11423,6 +11415,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Underscore FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Upcast FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Val FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Void +FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 WarnDirective FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 When FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 While FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 WhileBang @@ -11618,6 +11611,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsUnderscore FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsUpcast FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsVal FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsVoid +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsWarnDirective FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsWhen FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsWhile FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsWhileBang @@ -11809,6 +11803,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsUnderscore() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsUpcast() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsVal() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsVoid() +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsWarnDirective() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsWhen() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsWhile() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsWhileBang() @@ -12000,6 +11995,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Upcast FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Val FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Void +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind WarnDirective FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind When FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind While FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind WhileBang @@ -12191,6 +12187,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Upcast() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Val() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Void() +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_WarnDirective() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_When() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_While() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_WhileBang() diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj index 967f5aacfc4..fc325ec28aa 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj @@ -75,6 +75,7 @@ + diff --git a/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs b/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs index 654c01d6cc0..42bf0cf0eb0 100644 --- a/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/SyntaxTreeTests.fs @@ -95,7 +95,6 @@ let private sanitizeAST (sourceDirectoryValue: string) (ast: ParsedInput) : Pars | ParsedInput.ImplFile(ParsedImplFileInput(fileName, isScript, qualifiedNameOfFile, - scopedPragmas, hashDirectives, contents, flags, @@ -105,7 +104,6 @@ let private sanitizeAST (sourceDirectoryValue: string) (ast: ParsedInput) : Pars fileName, isScript, qualifiedNameOfFile, - scopedPragmas, List.map mapParsedHashDirective hashDirectives, List.map mapSynModuleOrNamespace contents, flags, @@ -113,11 +111,10 @@ let private sanitizeAST (sourceDirectoryValue: string) (ast: ParsedInput) : Pars identifiers ) |> ParsedInput.ImplFile - | ParsedInput.SigFile(ParsedSigFileInput(fileName, qualifiedNameOfFile, scopedPragmas, hashDirectives, contents, trivia, identifiers)) -> + | ParsedInput.SigFile(ParsedSigFileInput(fileName, qualifiedNameOfFile, hashDirectives, contents, trivia, identifiers)) -> ParsedSigFileInput( fileName, qualifiedNameOfFile, - scopedPragmas, List.map mapParsedHashDirective hashDirectives, List.map mapSynModuleOrNamespaceSig contents, trivia, diff --git a/tests/FSharp.Compiler.Service.Tests/WarnScopeTests.fs b/tests/FSharp.Compiler.Service.Tests/WarnScopeTests.fs new file mode 100644 index 00000000000..6348fa560ff --- /dev/null +++ b/tests/FSharp.Compiler.Service.Tests/WarnScopeTests.fs @@ -0,0 +1,210 @@ +module FSharp.Compiler.Service.Tests.WarnScopeTests + +open Xunit +open FSharp.Test +open FSharp.Test.Assert +open FSharp.Compiler.CodeAnalysis +open FSharp.Compiler.Diagnostics +open FSharp.Compiler.Service.Tests.Common +open FSharp.Compiler.Text + +module private ProjectForNoWarnHashDirective = + + let fileSource1 = """ +module N.M +#nowarn "40" +let rec f = new System.EventHandler(fun _ _ -> f.Invoke(null,null)) +""" + + let createOptions() = createProjectOptions [fileSource1] [] + +[] +let ``Test NoWarn HashDirective`` () = + let options = ProjectForNoWarnHashDirective.createOptions() + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true, useTransparentCompiler=CompilerAssertHelpers.UseTransparentCompiler) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunImmediate + + for e in wholeProjectResults.Diagnostics do + printfn "ProjectForNoWarnHashDirective error: <<<%s>>>" e.Message + + wholeProjectResults.Diagnostics.Length |> shouldEqual 0 + +let private sourceForParseError = """ +module N.M +#nowarn 0xy +() +""" + +[] +let ``RegressionTestForMissingParseError(TransparentCompiler)`` () = + let options = createProjectOptions [sourceForParseError] [] + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true, useTransparentCompiler=CompilerAssertHelpers.UseTransparentCompiler) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunImmediate + wholeProjectResults.Diagnostics.Length |> shouldEqual 1 + wholeProjectResults.Diagnostics.[0].ErrorNumber |> shouldEqual 203 + wholeProjectResults.Diagnostics.[0].Range.StartLine |> shouldEqual 3 + +[] +let ``RegressionTestForDuplicateParseError(BackgroundCompiler)`` () = + let options = createProjectOptions [sourceForParseError] [] + let exprChecker = FSharpChecker.Create(keepAssemblyContents=true, useTransparentCompiler=CompilerAssertHelpers.UseTransparentCompiler) + let sourceName = options.SourceFiles[0] + let _wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunImmediate + let _, checkResults = exprChecker.GetBackgroundCheckResultsForFileInProject(sourceName, options) |> Async.RunImmediate + checkResults.Diagnostics.Length |> shouldEqual 1 + checkResults.Diagnostics.[0].ErrorNumber |> shouldEqual 203 + checkResults.Diagnostics.[0].Range.StartLine |> shouldEqual 3 + +type private Expected = + | Err of errorNumber: int * lineNumber: int + | Warn of errorNumber: int * lineNumber: int +type private TestDef = {source: string; errors: Map} + +let private justNowarnTest = {source = """ +module N.M +"" +#nowarn "20" +"" +"" +"" +() +"""; errors = Map["9.0", [Warn(20, 3)]; "preview", [Warn(20, 3)]]} + +let private noNowarnTest = {source = """ +module N.M +"" +"" +"" +"" +() +"""; errors = Map[ + "9.0", [Warn(20, 3); Warn(20, 4); Warn(20, 5); Warn(20, 6)] + "preview", [Warn(20, 3); Warn(20, 4); Warn(20, 5); Warn(20, 6) + ]]} + +let private onOffTest = {source = """ +module N.M +"" +#nowarn "20" +"" +#warnon "20" +"" +#nowarn "20" +"" +() +"""; errors = Map["9.0", [Err(3350, 6); Warn(20, 3)]; "preview", [Warn(20, 3); Warn(20, 7)]]} + +let mkProjectOptionsAndChecker langVersion = + let options = createProjectOptions [onOffTest.source] [$"--langversion:{langVersion}"] + let checker = FSharpChecker.Create(keepAssemblyContents=true, useTransparentCompiler=CompilerAssertHelpers.UseTransparentCompiler) + options, checker + +let private checkDiagnostics (expected: Expected list) (diagnostics: FSharpDiagnostic list) = + let fail() = + printfn $"expected:" + for exp in expected do printfn $"{exp}" + printfn $"actual:" + for diag in diagnostics do printfn $"{diag.Severity} {diag.ErrorNumber} {diag.StartLine}" + Assert.Fail "unexpected diagnostics" + let unexpected(exp, diag: FSharpDiagnostic) = + match exp with + | Err(errno, line) -> + diag.Severity <> FSharpDiagnosticSeverity.Error || errno <> diag.ErrorNumber || line <> diag.StartLine + | Warn(errno, line) -> + diag.Severity <> FSharpDiagnosticSeverity.Warning || errno <> diag.ErrorNumber || line <> diag.StartLine + if diagnostics.Length <> expected.Length then fail() + elif List.exists unexpected (List.zip expected diagnostics) then fail() + +[] +[] +[] +let ParseAndCheckProjectTest langVersion = + let options, checker = mkProjectOptionsAndChecker langVersion + let wholeProjectResults = checker.ParseAndCheckProject(options) |> Async.RunImmediate + checkDiagnostics onOffTest.errors[langVersion] (Array.toList wholeProjectResults.Diagnostics) + +[] +[] +[] +let ParseAndCheckFileInProjectTest langVersion = + let options, checker = mkProjectOptionsAndChecker langVersion + let sourceName = options.SourceFiles[0] + let parseAndCheckFileInProject testDef = + let source = SourceText.ofString testDef.source + let _, checkAnswer = checker.ParseAndCheckFileInProject(sourceName, 0, source, options) |> Async.RunImmediate + match checkAnswer with + | FSharpCheckFileAnswer.Aborted -> Assert.Fail("Expected error, got Aborted") + | FSharpCheckFileAnswer.Succeeded checkResults -> + checkDiagnostics testDef.errors[langVersion] (Array.toList checkResults.Diagnostics) + [justNowarnTest; noNowarnTest; onOffTest] |> List.iter parseAndCheckFileInProject + +[] +[] +[] +let CheckFileInProjectTest langVersion = + let projectOptions, checker = mkProjectOptionsAndChecker langVersion + let sourceName = projectOptions.SourceFiles[0] + let parsingOptions = {FSharpParsingOptions.Default with SourceFiles = [|sourceName|]; LangVersionText = langVersion} + let checkFileInProject testDef = + let source = SourceText.ofString testDef.source + let parseResults = checker.ParseFile(sourceName, source, parsingOptions) |> Async.RunImmediate + let checkAnswer = checker.CheckFileInProject(parseResults, sourceName, 0, source, projectOptions) |> Async.RunImmediate + match checkAnswer with + | FSharpCheckFileAnswer.Aborted -> Assert.Fail("Expected error, got Aborted") + | FSharpCheckFileAnswer.Succeeded checkResults -> + checkDiagnostics testDef.errors[langVersion] (Array.toList checkResults.Diagnostics) + [justNowarnTest; noNowarnTest; onOffTest] |> List.iter checkFileInProject + +[] +[] +[] +let GetBackgroundCheckResultsForFileInProjectTest langVersion = + let options, checker = mkProjectOptionsAndChecker langVersion + let sourceName = options.SourceFiles[0] + let _wholeProjectResults = checker.ParseAndCheckProject(options) |> Async.RunImmediate + let _, checkResults = checker.GetBackgroundCheckResultsForFileInProject(sourceName, options) |> Async.RunImmediate + checkDiagnostics onOffTest.errors[langVersion] (Array.toList checkResults.Diagnostics) + +let private warnEdits = [ + "module X\n#nowarn 20\n0\n#warnon 20\n0", [Warn(20, 5)]; + "module X\n#nowarn 20\n0\n#warnon 21\n0", []; + "module X\n#nowarn 20\n0\n#warnon 20\n0", [Warn(20, 5)]; +] + +let private createProjectOptions() = + let args = mkProjectCommandLineArgs ("warnEdits.dll", []) + checker.GetProjectOptionsFromCommandLineArgs ("warnEdits.fsproj", args) + +#nowarn 57 +[] +let EditUndoCheckTest () = + let sourceName, projName, outputName = "warnEdits.fs", "warnEdits.fsproj", "warnEdits.dll" + let checker = FSharpChecker.Create(keepAssemblyContents=true, useTransparentCompiler=CompilerAssertHelpers.UseTransparentCompiler) + let emptyDocSource = DocumentSource.Custom(fun s -> async {return Some (SourceText.ofString "")}) + let args = mkProjectCommandLineArgs(outputName, []) + let options = {checker.GetProjectOptionsFromCommandLineArgs(projName, args) with SourceFiles = [| sourceName |]} + let snapshot = FSharpProjectSnapshot.FromOptions(options, emptyDocSource) |> Async.RunImmediate + let parseAndCheckFileInProject i (sourceText, errors) = + let getSource() = System.Threading.Tasks.Task.FromResult(SourceTextNew.ofString sourceText) + let fileSnapshot = ProjectSnapshot.FSharpFileSnapshot(sourceName, string i, getSource) + let snapshot = FSharpProjectSnapshot.Create( + snapshot.ProjectFileName, + snapshot.OutputFileName, + snapshot.ProjectId, + [fileSnapshot], + snapshot.ReferencesOnDisk, + snapshot.OtherOptions, + snapshot.ReferencedProjects, + snapshot.IsIncompleteTypeCheckEnvironment, + snapshot.UseScriptResolutionRules, + snapshot.LoadTime, + snapshot.UnresolvedReferences, + snapshot.OriginalLoadReferences, + None + ) + let _, checkAnswer = checker.ParseAndCheckFileInProject(sourceName, snapshot) |> Async.RunImmediate + match checkAnswer with + | FSharpCheckFileAnswer.Aborted -> Assert.Fail("Expected error, got Aborted") + | FSharpCheckFileAnswer.Succeeded checkResults -> + checkDiagnostics errors (Array.toList checkResults.Diagnostics) + warnEdits |> List.iteri parseAndCheckFileInProject diff --git a/tests/FSharp.Test.Utilities/CompilerAssert.fs b/tests/FSharp.Test.Utilities/CompilerAssert.fs index 1ec26cb3769..f52a66e92bc 100644 --- a/tests/FSharp.Test.Utilities/CompilerAssert.fs +++ b/tests/FSharp.Test.Utilities/CompilerAssert.fs @@ -309,6 +309,10 @@ and Compilation = module CompilerAssertHelpers = + let uniqueName = + let mutable counter = 0 + fun (ext: string) -> $"test%x{Interlocked.Increment &counter}{ext}" + let UseTransparentCompiler = FSharp.Compiler.CompilerConfig.FSharpExperimentalFeaturesEnabledAutomatically || not (String.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("TEST_TRANSPARENT_COMPILER"))) @@ -407,7 +411,7 @@ module CompilerAssertHelpers = #endif |] { - ProjectFileName = "Z:\\test.fsproj" + ProjectFileName = "Z:\\" ++ uniqueName ".fsproj" ProjectId = None SourceFiles = [|"test.fs"|] OtherOptions = Array.append testDefaults assemblies diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl index fd4b4d78bd0..897dd2ac22a 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl @@ -21,14 +21,14 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3509-805::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. -[IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@110::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3494-805::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. @@ -37,8 +37,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList@307::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x0000003E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getSwitch@325::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+attempt@373::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000E9F][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+Pipe #1 stage #1 at line 1845@1845::Invoke(int32)][offset 0x00000030][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+Pipe #1 stage #1 at line 1845@1845::Invoke(int32)][offset 0x00000039][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+Pipe #1 stage #1 at line 1781@1781::Invoke(int32)][offset 0x00000030][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+Pipe #1 stage #1 at line 1781@1781::Invoke(int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 4eaf1633b58..e81c636f402 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -28,18 +28,18 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3509-805::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3494-805::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x0000001B][found Char] Unexpected type on the stack. -[IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@110::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. +[IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1424-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000605][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$Symbols+fullName@2495-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000011][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. @@ -53,8 +53,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+attempt@373::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000E9F][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+processArg@333::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x0000004D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+ResponseFile+parseLine@239::Invoke(string)][offset 0x00000031][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+Pipe #1 stage #1 at line 1845@1845::Invoke(int32)][offset 0x00000030][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+Pipe #1 stage #1 at line 1845@1845::Invoke(int32)][offset 0x00000039][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+Pipe #1 stage #1 at line 1781@1781::Invoke(int32)][offset 0x00000030][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+Pipe #1 stage #1 at line 1781@1781::Invoke(int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerImports+line@570-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl index 0267e2b1bb0..9821dc3dc1a 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl @@ -21,15 +21,15 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3509-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3494-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@291-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@291-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::parseOption@266(string)][offset 0x0000000B][found Char] Unexpected type on the stack. @@ -39,8 +39,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::attempt@372([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000A99][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnderflow]: : FSharp.Compiler.CompilerOptions::DoWithColor([System.Console]System.ConsoleColor, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000005E] Stack underflow. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1845::Invoke(int32)][offset 0x00000031][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1845::Invoke(int32)][offset 0x0000003A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1781::Invoke(int32)][offset 0x00000031][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1781::Invoke(int32)][offset 0x0000003A][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000059C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x000005A5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1873-1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index 37aaa79a6f2..b53d7c7ecc6 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -28,20 +28,20 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3509-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3494-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x00000024][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000BB][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1424-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000620][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$Symbols+fullName@2495-3::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000030][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@291-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@291-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A7][found Char] Unexpected type on the stack. @@ -55,8 +55,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::subSystemVersionSwitch$cont@656([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string, [FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnderflow]: : FSharp.Compiler.CompilerOptions::DoWithColor([System.Console]System.ConsoleColor, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000005E] Stack underflow. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+ResponseFile+parseLine@239::Invoke(string)][offset 0x00000026][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1845::Invoke(int32)][offset 0x00000031][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1845::Invoke(int32)][offset 0x0000003A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1781::Invoke(int32)][offset 0x00000031][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1781::Invoke(int32)][offset 0x0000003A][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerImports+TcConfig-TryResolveLibWithDirectories@568-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000021][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerImports+TcConfig-TryResolveLibWithDirectories@568-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000003B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000059C][found Char] Unexpected type on the stack. diff --git a/tests/fsharp/core/load-script/ProjectDriver.fsx b/tests/fsharp/core/load-script/ProjectDriver.fsx index e614c5a3f72..e394078cc2a 100644 --- a/tests/fsharp/core/load-script/ProjectDriver.fsx +++ b/tests/fsharp/core/load-script/ProjectDriver.fsx @@ -1,9 +1,10 @@ // #Conformance #FSI #load "ThisProject.fsx" +#nowarn "44" [] let fn x = 0 -let y = fn 1 // This would be an 'obsolete' warning but ThisProject.fsx nowarns it +let y = fn 1 // This would be an 'obsolete' warning but for the #nowarn above printfn "Result = %d" (Namespace.Type.Method()) diff --git a/tests/service/data/SyntaxTree/Attribute/RangeOfAttribute.fs.bsl b/tests/service/data/SyntaxTree/Attribute/RangeOfAttribute.fs.bsl index bde23ff1693..8e83e55acfa 100644 --- a/tests/service/data/SyntaxTree/Attribute/RangeOfAttribute.fs.bsl +++ b/tests/service/data/SyntaxTree/Attribute/RangeOfAttribute.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Attribute/RangeOfAttribute.fs", false, - QualifiedNameOfFile RangeOfAttribute, [], [], + QualifiedNameOfFile RangeOfAttribute, [], [SynModuleOrNamespace ([RangeOfAttribute], false, AnonModule, [Attributes @@ -30,4 +30,5 @@ ImplFile Expr (Do (Const (Unit, (3,3--3,5)), (3,0--3,5)), (3,0--3,5))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Attribute/RangeOfAttributeWithPath.fs.bsl b/tests/service/data/SyntaxTree/Attribute/RangeOfAttributeWithPath.fs.bsl index b8c9c031836..4db0f069189 100644 --- a/tests/service/data/SyntaxTree/Attribute/RangeOfAttributeWithPath.fs.bsl +++ b/tests/service/data/SyntaxTree/Attribute/RangeOfAttributeWithPath.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Attribute/RangeOfAttributeWithPath.fs", false, - QualifiedNameOfFile RangeOfAttributeWithPath, [], [], + QualifiedNameOfFile RangeOfAttributeWithPath, [], [SynModuleOrNamespace ([RangeOfAttributeWithPath], false, AnonModule, [Attributes @@ -32,4 +32,5 @@ ImplFile Expr (Do (Const (Unit, (3,3--3,5)), (3,0--3,5)), (3,0--3,5))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Attribute/RangeOfAttributeWithTarget.fs.bsl b/tests/service/data/SyntaxTree/Attribute/RangeOfAttributeWithTarget.fs.bsl index cdb1fdd30fe..38b51a3bffd 100644 --- a/tests/service/data/SyntaxTree/Attribute/RangeOfAttributeWithTarget.fs.bsl +++ b/tests/service/data/SyntaxTree/Attribute/RangeOfAttributeWithTarget.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Attribute/RangeOfAttributeWithTarget.fs", false, - QualifiedNameOfFile RangeOfAttributeWithTarget, [], [], + QualifiedNameOfFile RangeOfAttributeWithTarget, [], [SynModuleOrNamespace ([RangeOfAttributeWithTarget], false, AnonModule, [Attributes @@ -30,4 +30,5 @@ ImplFile Expr (Do (Const (Unit, (3,3--3,5)), (3,0--3,5)), (3,0--3,5))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/ColonBeforeReturnTypeIsPartOfTrivia.fs.bsl b/tests/service/data/SyntaxTree/Binding/ColonBeforeReturnTypeIsPartOfTrivia.fs.bsl index 17fea8f0a33..654c3bed59d 100644 --- a/tests/service/data/SyntaxTree/Binding/ColonBeforeReturnTypeIsPartOfTrivia.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/ColonBeforeReturnTypeIsPartOfTrivia.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Binding/ColonBeforeReturnTypeIsPartOfTrivia.fs", false, - QualifiedNameOfFile ColonBeforeReturnTypeIsPartOfTrivia, [], [], + QualifiedNameOfFile ColonBeforeReturnTypeIsPartOfTrivia, [], [SynModuleOrNamespace ([ColonBeforeReturnTypeIsPartOfTrivia], false, AnonModule, [Let @@ -35,4 +35,5 @@ ImplFile (2,0--2,31))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/ColonBeforeReturnTypeIsPartOfTriviaInProperties.fs.bsl b/tests/service/data/SyntaxTree/Binding/ColonBeforeReturnTypeIsPartOfTriviaInProperties.fs.bsl index dd5022f2bc2..92d2ae4ebfc 100644 --- a/tests/service/data/SyntaxTree/Binding/ColonBeforeReturnTypeIsPartOfTriviaInProperties.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/ColonBeforeReturnTypeIsPartOfTriviaInProperties.fs.bsl @@ -2,7 +2,6 @@ ImplFile (ParsedImplFileInput ("/root/Binding/ColonBeforeReturnTypeIsPartOfTriviaInProperties.fs", false, QualifiedNameOfFile ColonBeforeReturnTypeIsPartOfTriviaInProperties, [], - [], [SynModuleOrNamespace ([ColonBeforeReturnTypeIsPartOfTriviaInProperties], false, AnonModule, [Types @@ -104,4 +103,5 @@ ImplFile WithKeyword = None })], (2,0--3,62))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/ConditionalDirectiveAroundInlineKeyword.fs.bsl b/tests/service/data/SyntaxTree/Binding/ConditionalDirectiveAroundInlineKeyword.fs.bsl index 115b95c51eb..495a509c7ca 100644 --- a/tests/service/data/SyntaxTree/Binding/ConditionalDirectiveAroundInlineKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/ConditionalDirectiveAroundInlineKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Binding/ConditionalDirectiveAroundInlineKeyword.fs", false, - QualifiedNameOfFile ConditionalDirectiveAroundInlineKeyword, [], [], + QualifiedNameOfFile ConditionalDirectiveAroundInlineKeyword, [], [SynModuleOrNamespace ([ConditionalDirectiveAroundInlineKeyword], false, AnonModule, [Let @@ -47,4 +47,5 @@ ImplFile (true, true), { ConditionalDirectives = [If (Not (Ident "FOO"), (3,0--3,8)); EndIf (5,0--5,6)] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/InlineKeywordInBinding.fs.bsl b/tests/service/data/SyntaxTree/Binding/InlineKeywordInBinding.fs.bsl index 596eb100812..3213618de10 100644 --- a/tests/service/data/SyntaxTree/Binding/InlineKeywordInBinding.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/InlineKeywordInBinding.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Binding/InlineKeywordInBinding.fs", false, - QualifiedNameOfFile InlineKeywordInBinding, [], [], + QualifiedNameOfFile InlineKeywordInBinding, [], [SynModuleOrNamespace ([InlineKeywordInBinding], false, AnonModule, [Let @@ -52,4 +52,5 @@ ImplFile EqualsRange = Some (2,17--2,18) })], (2,0--4,6))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeBetweenLetKeywordAndPatternShouldBeIncludedInSynModuleDeclLet.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeBetweenLetKeywordAndPatternShouldBeIncludedInSynModuleDeclLet.fs.bsl index 63b8a81ea59..90cbfb00a2a 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeBetweenLetKeywordAndPatternShouldBeIncludedInSynModuleDeclLet.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeBetweenLetKeywordAndPatternShouldBeIncludedInSynModuleDeclLet.fs.bsl @@ -4,7 +4,7 @@ ImplFile false, QualifiedNameOfFile RangeOfAttributeBetweenLetKeywordAndPatternShouldBeIncludedInSynModuleDeclLet, - [], [], + [], [SynModuleOrNamespace ([RangeOfAttributeBetweenLetKeywordAndPatternShouldBeIncludedInSynModuleDeclLet], false, AnonModule, @@ -34,4 +34,5 @@ ImplFile EqualsRange = Some (2,22--2,23) })], (2,0--2,25))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInBindingOfSynExprObjExpr.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInBindingOfSynExprObjExpr.fs.bsl index db5fe5051fe..8dbf89faea4 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInBindingOfSynExprObjExpr.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInBindingOfSynExprObjExpr.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfAttributeShouldBeIncludedInBindingOfSynExprObjExpr.fs", false, QualifiedNameOfFile - RangeOfAttributeShouldBeIncludedInBindingOfSynExprObjExpr, [], [], + RangeOfAttributeShouldBeIncludedInBindingOfSynExprObjExpr, [], [SynModuleOrNamespace ([RangeOfAttributeShouldBeIncludedInBindingOfSynExprObjExpr], false, AnonModule, @@ -50,4 +50,5 @@ ImplFile (2,2--2,21), (2,0--4,32)), (2,0--4,32))], PreXmlDocEmpty, [], None, (2,0--4,32), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMember.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMember.fs.bsl index d52e2f085ba..f53b47a4eaa 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMember.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMember.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMember.fs", false, QualifiedNameOfFile - RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMember, [], [], + RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMember, [], [SynModuleOrNamespace ([RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMember], false, AnonModule, @@ -51,4 +51,5 @@ ImplFile WithKeyword = None })], (2,0--4,15))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMemberOptAsSpec.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMemberOptAsSpec.fs.bsl index 4717531eb39..dde24f9afc2 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMemberOptAsSpec.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMemberOptAsSpec.fs.bsl @@ -4,7 +4,7 @@ ImplFile false, QualifiedNameOfFile RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMemberOptAsSpec, - [], [], + [], [SynModuleOrNamespace ([RangeOfAttributeShouldBeIncludedInConstructorSynMemberDefnMemberOptAsSpec], false, AnonModule, @@ -52,4 +52,5 @@ ImplFile WithKeyword = None })], (2,0--4,23))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInFullSynMemberDefnMemberProperty.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInFullSynMemberDefnMemberProperty.fs.bsl index fe111972f91..3a657b48cb7 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInFullSynMemberDefnMemberProperty.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInFullSynMemberDefnMemberProperty.fs.bsl @@ -4,7 +4,6 @@ ImplFile false, QualifiedNameOfFile RangeOfAttributeShouldBeIncludedInFullSynMemberDefnMemberProperty, [], - [], [SynModuleOrNamespace ([RangeOfAttributeShouldBeIncludedInFullSynMemberDefnMemberProperty], false, AnonModule, @@ -107,4 +106,5 @@ ImplFile WithKeyword = None })], (2,0--6,50))], PreXmlDocEmpty, [], None, (2,0--7,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSecondaryConstructor.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSecondaryConstructor.fs.bsl index ceff4f8e244..566cba41a61 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSecondaryConstructor.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSecondaryConstructor.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfAttributeShouldBeIncludedInSecondaryConstructor.fs", false, QualifiedNameOfFile RangeOfAttributeShouldBeIncludedInSecondaryConstructor, - [], [], + [], [SynModuleOrNamespace ([RangeOfAttributeShouldBeIncludedInSecondaryConstructor], false, AnonModule, @@ -117,4 +117,5 @@ ImplFile WithKeyword = None })], (2,0--11,12))], PreXmlDocEmpty, [], None, (2,0--12,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynMemberDefnLetBindings.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynMemberDefnLetBindings.fs.bsl index a8e5110eeb4..791854800d3 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynMemberDefnLetBindings.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynMemberDefnLetBindings.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfAttributeShouldBeIncludedInSynMemberDefnLetBindings.fs", false, QualifiedNameOfFile - RangeOfAttributeShouldBeIncludedInSynMemberDefnLetBindings, [], [], + RangeOfAttributeShouldBeIncludedInSynMemberDefnLetBindings, [], [SynModuleOrNamespace ([RangeOfAttributeShouldBeIncludedInSynMemberDefnLetBindings], false, AnonModule, @@ -42,4 +42,5 @@ ImplFile WithKeyword = None })], (2,0--4,13))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynMemberDefnMember.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynMemberDefnMember.fs.bsl index 83139fe83ee..ff220a2a034 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynMemberDefnMember.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynMemberDefnMember.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfAttributeShouldBeIncludedInSynMemberDefnMember.fs", false, QualifiedNameOfFile RangeOfAttributeShouldBeIncludedInSynMemberDefnMember, - [], [], + [], [SynModuleOrNamespace ([RangeOfAttributeShouldBeIncludedInSynMemberDefnMember], false, AnonModule, @@ -55,4 +55,5 @@ ImplFile WithKeyword = None })], (2,0--4,33))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynModuleDeclLet.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynModuleDeclLet.fs.bsl index 08edc3d2631..b15cdc324a7 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynModuleDeclLet.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInSynModuleDeclLet.fs.bsl @@ -3,7 +3,6 @@ ImplFile ("/root/Binding/RangeOfAttributeShouldBeIncludedInSynModuleDeclLet.fs", false, QualifiedNameOfFile RangeOfAttributeShouldBeIncludedInSynModuleDeclLet, [], - [], [SynModuleOrNamespace ([RangeOfAttributeShouldBeIncludedInSynModuleDeclLet], false, AnonModule, @@ -27,4 +26,5 @@ ImplFile EqualsRange = Some (3,6--3,7) })], (2,0--3,9))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInWriteOnlySynMemberDefnMemberProperty.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInWriteOnlySynMemberDefnMemberProperty.fs.bsl index bf0e8802e32..8698f8ddc7c 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInWriteOnlySynMemberDefnMemberProperty.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfAttributeShouldBeIncludedInWriteOnlySynMemberDefnMemberProperty.fs.bsl @@ -4,7 +4,7 @@ ImplFile false, QualifiedNameOfFile RangeOfAttributeShouldBeIncludedInWriteOnlySynMemberDefnMemberProperty, - [], [], + [], [SynModuleOrNamespace ([RangeOfAttributeShouldBeIncludedInWriteOnlySynMemberDefnMemberProperty], false, AnonModule, @@ -71,4 +71,5 @@ ImplFile WithKeyword = None })], (2,0--4,79))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBinding.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBinding.fs.bsl index e3156b5c3b5..9921095320e 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBinding.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBinding.fs.bsl @@ -2,7 +2,6 @@ ImplFile (ParsedImplFileInput ("/root/Binding/RangeOfEqualSignShouldBePresentInLocalLetBinding.fs", false, QualifiedNameOfFile RangeOfEqualSignShouldBePresentInLocalLetBinding, [], - [], [SynModuleOrNamespace ([RangeOfEqualSignShouldBePresentInLocalLetBinding], false, AnonModule, [Expr @@ -25,4 +24,5 @@ ImplFile InKeyword = None }), (2,0--4,6)), (2,0--4,6))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBindingTyped.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBindingTyped.fs.bsl index 93dabea4c82..770bfd5f4d5 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBindingTyped.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBindingTyped.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfEqualSignShouldBePresentInLocalLetBindingTyped.fs", false, QualifiedNameOfFile RangeOfEqualSignShouldBePresentInLocalLetBindingTyped, - [], [], + [], [SynModuleOrNamespace ([RangeOfEqualSignShouldBePresentInLocalLetBindingTyped], false, AnonModule, @@ -35,4 +35,5 @@ ImplFile InKeyword = None }), (2,0--4,6)), (2,0--4,6))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBinding.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBinding.fs.bsl index 9e0bd27f359..0a48a4272fc 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBinding.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBinding.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Binding/RangeOfEqualSignShouldBePresentInMemberBinding.fs", false, - QualifiedNameOfFile RangeOfEqualSignShouldBePresentInMemberBinding, [], [], + QualifiedNameOfFile RangeOfEqualSignShouldBePresentInMemberBinding, [], [SynModuleOrNamespace ([RangeOfEqualSignShouldBePresentInMemberBinding], false, AnonModule, [Types @@ -49,4 +49,5 @@ ImplFile WithKeyword = None })], (2,0--3,21))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBindingWithParameters.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBindingWithParameters.fs.bsl index 463fcef24ba..c8eb3a32a50 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBindingWithParameters.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBindingWithParameters.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfEqualSignShouldBePresentInMemberBindingWithParameters.fs", false, QualifiedNameOfFile - RangeOfEqualSignShouldBePresentInMemberBindingWithParameters, [], [], + RangeOfEqualSignShouldBePresentInMemberBindingWithParameters, [], [SynModuleOrNamespace ([RangeOfEqualSignShouldBePresentInMemberBindingWithParameters], false, AnonModule, @@ -56,4 +56,5 @@ ImplFile WithKeyword = None })], (2,0--3,24))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBindingWithReturnType.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBindingWithReturnType.fs.bsl index 49eeec4d346..431946b6f94 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBindingWithReturnType.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInMemberBindingWithReturnType.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfEqualSignShouldBePresentInMemberBindingWithReturnType.fs", false, QualifiedNameOfFile - RangeOfEqualSignShouldBePresentInMemberBindingWithReturnType, [], [], + RangeOfEqualSignShouldBePresentInMemberBindingWithReturnType, [], [SynModuleOrNamespace ([RangeOfEqualSignShouldBePresentInMemberBindingWithReturnType], false, AnonModule, @@ -65,4 +65,5 @@ ImplFile WithKeyword = None })], (2,0--3,33))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInProperty.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInProperty.fs.bsl index 32f9f50c83a..72ee28c403d 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInProperty.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInProperty.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Binding/RangeOfEqualSignShouldBePresentInProperty.fs", false, - QualifiedNameOfFile RangeOfEqualSignShouldBePresentInProperty, [], [], + QualifiedNameOfFile RangeOfEqualSignShouldBePresentInProperty, [], [SynModuleOrNamespace ([RangeOfEqualSignShouldBePresentInProperty], false, AnonModule, [Types @@ -96,4 +96,5 @@ ImplFile WithKeyword = None })], (2,0--5,50))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInSynModuleDeclLetBinding.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInSynModuleDeclLetBinding.fs.bsl index eca7f36b6dd..8453e7e60c9 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInSynModuleDeclLetBinding.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInSynModuleDeclLetBinding.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfEqualSignShouldBePresentInSynModuleDeclLetBinding.fs", false, QualifiedNameOfFile - RangeOfEqualSignShouldBePresentInSynModuleDeclLetBinding, [], [], + RangeOfEqualSignShouldBePresentInSynModuleDeclLetBinding, [], [SynModuleOrNamespace ([RangeOfEqualSignShouldBePresentInSynModuleDeclLetBinding], false, AnonModule, @@ -21,4 +21,5 @@ ImplFile EqualsRange = Some (2,6--2,7) })], (2,0--2,10))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInSynModuleDeclLetBindingTyped.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInSynModuleDeclLetBindingTyped.fs.bsl index 651cdb4f8ce..77819f9484e 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInSynModuleDeclLetBindingTyped.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInSynModuleDeclLetBindingTyped.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfEqualSignShouldBePresentInSynModuleDeclLetBindingTyped.fs", false, QualifiedNameOfFile - RangeOfEqualSignShouldBePresentInSynModuleDeclLetBindingTyped, [], [], + RangeOfEqualSignShouldBePresentInSynModuleDeclLetBindingTyped, [], [SynModuleOrNamespace ([RangeOfEqualSignShouldBePresentInSynModuleDeclLetBindingTyped], false, AnonModule, @@ -28,4 +28,5 @@ ImplFile EqualsRange = Some (2,12--2,13) })], (2,0--2,16))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding.fs.bsl index 86775dec80c..747fdcbc1e2 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding.fs", false, QualifiedNameOfFile - RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding, [], [], + RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding, [], [SynModuleOrNamespace ([RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding], false, AnonModule, @@ -42,4 +42,5 @@ ImplFile EqualsRange = Some (2,6--2,7) })], (2,0--4,6))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBinding.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBinding.fs.bsl index 0a175553cad..c2d3ab9e526 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBinding.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBinding.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Binding/RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBinding.fs", false, QualifiedNameOfFile - RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBinding, [], [], + RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBinding, [], [SynModuleOrNamespace ([RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBinding], false, AnonModule, @@ -21,4 +21,5 @@ ImplFile EqualsRange = Some (2,6--2,7) })], (2,0--2,10))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBindingWithAttributes.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBindingWithAttributes.fs.bsl index 613931862dd..af82b819e97 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBindingWithAttributes.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBindingWithAttributes.fs.bsl @@ -4,7 +4,7 @@ ImplFile false, QualifiedNameOfFile RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBindingWithAttributes, - [], [], + [], [SynModuleOrNamespace ([RangeOfLetKeywordShouldBePresentInSynModuleDeclLetBindingWithAttributes], false, AnonModule, @@ -29,4 +29,5 @@ ImplFile EqualsRange = Some (5,6--5,7) })], (2,0--5,10))], PreXmlDocEmpty, [], None, (3,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (4,0--4,15)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Binding/TupleReturnTypeOfBindingShouldContainStars.fs.bsl b/tests/service/data/SyntaxTree/Binding/TupleReturnTypeOfBindingShouldContainStars.fs.bsl index a8dae863d64..0ac9a8d3c94 100644 --- a/tests/service/data/SyntaxTree/Binding/TupleReturnTypeOfBindingShouldContainStars.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/TupleReturnTypeOfBindingShouldContainStars.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Binding/TupleReturnTypeOfBindingShouldContainStars.fs", false, - QualifiedNameOfFile TupleReturnTypeOfBindingShouldContainStars, [], [], + QualifiedNameOfFile TupleReturnTypeOfBindingShouldContainStars, [], [SynModuleOrNamespace ([TupleReturnTypeOfBindingShouldContainStars], false, AnonModule, [Let @@ -78,4 +78,5 @@ ImplFile EqualsRange = Some (3,28--3,29) })], (3,0--3,42))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCode.fs.bsl b/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCode.fs.bsl index 91dffc0ee66..9dcd99749c5 100644 --- a/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCode.fs.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCode.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/CodeComment/BlockCommentInSourceCode.fs", false, - QualifiedNameOfFile BlockCommentInSourceCode, [], [], + QualifiedNameOfFile BlockCommentInSourceCode, [], [SynModuleOrNamespace ([BlockCommentInSourceCode], false, AnonModule, [Let @@ -34,4 +34,5 @@ ImplFile EqualsRange = Some (2,17--2,18) })], (2,0--2,25))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [BlockComment (2,6--2,13)] }, set [])) diff --git a/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCodeSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCodeSignatureFile.fsi.bsl index 977d7b388de..e5fefe917a8 100644 --- a/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCodeSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/BlockCommentInSourceCodeSignatureFile.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/CodeComment/BlockCommentInSourceCodeSignatureFile.fsi", - QualifiedNameOfFile BlockCommentInSourceCodeSignatureFile, [], [], + QualifiedNameOfFile BlockCommentInSourceCodeSignatureFile, [], [SynModuleOrNamespaceSig ([Meh], false, DeclaredNamespace, [Val @@ -17,4 +17,5 @@ SigFile EqualsRange = None }), (4,0--4,19))], PreXmlDocEmpty, [], None, (2,0--4,19), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [BlockComment (4,6--4,13)] }, set [])) diff --git a/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCode.fs.bsl b/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCode.fs.bsl index a3bb2470842..07bd380cf4f 100644 --- a/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCode.fs.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCode.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/CodeComment/CommentAfterSourceCode.fs", false, - QualifiedNameOfFile CommentAfterSourceCode, [], [], + QualifiedNameOfFile CommentAfterSourceCode, [], [SynModuleOrNamespace ([CommentAfterSourceCode], false, AnonModule, [Expr @@ -10,4 +10,5 @@ ImplFile (2,0--2,5))], PreXmlDocEmpty, [], None, (2,0--2,5), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (2,6--2,17)] }, set [])) diff --git a/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCodeSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCodeSignatureFile.fsi.bsl index 7b8fc685e00..df379c0f423 100644 --- a/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCodeSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/CommentAfterSourceCodeSignatureFile.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/CodeComment/CommentAfterSourceCodeSignatureFile.fsi", - QualifiedNameOfFile CommentAfterSourceCodeSignatureFile, [], [], + QualifiedNameOfFile CommentAfterSourceCodeSignatureFile, [], [SynModuleOrNamespaceSig ([Meh], false, DeclaredNamespace, [Val @@ -17,4 +17,5 @@ SigFile EqualsRange = None }), (4,0--4,13))], PreXmlDocEmpty, [], None, (2,0--4,13), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (4,14--4,25)] }, set [])) diff --git a/tests/service/data/SyntaxTree/CodeComment/CommentAtEndOfFile.fs.bsl b/tests/service/data/SyntaxTree/CodeComment/CommentAtEndOfFile.fs.bsl index 4c1f24b1384..eb0ecc84f09 100644 --- a/tests/service/data/SyntaxTree/CodeComment/CommentAtEndOfFile.fs.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/CommentAtEndOfFile.fs.bsl @@ -1,9 +1,10 @@ ImplFile (ParsedImplFileInput ("/root/CodeComment/CommentAtEndOfFile.fs", false, - QualifiedNameOfFile CommentAtEndOfFile, [], [], + QualifiedNameOfFile CommentAtEndOfFile, [], [SynModuleOrNamespace ([CommentAtEndOfFile], false, AnonModule, [Expr (Ident x, (2,0--2,1))], PreXmlDocEmpty, [], None, (2,0--2,1), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (2,2--2,6)] }, set [])) diff --git a/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLine.fs.bsl b/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLine.fs.bsl index ad5aa017eac..d4dcf1896dc 100644 --- a/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLine.fs.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLine.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/CodeComment/CommentOnSingleLine.fs", false, - QualifiedNameOfFile CommentOnSingleLine, [], [], + QualifiedNameOfFile CommentOnSingleLine, [], [SynModuleOrNamespace ([CommentOnSingleLine], false, AnonModule, [Expr @@ -10,4 +10,5 @@ ImplFile (3,0--3,5))], PreXmlDocEmpty, [], None, (3,0--3,5), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (2,0--2,11)] }, set [])) diff --git a/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLineSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLineSignatureFile.fsi.bsl index 5dd445b4d00..899d4dacd23 100644 --- a/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLineSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/CommentOnSingleLineSignatureFile.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/CodeComment/CommentOnSingleLineSignatureFile.fsi", - QualifiedNameOfFile CommentOnSingleLineSignatureFile, [], [], + QualifiedNameOfFile CommentOnSingleLineSignatureFile, [], [SynModuleOrNamespaceSig ([Meh], false, DeclaredNamespace, [Val @@ -17,4 +17,5 @@ SigFile EqualsRange = None }), (4,0--4,10))], PreXmlDocEmpty, [], None, (2,0--4,10), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (3,0--3,11)] }, set [])) diff --git a/tests/service/data/SyntaxTree/CodeComment/TripleSlashCommentShouldBeCapturedIfUsedInAnInvalidLocation.fs.bsl b/tests/service/data/SyntaxTree/CodeComment/TripleSlashCommentShouldBeCapturedIfUsedInAnInvalidLocation.fs.bsl index b57381ca8e6..86c4c524b60 100644 --- a/tests/service/data/SyntaxTree/CodeComment/TripleSlashCommentShouldBeCapturedIfUsedInAnInvalidLocation.fs.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/TripleSlashCommentShouldBeCapturedIfUsedInAnInvalidLocation.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/CodeComment/TripleSlashCommentShouldBeCapturedIfUsedInAnInvalidLocation.fs", false, QualifiedNameOfFile - TripleSlashCommentShouldBeCapturedIfUsedInAnInvalidLocation, [], [], + TripleSlashCommentShouldBeCapturedIfUsedInAnInvalidLocation, [], [SynModuleOrNamespace ([TripleSlashCommentShouldBeCapturedIfUsedInAnInvalidLocation], false, AnonModule, @@ -38,6 +38,7 @@ ImplFile PreXmlDocEmpty, [], None, (3,0--10,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (4,4--4,40); LineComment (6,4--6,36); LineComment (7,4--7,27)] }, set [])) diff --git a/tests/service/data/SyntaxTree/CodeComment/TripleSlashCommentShouldNotBeCaptured.fs.bsl b/tests/service/data/SyntaxTree/CodeComment/TripleSlashCommentShouldNotBeCaptured.fs.bsl index fafd932e041..e5f11934a8f 100644 --- a/tests/service/data/SyntaxTree/CodeComment/TripleSlashCommentShouldNotBeCaptured.fs.bsl +++ b/tests/service/data/SyntaxTree/CodeComment/TripleSlashCommentShouldNotBeCaptured.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/CodeComment/TripleSlashCommentShouldNotBeCaptured.fs", false, - QualifiedNameOfFile TripleSlashCommentShouldNotBeCaptured, [], [], + QualifiedNameOfFile TripleSlashCommentShouldNotBeCaptured, [], [SynModuleOrNamespace ([TripleSlashCommentShouldNotBeCaptured], false, AnonModule, [Let @@ -18,4 +18,5 @@ ImplFile EqualsRange = Some (3,6--3,7) })], (2,0--3,9))], PreXmlDocEmpty, [], None, (3,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ComputationExpression/MultipleSynExprAndBangHaveRangeThatStartsAtAndAndEndsAfterExpression.fs.bsl b/tests/service/data/SyntaxTree/ComputationExpression/MultipleSynExprAndBangHaveRangeThatStartsAtAndAndEndsAfterExpression.fs.bsl index 16e62c6c1aa..77bbe3164c6 100644 --- a/tests/service/data/SyntaxTree/ComputationExpression/MultipleSynExprAndBangHaveRangeThatStartsAtAndAndEndsAfterExpression.fs.bsl +++ b/tests/service/data/SyntaxTree/ComputationExpression/MultipleSynExprAndBangHaveRangeThatStartsAtAndAndEndsAfterExpression.fs.bsl @@ -4,7 +4,6 @@ ImplFile false, QualifiedNameOfFile MultipleSynExprAndBangHaveRangeThatStartsAtAndAndEndsAfterExpression, [], - [], [SynModuleOrNamespace ([MultipleSynExprAndBangHaveRangeThatStartsAtAndAndEndsAfterExpression], false, AnonModule, @@ -47,4 +46,5 @@ ImplFile (2,0--7,1)), (2,0--7,1))], PreXmlDocEmpty, [], None, (2,0--7,1), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ComputationExpression/SynExprAndBangRangeStartsAtAndAndEndsAfterExpression.fs.bsl b/tests/service/data/SyntaxTree/ComputationExpression/SynExprAndBangRangeStartsAtAndAndEndsAfterExpression.fs.bsl index 9ee7e15f532..610ab87132f 100644 --- a/tests/service/data/SyntaxTree/ComputationExpression/SynExprAndBangRangeStartsAtAndAndEndsAfterExpression.fs.bsl +++ b/tests/service/data/SyntaxTree/ComputationExpression/SynExprAndBangRangeStartsAtAndAndEndsAfterExpression.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/ComputationExpression/SynExprAndBangRangeStartsAtAndAndEndsAfterExpression.fs", false, QualifiedNameOfFile SynExprAndBangRangeStartsAtAndAndEndsAfterExpression, - [], [], + [], [SynModuleOrNamespace ([SynExprAndBangRangeStartsAtAndAndEndsAfterExpression], false, AnonModule, @@ -36,4 +36,5 @@ ImplFile (2,0--8,1)), (2,0--8,1))], PreXmlDocEmpty, [], None, (2,0--8,1), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTrivia.fs.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTrivia.fs.bsl index 8a7a55c28a1..8ed093aa434 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTrivia.fs.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTrivia.fs.bsl @@ -3,7 +3,6 @@ ImplFile ("/root/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTrivia.fs", false, QualifiedNameOfFile DirectivesInMultilineCommentAreNotReportedAsTrivia, [], - [], [SynModuleOrNamespace ([DirectivesInMultilineCommentAreNotReportedAsTrivia], false, AnonModule, @@ -21,4 +20,5 @@ ImplFile EqualsRange = Some (2,6--2,7) })], (2,0--8,6))], PreXmlDocEmpty, [], None, (2,0--9,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [BlockComment (3,0--7,2)] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTriviaSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTriviaSignatureFile.fsi.bsl index bb8a2a87d75..cd8a4e3f8ff 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTriviaSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTriviaSignatureFile.fsi.bsl @@ -2,7 +2,7 @@ SigFile (ParsedSigFileInput ("/root/ConditionalDirective/DirectivesInMultilineCommentAreNotReportedAsTriviaSignatureFile.fsi", QualifiedNameOfFile - DirectivesInMultilineCommentAreNotReportedAsTriviaSignatureFile, [], [], + DirectivesInMultilineCommentAreNotReportedAsTriviaSignatureFile, [], [SynModuleOrNamespaceSig ([Foobar], false, DeclaredNamespace, [Val @@ -19,4 +19,5 @@ SigFile PreXmlDocEmpty, [], None, (2,0--10,6), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [BlockComment (5,0--9,2)] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTrivia.fs.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTrivia.fs.bsl index 231cfd08d6f..2c1508983b8 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTrivia.fs.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTrivia.fs.bsl @@ -3,7 +3,6 @@ ImplFile ("/root/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTrivia.fs", false, QualifiedNameOfFile DirectivesInMultilineStringAreNotReportedAsTrivia, [], - [], [SynModuleOrNamespace ([DirectivesInMultilineStringAreNotReportedAsTrivia], false, AnonModule, [Let @@ -28,4 +27,5 @@ ImplFile EqualsRange = Some (2,6--2,7) })], (2,0--7,3))], PreXmlDocEmpty, [], None, (2,0--8,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTriviaSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTriviaSignatureFile.fsi.bsl index 3a151928254..ad832870af4 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTriviaSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTriviaSignatureFile.fsi.bsl @@ -2,7 +2,7 @@ SigFile (ParsedSigFileInput ("/root/ConditionalDirective/DirectivesInMultilineStringAreNotReportedAsTriviaSignatureFile.fsi", QualifiedNameOfFile - DirectivesInMultilineStringAreNotReportedAsTriviaSignatureFile, [], [], + DirectivesInMultilineStringAreNotReportedAsTriviaSignatureFile, [], [SynModuleOrNamespaceSig ([Foobar], false, DeclaredNamespace, [Val @@ -29,4 +29,5 @@ SigFile PreXmlDocEmpty, [], None, (2,0--9,19), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndif.fs.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndif.fs.bsl index 9f409f45808..3a6cd1220fd 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndif.fs.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndif.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ConditionalDirective/NestedIfElseEndif.fs", false, - QualifiedNameOfFile NestedIfElseEndif, [], [], + QualifiedNameOfFile NestedIfElseEndif, [], [SynModuleOrNamespace ([NestedIfElseEndif], false, AnonModule, [Let @@ -22,4 +22,5 @@ ImplFile [If (Ident "FOO", (3,4--3,11)); If (Ident "MEH", (4,8--4,15)); Else (6,8--6,13); EndIf (8,8--8,14); Else (9,4--9,9); EndIf (11,4--11,10)] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndifSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndifSignatureFile.fsi.bsl index c1293f6c9c9..26f0f17c77e 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndifSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfElseEndifSignatureFile.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/ConditionalDirective/NestedIfElseEndifSignatureFile.fsi", - QualifiedNameOfFile NestedIfElseEndifSignatureFile, [], [], + QualifiedNameOfFile NestedIfElseEndifSignatureFile, [], [SynModuleOrNamespaceSig ([Foobar], false, DeclaredNamespace, [Val @@ -21,4 +21,5 @@ SigFile [If (Ident "FOO", (5,4--5,11)); If (Ident "MEH", (6,8--6,15)); Else (8,8--8,13); EndIf (10,8--10,14); Else (11,4--11,9); EndIf (13,4--13,10)] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressions.fs.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressions.fs.bsl index 25821646aa0..2a2ab666df7 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressions.fs.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressions.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ConditionalDirective/NestedIfEndifWithComplexExpressions.fs", false, - QualifiedNameOfFile NestedIfEndifWithComplexExpressions, [], [], + QualifiedNameOfFile NestedIfEndifWithComplexExpressions, [], [SynModuleOrNamespace ([NestedIfEndifWithComplexExpressions], false, AnonModule, [Let @@ -23,4 +23,5 @@ ImplFile If (And (Ident "FOO", Ident "BAR"), (4,8--4,22)); If (Or (Ident "MEH", Ident "HMM"), (5,12--5,26)); EndIf (7,12--7,18); EndIf (8,8--8,14); EndIf (9,4--9,10)] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressionsSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressionsSignatureFile.fsi.bsl index 9f0375afada..416dec61255 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressionsSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/NestedIfEndifWithComplexExpressionsSignatureFile.fsi.bsl @@ -2,7 +2,6 @@ SigFile (ParsedSigFileInput ("/root/ConditionalDirective/NestedIfEndifWithComplexExpressionsSignatureFile.fsi", QualifiedNameOfFile NestedIfEndifWithComplexExpressionsSignatureFile, [], - [], [SynModuleOrNamespaceSig ([Foobar], false, DeclaredNamespace, [Val @@ -23,4 +22,5 @@ SigFile If (And (Ident "FOO", Ident "BAR"), (6,8--6,22)); If (Or (Ident "MEH", Ident "HMM"), (7,12--7,26)); EndIf (9,12--9,18); EndIf (10,8--10,14); EndIf (11,4--11,10)] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndif.fs.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndif.fs.bsl index 72ac590cc94..6a070b4b63c 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndif.fs.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndif.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ConditionalDirective/SingleIfElseEndif.fs", false, - QualifiedNameOfFile SingleIfElseEndif, [], [], + QualifiedNameOfFile SingleIfElseEndif, [], [SynModuleOrNamespace ([SingleIfElseEndif], false, AnonModule, [Let @@ -20,4 +20,5 @@ ImplFile (true, true), { ConditionalDirectives = [If (Ident "DEBUG", (3,4--3,13)); Else (5,4--5,9); EndIf (7,4--7,10)] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndifSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndifSignatureFile.fsi.bsl index 4164c59cd03..393ca5b7291 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndifSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfElseEndifSignatureFile.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/ConditionalDirective/SingleIfElseEndifSignatureFile.fsi", - QualifiedNameOfFile SingleIfElseEndifSignatureFile, [], [], + QualifiedNameOfFile SingleIfElseEndifSignatureFile, [], [SynModuleOrNamespaceSig ([Foobar], false, DeclaredNamespace, [Val @@ -19,4 +19,5 @@ SigFile { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [If (Ident "DEBUG", (5,4--5,13)); Else (7,4--7,9); EndIf (9,4--9,10)] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndif.fs.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndif.fs.bsl index cd4a4243c4e..45ef82ca4c5 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndif.fs.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndif.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ConditionalDirective/SingleIfEndif.fs", false, - QualifiedNameOfFile SingleIfEndif, [], [], + QualifiedNameOfFile SingleIfEndif, [], [SynModuleOrNamespace ([SingleIfEndif], false, AnonModule, [Let @@ -20,4 +20,5 @@ ImplFile (true, true), { ConditionalDirectives = [If (Ident "DEBUG", (3,4--3,13)); EndIf (5,4--5,10)] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndifSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndifSignatureFile.fsi.bsl index ea0a6308762..bec565d234d 100644 --- a/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndifSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/ConditionalDirective/SingleIfEndifSignatureFile.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/ConditionalDirective/SingleIfEndifSignatureFile.fsi", - QualifiedNameOfFile SingleIfEndifSignatureFile, [], [], + QualifiedNameOfFile SingleIfEndifSignatureFile, [], [SynModuleOrNamespaceSig ([Foobar], false, DeclaredNamespace, [Val @@ -19,4 +19,5 @@ SigFile { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [If (Ident "DEBUG", (5,4--5,13)); EndIf (7,4--7,10)] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/EnumCase/MultipleSynEnumCasesHaveBarRange.fs.bsl b/tests/service/data/SyntaxTree/EnumCase/MultipleSynEnumCasesHaveBarRange.fs.bsl index 121139817fc..65b7c6c556f 100644 --- a/tests/service/data/SyntaxTree/EnumCase/MultipleSynEnumCasesHaveBarRange.fs.bsl +++ b/tests/service/data/SyntaxTree/EnumCase/MultipleSynEnumCasesHaveBarRange.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/EnumCase/MultipleSynEnumCasesHaveBarRange.fs", false, - QualifiedNameOfFile MultipleSynEnumCasesHaveBarRange, [], [], + QualifiedNameOfFile MultipleSynEnumCasesHaveBarRange, [], [SynModuleOrNamespace ([MultipleSynEnumCasesHaveBarRange], false, AnonModule, [Types @@ -30,4 +30,5 @@ ImplFile WithKeyword = None })], (2,0--4,14))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/EnumCase/SingleSynEnumCaseHasBarRange.fs.bsl b/tests/service/data/SyntaxTree/EnumCase/SingleSynEnumCaseHasBarRange.fs.bsl index 7f1b4d84526..ca80ebf45a9 100644 --- a/tests/service/data/SyntaxTree/EnumCase/SingleSynEnumCaseHasBarRange.fs.bsl +++ b/tests/service/data/SyntaxTree/EnumCase/SingleSynEnumCaseHasBarRange.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/EnumCase/SingleSynEnumCaseHasBarRange.fs", false, - QualifiedNameOfFile SingleSynEnumCaseHasBarRange, [], [], + QualifiedNameOfFile SingleSynEnumCaseHasBarRange, [], [SynModuleOrNamespace ([SingleSynEnumCaseHasBarRange], false, AnonModule, [Types @@ -24,4 +24,5 @@ ImplFile WithKeyword = None })], (2,0--2,20))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/EnumCase/SingleSynEnumCaseWithoutBar.fs.bsl b/tests/service/data/SyntaxTree/EnumCase/SingleSynEnumCaseWithoutBar.fs.bsl index 2b2f3d90daa..4ac684664e3 100644 --- a/tests/service/data/SyntaxTree/EnumCase/SingleSynEnumCaseWithoutBar.fs.bsl +++ b/tests/service/data/SyntaxTree/EnumCase/SingleSynEnumCaseWithoutBar.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/EnumCase/SingleSynEnumCaseWithoutBar.fs", false, - QualifiedNameOfFile SingleSynEnumCaseWithoutBar, [], [], + QualifiedNameOfFile SingleSynEnumCaseWithoutBar, [], [SynModuleOrNamespace ([SingleSynEnumCaseWithoutBar], false, AnonModule, [Types @@ -24,4 +24,5 @@ ImplFile WithKeyword = None })], (2,0--2,18))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Exception/Missing name 01.fs.bsl b/tests/service/data/SyntaxTree/Exception/Missing name 01.fs.bsl index 3bf7aea22b1..94c5dedbc2d 100644 --- a/tests/service/data/SyntaxTree/Exception/Missing name 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Exception/Missing name 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Exception/Missing name 01.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Exception @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,10)-(5,0) parse error Incomplete structured construct at or before this point in exception definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Exception/Missing name 02.fs.bsl b/tests/service/data/SyntaxTree/Exception/Missing name 02.fs.bsl index d71336169b3..4381c755f22 100644 --- a/tests/service/data/SyntaxTree/Exception/Missing name 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Exception/Missing name 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Exception/Missing name 02.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Exception @@ -30,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,9) parse error Unexpected keyword 'exception' in exception definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Exception/Missing name 03.fs.bsl b/tests/service/data/SyntaxTree/Exception/Missing name 03.fs.bsl index 2cb9b84bc5b..2b032173b1b 100644 --- a/tests/service/data/SyntaxTree/Exception/Missing name 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Exception/Missing name 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Exception/Missing name 03.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Exception @@ -26,6 +26,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,19)-(5,0) parse error Incomplete structured construct at or before this point in exception definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Exception/Recover Function Type 01.fs.bsl b/tests/service/data/SyntaxTree/Exception/Recover Function Type 01.fs.bsl index 690183a18b6..a1d17ea6c10 100644 --- a/tests/service/data/SyntaxTree/Exception/Recover Function Type 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Exception/Recover Function Type 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Exception/Recover Function Type 01.fs", false, - QualifiedNameOfFile Recover Function Type 01, [], [], + QualifiedNameOfFile Recover Function Type 01, [], [SynModuleOrNamespace ([Foo], false, DeclaredNamespace, [Exception @@ -43,6 +43,7 @@ ImplFile PreXmlDocEmpty, [], None, (1,0--4,22), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,17)-(3,27) parse error Unexpected function type in union case field definition. If you intend the field to be a function, consider wrapping the function signature with parens, e.g. | Case of a -> b into | Case of (a -> b). diff --git a/tests/service/data/SyntaxTree/Exception/SynExceptionDefnShouldContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Exception/SynExceptionDefnShouldContainsTheRangeOfTheWithKeyword.fs.bsl index 8326a320162..83c72a55237 100644 --- a/tests/service/data/SyntaxTree/Exception/SynExceptionDefnShouldContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Exception/SynExceptionDefnShouldContainsTheRangeOfTheWithKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Exception/SynExceptionDefnShouldContainsTheRangeOfTheWithKeyword.fs", false, QualifiedNameOfFile SynExceptionDefnShouldContainsTheRangeOfTheWithKeyword, - [], [], + [], [SynModuleOrNamespace ([X], false, DeclaredNamespace, [Exception @@ -41,4 +41,5 @@ ImplFile (4,0--5,22)), (4,0--5,22))], PreXmlDocEmpty, [], None, (2,0--5,22), { LeadingKeyword = Namespace (2,0--2,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl index f931eda4280..7dbc5c7695b 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/AnonymousRecords-01.fs", false, - QualifiedNameOfFile AnonymousRecords-01, [], [], + QualifiedNameOfFile AnonymousRecords-01, [], [SynModuleOrNamespace ([AnonymousRecords-01], false, AnonModule, [Expr @@ -34,6 +34,7 @@ ImplFile (6,0--6,17), { OpeningBraceRange = (6,7--6,9) }), (6,0--6,17))], PreXmlDocEmpty, [], None, (1,0--6,17), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,3)-(5,7) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl index 4701bc305a6..fc0a410b79e 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/AnonymousRecords-02.fs", false, - QualifiedNameOfFile AnonymousRecords-02, [], [], + QualifiedNameOfFile AnonymousRecords-02, [], [SynModuleOrNamespace ([AnonymousRecords-02], false, AnonModule, [Expr @@ -12,6 +12,7 @@ ImplFile { OpeningBraceRange = (1,0--1,2) }), (1,0--2,0))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,2) parse error Unmatched '{|' diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl index 074b9f0b601..4582e5eca53 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/AnonymousRecords-03.fs", false, - QualifiedNameOfFile AnonymousRecords-03, [], [], + QualifiedNameOfFile AnonymousRecords-03, [], [SynModuleOrNamespace ([AnonymousRecords-03], false, AnonModule, [Expr @@ -12,6 +12,7 @@ ImplFile { OpeningBraceRange = (1,7--1,9) }), (1,0--2,0))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,7)-(1,9) parse error Unmatched '{|' diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-04.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-04.fs.bsl index 3314197171d..64a376f178c 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/AnonymousRecords-04.fs", false, - QualifiedNameOfFile AnonymousRecords-04, [], [], + QualifiedNameOfFile AnonymousRecords-04, [], [SynModuleOrNamespace ([AnonymousRecords-04], false, AnonModule, [Expr @@ -10,6 +10,7 @@ ImplFile (1,0--1,2))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,2) parse error Unmatched '{|' diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-05.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-05.fs.bsl index fde8214fb91..38eb618a0ed 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/AnonymousRecords-05.fs", false, - QualifiedNameOfFile AnonymousRecords-05, [], [], + QualifiedNameOfFile AnonymousRecords-05, [], [SynModuleOrNamespace ([AnonymousRecords-05], false, AnonModule, [Expr @@ -10,6 +10,7 @@ ImplFile (1,0--1,9))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,7)-(1,9) parse error Unmatched '{|' diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl index 90e976cc843..9994586b626 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/AnonymousRecords-06.fs", false, - QualifiedNameOfFile AnonymousRecords-06, [], [], + QualifiedNameOfFile AnonymousRecords-06, [], [SynModuleOrNamespace ([AnonymousRecords-06], false, AnonModule, [Let @@ -31,6 +31,7 @@ ImplFile EqualsRange = Some (1,8--1,9) })], (1,0--1,39))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'AnonymousRecords-06' based on the file name 'AnonymousRecords-06.fs'. 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/tests/service/data/SyntaxTree/Expression/Binary - Eq 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Eq 01.fs.bsl index 4c3ccc484a3..39cbf2026e0 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Eq 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Eq 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Eq 01.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Eq 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Eq 02.fs.bsl index e6453f7d365..fe9b811b7f4 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Eq 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Eq 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Eq 02.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -22,4 +22,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Eq 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Eq 03.fs.bsl index 5e7b2edfe2e..5bfca010bf6 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Eq 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Eq 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Eq 03.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -23,6 +23,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,4)-(3,5) parse error Unexpected token '=' or incomplete expression diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Eq 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Eq 04.fs.bsl index 9fabf903f5c..5939066e98c 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Eq 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Eq 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Eq 04.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -38,6 +38,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,11)-(3,12) parse error Unexpected token '=' or incomplete expression diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Eq 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Eq 05.fs.bsl index 252070781e5..43fc5bc8157 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Eq 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Eq 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Eq 05.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -38,6 +38,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(3,6) parse error Unexpected symbol ',' in expression diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Eq 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Eq 06.fs.bsl index f0fd4f42abb..930c655f57a 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Eq 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Eq 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Eq 06.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -49,6 +49,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,20), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,12)-(3,13) parse error Unexpected symbol ',' in expression diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Eq 07.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Eq 07.fs.bsl index 09316e6513d..c78056c2631 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Eq 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Eq 07.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Eq 07.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -38,6 +38,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,9)-(3,10) parse error Expecting expression diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Plus 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Plus 01.fs.bsl index 748e99e38be..36821c30963 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Plus 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Plus 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Plus 01.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Plus 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Plus 02.fs.bsl index 8233f7b8725..145364c43c1 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Plus 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Plus 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Plus 02.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,3), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Plus 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Plus 03.fs.bsl index 95babc117f7..3088cf8197e 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Plus 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Plus 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Plus 03.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -24,6 +24,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,4)-(3,5) parse error Unexpected token '+' or incomplete expression diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Plus 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Plus 04.fs.bsl index 8f5d5280bb7..6ed4a9524f4 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Plus 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Plus 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Plus 04.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -30,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,2) parse error Unexpected infix operator in expression diff --git a/tests/service/data/SyntaxTree/Expression/Binary - Plus 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary - Plus 05.fs.bsl index 6717b3e3537..39964c93e47 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary - Plus 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary - Plus 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Binary - Plus 05.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -30,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Binary 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary 01.fs.bsl index d0679ba06df..6c8f50ea30a 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Binary 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Binary 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Binary 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Binary 02.fs.bsl index 0b5419a8632..6dbcde51d91 100644 --- a/tests/service/data/SyntaxTree/Expression/Binary 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Binary 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Binary 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Binary 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -28,4 +28,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index fde625dfdba..3fdf51035f5 100644 --- a/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -4,7 +4,6 @@ ImplFile false, QualifiedNameOfFile CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField, [], - [], [SynModuleOrNamespace ([CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField], false, AnonModule, @@ -17,4 +16,5 @@ ImplFile (2,0--5,20))], PreXmlDocEmpty, [], None, (2,0--5,20), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Do 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Do 01.fs.bsl index bbac8331c5c..a5e8992fe50 100644 --- a/tests/service/data/SyntaxTree/Expression/Do 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Do 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Do 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Do 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr (Do (Const (Int32 1, (4,4--4,5)), (3,0--4,5)), (3,0--4,5)); @@ -8,4 +8,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Do 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Do 02.fs.bsl index b3cfba16181..bff410302b0 100644 --- a/tests/service/data/SyntaxTree/Expression/Do 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Do 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Do 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Do 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr (Do (Const (Int32 1, (4,4--4,5)), (3,0--4,5)), (3,0--4,5)); @@ -8,4 +8,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Do 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Do 03.fs.bsl index 2bf1e3df8cb..846451482b1 100644 --- a/tests/service/data/SyntaxTree/Expression/Do 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Do 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Do 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Do 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -21,6 +21,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Do 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Do 04.fs.bsl index 7edad619273..8e8a69fb49d 100644 --- a/tests/service/data/SyntaxTree/Expression/Do 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Do 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Do 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Do 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -19,4 +19,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Do 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Do 05.fs.bsl index 8707692afc7..7fa6c873dd7 100644 --- a/tests/service/data/SyntaxTree/Expression/Do 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Do 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Do 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Do 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -19,4 +19,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery - Casts.fsx.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery - Casts.fsx.bsl index e0923b67823..40768a3059a 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery - Casts.fsx.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery - Casts.fsx.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda - _ Recovery - Casts.fsx", true, - QualifiedNameOfFile DotLambda - _ Recovery - Casts$fsx, [], [], + QualifiedNameOfFile DotLambda - _ Recovery - Casts$fsx, [], [SynModuleOrNamespace ([DotLambda - _ Recovery - Casts], false, AnonModule, [Let @@ -60,6 +60,7 @@ ImplFile EqualsRange = Some (3,6--3,7) })], (3,0--3,19))], PreXmlDocEmpty, [], None, (1,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,19)-(1,20) parse error Unexpected symbol ')' in expression. Expected '.' or other token. diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery - Eof.fsx.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery - Eof.fsx.bsl index f481a08bdd5..f337a4c3922 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery - Eof.fsx.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery - Eof.fsx.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda - _ Recovery - Eof.fsx", true, - QualifiedNameOfFile DotLambda - _ Recovery - Eof$fsx, [], [], + QualifiedNameOfFile DotLambda - _ Recovery - Eof$fsx, [], [SynModuleOrNamespace ([DotLambda - _ Recovery - Eof], false, AnonModule, [Expr @@ -18,6 +18,7 @@ ImplFile (1,0--1,6)), (1,0--1,6))], PreXmlDocEmpty, [], None, (1,0--1,6), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,5)-(1,6) parse error Unexpected end of input in expression diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery.fsx.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery.fsx.bsl index 1dfda19d13b..02ac877b298 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery.fsx.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda - _ Recovery.fsx.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda - _ Recovery.fsx", true, - QualifiedNameOfFile DotLambda - _ Recovery$fsx, [], [], + QualifiedNameOfFile DotLambda - _ Recovery$fsx, [], [SynModuleOrNamespace ([DotLambda - _ Recovery], false, AnonModule, [Expr @@ -10,6 +10,7 @@ ImplFile Some (1,2--1,3), (1,0--1,3)), (1,0--1,3))], PreXmlDocEmpty, [], None, (1,0--1,3), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,2)-(1,3) parse error Unexpected symbol ')' in expression. Expected '.' or other token. diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda - _. Recovery - Eof.fsx.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda - _. Recovery - Eof.fsx.bsl index 878b39bfb7a..3336a9e9419 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda - _. Recovery - Eof.fsx.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda - _. Recovery - Eof.fsx.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda - _. Recovery - Eof.fsx", true, - QualifiedNameOfFile DotLambda - _. Recovery - Eof$fsx, [], [], + QualifiedNameOfFile DotLambda - _. Recovery - Eof$fsx, [], [SynModuleOrNamespace ([DotLambda - _; Recovery - Eof], false, AnonModule, [Expr @@ -21,6 +21,7 @@ ImplFile DotRange = (1,6--1,7) }), (1,0--1,7)), (1,0--1,7))], PreXmlDocEmpty, [], None, (1,0--1,7), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,6)-(1,7) parse error Unexpected end of input in expression diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda - _. Recovery.fsx.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda - _. Recovery.fsx.bsl index 0bc367b4df3..3f0ab6de4e0 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda - _. Recovery.fsx.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda - _. Recovery.fsx.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda - _. Recovery.fsx", true, - QualifiedNameOfFile DotLambda - _. Recovery$fsx, [], [], + QualifiedNameOfFile DotLambda - _. Recovery$fsx, [], [SynModuleOrNamespace ([DotLambda - _; Recovery], false, AnonModule, [Expr @@ -13,6 +13,7 @@ ImplFile (1,0--1,4)), (1,0--1,4))], PreXmlDocEmpty, [], None, (1,0--1,4), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,3)-(1,4) parse error Unexpected symbol ')' in expression diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda_ArgumentExpressionInInnerAppExpression.fs.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda_ArgumentExpressionInInnerAppExpression.fs.bsl index cba7a3d17c6..ea4488dc2eb 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda_ArgumentExpressionInInnerAppExpression.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda_ArgumentExpressionInInnerAppExpression.fs.bsl @@ -3,7 +3,6 @@ ImplFile ("/root/Expression/DotLambda_ArgumentExpressionInInnerAppExpression.fs", false, QualifiedNameOfFile DotLambda_ArgumentExpressionInInnerAppExpression, [], - [], [SynModuleOrNamespace ([DotLambda_ArgumentExpressionInInnerAppExpression], false, AnonModule, [Let @@ -29,4 +28,5 @@ ImplFile (1,0--1,17))], PreXmlDocEmpty, [], None, (1,0--1,17), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda_FunctionWithUnderscoreDotLambda.fs.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda_FunctionWithUnderscoreDotLambda.fs.bsl index 378bed8cdf2..38bb6337e0a 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda_FunctionWithUnderscoreDotLambda.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda_FunctionWithUnderscoreDotLambda.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda_FunctionWithUnderscoreDotLambda.fs", false, - QualifiedNameOfFile DotLambda_FunctionWithUnderscoreDotLambda, [], [], + QualifiedNameOfFile DotLambda_FunctionWithUnderscoreDotLambda, [], [SynModuleOrNamespace ([DotLambda_FunctionWithUnderscoreDotLambda], false, AnonModule, [Let @@ -22,4 +22,5 @@ ImplFile EqualsRange = Some (1,11--1,12) })], (1,0--1,25))], PreXmlDocEmpty, [], None, (1,0--1,25), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda_NestedPropertiesAfterUnderscore.fs.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda_NestedPropertiesAfterUnderscore.fs.bsl index ad08dcfcd15..2211e80a157 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda_NestedPropertiesAfterUnderscore.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda_NestedPropertiesAfterUnderscore.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda_NestedPropertiesAfterUnderscore.fs", false, - QualifiedNameOfFile DotLambda_NestedPropertiesAfterUnderscore, [], [], + QualifiedNameOfFile DotLambda_NestedPropertiesAfterUnderscore, [], [SynModuleOrNamespace ([DotLambda_NestedPropertiesAfterUnderscore], false, AnonModule, [Let @@ -26,4 +26,5 @@ ImplFile EqualsRange = Some (1,11--1,12) })], (1,0--1,41))], PreXmlDocEmpty, [], None, (1,0--1,41), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda_NotAllowedFunctionExpressionWithArg.fs.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda_NotAllowedFunctionExpressionWithArg.fs.bsl index 561a8c4d1ee..a8b3627712a 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda_NotAllowedFunctionExpressionWithArg.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda_NotAllowedFunctionExpressionWithArg.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda_NotAllowedFunctionExpressionWithArg.fs", false, - QualifiedNameOfFile DotLambda_NotAllowedFunctionExpressionWithArg, [], [], + QualifiedNameOfFile DotLambda_NotAllowedFunctionExpressionWithArg, [], [SynModuleOrNamespace ([DotLambda_NotAllowedFunctionExpressionWithArg], false, AnonModule, [Let @@ -24,4 +24,5 @@ ImplFile (1,0--1,15))], PreXmlDocEmpty, [], None, (1,0--1,15), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda_TopLevelLet.fs.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda_TopLevelLet.fs.bsl index 7b8f9aa8c69..981cafe11c6 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda_TopLevelLet.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda_TopLevelLet.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda_TopLevelLet.fs", false, - QualifiedNameOfFile DotLambda_TopLevelLet, [], [], + QualifiedNameOfFile DotLambda_TopLevelLet, [], [SynModuleOrNamespace ([DotLambda_TopLevelLet], false, AnonModule, [Let @@ -34,4 +34,5 @@ ImplFile (1,0--1,25))], PreXmlDocEmpty, [], None, (1,0--1,25), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda_TopLevelStandaloneDotLambda.fs.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda_TopLevelStandaloneDotLambda.fs.bsl index 2c57852951a..dfc66d9269e 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda_TopLevelStandaloneDotLambda.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda_TopLevelStandaloneDotLambda.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda_TopLevelStandaloneDotLambda.fs", false, - QualifiedNameOfFile DotLambda_TopLevelStandaloneDotLambda, [], [], + QualifiedNameOfFile DotLambda_TopLevelStandaloneDotLambda, [], [SynModuleOrNamespace ([DotLambda_TopLevelStandaloneDotLambda], false, AnonModule, [Expr @@ -23,4 +23,5 @@ ImplFile (1,0--1,17)), (1,0--1,17))], PreXmlDocEmpty, [], None, (1,0--1,17), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda_UnderscoreToFunctionCallWithSpaceAndUnitApplication.fs.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda_UnderscoreToFunctionCallWithSpaceAndUnitApplication.fs.bsl index 5d634a011a2..f469e8302b0 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda_UnderscoreToFunctionCallWithSpaceAndUnitApplication.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda_UnderscoreToFunctionCallWithSpaceAndUnitApplication.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Expression/DotLambda_UnderscoreToFunctionCallWithSpaceAndUnitApplication.fs", false, QualifiedNameOfFile - DotLambda_UnderscoreToFunctionCallWithSpaceAndUnitApplication, [], [], + DotLambda_UnderscoreToFunctionCallWithSpaceAndUnitApplication, [], [SynModuleOrNamespace ([DotLambda_UnderscoreToFunctionCallWithSpaceAndUnitApplication], false, AnonModule, @@ -28,4 +28,5 @@ ImplFile EqualsRange = Some (1,11--1,12) })], (1,0--1,30))], PreXmlDocEmpty, [], None, (1,0--1,30), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda_UnderscoreToString.fs.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda_UnderscoreToString.fs.bsl index 177818e273f..8fe0a2efe72 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda_UnderscoreToString.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda_UnderscoreToString.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda_UnderscoreToString.fs", false, - QualifiedNameOfFile DotLambda_UnderscoreToString, [], [], + QualifiedNameOfFile DotLambda_UnderscoreToString, [], [SynModuleOrNamespace ([DotLambda_UnderscoreToString], false, AnonModule, [Expr @@ -13,4 +13,5 @@ ImplFile (1,0--1,12))], PreXmlDocEmpty, [], None, (1,0--1,12), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda_WithNonTupledFunctionCall.fs.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda_WithNonTupledFunctionCall.fs.bsl index 2aaeb2c9bff..7786431ba6a 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda_WithNonTupledFunctionCall.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda_WithNonTupledFunctionCall.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda_WithNonTupledFunctionCall.fs", false, - QualifiedNameOfFile DotLambda_WithNonTupledFunctionCall, [], [], + QualifiedNameOfFile DotLambda_WithNonTupledFunctionCall, [], [SynModuleOrNamespace ([DotLambda_WithNonTupledFunctionCall], false, AnonModule, [Let @@ -30,4 +30,5 @@ ImplFile EqualsRange = Some (1,11--1,12) })], (1,0--1,37))], PreXmlDocEmpty, [], None, (1,0--1,37), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda_WithoutDot.fs.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda_WithoutDot.fs.bsl index c9e140cb3a0..99bf5675320 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda_WithoutDot.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda_WithoutDot.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda_WithoutDot.fs", false, - QualifiedNameOfFile DotLambda_WithoutDot, [], [], + QualifiedNameOfFile DotLambda_WithoutDot, [], [SynModuleOrNamespace ([DotLambda_WithoutDot], false, AnonModule, [Expr @@ -10,4 +10,5 @@ ImplFile (1,0--1,11)), (1,0--1,11))], PreXmlDocEmpty, [], None, (1,0--1,11), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/DotLambda_WithoutUnderscore.fs.bsl b/tests/service/data/SyntaxTree/Expression/DotLambda_WithoutUnderscore.fs.bsl index 624a15c29e4..4600f7b41e8 100644 --- a/tests/service/data/SyntaxTree/Expression/DotLambda_WithoutUnderscore.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/DotLambda_WithoutUnderscore.fs.bsl @@ -1,11 +1,12 @@ ImplFile (ParsedImplFileInput ("/root/Expression/DotLambda_WithoutUnderscore.fs", false, - QualifiedNameOfFile DotLambda_WithoutUnderscore, [], [], + QualifiedNameOfFile DotLambda_WithoutUnderscore, [], [SynModuleOrNamespace ([DotLambda_WithoutUnderscore], false, AnonModule, [], PreXmlDocEmpty, [], None, (1,0--1,1), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,1) parse error Unexpected symbol '.' in implementation file diff --git a/tests/service/data/SyntaxTree/Expression/Downcast 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Downcast 01.fs.bsl index 8fde0743e4b..e090f188cc3 100644 --- a/tests/service/data/SyntaxTree/Expression/Downcast 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Downcast 01.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Downcast 01.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,6 +9,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Downcast 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Downcast 02.fs.bsl index d9a03af749d..18d0a648f3b 100644 --- a/tests/service/data/SyntaxTree/Expression/Downcast 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Downcast 02.fs.bsl @@ -1,13 +1,13 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Downcast 02.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr (Downcast (Ident i, Anon (4,0--4,2), (3,0--4,2)), (3,0--4,2))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,1)-(4,2) parse error Unexpected symbol ')' in expression diff --git a/tests/service/data/SyntaxTree/Expression/Downcast 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Downcast 03.fs.bsl index fab179734b2..dae32087164 100644 --- a/tests/service/data/SyntaxTree/Expression/Downcast 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Downcast 03.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Downcast 03.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -11,4 +10,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/For 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/For 01.fs.bsl index 97d7c7cb03e..ff36ce94f17 100644 --- a/tests/service/data/SyntaxTree/Expression/For 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/For 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/For 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/For 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -12,4 +12,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/For 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/For 02.fs.bsl index aad044dcf30..06684182ce5 100644 --- a/tests/service/data/SyntaxTree/Expression/For 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/For 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/For 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/For 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -12,4 +12,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/For 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/For 03.fs.bsl index 023ec9d79e0..f0fcaf35d0a 100644 --- a/tests/service/data/SyntaxTree/Expression/For 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/For 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/For 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/For 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -23,6 +23,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/For 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/For 04.fs.bsl index 41ed392a753..2f2bdc1381a 100644 --- a/tests/service/data/SyntaxTree/Expression/For 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/For 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/For 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/For 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -22,4 +22,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/For 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/For 05.fs.bsl index 9a71d8f9e4c..034c9fb57de 100644 --- a/tests/service/data/SyntaxTree/Expression/For 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/For 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/For 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/For 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -22,4 +22,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/GlobalKeywordAsSynExpr.fs.bsl b/tests/service/data/SyntaxTree/Expression/GlobalKeywordAsSynExpr.fs.bsl index d76e9fe48b4..cf9e8ee0a9b 100644 --- a/tests/service/data/SyntaxTree/Expression/GlobalKeywordAsSynExpr.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/GlobalKeywordAsSynExpr.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/GlobalKeywordAsSynExpr.fs", false, - QualifiedNameOfFile GlobalKeywordAsSynExpr, [], [], + QualifiedNameOfFile GlobalKeywordAsSynExpr, [], [SynModuleOrNamespace ([GlobalKeywordAsSynExpr], false, AnonModule, [Expr @@ -12,4 +12,5 @@ ImplFile (2,0--2,6)), (2,0--2,6))], PreXmlDocEmpty, [], None, (2,0--2,6), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Id 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Id 01.fs.bsl index e24dcc6b23b..6d2f542b4d3 100644 --- a/tests/service/data/SyntaxTree/Expression/Id 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Id 01.fs.bsl @@ -1,9 +1,10 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Id 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Id 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr (Ident a, (3,0--3,1))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Id 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Id 02.fs.bsl index d46a4254b22..108d2f3c42f 100644 --- a/tests/service/data/SyntaxTree/Expression/Id 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Id 02.fs.bsl @@ -1,12 +1,13 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Id 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Id 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr (Ident a, (3,0--3,3)); Expr (Ident b, (4,0--4,1))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,3) parse error This is not a valid identifier diff --git a/tests/service/data/SyntaxTree/Expression/Id 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Id 03.fs.bsl index 26ef9dd71d4..bb388104ac3 100644 --- a/tests/service/data/SyntaxTree/Expression/Id 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Id 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Id 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Id 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr (FromParseError (Ident , (3,0--3,2)), (3,0--3,2)); @@ -8,6 +8,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,2) parse error This is not a valid identifier diff --git a/tests/service/data/SyntaxTree/Expression/Id 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Id 04.fs.bsl index c76189328b1..55cfbf59da5 100644 --- a/tests/service/data/SyntaxTree/Expression/Id 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Id 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Id 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Id 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr (FromParseError (Ident , (3,0--3,1)), (3,0--3,1)); @@ -8,6 +8,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,1) parse error This is not a valid identifier diff --git a/tests/service/data/SyntaxTree/Expression/Id 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Id 05.fs.bsl index 2e3f9d5568d..9d258b6db1a 100644 --- a/tests/service/data/SyntaxTree/Expression/Id 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Id 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Id 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Id 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,6 +10,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,1) parse error This is not a valid identifier diff --git a/tests/service/data/SyntaxTree/Expression/Id 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Id 06.fs.bsl index bade7e896ea..e175c015187 100644 --- a/tests/service/data/SyntaxTree/Expression/Id 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Id 06.fs.bsl @@ -1,11 +1,12 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Id 06.fs", false, QualifiedNameOfFile Id 06, [], [], + ("/root/Expression/Id 06.fs", false, QualifiedNameOfFile Id 06, [], [SynModuleOrNamespace ([Id 06], false, AnonModule, [Expr (FromParseError (Ident , (1,0--1,2)), (1,0--1,2))], PreXmlDocEmpty, [], None, (1,0--1,2), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,2) parse error This is not a valid identifier diff --git a/tests/service/data/SyntaxTree/Expression/Id 07.fs.bsl b/tests/service/data/SyntaxTree/Expression/Id 07.fs.bsl index 60d8974e781..aee51fa86ae 100644 --- a/tests/service/data/SyntaxTree/Expression/Id 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Id 07.fs.bsl @@ -1,11 +1,12 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Id 07.fs", false, QualifiedNameOfFile Id 07, [], [], + ("/root/Expression/Id 07.fs", false, QualifiedNameOfFile Id 07, [], [SynModuleOrNamespace ([Id 07], false, AnonModule, [Expr (FromParseError (Ident , (1,0--1,1)), (1,0--1,1))], PreXmlDocEmpty, [], None, (1,0--1,1), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,1) parse error This is not a valid identifier diff --git a/tests/service/data/SyntaxTree/Expression/If 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 01.fs.bsl index 775d6d7764d..f39f9211e22 100644 --- a/tests/service/data/SyntaxTree/Expression/If 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/If 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/If 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/If 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,4 +15,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/If 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 02.fs.bsl index 8f026aa409e..8a3b70d7861 100644 --- a/tests/service/data/SyntaxTree/Expression/If 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/If 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/If 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/If 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,4 +15,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/If 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 03.fs.bsl index c68682f6f59..ae9e6a4ec23 100644 --- a/tests/service/data/SyntaxTree/Expression/If 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/If 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/If 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/If 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,8)-(5,0) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/If 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 04.fs.bsl index 99ffbe73e73..f2495d64253 100644 --- a/tests/service/data/SyntaxTree/Expression/If 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/If 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/If 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/If 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,3)-(5,0) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/If 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 05.fs.bsl index 0197cbcd0d2..b890559871b 100644 --- a/tests/service/data/SyntaxTree/Expression/If 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/If 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/If 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/If 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/If 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 06.fs.bsl index 2c0215d0a8f..e1d1405077e 100644 --- a/tests/service/data/SyntaxTree/Expression/If 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/If 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/If 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/If 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -23,6 +23,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,4) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/If 07.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 07.fs.bsl index d4d53023ff8..781ea3d377e 100644 --- a/tests/service/data/SyntaxTree/Expression/If 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/If 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/If 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/If 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/If 08.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 08.fs.bsl index 016bc4dbfe7..9f0b60b3108 100644 --- a/tests/service/data/SyntaxTree/Expression/If 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/If 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/If 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/If 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -26,4 +26,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/If 09.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 09.fs.bsl index 6541b409bd9..8756a96f138 100644 --- a/tests/service/data/SyntaxTree/Expression/If 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/If 09.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/If 09.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/If 09.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -26,4 +26,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/If 10.fs.bsl b/tests/service/data/SyntaxTree/Expression/If 10.fs.bsl index ef03391599d..096cafbaaff 100644 --- a/tests/service/data/SyntaxTree/Expression/If 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/If 10.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/If 10.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/If 10.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -29,6 +29,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index 8c19bf183e8..8e2a71ee797 100644 --- a/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -4,7 +4,7 @@ ImplFile false, QualifiedNameOfFile InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField, - [], [], + [], [SynModuleOrNamespace ([InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField], false, AnonModule, @@ -23,4 +23,5 @@ ImplFile (2,0--2,34))], PreXmlDocEmpty, [], None, (2,0--2,34), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Lambda - Missing expr 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Lambda - Missing expr 01.fs.bsl index f67f65c9688..da7586f679b 100644 --- a/tests/service/data/SyntaxTree/Expression/Lambda - Missing expr 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Lambda - Missing expr 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Lambda - Missing expr 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,1)-(3,9) parse error Missing function body diff --git a/tests/service/data/SyntaxTree/Expression/Lambda - Missing expr 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Lambda - Missing expr 02.fs.bsl index 42bbbc58539..db52b133a52 100644 --- a/tests/service/data/SyntaxTree/Expression/Lambda - Missing expr 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Lambda - Missing expr 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Lambda - Missing expr 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (1:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Lambda 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Lambda 01.fs.bsl index 095a5f6834a..710431524da 100644 --- a/tests/service/data/SyntaxTree/Expression/Lambda 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Lambda 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Lambda 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Lambda 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -16,4 +16,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Lambda 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Lambda 02.fs.bsl index 82cf6a37d3a..e95c7440fd7 100644 --- a/tests/service/data/SyntaxTree/Expression/Lambda 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Lambda 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Lambda 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Lambda 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -14,4 +14,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Lazy 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Lazy 01.fs.bsl index 9af75da75fe..38abbd179a4 100644 --- a/tests/service/data/SyntaxTree/Expression/Lazy 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Lazy 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Lazy 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Lazy 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -19,4 +19,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Lazy 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Lazy 02.fs.bsl index 32e1522a9e5..c1441f5807d 100644 --- a/tests/service/data/SyntaxTree/Expression/Lazy 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Lazy 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Lazy 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Lazy 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -19,4 +19,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Lazy 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Lazy 03.fs.bsl index 17a4c9785fb..6b04c031cd7 100644 --- a/tests/service/data/SyntaxTree/Expression/Lazy 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Lazy 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Lazy 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Lazy 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -21,6 +21,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Let 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Let 01.fs.bsl index 8eaabfb3d65..634f5cbd322 100644 --- a/tests/service/data/SyntaxTree/Expression/Let 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Let 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Let 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Let 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Let 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Let 02.fs.bsl index bf9b340b539..e033e0ed9f1 100644 --- a/tests/service/data/SyntaxTree/Expression/Let 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Let 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Let 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Let 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/List - Comprehension 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/List - Comprehension 01.fs.bsl index 517c835a63a..a80d19b37bd 100644 --- a/tests/service/data/SyntaxTree/Expression/List - Comprehension 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/List - Comprehension 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/List - Comprehension 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/List - Comprehension 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/List - Comprehension 02.fs.bsl index 9897592fb0a..84d19bf27f3 100644 --- a/tests/service/data/SyntaxTree/Expression/List - Comprehension 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/List - Comprehension 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/List - Comprehension 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,18), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,17)-(3,18) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/NestedSynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/NestedSynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl index 791f6099b9e..51a31c623dd 100644 --- a/tests/service/data/SyntaxTree/Expression/NestedSynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/NestedSynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl @@ -3,7 +3,6 @@ ImplFile ("/root/Expression/NestedSynExprLetOrUseContainsTheRangeOfInKeyword.fs", false, QualifiedNameOfFile NestedSynExprLetOrUseContainsTheRangeOfInKeyword, [], - [], [SynModuleOrNamespace ([NestedSynExprLetOrUseContainsTheRangeOfInKeyword], false, AnonModule, [Let @@ -64,4 +63,5 @@ ImplFile EqualsRange = Some (2,9--2,10) })], (2,0--5,9))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (3,17--3,55)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 01.fs.bsl index cf716944487..01cc65b67ec 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 01.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -33,4 +33,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 02.fs.bsl index 9a06f01ae6e..d09eb05ae24 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 02.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -60,4 +60,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 03.fs.bsl index 92401919062..14eb81a9938 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 03.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -88,4 +88,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--10,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 04.fs.bsl index 5b7efb7cdf9..b5f3b9cfb96 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 04.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -13,6 +13,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,15)-(3,16) parse error Incomplete structured construct at or before this point in binding diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 05.fs.bsl index d4dbc824d6d..ec7aab469c5 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 05.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -13,6 +13,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,5)-(4,6) parse error Incomplete structured construct at or before this point in binding diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 06.fs.bsl index 1880c3c044f..37a61aeba7d 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 06.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -34,6 +34,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,12)-(4,13) parse error Incomplete structured construct at or before this point in object expression diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 07.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 07.fs.bsl index eeaef3fd16a..bf1c735224d 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 07.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 07.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -33,6 +33,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,17)-(4,18) parse error Expecting member body diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 08.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 08.fs.bsl index f7c76b0b8fb..33c5ba7f048 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 08.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 08.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -33,6 +33,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,18)-(4,19) parse error Identifier expected diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 09.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 09.fs.bsl index 831deffbeac..8f5d7ae0774 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 09.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 09.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -36,6 +36,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,19)-(4,20) parse error Expecting member body diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 10.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 10.fs.bsl index d7670c74151..dd507d0fa2c 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 10.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 10.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -37,6 +37,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,21)-(4,22) parse error Expecting expression diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 11.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 11.fs.bsl index ff41ad2a5d8..eeb2063d6ac 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 11.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 11.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -59,6 +59,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,5)-(5,11) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:6). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 12.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 12.fs.bsl index 53d26ec6e93..28a4afa9b04 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 12.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 12.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -58,6 +58,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,20)-(5,5) parse error Expecting member body diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 13.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 13.fs.bsl index 6567abe2e7b..8127a275f38 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 13.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 13.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 13.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -55,6 +55,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,18)-(5,5) parse error Incomplete structured construct at or before this point in object expression diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 14.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 14.fs.bsl index 64530949bbc..fbebde8b07c 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 14.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 14.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 14.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -55,6 +55,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,17)-(5,5) parse error Expecting member body diff --git a/tests/service/data/SyntaxTree/Expression/Object - Class 15.fs.bsl b/tests/service/data/SyntaxTree/Expression/Object - Class 15.fs.bsl index ec08bebfe92..ed81dff8214 100644 --- a/tests/service/data/SyntaxTree/Expression/Object - Class 15.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Object - Class 15.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Object - Class 15.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -56,6 +56,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,12)-(5,5) parse error Incomplete structured construct at or before this point in object expression diff --git a/tests/service/data/SyntaxTree/Expression/Rarrow 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Rarrow 01.fs.bsl index c3c454436ce..770fbc8ed98 100644 --- a/tests/service/data/SyntaxTree/Expression/Rarrow 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Rarrow 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Rarrow 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Rarrow 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,6 +10,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,4), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,4) parse error The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. diff --git a/tests/service/data/SyntaxTree/Expression/Rarrow 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Rarrow 02.fs.bsl index 3a0af632862..59d36bd5980 100644 --- a/tests/service/data/SyntaxTree/Expression/Rarrow 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Rarrow 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Rarrow 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Rarrow 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -11,6 +11,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/Rarrow 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Rarrow 03.fs.bsl index ceae74bf09b..e62be3cb75a 100644 --- a/tests/service/data/SyntaxTree/Expression/Rarrow 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Rarrow 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Rarrow 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Rarrow 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 01.fs.bsl index 0e74d6eb486..409a6349663 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 01.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -13,4 +13,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 02.fs.bsl index 52748529a11..abb4f9c61af 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 02.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -13,6 +13,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,7)-(3,9) parse error Unexpected symbol '|}' in definition diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl index dbb9b6e063f..24b70e7a5c0 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 03.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -11,6 +11,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,3)-(3,4) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl index 07303e1a146..d20ecba85e3 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 04.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,3)-(3,6) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl index 6c2cefee45d..c80a4ecab50 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 05.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,6)-(3,7) parse error Missing qualification after '.' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl index edbeaa194e6..093f445494c 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 06.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,3)-(3,8) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 07.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 07.fs.bsl index 1bc1a409d91..0a2441bca98 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 07.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 07.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,3)-(4,5) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 08.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 08.fs.bsl index 0cd4a997180..70fdc8e6a09 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 08.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 08.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,3)-(4,5) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 09.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 09.fs.bsl index e851232c521..c40cd96963e 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 09.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 09.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -24,4 +24,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 10.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 10.fs.bsl index 2e01c7ef8c7..cc908ff2853 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 10.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 10.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,3)-(4,5) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 11.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 11.fs.bsl index 97ffe8e441d..4fe46cfb3d5 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 11.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 11.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -22,4 +22,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl index 3371e7a75e6..0fcf36be842 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Anon 12.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -22,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,3)-(3,5) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 01.fs.bsl index be62dae5864..7c25259a523 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 01.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -12,6 +12,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,3)-(3,4) parse error Missing qualification after '.' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 02.fs.bsl index 41d98a61173..7000a0b1901 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 02.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(3,6) parse error Missing qualification after '.' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 03.fs.bsl index 7ca89a4c8ed..d15f4c6b78c 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 03.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -14,6 +14,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,3)-(3,4) parse error Missing qualification after '.' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 04.fs.bsl index d37f41ae725..c395eb014d6 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 04.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(3,6) parse error Missing qualification after '.' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 05.fs.bsl index f0baef9a8ff..8c12002c7d8 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 05.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -14,4 +14,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 06.fs.bsl index a280f304f7d..9126643f0cf 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 06.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -14,4 +14,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 07.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 07.fs.bsl index 58a717c0121..6bc57ed48ca 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 07.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 07.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,3)-(3,4) parse error Missing qualification after '.' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl index a9a2cbc8047..a50149dd91b 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 08.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,3)-(4,4) parse error Unexpected end of type. Expected a name after this point. diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl index 6132a89bd66..19fe3d819a2 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 09.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,2)-(4,3) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 10.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 10.fs.bsl index 0b0379f5dbf..02cb421c64e 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 10.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 10.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -23,4 +23,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 11.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 11.fs.bsl index 6b20cddae13..1ba251bdb3a 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 11.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 11.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -13,6 +13,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,6)-(3,7) parse error Unexpected symbol '}' in expression diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 12.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 12.fs.bsl index f1c61f45015..3cdbc54ea47 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 12.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 12.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -25,4 +25,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl index 0012edc2639..f059d4924a4 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 13.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,2)-(4,4) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl index 1afdd819fb1..a3acec5a7b7 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Record - Field 14.fs", false, QualifiedNameOfFile Foo, - [], [], + [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Expr @@ -28,4 +28,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Sequential 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Sequential 01.fs.bsl index c42ed608ed2..763ab6d97b8 100644 --- a/tests/service/data/SyntaxTree/Expression/Sequential 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Sequential 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Sequential 01.fs", false, - QualifiedNameOfFile Sequential 01, [], [], + QualifiedNameOfFile Sequential 01, [], [SynModuleOrNamespace ([Sequential 01], false, AnonModule, [Expr @@ -12,6 +12,7 @@ ImplFile (1,0--1,8))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'Sequential 01' based on the file name 'Sequential 01.fs'. 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/tests/service/data/SyntaxTree/Expression/Sequential 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Sequential 02.fs.bsl index 7d58b85ed22..724388842b5 100644 --- a/tests/service/data/SyntaxTree/Expression/Sequential 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Sequential 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Sequential 02.fs", false, - QualifiedNameOfFile Sequential 02, [], [], + QualifiedNameOfFile Sequential 02, [], [SynModuleOrNamespace ([Sequential 02], false, AnonModule, [Expr @@ -12,6 +12,7 @@ ImplFile (1,0--1,11))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'Sequential 02' based on the file name 'Sequential 02.fs'. 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/tests/service/data/SyntaxTree/Expression/Sequential 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Sequential 03.fs.bsl index b04598b79fd..064662b49c7 100644 --- a/tests/service/data/SyntaxTree/Expression/Sequential 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Sequential 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Sequential 03.fs", false, - QualifiedNameOfFile Sequential 03, [], [], + QualifiedNameOfFile Sequential 03, [], [SynModuleOrNamespace ([Sequential 03], false, AnonModule, [Expr @@ -14,6 +14,7 @@ ImplFile (1,0--1,21)), (1,0--1,21))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'Sequential 03' based on the file name 'Sequential 03.fs'. 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/tests/service/data/SyntaxTree/Expression/Set 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Set 01.fs.bsl index 68e1f2c85c2..6fa90963927 100644 --- a/tests/service/data/SyntaxTree/Expression/Set 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Set 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Set 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Set 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -11,4 +11,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Set 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Set 02.fs.bsl index da5e8af6a69..f7e69c6dde9 100644 --- a/tests/service/data/SyntaxTree/Expression/Set 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Set 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Set 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Set 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -11,4 +11,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Set 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Set 03.fs.bsl index fc450c30c94..e2eb444e310 100644 --- a/tests/service/data/SyntaxTree/Expression/Set 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Set 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Set 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Set 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,4 +10,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Set 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Set 04.fs.bsl index ee798381576..297ef11ba05 100644 --- a/tests/service/data/SyntaxTree/Expression/Set 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Set 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Set 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Set 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -22,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/SynExprAnonRecdWithStructKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprAnonRecdWithStructKeyword.fs.bsl index 4e6e88c4234..abb76d98ae6 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprAnonRecdWithStructKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprAnonRecdWithStructKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/SynExprAnonRecdWithStructKeyword.fs", false, - QualifiedNameOfFile SynExprAnonRecdWithStructKeyword, [], [], + QualifiedNameOfFile SynExprAnonRecdWithStructKeyword, [], [SynModuleOrNamespace ([SynExprAnonRecdWithStructKeyword], false, AnonModule, [Expr @@ -16,4 +16,5 @@ ImplFile (7,0--7,12))], PreXmlDocEmpty, [], None, (2,0--7,12), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (4,4--4,11)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl index 534c40ade09..e7e6666975a 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs", false, QualifiedNameOfFile - SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields, [], [], + SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields, [], [SynModuleOrNamespace ([SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields], false, AnonModule, @@ -19,4 +19,5 @@ ImplFile { OpeningBraceRange = (2,0--2,2) }), (2,0--4,18))], PreXmlDocEmpty, [], None, (2,0--4,18), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprDoContainsTheRangeOfTheDoKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprDoContainsTheRangeOfTheDoKeyword.fs.bsl index 4b3437c248d..651879d2cb0 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprDoContainsTheRangeOfTheDoKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprDoContainsTheRangeOfTheDoKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/SynExprDoContainsTheRangeOfTheDoKeyword.fs", false, - QualifiedNameOfFile SynExprDoContainsTheRangeOfTheDoKeyword, [], [], + QualifiedNameOfFile SynExprDoContainsTheRangeOfTheDoKeyword, [], [SynModuleOrNamespace ([SynExprDoContainsTheRangeOfTheDoKeyword], false, AnonModule, [Let @@ -23,4 +23,5 @@ ImplFile EqualsRange = Some (2,6--2,7) })], (2,0--6,18))], PreXmlDocEmpty, [], None, (2,0--7,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprDynamicDoesContainIdent.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprDynamicDoesContainIdent.fs.bsl index fe39cf8a627..872dba8d062 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprDynamicDoesContainIdent.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprDynamicDoesContainIdent.fs.bsl @@ -1,10 +1,11 @@ ImplFile (ParsedImplFileInput ("/root/Expression/SynExprDynamicDoesContainIdent.fs", false, - QualifiedNameOfFile SynExprDynamicDoesContainIdent, [], [], + QualifiedNameOfFile SynExprDynamicDoesContainIdent, [], [SynModuleOrNamespace ([SynExprDynamicDoesContainIdent], false, AnonModule, [Expr (Dynamic (Ident x, (2,1--2,2), Ident k, (2,0--2,3)), (2,0--2,3))], PreXmlDocEmpty, [], None, (2,0--2,3), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprDynamicDoesContainParentheses.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprDynamicDoesContainParentheses.fs.bsl index 46eee1bf1b6..c22b13523e0 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprDynamicDoesContainParentheses.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprDynamicDoesContainParentheses.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/SynExprDynamicDoesContainParentheses.fs", false, - QualifiedNameOfFile SynExprDynamicDoesContainParentheses, [], [], + QualifiedNameOfFile SynExprDynamicDoesContainParentheses, [], [SynModuleOrNamespace ([SynExprDynamicDoesContainParentheses], false, AnonModule, [Expr @@ -11,4 +11,5 @@ ImplFile (2,0--2,5)), (2,0--2,5))], PreXmlDocEmpty, [], None, (2,0--2,5), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprForContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprForContainsTheRangeOfTheEqualsSign.fs.bsl index e62b4dc35d8..d2c4077e59c 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprForContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprForContainsTheRangeOfTheEqualsSign.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/SynExprForContainsTheRangeOfTheEqualsSign.fs", false, - QualifiedNameOfFile SynExprForContainsTheRangeOfTheEqualsSign, [], [], + QualifiedNameOfFile SynExprForContainsTheRangeOfTheEqualsSign, [], [SynModuleOrNamespace ([SynExprForContainsTheRangeOfTheEqualsSign], false, AnonModule, [Expr @@ -18,4 +18,5 @@ ImplFile (2,0--3,14))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseBangContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseBangContainsTheRangeOfTheEqualsSign.fs.bsl index 0264686482c..c5a6b577bc1 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseBangContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseBangContainsTheRangeOfTheEqualsSign.fs.bsl @@ -3,7 +3,6 @@ ImplFile ("/root/Expression/SynExprLetOrUseBangContainsTheRangeOfTheEqualsSign.fs", false, QualifiedNameOfFile SynExprLetOrUseBangContainsTheRangeOfTheEqualsSign, [], - [], [SynModuleOrNamespace ([SynExprLetOrUseBangContainsTheRangeOfTheEqualsSign], false, AnonModule, @@ -33,4 +32,5 @@ ImplFile (2,0--6,1)), (2,0--6,1))], PreXmlDocEmpty, [], None, (2,0--6,1), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl index 5408f5d71d1..47612e2ac1c 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/SynExprLetOrUseContainsTheRangeOfInKeyword.fs", false, - QualifiedNameOfFile SynExprLetOrUseContainsTheRangeOfInKeyword, [], [], + QualifiedNameOfFile SynExprLetOrUseContainsTheRangeOfInKeyword, [], [SynModuleOrNamespace ([SynExprLetOrUseContainsTheRangeOfInKeyword], false, AnonModule, [Expr @@ -23,4 +23,5 @@ ImplFile InKeyword = Some (2,10--2,12) }), (2,0--2,15))], PreXmlDocEmpty, [], None, (2,0--2,15), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseDoesNotContainTheRangeOfInKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseDoesNotContainTheRangeOfInKeyword.fs.bsl index bb9dcafe15f..a7ba9540a40 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseDoesNotContainTheRangeOfInKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseDoesNotContainTheRangeOfInKeyword.fs.bsl @@ -3,7 +3,6 @@ ImplFile ("/root/Expression/SynExprLetOrUseDoesNotContainTheRangeOfInKeyword.fs", false, QualifiedNameOfFile SynExprLetOrUseDoesNotContainTheRangeOfInKeyword, [], - [], [SynModuleOrNamespace ([SynExprLetOrUseDoesNotContainTheRangeOfInKeyword], false, AnonModule, [Expr @@ -26,4 +25,5 @@ ImplFile InKeyword = None }), (2,0--4,2)), (2,0--4,2))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWhereBodyExprStartsWithTokenOfTwoCharactersDoesNotContainTheRangeOfInKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWhereBodyExprStartsWithTokenOfTwoCharactersDoesNotContainTheRangeOfInKeyword.fs.bsl index 554f4eb21ef..691c7762f37 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWhereBodyExprStartsWithTokenOfTwoCharactersDoesNotContainTheRangeOfInKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWhereBodyExprStartsWithTokenOfTwoCharactersDoesNotContainTheRangeOfInKeyword.fs.bsl @@ -4,7 +4,7 @@ ImplFile false, QualifiedNameOfFile SynExprLetOrUseWhereBodyExprStartsWithTokenOfTwoCharactersDoesNotContainTheRangeOfInKeyword, - [], [], + [], [SynModuleOrNamespace ([SynExprLetOrUseWhereBodyExprStartsWithTokenOfTwoCharactersDoesNotContainTheRangeOfInKeyword], false, AnonModule, @@ -45,4 +45,5 @@ ImplFile (2,0--4,16))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword.fs.bsl index 8b57f33b953..b2ac0ca44e8 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Expression/SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword.fs", false, QualifiedNameOfFile - SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword, [], [], + SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword, [], [SynModuleOrNamespace ([SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword], false, AnonModule, @@ -39,4 +39,5 @@ ImplFile InKeyword = Some (4,15--4,17) }), (2,0--5,6)), (2,0--5,6))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprMatchBangContainsTheRangeOfTheMatchAndWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprMatchBangContainsTheRangeOfTheMatchAndWithKeyword.fs.bsl index e70d8c752eb..871e70098d3 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprMatchBangContainsTheRangeOfTheMatchAndWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprMatchBangContainsTheRangeOfTheMatchAndWithKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Expression/SynExprMatchBangContainsTheRangeOfTheMatchAndWithKeyword.fs", false, QualifiedNameOfFile - SynExprMatchBangContainsTheRangeOfTheMatchAndWithKeyword, [], [], + SynExprMatchBangContainsTheRangeOfTheMatchAndWithKeyword, [], [SynModuleOrNamespace ([SynExprMatchBangContainsTheRangeOfTheMatchAndWithKeyword], false, AnonModule, @@ -18,4 +18,5 @@ ImplFile WithKeyword = (2,9--2,13) }), (2,0--3,8))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprMatchContainsTheRangeOfTheMatchAndWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprMatchContainsTheRangeOfTheMatchAndWithKeyword.fs.bsl index acbf05115af..f1e4b950125 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprMatchContainsTheRangeOfTheMatchAndWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprMatchContainsTheRangeOfTheMatchAndWithKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Expression/SynExprMatchContainsTheRangeOfTheMatchAndWithKeyword.fs", false, QualifiedNameOfFile SynExprMatchContainsTheRangeOfTheMatchAndWithKeyword, - [], [], + [], [SynModuleOrNamespace ([SynExprMatchContainsTheRangeOfTheMatchAndWithKeyword], false, AnonModule, @@ -18,4 +18,5 @@ ImplFile WithKeyword = (2,8--2,12) }), (2,0--3,8))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprObjExprContainsTheRangeOfWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprObjExprContainsTheRangeOfWithKeyword.fs.bsl index c84d9fb3d27..8ee3426fb4e 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprObjExprContainsTheRangeOfWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprObjExprContainsTheRangeOfWithKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/SynExprObjExprContainsTheRangeOfWithKeyword.fs", false, - QualifiedNameOfFile SynExprObjExprContainsTheRangeOfWithKeyword, [], [], + QualifiedNameOfFile SynExprObjExprContainsTheRangeOfWithKeyword, [], [SynModuleOrNamespace ([SynExprObjExprContainsTheRangeOfWithKeyword], false, AnonModule, [Expr @@ -80,4 +80,5 @@ ImplFile (5,2--6,35))], (2,2--2,11), (2,0--6,37)), (2,0--6,37))], PreXmlDocEmpty, [], None, (2,0--6,37), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprObjWithSetter.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprObjWithSetter.fs.bsl index 405f967b350..ce9e69a010f 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprObjWithSetter.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprObjWithSetter.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/SynExprObjWithSetter.fs", false, - QualifiedNameOfFile SynExprObjWithSetter, [], [], + QualifiedNameOfFile SynExprObjWithSetter, [], [SynModuleOrNamespace ([SynExprObjWithSetter], false, AnonModule, [Types @@ -100,4 +100,5 @@ ImplFile (6,0--7,69)), (6,0--7,69))], PreXmlDocEmpty, [], None, (2,0--7,69), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index bbd85336307..5287fdc598b 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs", false, QualifiedNameOfFile - SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField, [], [], + SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField, [], [SynModuleOrNamespace ([SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField], false, AnonModule, @@ -27,4 +27,5 @@ ImplFile (2,0--7,23))], PreXmlDocEmpty, [], None, (2,0--7,23), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (3,13--3,28)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl index 109d053a41d..8adb7c8269f 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl @@ -2,7 +2,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs", false, QualifiedNameOfFile SynExprRecordFieldsContainCorrectAmountOfTrivia, - [], [], + [], [SynModuleOrNamespace ([SynExprRecordFieldsContainCorrectAmountOfTrivia], false, AnonModule, [Expr @@ -62,4 +62,5 @@ ImplFile (2,0--5,28)), (2,0--5,28))], PreXmlDocEmpty, [], None, (2,0--5,28), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprSetWithSynExprDynamic.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprSetWithSynExprDynamic.fs.bsl index 4cd0b5776e6..f919b4c95cf 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprSetWithSynExprDynamic.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprSetWithSynExprDynamic.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/SynExprSetWithSynExprDynamic.fs", false, - QualifiedNameOfFile SynExprSetWithSynExprDynamic, [], [], + QualifiedNameOfFile SynExprSetWithSynExprDynamic, [], [SynModuleOrNamespace ([SynExprSetWithSynExprDynamic], false, AnonModule, [Expr @@ -10,4 +10,5 @@ ImplFile Const (Int32 2, (2,7--2,8)), (2,0--2,8)), (2,0--2,8))], PreXmlDocEmpty, [], None, (2,0--2,8), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprTryFinallyContainsTheRangeOfTheTryAndWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprTryFinallyContainsTheRangeOfTheTryAndWithKeyword.fs.bsl index 4e1d438bfe7..43d2f88584e 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprTryFinallyContainsTheRangeOfTheTryAndWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprTryFinallyContainsTheRangeOfTheTryAndWithKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Expression/SynExprTryFinallyContainsTheRangeOfTheTryAndWithKeyword.fs", false, QualifiedNameOfFile - SynExprTryFinallyContainsTheRangeOfTheTryAndWithKeyword, [], [], + SynExprTryFinallyContainsTheRangeOfTheTryAndWithKeyword, [], [SynModuleOrNamespace ([SynExprTryFinallyContainsTheRangeOfTheTryAndWithKeyword], false, AnonModule, @@ -14,4 +14,5 @@ ImplFile FinallyKeyword = (4,0--4,7) }), (2,0--5,2))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprTryWithContainsTheRangeOfTheTryAndWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprTryWithContainsTheRangeOfTheTryAndWithKeyword.fs.bsl index 7900862979d..690618cda81 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprTryWithContainsTheRangeOfTheTryAndWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprTryWithContainsTheRangeOfTheTryAndWithKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Expression/SynExprTryWithContainsTheRangeOfTheTryAndWithKeyword.fs", false, QualifiedNameOfFile SynExprTryWithContainsTheRangeOfTheTryAndWithKeyword, - [], [], + [], [SynModuleOrNamespace ([SynExprTryWithContainsTheRangeOfTheTryAndWithKeyword], false, AnonModule, @@ -21,4 +21,5 @@ ImplFile WithToEndRange = (4,0--5,9) }), (2,0--5,9))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Try - Finally 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - Finally 01.fs.bsl index d2437e5ebfc..5a03c6066c8 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - Finally 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - Finally 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - Finally 01.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -24,4 +24,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Try - Finally 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - Finally 02.fs.bsl index 4d463ef1077..d0ad1002eea 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - Finally 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - Finally 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - Finally 02.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -24,4 +24,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Try - Finally 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - Finally 03.fs.bsl index 2ad046c6c6a..05d4bf58c56 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - Finally 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - Finally 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - Finally 03.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -24,4 +24,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Try - Finally 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - Finally 04.fs.bsl index 58c6e87e550..2efe693eb39 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - Finally 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - Finally 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - Finally 04.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -26,6 +26,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Try - With 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - With 01.fs.bsl index beb30aedfe4..4b9b32262aa 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - With 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - With 01.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - With 01.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -30,4 +29,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Try - With 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - With 02.fs.bsl index 0fa71a2d560..2805db17744 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - With 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - With 02.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - With 02.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -30,4 +29,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Try - With 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - With 03.fs.bsl index f357989f6d7..628ff8509d0 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - With 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - With 03.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - With 03.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -30,4 +29,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Try - With 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - With 04.fs.bsl index b3ed1e9fdf0..2ff3b16f3c2 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - With 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - With 04.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - With 04.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -32,6 +31,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Try - With 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - With 05.fs.bsl index cce7a7716ca..f266fe9c97d 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - With 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - With 05.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - With 05.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -31,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,1) parse error Incomplete structured construct at or before this point in pattern matching. Expected '->' or other token. diff --git a/tests/service/data/SyntaxTree/Expression/Try - With 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - With 06.fs.bsl index 2f37ac458b1..367842a5c41 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - With 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - With 06.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - With 06.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -25,6 +24,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Try - With 07.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - With 07.fs.bsl index 394af4cbd7c..3e000ea7d4a 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - With 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - With 07.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - With 07.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -30,4 +29,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Try - With 08.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - With 08.fs.bsl index bcad7831beb..8c78faa7c9c 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - With 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - With 08.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - With 08.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -31,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,1) parse error Incomplete structured construct at or before this point in pattern matching. Expected '->' or other token. diff --git a/tests/service/data/SyntaxTree/Expression/Try - With 09.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try - With 09.fs.bsl index d3557177c85..efc7f1e612f 100644 --- a/tests/service/data/SyntaxTree/Expression/Try - With 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try - With 09.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try - With 09.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -25,6 +24,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,1) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/Try 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try 01.fs.bsl index 94e5c9c690d..61abb3656ca 100644 --- a/tests/service/data/SyntaxTree/Expression/Try 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Try 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Try 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -24,6 +24,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in expression. Expected 'finally', 'with' or other token. diff --git a/tests/service/data/SyntaxTree/Expression/Try 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try 02.fs.bsl index b1330bbff79..57f8ddac5e9 100644 --- a/tests/service/data/SyntaxTree/Expression/Try 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Try 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Try 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 01.fs.bsl index 8a17abd5fe8..cb0e0eb6abf 100644 --- a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try with - Missing expr 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,4) parse error Expecting expression diff --git a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 02.fs.bsl index 4d6eeb04f62..0ee1ddcecc9 100644 --- a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try with - Missing expr 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 03.fs.bsl index 74ec0b40076..7fe035f2d55 100644 --- a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try with - Missing expr 03.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,3), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 04.fs.bsl index 74221e70a5f..319880a8b0a 100644 --- a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try with - Missing expr 04.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -29,6 +29,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,3) parse error The block following this 'let' is unfinished. Every code block is an expression and must have a result. 'let' cannot be the final code element in a block. Consider giving this block an explicit result. diff --git a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 05.fs.bsl index e55f5f0b2ef..4c001b2e367 100644 --- a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try with - Missing expr 05.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,3), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,6) parse error Expecting expression diff --git a/tests/service/data/SyntaxTree/Expression/Try with 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try with 01.fs.bsl index 3435a66a380..e7263d93cc4 100644 --- a/tests/service/data/SyntaxTree/Expression/Try with 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try with 01.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Try with 01.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 01.fs.bsl index 6df06c17cc4..d521c1789ec 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Tuple - Missing item 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -14,6 +14,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,4), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,2)-(3,3) parse error Expected an expression after this point diff --git a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 02.fs.bsl index 8478b3cd009..ccd6e5f67ee 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Tuple - Missing item 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -14,6 +14,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,4), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,1)-(3,2) parse error Expecting expression diff --git a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 03.fs.bsl index 8690087c0b8..507b7d9912a 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Tuple - Missing item 03.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -14,6 +14,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,1)-(3,2) parse error Expecting expression diff --git a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 04.fs.bsl index 142fb6f4d4d..c185b93c766 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Tuple - Missing item 04.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -14,6 +14,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,3)-(3,4) parse error Expecting expression diff --git a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 05.fs.bsl index 9ff45a09481..5e7cf3894a5 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Tuple - Missing item 05.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,4)-(3,5) parse error Expected an expression after this point diff --git a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 06.fs.bsl index f1ac3a85d0a..8d07f50febd 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Tuple - Missing item 06.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -12,6 +12,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,4), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,2)-(3,3) parse error Unexpected symbol ',' in expression diff --git a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 07.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 07.fs.bsl index 28b3b9ebffd..9fa5505703b 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 07.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Tuple - Missing item 07.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,3)-(3,4) parse error Expecting expression diff --git a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 08.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 08.fs.bsl index 750a36647f4..4626a7a68a3 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 08.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Tuple - Missing item 08.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,0), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (1:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 09.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 09.fs.bsl index ee4a18e88a0..8e500764925 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 09.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Tuple - Missing item 09.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,4)-(3,5) parse error Unexpected symbol ',' in expression diff --git a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 10.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 10.fs.bsl index d44279250a4..c7bf2053a39 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 10.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Tuple - Missing item 10.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -23,6 +23,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:9). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 11.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 11.fs.bsl index df9f4900d70..92db48f5d0d 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple - Missing item 11.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Tuple - Missing item 11.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,8)-(3,9) parse error Unexpected symbol ',' in binding diff --git a/tests/service/data/SyntaxTree/Expression/Tuple 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple 01.fs.bsl index 5310605d97b..08d3bc21594 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Tuple 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Tuple 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,4 +10,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Tuple 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Tuple 02.fs.bsl index d8ef94b69a8..f3b4e3f4e28 100644 --- a/tests/service/data/SyntaxTree/Expression/Tuple 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Tuple 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Tuple 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Tuple 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -12,4 +12,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Type test 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Type test 01.fs.bsl index 7e404d712a8..17a27f16a50 100644 --- a/tests/service/data/SyntaxTree/Expression/Type test 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Type test 01.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Type test 01.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,6 +9,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,4), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/Type test 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Type test 02.fs.bsl index a0c458e845c..f47e0daee15 100644 --- a/tests/service/data/SyntaxTree/Expression/Type test 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Type test 02.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Type test 02.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,6 +9,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(4,0) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/Type test 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Type test 03.fs.bsl index 4189996253d..84ed9ca2d0f 100644 --- a/tests/service/data/SyntaxTree/Expression/Type test 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Type test 03.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Type test 03.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,6 +9,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(4,0) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/Type test 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Type test 04.fs.bsl index ab70a127c9c..d01cecf2e10 100644 --- a/tests/service/data/SyntaxTree/Expression/Type test 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Type test 04.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Type test 04.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -16,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,8)-(3,12) parse error Unexpected keyword 'then' in expression diff --git a/tests/service/data/SyntaxTree/Expression/Typed 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Typed 01.fs.bsl index 126033bd3a0..5defbcc13e1 100644 --- a/tests/service/data/SyntaxTree/Expression/Typed 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Typed 01.fs.bsl @@ -1,11 +1,12 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Typed 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Typed 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr (Ident i, (3,0--3,1))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,1)-(3,2) parse error Unexpected symbol ':' in definition. Expected incomplete structured construct at or before this point or other token. diff --git a/tests/service/data/SyntaxTree/Expression/Typed 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Typed 02.fs.bsl index cfca2392376..e583d82bdd1 100644 --- a/tests/service/data/SyntaxTree/Expression/Typed 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Typed 02.fs.bsl @@ -1,11 +1,12 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Typed 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Typed 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr (Ident i, (3,0--3,1))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,1)-(3,2) parse error Unexpected symbol ':' in definition. Expected incomplete structured construct at or before this point or other token. diff --git a/tests/service/data/SyntaxTree/Expression/Typed 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Typed 03.fs.bsl index ea133deba4a..9d829ce73d8 100644 --- a/tests/service/data/SyntaxTree/Expression/Typed 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Typed 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Typed 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Typed 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,6 +10,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/Typed 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Typed 04.fs.bsl index 2bef6b3b004..ead43033b31 100644 --- a/tests/service/data/SyntaxTree/Expression/Typed 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Typed 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Typed 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Typed 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,6 +10,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/Expression/Unary - Reserved 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Unary - Reserved 01.fs.bsl index 0ef183357aa..9438da58699 100644 --- a/tests/service/data/SyntaxTree/Expression/Unary - Reserved 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Unary - Reserved 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Unary - Reserved 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -12,6 +12,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,1) parse error This is not a valid identifier diff --git a/tests/service/data/SyntaxTree/Expression/Unary - Reserved 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Unary - Reserved 02.fs.bsl index d246acbd5b9..c913a482807 100644 --- a/tests/service/data/SyntaxTree/Expression/Unary - Reserved 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Unary - Reserved 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Unary - Reserved 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -14,6 +14,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,2)-(3,3) parse error This is not a valid identifier diff --git a/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 01.fs.bsl index 7e4b6c613c6..40795098b50 100644 --- a/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Unfinished escaped ident 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -72,6 +72,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--46,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,5) parse error This is not a valid identifier diff --git a/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 02.fs.bsl index d85ff5016bd..d8ac768d36b 100644 --- a/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Unfinished escaped ident 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -82,6 +82,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,27), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,16)-(4,17) parse error This is not a valid identifier diff --git a/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 03.fs.bsl index 683dccae609..043ea507ef0 100644 --- a/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Unfinished escaped ident 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Expression/Unfinished escaped ident 03.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -35,6 +35,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,2)-(4,3) parse error This is not a valid identifier diff --git a/tests/service/data/SyntaxTree/Expression/Upcast 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Upcast 01.fs.bsl index cd9537573ea..3a61bc5ca0e 100644 --- a/tests/service/data/SyntaxTree/Expression/Upcast 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Upcast 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Upcast 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Upcast 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -9,6 +9,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,4), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Upcast 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Upcast 02.fs.bsl index 3b979512571..7349d893d1b 100644 --- a/tests/service/data/SyntaxTree/Expression/Upcast 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Upcast 02.fs.bsl @@ -1,12 +1,13 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Upcast 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Upcast 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr (Upcast (Ident i, Anon (4,0--4,2), (3,0--4,2)), (3,0--4,2))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,1)-(4,2) parse error Unexpected symbol ')' in expression diff --git a/tests/service/data/SyntaxTree/Expression/Upcast 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Upcast 03.fs.bsl index 174f880184b..24b83414582 100644 --- a/tests/service/data/SyntaxTree/Expression/Upcast 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Upcast 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Upcast 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Upcast 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,4 +10,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Upcast 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Upcast 04.fs.bsl index adf29275cb5..ea64ddbe559 100644 --- a/tests/service/data/SyntaxTree/Expression/Upcast 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Upcast 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Upcast 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Upcast 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -11,6 +11,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/Upcast 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Upcast 05.fs.bsl index 62339dd016f..78cddea4a93 100644 --- a/tests/service/data/SyntaxTree/Expression/Upcast 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Upcast 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/Upcast 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/Upcast 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,6 +10,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/While 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/While 01.fs.bsl index e8039cbe2cf..3ca61e2fb2f 100644 --- a/tests/service/data/SyntaxTree/Expression/While 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/While 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/While 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/While 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -11,4 +11,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/While 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/While 02.fs.bsl index 99e63d5e069..4e922840a50 100644 --- a/tests/service/data/SyntaxTree/Expression/While 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/While 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/While 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/While 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -11,4 +11,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/While 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/While 03.fs.bsl index f8e8df6f239..f97b2ef3702 100644 --- a/tests/service/data/SyntaxTree/Expression/While 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/While 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/While 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/While 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -21,6 +21,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/While 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/While 04.fs.bsl index 525fd0e42a5..bc9409d1352 100644 --- a/tests/service/data/SyntaxTree/Expression/While 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/While 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/While 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/While 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -21,6 +21,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,14), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/While 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/While 05.fs.bsl index b6d3daf4f51..63f49be132f 100644 --- a/tests/service/data/SyntaxTree/Expression/While 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/While 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/While 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/While 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -21,4 +21,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/While 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/While 06.fs.bsl index e106a73365d..fa00ab9ef46 100644 --- a/tests/service/data/SyntaxTree/Expression/While 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/While 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Expression/While 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Expression/While 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -21,4 +21,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/WhileBang 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/WhileBang 01.fs.bsl index deb6d27aa83..a516411d1db 100644 --- a/tests/service/data/SyntaxTree/Expression/WhileBang 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/WhileBang 01.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/WhileBang 01.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -20,4 +19,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/WhileBang 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/WhileBang 02.fs.bsl index 52eaca7bfdc..30c58b59105 100644 --- a/tests/service/data/SyntaxTree/Expression/WhileBang 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/WhileBang 02.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/WhileBang 02.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -20,4 +19,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/WhileBang 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/WhileBang 03.fs.bsl index 437c23a2c6b..9cd7ffdf523 100644 --- a/tests/service/data/SyntaxTree/Expression/WhileBang 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/WhileBang 03.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/WhileBang 03.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -31,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/WhileBang 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/WhileBang 04.fs.bsl index 70db990cb0e..6afb7df4944 100644 --- a/tests/service/data/SyntaxTree/Expression/WhileBang 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/WhileBang 04.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/WhileBang 04.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -31,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,35), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Expression/WhileBang 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/WhileBang 05.fs.bsl index a8b4a21543b..68269efd975 100644 --- a/tests/service/data/SyntaxTree/Expression/WhileBang 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/WhileBang 05.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/WhileBang 05.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -31,4 +30,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/WhileBang 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/WhileBang 06.fs.bsl index df87ceb6a9d..733ec5ee330 100644 --- a/tests/service/data/SyntaxTree/Expression/WhileBang 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/WhileBang 06.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Expression/WhileBang 06.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -31,4 +30,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Extern/Extern 01.fs.bsl b/tests/service/data/SyntaxTree/Extern/Extern 01.fs.bsl index efb3580fda3..7e70df62f0d 100644 --- a/tests/service/data/SyntaxTree/Extern/Extern 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Extern/Extern 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Extern/Extern 01.fs", false, QualifiedNameOfFile Extern 01, [], [], + ("/root/Extern/Extern 01.fs", false, QualifiedNameOfFile Extern 01, [], [SynModuleOrNamespace ([Extern 01], false, AnonModule, [Let @@ -98,6 +98,7 @@ ImplFile EqualsRange = None })], (1,0--2,70))], PreXmlDocEmpty, [], None, (1,0--2,70), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'Extern 01' based on the file name 'Extern 01.fs'. 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/tests/service/data/SyntaxTree/Extern/ExternKeywordIsPresentInTrivia.fs.bsl b/tests/service/data/SyntaxTree/Extern/ExternKeywordIsPresentInTrivia.fs.bsl index 8b6a9a601fc..cd770091661 100644 --- a/tests/service/data/SyntaxTree/Extern/ExternKeywordIsPresentInTrivia.fs.bsl +++ b/tests/service/data/SyntaxTree/Extern/ExternKeywordIsPresentInTrivia.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Extern/ExternKeywordIsPresentInTrivia.fs", false, - QualifiedNameOfFile ExternKeywordIsPresentInTrivia, [], [], + QualifiedNameOfFile ExternKeywordIsPresentInTrivia, [], [SynModuleOrNamespace ([ExternKeywordIsPresentInTrivia], false, AnonModule, [Let @@ -42,4 +42,5 @@ ImplFile EqualsRange = None })], (2,0--2,28))], PreXmlDocEmpty, [], None, (2,0--2,28), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/IfThenElse/Comment after else 01.fs.bsl b/tests/service/data/SyntaxTree/IfThenElse/Comment after else 01.fs.bsl index 6800642d8f9..15cfd83a38c 100644 --- a/tests/service/data/SyntaxTree/IfThenElse/Comment after else 01.fs.bsl +++ b/tests/service/data/SyntaxTree/IfThenElse/Comment after else 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/IfThenElse/Comment after else 01.fs", false, - QualifiedNameOfFile Comment after else 01, [], [], + QualifiedNameOfFile Comment after else 01, [], [SynModuleOrNamespace ([Comment after else 01], false, AnonModule, [Expr @@ -23,6 +23,7 @@ ImplFile IfToThenRange = (1,0--1,9) }), (1,0--4,5))], PreXmlDocEmpty, [], None, (1,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [BlockComment (3,5--3,33)] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'Comment after else 01' based on the file name 'Comment after else 01.fs'. 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/tests/service/data/SyntaxTree/IfThenElse/Comment after else 02.fs.bsl b/tests/service/data/SyntaxTree/IfThenElse/Comment after else 02.fs.bsl index 6fcbf474c2f..d3974f75b62 100644 --- a/tests/service/data/SyntaxTree/IfThenElse/Comment after else 02.fs.bsl +++ b/tests/service/data/SyntaxTree/IfThenElse/Comment after else 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/IfThenElse/Comment after else 02.fs", false, - QualifiedNameOfFile Comment after else 02, [], [], + QualifiedNameOfFile Comment after else 02, [], [SynModuleOrNamespace ([Comment after else 02], false, AnonModule, [Expr @@ -17,6 +17,7 @@ ImplFile Expr (Ident b, (2,0--2,1))], PreXmlDocEmpty, [], None, (1,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [BlockComment (3,5--3,33)] }, set [])) (2,0)-(2,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (1:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/IfThenElse/DeeplyNestedIfThenElse.fs.bsl b/tests/service/data/SyntaxTree/IfThenElse/DeeplyNestedIfThenElse.fs.bsl index a94aa49c2f8..6c91bc3c497 100644 --- a/tests/service/data/SyntaxTree/IfThenElse/DeeplyNestedIfThenElse.fs.bsl +++ b/tests/service/data/SyntaxTree/IfThenElse/DeeplyNestedIfThenElse.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/IfThenElse/DeeplyNestedIfThenElse.fs", false, - QualifiedNameOfFile DeeplyNestedIfThenElse, [], [], + QualifiedNameOfFile DeeplyNestedIfThenElse, [], [SynModuleOrNamespace ([DeeplyNestedIfThenElse], false, AnonModule, [Expr @@ -32,4 +32,5 @@ ImplFile IfToThenRange = (2,0--2,9) }), (2,0--10,13))], PreXmlDocEmpty, [], None, (2,0--11,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/IfThenElse/ElseKeywordInSimpleIfThenElse.fs.bsl b/tests/service/data/SyntaxTree/IfThenElse/ElseKeywordInSimpleIfThenElse.fs.bsl index 4ee21824e57..8880778d7d4 100644 --- a/tests/service/data/SyntaxTree/IfThenElse/ElseKeywordInSimpleIfThenElse.fs.bsl +++ b/tests/service/data/SyntaxTree/IfThenElse/ElseKeywordInSimpleIfThenElse.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/IfThenElse/ElseKeywordInSimpleIfThenElse.fs", false, - QualifiedNameOfFile ElseKeywordInSimpleIfThenElse, [], [], + QualifiedNameOfFile ElseKeywordInSimpleIfThenElse, [], [SynModuleOrNamespace ([ElseKeywordInSimpleIfThenElse], false, AnonModule, [Expr @@ -14,4 +14,5 @@ ImplFile IfToThenRange = (2,0--2,9) }), (2,0--2,18))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/IfThenElse/IfKeywordInIfThenElse.fs.bsl b/tests/service/data/SyntaxTree/IfThenElse/IfKeywordInIfThenElse.fs.bsl index afb0f0222c3..e5e31766436 100644 --- a/tests/service/data/SyntaxTree/IfThenElse/IfKeywordInIfThenElse.fs.bsl +++ b/tests/service/data/SyntaxTree/IfThenElse/IfKeywordInIfThenElse.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/IfThenElse/IfKeywordInIfThenElse.fs", false, - QualifiedNameOfFile IfKeywordInIfThenElse, [], [], + QualifiedNameOfFile IfKeywordInIfThenElse, [], [SynModuleOrNamespace ([IfKeywordInIfThenElse], false, AnonModule, [Expr @@ -14,4 +14,5 @@ ImplFile IfToThenRange = (2,0--2,9) }), (2,0--2,11))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/IfThenElse/IfThenAndElseKeywordOnSeparateLines.fs.bsl b/tests/service/data/SyntaxTree/IfThenElse/IfThenAndElseKeywordOnSeparateLines.fs.bsl index f1421e566ab..7ecb4d2a588 100644 --- a/tests/service/data/SyntaxTree/IfThenElse/IfThenAndElseKeywordOnSeparateLines.fs.bsl +++ b/tests/service/data/SyntaxTree/IfThenElse/IfThenAndElseKeywordOnSeparateLines.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/IfThenElse/IfThenAndElseKeywordOnSeparateLines.fs", false, - QualifiedNameOfFile IfThenAndElseKeywordOnSeparateLines, [], [], + QualifiedNameOfFile IfThenAndElseKeywordOnSeparateLines, [], [SynModuleOrNamespace ([IfThenAndElseKeywordOnSeparateLines], false, AnonModule, [Expr @@ -14,4 +14,5 @@ ImplFile IfToThenRange = (2,0--3,4) }), (2,0--4,6))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/IfThenElse/NestedElifInIfThenElse.fs.bsl b/tests/service/data/SyntaxTree/IfThenElse/NestedElifInIfThenElse.fs.bsl index 08b9a76501c..4d59e2371b3 100644 --- a/tests/service/data/SyntaxTree/IfThenElse/NestedElifInIfThenElse.fs.bsl +++ b/tests/service/data/SyntaxTree/IfThenElse/NestedElifInIfThenElse.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/IfThenElse/NestedElifInIfThenElse.fs", false, - QualifiedNameOfFile NestedElifInIfThenElse, [], [], + QualifiedNameOfFile NestedElifInIfThenElse, [], [SynModuleOrNamespace ([NestedElifInIfThenElse], false, AnonModule, [Expr @@ -23,4 +23,5 @@ ImplFile IfToThenRange = (2,0--2,9) }), (2,0--4,13))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/IfThenElse/NestedElseIfInIfThenElse.fs.bsl b/tests/service/data/SyntaxTree/IfThenElse/NestedElseIfInIfThenElse.fs.bsl index 07bafab126e..8085e2915cd 100644 --- a/tests/service/data/SyntaxTree/IfThenElse/NestedElseIfInIfThenElse.fs.bsl +++ b/tests/service/data/SyntaxTree/IfThenElse/NestedElseIfInIfThenElse.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/IfThenElse/NestedElseIfInIfThenElse.fs", false, - QualifiedNameOfFile NestedElseIfInIfThenElse, [], [], + QualifiedNameOfFile NestedElseIfInIfThenElse, [], [SynModuleOrNamespace ([NestedElseIfInIfThenElse], false, AnonModule, [Expr @@ -23,4 +23,5 @@ ImplFile IfToThenRange = (2,0--2,9) }), (2,0--5,15))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/IfThenElse/NestedElseIfOnTheSameLineInIfThenElse.fs.bsl b/tests/service/data/SyntaxTree/IfThenElse/NestedElseIfOnTheSameLineInIfThenElse.fs.bsl index da6f78fb889..7b9c52347c3 100644 --- a/tests/service/data/SyntaxTree/IfThenElse/NestedElseIfOnTheSameLineInIfThenElse.fs.bsl +++ b/tests/service/data/SyntaxTree/IfThenElse/NestedElseIfOnTheSameLineInIfThenElse.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/IfThenElse/NestedElseIfOnTheSameLineInIfThenElse.fs", false, - QualifiedNameOfFile NestedElseIfOnTheSameLineInIfThenElse, [], [], + QualifiedNameOfFile NestedElseIfOnTheSameLineInIfThenElse, [], [SynModuleOrNamespace ([NestedElseIfOnTheSameLineInIfThenElse], false, AnonModule, [Expr @@ -23,4 +23,5 @@ ImplFile IfToThenRange = (2,0--2,9) }), (2,0--5,5))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl index b7334e423de..930c7d13e77 100644 --- a/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Lambda/ComplexArgumentsLambdaHasArrowRange.fs", false, - QualifiedNameOfFile ComplexArgumentsLambdaHasArrowRange, [], [], + QualifiedNameOfFile ComplexArgumentsLambdaHasArrowRange, [], [SynModuleOrNamespace ([ComplexArgumentsLambdaHasArrowRange], false, AnonModule, [Expr @@ -161,4 +161,5 @@ ImplFile { ArrowRange = Some (5,4--5,6) }), (2,0--6,13))], PreXmlDocEmpty, [], None, (2,0--7,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl index 442d815a3dd..3f1c530f9d5 100644 --- a/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Lambda/DestructedLambdaHasArrowRange.fs", false, - QualifiedNameOfFile DestructedLambdaHasArrowRange, [], [], + QualifiedNameOfFile DestructedLambdaHasArrowRange, [], [SynModuleOrNamespace ([DestructedLambdaHasArrowRange], false, AnonModule, [Expr @@ -64,4 +64,5 @@ ImplFile { ArrowRange = Some (2,14--2,16) }), (2,0--2,22))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Lambda/LambdaWithTupleParameterWithWildCardGivesCorrectBody.fs.bsl b/tests/service/data/SyntaxTree/Lambda/LambdaWithTupleParameterWithWildCardGivesCorrectBody.fs.bsl index af455533914..e85c474072a 100644 --- a/tests/service/data/SyntaxTree/Lambda/LambdaWithTupleParameterWithWildCardGivesCorrectBody.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/LambdaWithTupleParameterWithWildCardGivesCorrectBody.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Lambda/LambdaWithTupleParameterWithWildCardGivesCorrectBody.fs", false, QualifiedNameOfFile LambdaWithTupleParameterWithWildCardGivesCorrectBody, - [], [], + [], [SynModuleOrNamespace ([LambdaWithTupleParameterWithWildCardGivesCorrectBody], false, AnonModule, @@ -39,4 +39,5 @@ ImplFile (2,0--2,19))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Lambda/LambdaWithTwoParametersGivesCorrectBody.fs.bsl b/tests/service/data/SyntaxTree/Lambda/LambdaWithTwoParametersGivesCorrectBody.fs.bsl index c014aa3236c..8e77bc9eed1 100644 --- a/tests/service/data/SyntaxTree/Lambda/LambdaWithTwoParametersGivesCorrectBody.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/LambdaWithTwoParametersGivesCorrectBody.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Lambda/LambdaWithTwoParametersGivesCorrectBody.fs", false, - QualifiedNameOfFile LambdaWithTwoParametersGivesCorrectBody, [], [], + QualifiedNameOfFile LambdaWithTwoParametersGivesCorrectBody, [], [SynModuleOrNamespace ([LambdaWithTwoParametersGivesCorrectBody], false, AnonModule, [Expr @@ -23,4 +23,5 @@ ImplFile (2,0--2,12))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Lambda/LambdaWithWildCardParameterGivesCorrectBody.fs.bsl b/tests/service/data/SyntaxTree/Lambda/LambdaWithWildCardParameterGivesCorrectBody.fs.bsl index 9e2a1e33385..e38de7b5537 100644 --- a/tests/service/data/SyntaxTree/Lambda/LambdaWithWildCardParameterGivesCorrectBody.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/LambdaWithWildCardParameterGivesCorrectBody.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Lambda/LambdaWithWildCardParameterGivesCorrectBody.fs", false, - QualifiedNameOfFile LambdaWithWildCardParameterGivesCorrectBody, [], [], + QualifiedNameOfFile LambdaWithWildCardParameterGivesCorrectBody, [], [SynModuleOrNamespace ([LambdaWithWildCardParameterGivesCorrectBody], false, AnonModule, [Expr @@ -30,4 +30,5 @@ ImplFile (2,0--2,14))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Lambda/LambdaWithWildCardThatReturnsALambdaGivesCorrectBody.fs.bsl b/tests/service/data/SyntaxTree/Lambda/LambdaWithWildCardThatReturnsALambdaGivesCorrectBody.fs.bsl index 83435aa48a5..eb2ff3402e8 100644 --- a/tests/service/data/SyntaxTree/Lambda/LambdaWithWildCardThatReturnsALambdaGivesCorrectBody.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/LambdaWithWildCardThatReturnsALambdaGivesCorrectBody.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Lambda/LambdaWithWildCardThatReturnsALambdaGivesCorrectBody.fs", false, QualifiedNameOfFile LambdaWithWildCardThatReturnsALambdaGivesCorrectBody, - [], [], + [], [SynModuleOrNamespace ([LambdaWithWildCardThatReturnsALambdaGivesCorrectBody], false, AnonModule, @@ -32,4 +32,5 @@ ImplFile { ArrowRange = Some (2,6--2,8) }), (2,0--2,19))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Lambda/MultilineLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/MultilineLambdaHasArrowRange.fs.bsl index 6d3ea6eea4a..40da24ed4d1 100644 --- a/tests/service/data/SyntaxTree/Lambda/MultilineLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/MultilineLambdaHasArrowRange.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Lambda/MultilineLambdaHasArrowRange.fs", false, - QualifiedNameOfFile MultilineLambdaHasArrowRange, [], [], + QualifiedNameOfFile MultilineLambdaHasArrowRange, [], [SynModuleOrNamespace ([MultilineLambdaHasArrowRange], false, AnonModule, [Expr @@ -72,4 +72,5 @@ ImplFile { ArrowRange = Some (3,28--3,30) }), (2,0--4,41))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Lambda/Param - Missing type 01.fs.bsl b/tests/service/data/SyntaxTree/Lambda/Param - Missing type 01.fs.bsl index cf6edce993f..dfce41e19da 100644 --- a/tests/service/data/SyntaxTree/Lambda/Param - Missing type 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/Param - Missing type 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Lambda/Param - Missing type 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -21,6 +21,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,6)-(3,7) parse error Unexpected symbol ':' in lambda expression. Expected '->' or other token. diff --git a/tests/service/data/SyntaxTree/Lambda/Param - Missing type 02.fs.bsl b/tests/service/data/SyntaxTree/Lambda/Param - Missing type 02.fs.bsl index faf86a319e0..6cb18044558 100644 --- a/tests/service/data/SyntaxTree/Lambda/Param - Missing type 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/Param - Missing type 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Lambda/Param - Missing type 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -21,6 +21,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,14), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,6)-(3,7) parse error Unexpected symbol ':' in lambda expression. Expected '->' or other token. diff --git a/tests/service/data/SyntaxTree/Lambda/Param - Missing type 03.fs.bsl b/tests/service/data/SyntaxTree/Lambda/Param - Missing type 03.fs.bsl index 490a20dd75f..6031ebdc107 100644 --- a/tests/service/data/SyntaxTree/Lambda/Param - Missing type 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/Param - Missing type 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Lambda/Param - Missing type 03.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,8)-(3,9) parse error Unexpected symbol ')' in pattern diff --git a/tests/service/data/SyntaxTree/Lambda/Param - Missing type 04.fs.bsl b/tests/service/data/SyntaxTree/Lambda/Param - Missing type 04.fs.bsl index 6c522c46bab..71f17176866 100644 --- a/tests/service/data/SyntaxTree/Lambda/Param - Missing type 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/Param - Missing type 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Lambda/Param - Missing type 04.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -31,6 +31,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,19), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,8)-(3,9) parse error Unexpected symbol ',' in pattern diff --git a/tests/service/data/SyntaxTree/Lambda/SimpleLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/SimpleLambdaHasArrowRange.fs.bsl index 818107806bf..54ee6a39cde 100644 --- a/tests/service/data/SyntaxTree/Lambda/SimpleLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/SimpleLambdaHasArrowRange.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Lambda/SimpleLambdaHasArrowRange.fs", false, - QualifiedNameOfFile SimpleLambdaHasArrowRange, [], [], + QualifiedNameOfFile SimpleLambdaHasArrowRange, [], [SynModuleOrNamespace ([SimpleLambdaHasArrowRange], false, AnonModule, [Expr @@ -16,4 +16,5 @@ ImplFile (2,0--2,10))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Lambda/TupleInLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/TupleInLambdaHasArrowRange.fs.bsl index 30442a303f0..788eb98a507 100644 --- a/tests/service/data/SyntaxTree/Lambda/TupleInLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/TupleInLambdaHasArrowRange.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Lambda/TupleInLambdaHasArrowRange.fs", false, - QualifiedNameOfFile TupleInLambdaHasArrowRange, [], [], + QualifiedNameOfFile TupleInLambdaHasArrowRange, [], [SynModuleOrNamespace ([TupleInLambdaHasArrowRange], false, AnonModule, [Expr @@ -41,4 +41,5 @@ ImplFile (2,0--2,19), { ArrowRange = Some (2,11--2,13) }), (2,0--2,19))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/AbstractKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/AbstractKeyword.fs.bsl index 9c4b593e133..34aa70d3379 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/AbstractKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/AbstractKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/AbstractKeyword.fs", false, - QualifiedNameOfFile AbstractKeyword, [], [], + QualifiedNameOfFile AbstractKeyword, [], [SynModuleOrNamespace ([AbstractKeyword], false, AnonModule, [Types @@ -37,4 +37,5 @@ ImplFile WithKeyword = None })], (2,0--3,20))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/AbstractMemberKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/AbstractMemberKeyword.fs.bsl index 0cbd9b3a434..9f3ccbf040b 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/AbstractMemberKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/AbstractMemberKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/AbstractMemberKeyword.fs", false, - QualifiedNameOfFile AbstractMemberKeyword, [], [], + QualifiedNameOfFile AbstractMemberKeyword, [], [SynModuleOrNamespace ([AbstractMemberKeyword], false, AnonModule, [Types @@ -38,4 +38,5 @@ ImplFile WithKeyword = None })], (2,0--3,27))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/AndKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/AndKeyword.fs.bsl index 7376e64e8e4..c1c8979edcb 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/AndKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/AndKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/AndKeyword.fs", false, - QualifiedNameOfFile AndKeyword, [], [], + QualifiedNameOfFile AndKeyword, [], [SynModuleOrNamespace ([AndKeyword], false, AnonModule, [Let @@ -59,4 +59,5 @@ ImplFile EqualsRange = Some (3,8--3,9) })], (2,0--3,15))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/DefaultKeyword.fsi.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/DefaultKeyword.fsi.bsl index ba9b7296835..b8ef7219487 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/DefaultKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/DefaultKeyword.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/LeadingKeyword/DefaultKeyword.fsi", - QualifiedNameOfFile DefaultKeyword, [], [], + QualifiedNameOfFile DefaultKeyword, [], [SynModuleOrNamespaceSig ([X], false, DeclaredNamespace, [Types @@ -38,4 +38,5 @@ SigFile PreXmlDocEmpty, [], None, (2,0--5,19), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/DefaultValKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/DefaultValKeyword.fs.bsl index 2c243f2ca9d..028585bc0b5 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/DefaultValKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/DefaultValKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/DefaultValKeyword.fs", false, - QualifiedNameOfFile DefaultValKeyword, [], [], + QualifiedNameOfFile DefaultValKeyword, [], [SynModuleOrNamespace ([DefaultValKeyword], false, AnonModule, [Types @@ -40,4 +40,5 @@ ImplFile WithKeyword = None })], (2,0--3,27))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/DoKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/DoKeyword.fs.bsl index 41ed25792f7..e70a4e5463e 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/DoKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/DoKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/DoKeyword.fs", false, QualifiedNameOfFile DoKeyword, - [], [], + [], [SynModuleOrNamespace ([DoKeyword], false, AnonModule, [Types @@ -29,4 +29,5 @@ ImplFile WithKeyword = None })], (2,0--3,9))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/DoStaticKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/DoStaticKeyword.fs.bsl index 1c7e811ab69..29b5e5c9688 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/DoStaticKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/DoStaticKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/DoStaticKeyword.fs", false, - QualifiedNameOfFile DoStaticKeyword, [], [], + QualifiedNameOfFile DoStaticKeyword, [], [SynModuleOrNamespace ([DoStaticKeyword], false, AnonModule, [Types @@ -30,4 +30,5 @@ ImplFile WithKeyword = None })], (2,0--3,16))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/ExternKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/ExternKeyword.fs.bsl index ae6df6a8091..189a700298e 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/ExternKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/ExternKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/ExternKeyword.fs", false, - QualifiedNameOfFile ExternKeyword, [], [], + QualifiedNameOfFile ExternKeyword, [], [SynModuleOrNamespace ([ExternKeyword], false, AnonModule, [Let @@ -42,4 +42,5 @@ ImplFile EqualsRange = None })], (2,0--2,17))], PreXmlDocEmpty, [], None, (2,0--2,17), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/LetKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/LetKeyword.fs.bsl index c783b4b4354..c8ae05916a7 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/LetKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/LetKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/LetKeyword.fs", false, - QualifiedNameOfFile LetKeyword, [], [], + QualifiedNameOfFile LetKeyword, [], [SynModuleOrNamespace ([LetKeyword], false, AnonModule, [Let @@ -33,4 +33,5 @@ ImplFile EqualsRange = Some (2,8--2,9) })], (2,0--2,15))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/LetRecKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/LetRecKeyword.fs.bsl index a5ecb2a98b5..816ba3b4e59 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/LetRecKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/LetRecKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/LetRecKeyword.fs", false, - QualifiedNameOfFile LetRecKeyword, [], [], + QualifiedNameOfFile LetRecKeyword, [], [SynModuleOrNamespace ([LetRecKeyword], false, AnonModule, [Let @@ -34,4 +34,5 @@ ImplFile EqualsRange = Some (2,12--2,13) })], (2,0--2,19))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/MemberKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/MemberKeyword.fs.bsl index d9497db0bfe..3d161da52e3 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/MemberKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/MemberKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/MemberKeyword.fs", false, - QualifiedNameOfFile MemberKeyword, [], [], + QualifiedNameOfFile MemberKeyword, [], [SynModuleOrNamespace ([MemberKeyword], false, AnonModule, [Types @@ -45,4 +45,5 @@ ImplFile WithKeyword = None })], (2,0--3,26))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/MemberValKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/MemberValKeyword.fs.bsl index 63618be45b7..d9ba80b80df 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/MemberValKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/MemberValKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/MemberValKeyword.fs", false, - QualifiedNameOfFile MemberValKeyword, [], [], + QualifiedNameOfFile MemberValKeyword, [], [SynModuleOrNamespace ([MemberValKeyword], false, AnonModule, [Types @@ -40,4 +40,5 @@ ImplFile WithKeyword = None })], (2,0--3,26))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/NewKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/NewKeyword.fs.bsl index 1e408d27f4b..ebc374d1432 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/NewKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/NewKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/NewKeyword.fs", false, - QualifiedNameOfFile NewKeyword, [], [], + QualifiedNameOfFile NewKeyword, [], [SynModuleOrNamespace ([NewKeyword], false, AnonModule, [Types @@ -61,4 +61,5 @@ ImplFile WithKeyword = None })], (2,0--3,30))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/OverrideKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/OverrideKeyword.fs.bsl index 896ea64e69b..f9d0ec25562 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/OverrideKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/OverrideKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/OverrideKeyword.fs", false, - QualifiedNameOfFile OverrideKeyword, [], [], + QualifiedNameOfFile OverrideKeyword, [], [SynModuleOrNamespace ([OverrideKeyword], false, AnonModule, [Types @@ -50,4 +50,5 @@ ImplFile WithKeyword = None })], (2,0--3,28))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/OverrideValKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/OverrideValKeyword.fs.bsl index 3fff6cb5b0d..837e1b368fd 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/OverrideValKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/OverrideValKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/OverrideValKeyword.fs", false, - QualifiedNameOfFile OverrideValKeyword, [], [], + QualifiedNameOfFile OverrideValKeyword, [], [SynModuleOrNamespace ([OverrideValKeyword], false, AnonModule, [Types @@ -40,4 +40,5 @@ ImplFile WithKeyword = None })], (2,0--3,28))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractKeyword.fs.bsl index 92d3182daea..e75b4c25218 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/StaticAbstractKeyword.fs", false, - QualifiedNameOfFile StaticAbstractKeyword, [], [], + QualifiedNameOfFile StaticAbstractKeyword, [], [SynModuleOrNamespace ([StaticAbstractKeyword], false, AnonModule, [Types @@ -42,6 +42,7 @@ ImplFile WithKeyword = None })], (2,0--3,34))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,4)-(3,19) parse warning Declaring "interfaces with static abstract methods" is an advanced feature. See https://aka.ms/fsharp-iwsams for guidance. You can disable this warning by using '#nowarn "3535"' or '--nowarn:3535'. diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractMemberKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractMemberKeyword.fs.bsl index 8b2dc3b5c8f..73e5a522b4b 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractMemberKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/StaticAbstractMemberKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/StaticAbstractMemberKeyword.fs", false, - QualifiedNameOfFile StaticAbstractMemberKeyword, [], [], + QualifiedNameOfFile StaticAbstractMemberKeyword, [], [SynModuleOrNamespace ([StaticAbstractMemberKeyword], false, AnonModule, [Types @@ -43,6 +43,7 @@ ImplFile WithKeyword = None })], (2,0--3,41))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,4)-(3,19) parse warning Declaring "interfaces with static abstract methods" is an advanced feature. See https://aka.ms/fsharp-iwsams for guidance. You can disable this warning by using '#nowarn "3535"' or '--nowarn:3535'. diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/StaticLetKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/StaticLetKeyword.fs.bsl index 25ad616ec0f..94e3e11ef7f 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/StaticLetKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/StaticLetKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/StaticLetKeyword.fs", false, - QualifiedNameOfFile StaticLetKeyword, [], [], + QualifiedNameOfFile StaticLetKeyword, [], [SynModuleOrNamespace ([StaticLetKeyword], false, AnonModule, [Types @@ -35,4 +35,5 @@ ImplFile WithKeyword = None })], (2,0--3,24))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/StaticLetRecKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/StaticLetRecKeyword.fs.bsl index a0851241351..06aa352f3d3 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/StaticLetRecKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/StaticLetRecKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/StaticLetRecKeyword.fs", false, - QualifiedNameOfFile StaticLetRecKeyword, [], [], + QualifiedNameOfFile StaticLetRecKeyword, [], [SynModuleOrNamespace ([StaticLetRecKeyword], false, AnonModule, [Types @@ -41,4 +41,5 @@ ImplFile WithKeyword = None })], (2,0--3,41))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberKeyword.fs.bsl index 70b40e7ccd2..541b6f582a9 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/StaticMemberKeyword.fs", false, - QualifiedNameOfFile StaticMemberKeyword, [], [], + QualifiedNameOfFile StaticMemberKeyword, [], [SynModuleOrNamespace ([StaticMemberKeyword], false, AnonModule, [Types @@ -47,4 +47,5 @@ ImplFile WithKeyword = None })], (2,0--3,29))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberValKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberValKeyword.fs.bsl index 1ce7e21fea2..feb33135568 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberValKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/StaticMemberValKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/StaticMemberValKeyword.fs", false, - QualifiedNameOfFile StaticMemberValKeyword, [], [], + QualifiedNameOfFile StaticMemberValKeyword, [], [SynModuleOrNamespace ([StaticMemberValKeyword], false, AnonModule, [Types @@ -41,4 +41,5 @@ ImplFile WithKeyword = None })], (2,0--3,33))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/StaticValKeyword.fsi.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/StaticValKeyword.fsi.bsl index a30354d3b41..47aa7f74ac2 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/StaticValKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/StaticValKeyword.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/LeadingKeyword/StaticValKeyword.fsi", - QualifiedNameOfFile StaticValKeyword, [], [], + QualifiedNameOfFile StaticValKeyword, [], [SynModuleOrNamespaceSig ([Meh], false, DeclaredNamespace, [Types @@ -31,4 +31,5 @@ SigFile WithKeyword = None })], (4,0--5,29))], PreXmlDocEmpty, [], None, (2,0--5,29), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/SyntheticKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/SyntheticKeyword.fs.bsl index b833f40ae10..ef4aa89c83d 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/SyntheticKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/SyntheticKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/SyntheticKeyword.fs", false, - QualifiedNameOfFile SyntheticKeyword, [], [], + QualifiedNameOfFile SyntheticKeyword, [], [SynModuleOrNamespace ([SyntheticKeyword], false, AnonModule, [Expr @@ -21,4 +21,5 @@ ImplFile (2,0--3,12)), (2,0--3,12))], PreXmlDocEmpty, [], None, (2,0--3,12), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/UseKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/UseKeyword.fs.bsl index 4571189344f..913dfadb878 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/UseKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/UseKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/UseKeyword.fs", false, - QualifiedNameOfFile UseKeyword, [], [], + QualifiedNameOfFile UseKeyword, [], [SynModuleOrNamespace ([UseKeyword], false, AnonModule, [Expr @@ -27,4 +27,5 @@ ImplFile InKeyword = None }), (2,0--4,6)), (2,0--4,6))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/UseRecKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/UseRecKeyword.fs.bsl index ac1d1ce9819..eac3e1cf38c 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/UseRecKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/UseRecKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/LeadingKeyword/UseRecKeyword.fs", false, - QualifiedNameOfFile UseRecKeyword, [], [], + QualifiedNameOfFile UseRecKeyword, [], [SynModuleOrNamespace ([UseRecKeyword], false, AnonModule, [Expr @@ -27,4 +27,5 @@ ImplFile InKeyword = None }), (2,0--4,6)), (2,0--4,6))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/ValKeyword.fsi.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/ValKeyword.fsi.bsl index 1c940b8d6fd..111c2ac7565 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/ValKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/ValKeyword.fsi.bsl @@ -1,7 +1,6 @@ SigFile (ParsedSigFileInput ("/root/LeadingKeyword/ValKeyword.fsi", QualifiedNameOfFile ValKeyword, [], - [], [SynModuleOrNamespaceSig ([X], false, DeclaredNamespace, [Types @@ -26,4 +25,5 @@ SigFile WithKeyword = None })], (4,0--5,15))], PreXmlDocEmpty, [], None, (2,0--5,15), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MatchClause/Missing expr 01.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/Missing expr 01.fs.bsl index 6f92c909aa0..53fc9e8d6ed 100644 --- a/tests/service/data/SyntaxTree/MatchClause/Missing expr 01.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/Missing expr 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/Missing expr 01.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -12,6 +12,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/MatchClause/Missing expr 02.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/Missing expr 02.fs.bsl index a38e67668d2..ad4bd5152d4 100644 --- a/tests/service/data/SyntaxTree/MatchClause/Missing expr 02.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/Missing expr 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/Missing expr 02.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/MatchClause/Missing expr 03.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/Missing expr 03.fs.bsl index 36e8ecc9e9b..cb1b6725877 100644 --- a/tests/service/data/SyntaxTree/MatchClause/Missing expr 03.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/Missing expr 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/Missing expr 03.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -22,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Unexpected symbol '|' in pattern matching diff --git a/tests/service/data/SyntaxTree/MatchClause/Missing expr 04.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/Missing expr 04.fs.bsl index eae47c2aa83..0ced217b112 100644 --- a/tests/service/data/SyntaxTree/MatchClause/Missing expr 04.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/Missing expr 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/Missing expr 04.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -22,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Unexpected symbol '|' in pattern matching diff --git a/tests/service/data/SyntaxTree/MatchClause/Missing expr 05.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/Missing expr 05.fs.bsl index 787b09b31dc..c998f9ea0ff 100644 --- a/tests/service/data/SyntaxTree/MatchClause/Missing expr 05.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/Missing expr 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/Missing expr 05.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -29,6 +29,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/MatchClause/Missing pat 01.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/Missing pat 01.fs.bsl index 3e5974d65be..c93e51541e9 100644 --- a/tests/service/data/SyntaxTree/MatchClause/Missing pat 01.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/Missing pat 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/Missing pat 01.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -23,6 +23,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/MatchClause/Missing pat 02.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/Missing pat 02.fs.bsl index 0812581e1ff..33d920952dd 100644 --- a/tests/service/data/SyntaxTree/MatchClause/Missing pat 02.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/Missing pat 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/Missing pat 02.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/MatchClause/Missing pat 03.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/Missing pat 03.fs.bsl index 8fb3f4b8142..871797f6a49 100644 --- a/tests/service/data/SyntaxTree/MatchClause/Missing pat 03.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/Missing pat 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/Missing pat 03.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,14), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/MatchClause/Missing pat 04.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/Missing pat 04.fs.bsl index 8fde4f353ee..886feeff984 100644 --- a/tests/service/data/SyntaxTree/MatchClause/Missing pat 04.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/Missing pat 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/Missing pat 04.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -24,6 +24,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,14), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/MatchClause/Missing pat 05.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/Missing pat 05.fs.bsl index e9693065f21..ea498351936 100644 --- a/tests/service/data/SyntaxTree/MatchClause/Missing pat 05.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/Missing pat 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/Missing pat 05.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -13,6 +13,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/MatchClause/NoRangeOfBarInASingleSynMatchClauseInSynExprTryWith.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/NoRangeOfBarInASingleSynMatchClauseInSynExprTryWith.fs.bsl index 79e765d0135..4fb707a309e 100644 --- a/tests/service/data/SyntaxTree/MatchClause/NoRangeOfBarInASingleSynMatchClauseInSynExprTryWith.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/NoRangeOfBarInASingleSynMatchClauseInSynExprTryWith.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/MatchClause/NoRangeOfBarInASingleSynMatchClauseInSynExprTryWith.fs", false, QualifiedNameOfFile NoRangeOfBarInASingleSynMatchClauseInSynExprTryWith, - [], [], + [], [SynModuleOrNamespace ([NoRangeOfBarInASingleSynMatchClauseInSynExprTryWith], false, AnonModule, @@ -23,4 +23,5 @@ ImplFile WithToEndRange = (4,0--6,6) }), (2,0--6,6))], PreXmlDocEmpty, [], None, (2,0--7,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (5,4--5,19)] }, set [])) diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfArrowInSynMatchClause.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfArrowInSynMatchClause.fs.bsl index 850422e1df8..23af64bcfe3 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfArrowInSynMatchClause.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfArrowInSynMatchClause.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/RangeOfArrowInSynMatchClause.fs", false, - QualifiedNameOfFile RangeOfArrowInSynMatchClause, [], [], + QualifiedNameOfFile RangeOfArrowInSynMatchClause, [], [SynModuleOrNamespace ([RangeOfArrowInSynMatchClause], false, AnonModule, [Expr @@ -19,4 +19,5 @@ ImplFile WithKeyword = (2,10--2,14) }), (2,0--3,15))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfArrowInSynMatchClauseWithWhenClause.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfArrowInSynMatchClauseWithWhenClause.fs.bsl index 3ec91a6aab5..37445cfd5a1 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfArrowInSynMatchClauseWithWhenClause.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfArrowInSynMatchClauseWithWhenClause.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/RangeOfArrowInSynMatchClauseWithWhenClause.fs", false, - QualifiedNameOfFile RangeOfArrowInSynMatchClauseWithWhenClause, [], [], + QualifiedNameOfFile RangeOfArrowInSynMatchClauseWithWhenClause, [], [SynModuleOrNamespace ([RangeOfArrowInSynMatchClauseWithWhenClause], false, AnonModule, [Expr @@ -25,4 +25,5 @@ ImplFile WithKeyword = (2,10--2,14) }), (2,0--3,36))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInAMultipleSynMatchClausesInSynExprTryWith.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInAMultipleSynMatchClausesInSynExprTryWith.fs.bsl index 00fd4e2de7b..5a1bf39c36b 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInAMultipleSynMatchClausesInSynExprTryWith.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInAMultipleSynMatchClausesInSynExprTryWith.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/MatchClause/RangeOfBarInAMultipleSynMatchClausesInSynExprTryWith.fs", false, QualifiedNameOfFile RangeOfBarInAMultipleSynMatchClausesInSynExprTryWith, - [], [], + [], [SynModuleOrNamespace ([RangeOfBarInAMultipleSynMatchClausesInSynExprTryWith], false, AnonModule, @@ -33,4 +33,5 @@ ImplFile WithToEndRange = (4,0--8,10) }), (2,0--8,10))], PreXmlDocEmpty, [], None, (2,0--9,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (6,4--6,19)] }, set [])) diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInASingleSynMatchClauseInSynExprMatch.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInASingleSynMatchClauseInSynExprMatch.fs.bsl index 744fc813f3c..07c297570a9 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInASingleSynMatchClauseInSynExprMatch.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInASingleSynMatchClauseInSynExprMatch.fs.bsl @@ -2,7 +2,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/RangeOfBarInASingleSynMatchClauseInSynExprMatch.fs", false, QualifiedNameOfFile RangeOfBarInASingleSynMatchClauseInSynExprMatch, - [], [], + [], [SynModuleOrNamespace ([RangeOfBarInASingleSynMatchClauseInSynExprMatch], false, AnonModule, [Expr @@ -26,4 +26,5 @@ ImplFile WithKeyword = (2,10--2,14) }), (2,0--3,36))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInASingleSynMatchClauseInSynExprTryWith.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInASingleSynMatchClauseInSynExprTryWith.fs.bsl index 8306431f657..8df2cbe5f9f 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInASingleSynMatchClauseInSynExprTryWith.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInASingleSynMatchClauseInSynExprTryWith.fs.bsl @@ -3,7 +3,6 @@ ImplFile ("/root/MatchClause/RangeOfBarInASingleSynMatchClauseInSynExprTryWith.fs", false, QualifiedNameOfFile RangeOfBarInASingleSynMatchClauseInSynExprTryWith, [], - [], [SynModuleOrNamespace ([RangeOfBarInASingleSynMatchClauseInSynExprTryWith], false, AnonModule, [Expr @@ -23,4 +22,5 @@ ImplFile WithToEndRange = (4,0--5,11) }), (2,0--5,11))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInMultipleSynMatchClausesInSynExprMatch.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInMultipleSynMatchClausesInSynExprMatch.fs.bsl index 02122fba61d..dbe210b96d4 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInMultipleSynMatchClausesInSynExprMatch.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfBarInMultipleSynMatchClausesInSynExprMatch.fs.bsl @@ -3,7 +3,6 @@ ImplFile ("/root/MatchClause/RangeOfBarInMultipleSynMatchClausesInSynExprMatch.fs", false, QualifiedNameOfFile RangeOfBarInMultipleSynMatchClausesInSynExprMatch, [], - [], [SynModuleOrNamespace ([RangeOfBarInMultipleSynMatchClausesInSynExprMatch], false, AnonModule, [Expr @@ -38,4 +37,5 @@ ImplFile WithKeyword = (2,10--2,14) }), (2,0--4,20))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfMultipleSynMatchClause.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfMultipleSynMatchClause.fs.bsl index f4b3b9f7a39..25fb2192c73 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfMultipleSynMatchClause.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfMultipleSynMatchClause.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/RangeOfMultipleSynMatchClause.fs", false, - QualifiedNameOfFile RangeOfMultipleSynMatchClause, [], [], + QualifiedNameOfFile RangeOfMultipleSynMatchClause, [], [SynModuleOrNamespace ([RangeOfMultipleSynMatchClause], false, AnonModule, [Expr @@ -54,4 +54,5 @@ ImplFile WithToEndRange = (5,0--10,8) }), (2,0--10,8))], PreXmlDocEmpty, [], None, (2,0--11,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClause.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClause.fs.bsl index 324463e7b2e..547027c53ab 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClause.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClause.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/RangeOfSingleSynMatchClause.fs", false, - QualifiedNameOfFile RangeOfSingleSynMatchClause, [], [], + QualifiedNameOfFile RangeOfSingleSynMatchClause, [], [SynModuleOrNamespace ([RangeOfSingleSynMatchClause], false, AnonModule, [Expr @@ -48,4 +48,5 @@ ImplFile WithToEndRange = (5,0--7,8) }), (2,0--7,8))], PreXmlDocEmpty, [], None, (2,0--8,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClauseFollowedByBar.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClauseFollowedByBar.fs.bsl index 132cbd01cc0..11f88dadedb 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClauseFollowedByBar.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClauseFollowedByBar.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MatchClause/RangeOfSingleSynMatchClauseFollowedByBar.fs", false, - QualifiedNameOfFile RangeOfSingleSynMatchClauseFollowedByBar, [], [], + QualifiedNameOfFile RangeOfSingleSynMatchClauseFollowedByBar, [], [SynModuleOrNamespace ([RangeOfSingleSynMatchClauseFollowedByBar], false, AnonModule, [Expr @@ -39,6 +39,7 @@ ImplFile (2,0--8,1))], PreXmlDocEmpty, [], None, (2,0--9,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (9,0)-(9,0) parse error Incomplete structured construct at or before this point in pattern matching diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 01.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 01.fs.bsl index a9bc46a831a..8ffb582cf4d 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Measure/Constant - 01.fs", false, QualifiedNameOfFile M, [], [], + ("/root/Measure/Constant - 01.fs", false, QualifiedNameOfFile M, [], [SynModuleOrNamespace ([M], false, NamedModule, [Expr @@ -12,4 +12,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 02.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 02.fs.bsl index 9cc97f47504..2eeda517c00 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Measure/Constant - 02.fs", false, QualifiedNameOfFile M, [], [], + ("/root/Measure/Constant - 02.fs", false, QualifiedNameOfFile M, [], [SynModuleOrNamespace ([M], false, NamedModule, [Expr @@ -13,4 +13,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 03.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 03.fs.bsl index a28e62906de..2739d05837a 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Measure/Constant - 03.fs", false, QualifiedNameOfFile M, [], [], + ("/root/Measure/Constant - 03.fs", false, QualifiedNameOfFile M, [], [SynModuleOrNamespace ([M], false, NamedModule, [Expr @@ -12,4 +12,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 04.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 04.fs.bsl index bf2ab0c3bd3..612593fef4e 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Measure/Constant - 04.fs", false, QualifiedNameOfFile M, [], [], + ("/root/Measure/Constant - 04.fs", false, QualifiedNameOfFile M, [], [SynModuleOrNamespace ([M], false, NamedModule, [Expr @@ -15,4 +15,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 05.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 05.fs.bsl index b18f6f4a22f..e95c55e8bb3 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Measure/Constant - 05.fs", false, QualifiedNameOfFile M, [], [], + ("/root/Measure/Constant - 05.fs", false, QualifiedNameOfFile M, [], [SynModuleOrNamespace ([M], false, NamedModule, [Expr @@ -16,4 +16,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 06.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 06.fs.bsl index 7d5bac5d2e4..031570ff774 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Measure/Constant - 06.fs", false, QualifiedNameOfFile M, [], [], + ("/root/Measure/Constant - 06.fs", false, QualifiedNameOfFile M, [], [SynModuleOrNamespace ([M], false, NamedModule, [Expr @@ -17,4 +17,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 07.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 07.fs.bsl index db9e83c0fb8..6b7f9dfad3b 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Measure/Constant - 07.fs", false, QualifiedNameOfFile M, [], [], + ("/root/Measure/Constant - 07.fs", false, QualifiedNameOfFile M, [], [SynModuleOrNamespace ([M], false, NamedModule, [Expr @@ -20,4 +20,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,33), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 08.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 08.fs.bsl index b4a8f0b48c2..cbde40a93f2 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Measure/Constant - 08.fs", false, QualifiedNameOfFile M, [], [], + ("/root/Measure/Constant - 08.fs", false, QualifiedNameOfFile M, [], [SynModuleOrNamespace ([M], false, NamedModule, [Expr @@ -21,4 +21,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,24), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 09.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 09.fs.bsl index 2eeee44a379..c45821bf58e 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 09.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Measure/Constant - 09.fs", false, QualifiedNameOfFile M, [], [], + ("/root/Measure/Constant - 09.fs", false, QualifiedNameOfFile M, [], [SynModuleOrNamespace ([M], false, NamedModule, [Expr @@ -21,4 +21,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 10.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 10.fs.bsl index f6e6b3d7fee..6604a2712ac 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 10.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Measure/Constant - 10.fs", false, QualifiedNameOfFile M, [], [], + ("/root/Measure/Constant - 10.fs", false, QualifiedNameOfFile M, [], [SynModuleOrNamespace ([M], false, NamedModule, [Expr @@ -17,4 +17,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/MeasureContainsTheRangeOfTheConstant.fs.bsl b/tests/service/data/SyntaxTree/Measure/MeasureContainsTheRangeOfTheConstant.fs.bsl index b0150fbdc0b..541c856bb70 100644 --- a/tests/service/data/SyntaxTree/Measure/MeasureContainsTheRangeOfTheConstant.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/MeasureContainsTheRangeOfTheConstant.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Measure/MeasureContainsTheRangeOfTheConstant.fs", false, - QualifiedNameOfFile MeasureContainsTheRangeOfTheConstant, [], [], + QualifiedNameOfFile MeasureContainsTheRangeOfTheConstant, [], [SynModuleOrNamespace ([MeasureContainsTheRangeOfTheConstant], false, AnonModule, [Let @@ -42,4 +42,5 @@ ImplFile (3,0--3,17))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/SynMeasureParenHasCorrectRange.fs.bsl b/tests/service/data/SyntaxTree/Measure/SynMeasureParenHasCorrectRange.fs.bsl index 84f544b9146..dc6bfe9c588 100644 --- a/tests/service/data/SyntaxTree/Measure/SynMeasureParenHasCorrectRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/SynMeasureParenHasCorrectRange.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Measure/SynMeasureParenHasCorrectRange.fs", false, - QualifiedNameOfFile SynMeasureParenHasCorrectRange, [], [], + QualifiedNameOfFile SynMeasureParenHasCorrectRange, [], [SynModuleOrNamespace ([SynMeasureParenHasCorrectRange], false, AnonModule, [Expr @@ -21,4 +21,5 @@ ImplFile GreaterRange = (2,22--2,23) }), (2,0--2,23)), (2,0--2,23))], PreXmlDocEmpty, [], None, (2,0--2,23), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithLeadingSlash.fs.bsl b/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithLeadingSlash.fs.bsl index 65535c03d20..33675b1a3a1 100644 --- a/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithLeadingSlash.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithLeadingSlash.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Measure/SynTypeTupleInMeasureTypeWithLeadingSlash.fs", false, - QualifiedNameOfFile SynTypeTupleInMeasureTypeWithLeadingSlash, [], [], + QualifiedNameOfFile SynTypeTupleInMeasureTypeWithLeadingSlash, [], [SynModuleOrNamespace ([SynTypeTupleInMeasureTypeWithLeadingSlash], false, AnonModule, [Types @@ -30,4 +30,5 @@ ImplFile WithKeyword = None })], (2,0--2,29))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithNoSlashes.fs.bsl b/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithNoSlashes.fs.bsl index dca088b13db..fc29ce7d7e1 100644 --- a/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithNoSlashes.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithNoSlashes.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Measure/SynTypeTupleInMeasureTypeWithNoSlashes.fs", false, - QualifiedNameOfFile SynTypeTupleInMeasureTypeWithNoSlashes, [], [], + QualifiedNameOfFile SynTypeTupleInMeasureTypeWithNoSlashes, [], [SynModuleOrNamespace ([SynTypeTupleInMeasureTypeWithNoSlashes], false, AnonModule, [Types @@ -30,4 +30,5 @@ ImplFile WithKeyword = None })], (2,0--2,26))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithStartAndSlash.fs.bsl b/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithStartAndSlash.fs.bsl index f47273a687c..6e423837385 100644 --- a/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithStartAndSlash.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/SynTypeTupleInMeasureTypeWithStartAndSlash.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Measure/SynTypeTupleInMeasureTypeWithStartAndSlash.fs", false, - QualifiedNameOfFile SynTypeTupleInMeasureTypeWithStartAndSlash, [], [], + QualifiedNameOfFile SynTypeTupleInMeasureTypeWithStartAndSlash, [], [SynModuleOrNamespace ([SynTypeTupleInMeasureTypeWithStartAndSlash], false, AnonModule, [Types @@ -32,4 +32,5 @@ ImplFile WithKeyword = None })], (2,0--2,30))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Abstract - Property 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Abstract - Property 01.fs.bsl index 9ec3b5452d7..20e86102317 100644 --- a/tests/service/data/SyntaxTree/Member/Abstract - Property 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Abstract - Property 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Abstract - Property 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -38,4 +38,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,19), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Abstract - Property 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Abstract - Property 02.fs.bsl index 95ced08879b..c78f3040f42 100644 --- a/tests/service/data/SyntaxTree/Member/Abstract - Property 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Abstract - Property 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Abstract - Property 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,4 +40,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,33), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Abstract - Property 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Abstract - Property 03.fs.bsl index d9393dc8da0..cff1499dca4 100644 --- a/tests/service/data/SyntaxTree/Member/Abstract - Property 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Abstract - Property 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Abstract - Property 03.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,6 +40,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Abstract - Property 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Abstract - Property 04.fs.bsl index f315032ac6c..a208af54581 100644 --- a/tests/service/data/SyntaxTree/Member/Abstract - Property 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Abstract - Property 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Abstract - Property 04.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -39,6 +39,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Abstract - Property 05.fs.bsl b/tests/service/data/SyntaxTree/Member/Abstract - Property 05.fs.bsl index e8092cae4f6..6ad8da57115 100644 --- a/tests/service/data/SyntaxTree/Member/Abstract - Property 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Abstract - Property 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Abstract - Property 05.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -59,6 +59,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,4)-(5,12) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 01.fs.bsl index 211a0fed943..7490cf06b8e 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 01.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 01.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,4 +39,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Auto property 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 02.fs.bsl index 31f825ba1af..cd6d84a1903 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 02.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 02.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -43,6 +42,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 03.fs.bsl index fced13abaa4..499e1c4c6ec 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 03.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 03.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -65,6 +64,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,4)-(5,10) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 04.fs.bsl index 19e8d589688..c57b6c5faad 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 04.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 04.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -64,4 +63,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Auto property 05.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 05.fs.bsl index ca97d03b523..6ae271aaa1a 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 05.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 05.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -64,6 +63,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,15)-(5,4) parse error Incomplete structured construct at or before this point in member definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 06.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 06.fs.bsl index 6a60db20a73..4e0c9d821ae 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 06.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 06.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -41,6 +40,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,18)-(4,19) parse error Unexpected symbol '=' in member definition diff --git a/tests/service/data/SyntaxTree/Member/Auto property 07.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 07.fs.bsl index 8e6436d4eb4..920e5a36916 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Auto property 07.fs", false, QualifiedNameOfFile A, [], [], + ("/root/Member/Auto property 07.fs", false, QualifiedNameOfFile A, [], [SynModuleOrNamespace ([A], false, NamedModule, [Types @@ -52,4 +52,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,38), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Auto property 08.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 08.fs.bsl index b4d9c9da2c4..c758fcae4a9 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 08.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 08.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -42,6 +41,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:22). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 09.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 09.fs.bsl index 5599ff4faa3..70796107bed 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 09.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 09.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -65,6 +64,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,4)-(5,10) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:23). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 10.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 10.fs.bsl index 0a94591f95a..ba04b1a3de7 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 10.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 10.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -41,6 +40,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,29), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:22). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 11.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 11.fs.bsl index f6f1fb9e52b..dfd6e2fff03 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 11.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 11.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -41,4 +40,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,29), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Auto property 12.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 12.fs.bsl index da5a5eb7b72..80e694f5424 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 12.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 12.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -41,6 +40,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,21)-(4,25) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 13.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 13.fs.bsl index b28a6d273bb..d6522b75532 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 13.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 13.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Member/Auto property 13.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -64,6 +63,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,21)-(4,25) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Auto property 14.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 14.fs.bsl index d9725daa923..ba44d47b0c0 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 14.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 14.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Auto property 14.fs", false, QualifiedNameOfFile A, [], [], + ("/root/Member/Auto property 14.fs", false, QualifiedNameOfFile A, [], [SynModuleOrNamespace ([A], false, NamedModule, [Types @@ -54,4 +54,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,54), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Auto property 15.fs.bsl b/tests/service/data/SyntaxTree/Member/Auto property 15.fs.bsl index 417da42ef8a..6e0b861b01e 100644 --- a/tests/service/data/SyntaxTree/Member/Auto property 15.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Auto property 15.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Auto property 15.fs", false, QualifiedNameOfFile A, [], [], + ("/root/Member/Auto property 15.fs", false, QualifiedNameOfFile A, [], [SynModuleOrNamespace ([A], false, NamedModule, [Types @@ -55,4 +55,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,63), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Do 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Do 01.fs.bsl index 5f63d7bdc38..ebcf90b0c06 100644 --- a/tests/service/data/SyntaxTree/Member/Do 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Do 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Do 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Do 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,4 +40,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Do 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Do 02.fs.bsl index 1585d6135ee..41cc0daa22e 100644 --- a/tests/service/data/SyntaxTree/Member/Do 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Do 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Do 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Do 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -42,4 +42,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Do 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Do 03.fs.bsl index b255897d0e8..51c20b468ad 100644 --- a/tests/service/data/SyntaxTree/Member/Do 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Do 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Do 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Do 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -43,6 +43,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,4)-(7,6) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (5:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Do 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Do 04.fs.bsl index 637426c98df..6bb13a90212 100644 --- a/tests/service/data/SyntaxTree/Member/Do 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Do 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Do 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Do 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -42,6 +42,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,4)-(7,6) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (5:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Field 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 01.fs.bsl index add8ac4adbe..517082e1e06 100644 --- a/tests/service/data/SyntaxTree/Member/Field 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -26,4 +26,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Field 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 02.fs.bsl index 33eba0a9f87..874473c1059 100644 --- a/tests/service/data/SyntaxTree/Member/Field 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -35,6 +35,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,12)-(5,4) parse error Incomplete structured construct at or before this point in type definition diff --git a/tests/service/data/SyntaxTree/Member/Field 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 03.fs.bsl index 4308cbcfebb..b2663b51b18 100644 --- a/tests/service/data/SyntaxTree/Member/Field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -35,6 +35,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,11)-(5,4) parse error Incomplete structured construct at or before this point in type definition. Expected ':' or other token. diff --git a/tests/service/data/SyntaxTree/Member/Field 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 04.fs.bsl index e481768ccb4..878fc8647bd 100644 --- a/tests/service/data/SyntaxTree/Member/Field 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -34,6 +34,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,8)-(5,4) parse error Incomplete structured construct at or before this point in type definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Member/Field 05.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 05.fs.bsl index 46cf2e29c7f..80f5a737513 100644 --- a/tests/service/data/SyntaxTree/Member/Field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +27,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in type definition diff --git a/tests/service/data/SyntaxTree/Member/Field 06.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 06.fs.bsl index 723a8c44f25..3c29ce9e5ab 100644 --- a/tests/service/data/SyntaxTree/Member/Field 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in type definition. Expected ':' or other token. diff --git a/tests/service/data/SyntaxTree/Member/Field 07.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 07.fs.bsl index e62126034db..9d652142213 100644 --- a/tests/service/data/SyntaxTree/Member/Field 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in type definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Member/Field 08.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 08.fs.bsl index c74f09be72c..77a967f379a 100644 --- a/tests/service/data/SyntaxTree/Member/Field 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -26,6 +26,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,7) parse error Unexpected keyword 'end' in member definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Member/Field 09.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 09.fs.bsl index 8b4d8d1fa48..4f9de01f3a6 100644 --- a/tests/service/data/SyntaxTree/Member/Field 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 09.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 09.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 09.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +27,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in type definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Member/Field 10.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 10.fs.bsl index 77016903ad5..fa1e21bf3e1 100644 --- a/tests/service/data/SyntaxTree/Member/Field 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 10.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 10.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 10.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +27,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in type definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Member/Field 11.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 11.fs.bsl index 4f3cfe4b8b4..e62fa49126b 100644 --- a/tests/service/data/SyntaxTree/Member/Field 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 11.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 11.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 11.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +27,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in type definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Member/Field 12.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 12.fs.bsl index d29045ba0e7..54f58854119 100644 --- a/tests/service/data/SyntaxTree/Member/Field 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 12.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 12.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 12.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +27,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in type definition. Expected ':' or other token. diff --git a/tests/service/data/SyntaxTree/Member/Field 13.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 13.fs.bsl index 3b42126b6db..86fcb6cd48d 100644 --- a/tests/service/data/SyntaxTree/Member/Field 13.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 13.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 13.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 13.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +27,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in type definition diff --git a/tests/service/data/SyntaxTree/Member/Field 14.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 14.fs.bsl index b9ae59996cf..4873d37e961 100644 --- a/tests/service/data/SyntaxTree/Member/Field 14.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 14.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 14.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 14.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -28,4 +28,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Field 15.fs.bsl b/tests/service/data/SyntaxTree/Member/Field 15.fs.bsl index 472d5e0c2f9..62e1ee5046f 100644 --- a/tests/service/data/SyntaxTree/Member/Field 15.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Field 15.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Field 15.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Field 15.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -34,4 +34,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/GetSetMember 01.fs.bsl b/tests/service/data/SyntaxTree/Member/GetSetMember 01.fs.bsl index 55fb27c87bd..9e5a4d2c4b8 100644 --- a/tests/service/data/SyntaxTree/Member/GetSetMember 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/GetSetMember 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/GetSetMember 01.fs", false, QualifiedNameOfFile Foo, [], [], + ("/root/Member/GetSetMember 01.fs", false, QualifiedNameOfFile Foo, [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Types @@ -203,6 +203,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,92), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,57)-(5,87) parse error When the visibility for a property is specified, setting the visibility of the set or get method is not allowed. diff --git a/tests/service/data/SyntaxTree/Member/GetSetMemberWithInlineKeyword.fs.bsl b/tests/service/data/SyntaxTree/Member/GetSetMemberWithInlineKeyword.fs.bsl index 3768075ef94..f09cb92e147 100644 --- a/tests/service/data/SyntaxTree/Member/GetSetMemberWithInlineKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/GetSetMemberWithInlineKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/GetSetMemberWithInlineKeyword.fs", false, - QualifiedNameOfFile GetSetMemberWithInlineKeyword, [], [], + QualifiedNameOfFile GetSetMemberWithInlineKeyword, [], [SynModuleOrNamespace ([GetSetMemberWithInlineKeyword], false, AnonModule, [Types @@ -83,4 +83,5 @@ ImplFile WithKeyword = None })], (2,0--5,29))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Missing type 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Missing type 01.fs.bsl index d603121ea71..72f6fee4eb6 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Missing type 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Missing type 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Missing type 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -39,6 +39,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,9)-(3,10) parse error Unexpected symbol ')' in pattern diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Missing type 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Missing type 02.fs.bsl index d963c4115e8..567a68b336c 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Missing type 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Missing type 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Missing type 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -48,6 +48,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,25), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,9)-(3,10) parse error Unexpected symbol ',' in pattern diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Pat - Tuple 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Pat - Tuple 01.fs.bsl index 2bc4b5f488f..26a281bd317 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Pat - Tuple 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Pat - Tuple 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Pat - Tuple 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -73,4 +73,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,40), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Pat - Tuple 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Pat - Tuple 02.fs.bsl index 35502745762..e1f3b5fa319 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Pat - Tuple 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Pat - Tuple 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Pat - Tuple 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -47,6 +47,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,26), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,10)-(3,11) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 01.fs.bsl index 424a3619305..7a2f7aff28c 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Type - Fun 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -45,4 +45,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,29), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 02.fs.bsl index 0146ad5a153..2f79bcc5830 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Type - Fun 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -51,4 +51,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,34), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 03.fs.bsl index 61b3b7f3776..5d8f26d1d61 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Type - Fun 03.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -51,4 +51,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,34), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 04.fs.bsl index ca30a8c2327..ab62149eaf0 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Type - Fun 04.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -45,6 +45,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,15)-(3,16) parse error Unexpected symbol ')' in type diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 05.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 05.fs.bsl index bd89bbaf94e..d96ff30cc94 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Type - Fun 05.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -51,6 +51,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,32), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,15)-(3,17) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 06.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 06.fs.bsl index ac58a094acb..fcf88aa59ce 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Fun 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Type - Fun 06.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -65,6 +65,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,35), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,22)-(3,23) parse error Unexpected symbol ')' in type diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 01.fs.bsl index 473bd768b3c..6e2a0109f5c 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Type - Tuple 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -52,4 +52,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 02.fs.bsl index 57b5279161a..b7193884014 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Type - Tuple 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -58,4 +58,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,32), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 03.fs.bsl index 92b69f0c2b2..8d6e7c19f5b 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Type - Tuple 03.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -50,6 +50,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,27), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,14)-(3,15) parse error Unexpected symbol ')' in type diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 04.fs.bsl index 5ff10cae81b..810cb8303f7 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Type - Tuple 04.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -56,6 +56,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,31), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,18)-(3,19) parse error Unexpected symbol ')' in type diff --git a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 05.fs.bsl b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 05.fs.bsl index a39da9cc29e..11c7411ee8b 100644 --- a/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Implicit ctor - Type - Tuple 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Implicit ctor - Type - Tuple 05.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -56,6 +56,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,31), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,14)-(3,15) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/Member/ImplicitCtorWithAsKeyword.fs.bsl b/tests/service/data/SyntaxTree/Member/ImplicitCtorWithAsKeyword.fs.bsl index 61f182611f8..06e7e3f9fdc 100644 --- a/tests/service/data/SyntaxTree/Member/ImplicitCtorWithAsKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/ImplicitCtorWithAsKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/ImplicitCtorWithAsKeyword.fs", false, - QualifiedNameOfFile ImplicitCtorWithAsKeyword, [], [], + QualifiedNameOfFile ImplicitCtorWithAsKeyword, [], [SynModuleOrNamespace ([ImplicitCtorWithAsKeyword], false, AnonModule, [Types @@ -80,6 +80,7 @@ ImplFile PreXmlDocEmpty, [], None, (2,0--9,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (3,0--3,23); LineComment (5,0--5,7); LineComment (6,0--6,8); LineComment (7,0--7,9)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Inherit 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Inherit 01.fs.bsl index 817c15422b4..16618257bdd 100644 --- a/tests/service/data/SyntaxTree/Member/Inherit 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Inherit 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Inherit 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Inherit 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -21,4 +21,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Inherit 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Inherit 02.fs.bsl index 3a9482667e2..80da2bd45fd 100644 --- a/tests/service/data/SyntaxTree/Member/Inherit 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Inherit 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Inherit 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Inherit 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -21,4 +21,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Inherit 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Inherit 03.fs.bsl index 76aeb2e2e47..7b476b67650 100644 --- a/tests/service/data/SyntaxTree/Member/Inherit 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Inherit 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Inherit 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Inherit 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,11) parse error Type name cannot be empty. diff --git a/tests/service/data/SyntaxTree/Member/Inherit 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Inherit 04.fs.bsl index 2b1741c3714..e502b24ef0c 100644 --- a/tests/service/data/SyntaxTree/Member/Inherit 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Inherit 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Inherit 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Inherit 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -21,6 +21,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,11) parse error Type name cannot be empty. diff --git a/tests/service/data/SyntaxTree/Member/Inherit 05.fs.bsl b/tests/service/data/SyntaxTree/Member/Inherit 05.fs.bsl index f2bdb9713e2..d006bbe9099 100644 --- a/tests/service/data/SyntaxTree/Member/Inherit 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Inherit 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Inherit 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Inherit 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -44,6 +44,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,12)-(6,4) parse error Incomplete structured construct at or before this point in type definition diff --git a/tests/service/data/SyntaxTree/Member/Inherit 06.fsi.bsl b/tests/service/data/SyntaxTree/Member/Inherit 06.fsi.bsl index 3ac7c9adc29..04d00187693 100644 --- a/tests/service/data/SyntaxTree/Member/Inherit 06.fsi.bsl +++ b/tests/service/data/SyntaxTree/Member/Inherit 06.fsi.bsl @@ -1,6 +1,6 @@ SigFile (ParsedSigFileInput - ("/root/Member/Inherit 06.fsi", QualifiedNameOfFile Module, [], [], + ("/root/Member/Inherit 06.fsi", QualifiedNameOfFile Module, [], [SynModuleOrNamespaceSig ([Module], false, NamedModule, [Types @@ -19,6 +19,7 @@ SigFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,11), { LeadingKeyword = Module (1,0--1,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Incomplete structured construct at or before this point in member signature diff --git a/tests/service/data/SyntaxTree/Member/Inherit 07.fsi.bsl b/tests/service/data/SyntaxTree/Member/Inherit 07.fsi.bsl index 7dc4657766f..2c6af3b87ee 100644 --- a/tests/service/data/SyntaxTree/Member/Inherit 07.fsi.bsl +++ b/tests/service/data/SyntaxTree/Member/Inherit 07.fsi.bsl @@ -1,6 +1,6 @@ SigFile (ParsedSigFileInput - ("/root/Member/Inherit 07.fsi", QualifiedNameOfFile Module, [], [], + ("/root/Member/Inherit 07.fsi", QualifiedNameOfFile Module, [], [SynModuleOrNamespaceSig ([Module], false, NamedModule, [Types @@ -38,6 +38,7 @@ SigFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,17), { LeadingKeyword = Module (1,0--1,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,12)-(6,4) parse error Incomplete structured construct at or before this point in member signature diff --git a/tests/service/data/SyntaxTree/Member/Inherit 08.fs.bsl b/tests/service/data/SyntaxTree/Member/Inherit 08.fs.bsl index 1b0e4712cb5..d75196d3f26 100644 --- a/tests/service/data/SyntaxTree/Member/Inherit 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Inherit 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Inherit 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Inherit 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -44,6 +44,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,12)-(4,14) parse error Unexpected keyword 'as' in type definition diff --git a/tests/service/data/SyntaxTree/Member/Interface 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Interface 01.fs.bsl index 332508f43f8..c99c2599dfd 100644 --- a/tests/service/data/SyntaxTree/Member/Interface 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Interface 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Interface 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Interface 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -71,4 +71,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Interface 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Interface 02.fs.bsl index 2d699762c27..7d67643e0fa 100644 --- a/tests/service/data/SyntaxTree/Member/Interface 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Interface 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Interface 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Interface 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -44,6 +44,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,21) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Interface 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Interface 03.fs.bsl index 8f563d2c61a..0f0731b660c 100644 --- a/tests/service/data/SyntaxTree/Member/Interface 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Interface 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Interface 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Interface 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -20,4 +20,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,20), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Interface 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Interface 04.fs.bsl index 20db259a02e..af0e0006af0 100644 --- a/tests/service/data/SyntaxTree/Member/Interface 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Interface 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Interface 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Interface 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -33,4 +33,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Interface 05.fs.bsl b/tests/service/data/SyntaxTree/Member/Interface 05.fs.bsl index 1394c744330..d284b54e20c 100644 --- a/tests/service/data/SyntaxTree/Member/Interface 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Interface 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Interface 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Interface 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -32,4 +32,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Interface 06.fs.bsl b/tests/service/data/SyntaxTree/Member/Interface 06.fs.bsl index b92b4abc202..b841c289ab7 100644 --- a/tests/service/data/SyntaxTree/Member/Interface 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Interface 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Interface 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Interface 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -34,6 +34,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,14), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,14) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Interface 07.fs.bsl b/tests/service/data/SyntaxTree/Member/Interface 07.fs.bsl index 66c618d8e44..03171bf375d 100644 --- a/tests/service/data/SyntaxTree/Member/Interface 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Interface 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Interface 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Interface 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -44,4 +44,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Interface 08.fs.bsl b/tests/service/data/SyntaxTree/Member/Interface 08.fs.bsl index 301dc4c9570..ce5ae85345f 100644 --- a/tests/service/data/SyntaxTree/Member/Interface 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Interface 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Interface 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Interface 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -44,6 +44,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,14)-(6,4) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Member/Interface 09.fs.bsl b/tests/service/data/SyntaxTree/Member/Interface 09.fs.bsl index 9260f21ff5b..cbea58a540b 100644 --- a/tests/service/data/SyntaxTree/Member/Interface 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Interface 09.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Interface 09.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Interface 09.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -34,6 +34,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,4) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Member/Interface 10.fs.bsl b/tests/service/data/SyntaxTree/Member/Interface 10.fs.bsl index 9ddc6fb80bb..76edb4cdbf1 100644 --- a/tests/service/data/SyntaxTree/Member/Interface 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Interface 10.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Interface 10.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Interface 10.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -34,6 +34,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,4) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Member/Let 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Let 01.fs.bsl index c4071e92b4f..50dca73426c 100644 --- a/tests/service/data/SyntaxTree/Member/Let 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Let 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Let 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Let 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -43,4 +43,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Let 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Let 02.fs.bsl index e8e2862dcc6..fc1ab916f24 100644 --- a/tests/service/data/SyntaxTree/Member/Let 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Let 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Let 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Let 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -43,6 +43,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,4)-(7,6) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (5:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Let 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Let 03.fs.bsl index 01cb91bbe95..d6656bcd492 100644 --- a/tests/service/data/SyntaxTree/Member/Let 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Let 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Let 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Let 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -42,6 +42,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,4)-(7,6) parse error Incomplete structured construct at or before this point in binding. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/Member/Let 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Let 04.fs.bsl index 439bf0d6cb7..41a0f46443e 100644 --- a/tests/service/data/SyntaxTree/Member/Let 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Let 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Let 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Let 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -30,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,4)-(7,6) parse error Incomplete structured construct at or before this point in binding diff --git a/tests/service/data/SyntaxTree/Member/Member - Attributes 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Member - Attributes 01.fs.bsl index 168769ff761..7efcd1a8341 100644 --- a/tests/service/data/SyntaxTree/Member/Member - Attributes 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member - Attributes 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Member - Attributes 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -108,6 +108,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,17)-(6,4) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Member/Member - Param - Missing type 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Member - Param - Missing type 01.fs.bsl index 432229da76f..4cbba8169f3 100644 --- a/tests/service/data/SyntaxTree/Member/Member - Param - Missing type 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member - Param - Missing type 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/Member - Param - Missing type 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -51,6 +51,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,26), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,20)-(4,21) parse error Unexpected symbol ')' in pattern diff --git a/tests/service/data/SyntaxTree/Member/Member 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 01.fs.bsl index e5ce844b09e..e6ca39bf5f5 100644 --- a/tests/service/data/SyntaxTree/Member/Member 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -107,6 +107,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,17)-(6,4) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Member/Member 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 02.fs.bsl index dc24f73a058..af9957edb7b 100644 --- a/tests/service/data/SyntaxTree/Member/Member 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -107,6 +107,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,22)-(6,4) parse error Expecting member body diff --git a/tests/service/data/SyntaxTree/Member/Member 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 03.fs.bsl index cb85a85bfc7..a7baa985888 100644 --- a/tests/service/data/SyntaxTree/Member/Member 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -107,6 +107,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,23)-(6,4) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Member/Member 04.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 04.fs.bsl index c4bfa610f42..5b11990bd32 100644 --- a/tests/service/data/SyntaxTree/Member/Member 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -108,6 +108,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,25)-(6,4) parse error Expecting member body diff --git a/tests/service/data/SyntaxTree/Member/Member 05.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 05.fs.bsl index 7fdadfeebbc..9f480a45c60 100644 --- a/tests/service/data/SyntaxTree/Member/Member 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -109,6 +109,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,6) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (5:11). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Member/Member 06.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 06.fs.bsl index d249dd2cc26..e33344ba3e9 100644 --- a/tests/service/data/SyntaxTree/Member/Member 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -108,4 +108,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Member 07.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 07.fs.bsl index 5e5c51e0f2b..c919ab5a29d 100644 --- a/tests/service/data/SyntaxTree/Member/Member 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -106,6 +106,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,23)-(5,24) parse error Unexpected symbol '=' in member definition diff --git a/tests/service/data/SyntaxTree/Member/Member 08.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 08.fs.bsl index b2e10558c6a..2f1415319fd 100644 --- a/tests/service/data/SyntaxTree/Member/Member 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -74,6 +74,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,63), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Expecting member body diff --git a/tests/service/data/SyntaxTree/Member/Member 09.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 09.fs.bsl index e101bf1b6da..a9104d2dfb0 100644 --- a/tests/service/data/SyntaxTree/Member/Member 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 09.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 09.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 09.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -43,6 +43,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,0) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Member/Member 10.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 10.fs.bsl index e0e6936d612..b30067d371f 100644 --- a/tests/service/data/SyntaxTree/Member/Member 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 10.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 10.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 10.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -43,6 +43,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,0) parse error Expecting member body diff --git a/tests/service/data/SyntaxTree/Member/Member 11.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 11.fs.bsl index a4d4b985c40..eb37ddf77d9 100644 --- a/tests/service/data/SyntaxTree/Member/Member 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 11.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 11.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 11.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -43,6 +43,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,0) parse error Incomplete structured construct at or before this point in member definition. Expected identifier, '(', '(*)' or other token. diff --git a/tests/service/data/SyntaxTree/Member/Member 12.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 12.fs.bsl index 44e361be813..33eac2d6efd 100644 --- a/tests/service/data/SyntaxTree/Member/Member 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 12.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 12.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 12.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,6 +40,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Identifier expected diff --git a/tests/service/data/SyntaxTree/Member/Member 13.fs.bsl b/tests/service/data/SyntaxTree/Member/Member 13.fs.bsl index 129c9f529ce..929250cabbe 100644 --- a/tests/service/data/SyntaxTree/Member/Member 13.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Member 13.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Member 13.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Member 13.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -71,6 +71,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,4) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Member/MemberMispelledToMeme.fs.bsl b/tests/service/data/SyntaxTree/Member/MemberMispelledToMeme.fs.bsl index 13e0c26b915..dcd3bb70c91 100644 --- a/tests/service/data/SyntaxTree/Member/MemberMispelledToMeme.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/MemberMispelledToMeme.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/MemberMispelledToMeme.fs", false, - QualifiedNameOfFile MemberMispelledToMeme, [], [], + QualifiedNameOfFile MemberMispelledToMeme, [], [SynModuleOrNamespace ([MemberMispelledToMeme], false, AnonModule, [Types @@ -57,6 +57,7 @@ ImplFile WithKeyword = None })], (1,0--2,39))], PreXmlDocEmpty, [], None, (1,0--2,39), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (2,3)-(2,9) parse error Incomplete declaration of a static construct. Use 'static let','static do','static member' or 'static val' for declaration. diff --git a/tests/service/data/SyntaxTree/Member/MemberWithInlineKeyword.fs.bsl b/tests/service/data/SyntaxTree/Member/MemberWithInlineKeyword.fs.bsl index 7db3831e689..65401553b8f 100644 --- a/tests/service/data/SyntaxTree/Member/MemberWithInlineKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/MemberWithInlineKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/MemberWithInlineKeyword.fs", false, - QualifiedNameOfFile MemberWithInlineKeyword, [], [], + QualifiedNameOfFile MemberWithInlineKeyword, [], [SynModuleOrNamespace ([MemberWithInlineKeyword], false, AnonModule, [Types @@ -45,4 +45,5 @@ ImplFile WithKeyword = None })], (2,0--3,29))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Read-onlyPropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Member/Read-onlyPropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl index 6692c520246..94e0c06897d 100644 --- a/tests/service/data/SyntaxTree/Member/Read-onlyPropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Read-onlyPropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl @@ -4,7 +4,7 @@ ImplFile false, QualifiedNameOfFile Read-onlyPropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword, - [], [], + [], [SynModuleOrNamespace ([Foo], false, DeclaredNamespace, [Types @@ -64,4 +64,5 @@ ImplFile WithKeyword = None })], (3,0--5,60))], PreXmlDocEmpty, [], None, (1,0--5,60), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (4,4--4,28)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/ReadwritePropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Member/ReadwritePropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl index 8319d790680..110af6cd16c 100644 --- a/tests/service/data/SyntaxTree/Member/ReadwritePropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/ReadwritePropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl @@ -4,7 +4,7 @@ ImplFile false, QualifiedNameOfFile ReadwritePropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword, - [], [], + [], [SynModuleOrNamespace ([ReadwritePropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword], false, AnonModule, @@ -100,4 +100,5 @@ ImplFile WithKeyword = None })], (2,0--6,50))], PreXmlDocEmpty, [], None, (2,0--7,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (3,4--3,29)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/SignatureMemberWithGet.fsi.bsl b/tests/service/data/SyntaxTree/Member/SignatureMemberWithGet.fsi.bsl index a516a7766cf..c257b90f316 100644 --- a/tests/service/data/SyntaxTree/Member/SignatureMemberWithGet.fsi.bsl +++ b/tests/service/data/SyntaxTree/Member/SignatureMemberWithGet.fsi.bsl @@ -1,6 +1,6 @@ SigFile (ParsedSigFileInput - ("/root/Member/SignatureMemberWithGet.fsi", QualifiedNameOfFile Meh, [], [], + ("/root/Member/SignatureMemberWithGet.fsi", QualifiedNameOfFile Meh, [], [SynModuleOrNamespaceSig ([Meh], false, NamedModule, [Types @@ -38,4 +38,5 @@ SigFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--8,35), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (5,4--5,23)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/SignatureMemberWithSet.fsi.bsl b/tests/service/data/SyntaxTree/Member/SignatureMemberWithSet.fsi.bsl index 038b502e256..6be357ee2c4 100644 --- a/tests/service/data/SyntaxTree/Member/SignatureMemberWithSet.fsi.bsl +++ b/tests/service/data/SyntaxTree/Member/SignatureMemberWithSet.fsi.bsl @@ -1,6 +1,6 @@ SigFile (ParsedSigFileInput - ("/root/Member/SignatureMemberWithSet.fsi", QualifiedNameOfFile Meh, [], [], + ("/root/Member/SignatureMemberWithSet.fsi", QualifiedNameOfFile Meh, [], [SynModuleOrNamespaceSig ([Meh], false, NamedModule, [Types @@ -38,4 +38,5 @@ SigFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--8,31), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (5,4--5,23)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/SignatureMemberWithSetget.fsi.bsl b/tests/service/data/SyntaxTree/Member/SignatureMemberWithSetget.fsi.bsl index acb516b9113..c5bf35a6c4e 100644 --- a/tests/service/data/SyntaxTree/Member/SignatureMemberWithSetget.fsi.bsl +++ b/tests/service/data/SyntaxTree/Member/SignatureMemberWithSetget.fsi.bsl @@ -1,7 +1,6 @@ SigFile (ParsedSigFileInput ("/root/Member/SignatureMemberWithSetget.fsi", QualifiedNameOfFile Meh, [], - [], [SynModuleOrNamespaceSig ([Meh], false, NamedModule, [Types @@ -40,4 +39,5 @@ SigFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--8,39), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (5,4--5,23)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Static 01.fs.bsl b/tests/service/data/SyntaxTree/Member/Static 01.fs.bsl index 7c47ccf95ec..4993c476447 100644 --- a/tests/service/data/SyntaxTree/Member/Static 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Static 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Static 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Static 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -50,6 +50,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,11)-(7,4) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Member/Static 02.fs.bsl b/tests/service/data/SyntaxTree/Member/Static 02.fs.bsl index ecf86c4e1f6..d339245331b 100644 --- a/tests/service/data/SyntaxTree/Member/Static 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Static 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Static 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Static 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -106,6 +106,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,17)-(6,4) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Member/Static 03.fs.bsl b/tests/service/data/SyntaxTree/Member/Static 03.fs.bsl index 70d5eb3aba9..68d1466b47a 100644 --- a/tests/service/data/SyntaxTree/Member/Static 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Static 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Member/Static 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Member/Static 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -107,6 +107,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,24)-(6,4) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword.fs.bsl index 4158e55ca3f..4838003cfc0 100644 --- a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Member/SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword.fs", false, QualifiedNameOfFile - SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword, [], [], + SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword, [], [SynModuleOrNamespace ([SynTypeDefnWithAbstractSlotContainsTheRangeOfTheWithKeyword], false, AnonModule, @@ -52,4 +52,5 @@ ImplFile WithKeyword = None })], (2,0--3,42))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign.fs.bsl index 06e0765a03b..3009a787588 100644 --- a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign.fs", false, QualifiedNameOfFile - SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign, [], [], + SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign, [], [SynModuleOrNamespace ([SynTypeDefnWithAutoPropertyContainsTheRangeOfTheEqualsSign], false, AnonModule, @@ -86,4 +86,5 @@ ImplFile WithKeyword = None })], (2,0--5,40))], PreXmlDocEmpty, [], None, (3,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword.fs.bsl index 95b26eac8a3..f437240766a 100644 --- a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Member/SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword.fs", false, QualifiedNameOfFile - SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword, [], [], + SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword, [], [SynModuleOrNamespace ([SynTypeDefnWithAutoPropertyContainsTheRangeOfTheWithKeyword], false, AnonModule, @@ -72,4 +72,5 @@ ImplFile WithKeyword = None })], (2,0--4,39))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithMemberWithGetHasXmlComment.fs.bsl b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithMemberWithGetHasXmlComment.fs.bsl index b09a60eed84..cf045eeca1f 100644 --- a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithMemberWithGetHasXmlComment.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithMemberWithGetHasXmlComment.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/SynTypeDefnWithMemberWithGetHasXmlComment.fs", false, - QualifiedNameOfFile SynTypeDefnWithMemberWithGetHasXmlComment, [], [], + QualifiedNameOfFile SynTypeDefnWithMemberWithGetHasXmlComment, [], [SynModuleOrNamespace ([SynTypeDefnWithMemberWithGetHasXmlComment], false, AnonModule, [Types @@ -52,4 +52,5 @@ ImplFile WithKeyword = None })], (2,0--4,29))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithMemberWithSetget.fs.bsl b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithMemberWithSetget.fs.bsl index e3fe9618a23..97c59244fb9 100644 --- a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithMemberWithSetget.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithMemberWithSetget.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/SynTypeDefnWithMemberWithSetget.fs", false, - QualifiedNameOfFile SynTypeDefnWithMemberWithSetget, [], [], + QualifiedNameOfFile SynTypeDefnWithMemberWithSetget, [], [SynModuleOrNamespace ([SynTypeDefnWithMemberWithSetget], false, AnonModule, [Types @@ -112,4 +112,5 @@ ImplFile WithKeyword = None })], (2,0--3,62))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithStaticMemberWithGetset.fs.bsl b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithStaticMemberWithGetset.fs.bsl index 33c1348b561..7277f5e58c2 100644 --- a/tests/service/data/SyntaxTree/Member/SynTypeDefnWithStaticMemberWithGetset.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/SynTypeDefnWithStaticMemberWithGetset.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Member/SynTypeDefnWithStaticMemberWithGetset.fs", false, - QualifiedNameOfFile SynTypeDefnWithStaticMemberWithGetset, [], [], + QualifiedNameOfFile SynTypeDefnWithStaticMemberWithGetset, [], [SynModuleOrNamespace ([SynTypeDefnWithStaticMemberWithGetset], false, AnonModule, [Types @@ -109,4 +109,5 @@ ImplFile WithKeyword = None })], (2,0--5,54))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Member/Write-onlyPropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Member/Write-onlyPropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl index 79a865c5eed..70bb20dca39 100644 --- a/tests/service/data/SyntaxTree/Member/Write-onlyPropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Member/Write-onlyPropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword.fs.bsl @@ -4,7 +4,7 @@ ImplFile false, QualifiedNameOfFile Write-onlyPropertyInSynMemberDefnMemberContainsTheRangeOfTheWithKeyword, - [], [], + [], [SynModuleOrNamespace ([Foo], false, DeclaredNamespace, [Types @@ -71,4 +71,5 @@ ImplFile WithKeyword = None })], (3,0--5,79))], PreXmlDocEmpty, [], None, (1,0--5,79), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (4,4--4,29)] }, set [])) diff --git a/tests/service/data/SyntaxTree/MemberFlag/SynExprObjMembersHaveCorrectKeywords.fs.bsl b/tests/service/data/SyntaxTree/MemberFlag/SynExprObjMembersHaveCorrectKeywords.fs.bsl index cb73ae7b1dd..c820010e740 100644 --- a/tests/service/data/SyntaxTree/MemberFlag/SynExprObjMembersHaveCorrectKeywords.fs.bsl +++ b/tests/service/data/SyntaxTree/MemberFlag/SynExprObjMembersHaveCorrectKeywords.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MemberFlag/SynExprObjMembersHaveCorrectKeywords.fs", false, - QualifiedNameOfFile SynExprObjMembersHaveCorrectKeywords, [], [], + QualifiedNameOfFile SynExprObjMembersHaveCorrectKeywords, [], [SynModuleOrNamespace ([SynExprObjMembersHaveCorrectKeywords], false, AnonModule, [Let @@ -107,4 +107,5 @@ ImplFile EqualsRange = Some (2,8--2,9) })], (2,0--7,34))], PreXmlDocEmpty, [], None, (2,0--8,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAbstractSlotHasCorrectKeyword.fs.bsl b/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAbstractSlotHasCorrectKeyword.fs.bsl index 23d12756c3e..bbc45fd79ae 100644 --- a/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAbstractSlotHasCorrectKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAbstractSlotHasCorrectKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MemberFlag/SynMemberDefnAbstractSlotHasCorrectKeyword.fs", false, - QualifiedNameOfFile SynMemberDefnAbstractSlotHasCorrectKeyword, [], [], + QualifiedNameOfFile SynMemberDefnAbstractSlotHasCorrectKeyword, [], [SynModuleOrNamespace ([SynMemberDefnAbstractSlotHasCorrectKeyword], false, AnonModule, [Types @@ -58,4 +58,5 @@ ImplFile WithKeyword = None })], (2,0--4,26))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAutoPropertyHasCorrectKeyword.fs.bsl b/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAutoPropertyHasCorrectKeyword.fs.bsl index 76d6b9ac1b5..2f12d930aa0 100644 --- a/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAutoPropertyHasCorrectKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnAutoPropertyHasCorrectKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/MemberFlag/SynMemberDefnAutoPropertyHasCorrectKeyword.fs", false, - QualifiedNameOfFile SynMemberDefnAutoPropertyHasCorrectKeyword, [], [], + QualifiedNameOfFile SynMemberDefnAutoPropertyHasCorrectKeyword, [], [SynModuleOrNamespace ([SynMemberDefnAutoPropertyHasCorrectKeyword], false, AnonModule, [Types @@ -110,4 +110,5 @@ ImplFile WithKeyword = None })], (2,0--6,27))], PreXmlDocEmpty, [], None, (2,0--7,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnMemberSynValDataHasCorrectKeyword.fs.bsl b/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnMemberSynValDataHasCorrectKeyword.fs.bsl index ae8cfbaa083..ddf52181d1c 100644 --- a/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnMemberSynValDataHasCorrectKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/MemberFlag/SynMemberDefnMemberSynValDataHasCorrectKeyword.fs.bsl @@ -2,7 +2,7 @@ ImplFile (ParsedImplFileInput ("/root/MemberFlag/SynMemberDefnMemberSynValDataHasCorrectKeyword.fs", false, QualifiedNameOfFile SynMemberDefnMemberSynValDataHasCorrectKeyword, - [], [], + [], [SynModuleOrNamespace ([SynMemberDefnMemberSynValDataHasCorrectKeyword], false, AnonModule, [Types @@ -127,4 +127,5 @@ ImplFile WithKeyword = None })], (2,0--6,25))], PreXmlDocEmpty, [], None, (2,0--7,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/MemberFlag/SynMemberSigMemberHasCorrectKeywords.fsi.bsl b/tests/service/data/SyntaxTree/MemberFlag/SynMemberSigMemberHasCorrectKeywords.fsi.bsl index 878187410bc..e697a34ef5b 100644 --- a/tests/service/data/SyntaxTree/MemberFlag/SynMemberSigMemberHasCorrectKeywords.fsi.bsl +++ b/tests/service/data/SyntaxTree/MemberFlag/SynMemberSigMemberHasCorrectKeywords.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/MemberFlag/SynMemberSigMemberHasCorrectKeywords.fsi", - QualifiedNameOfFile SynMemberSigMemberHasCorrectKeywords, [], [], + QualifiedNameOfFile SynMemberSigMemberHasCorrectKeywords, [], [SynModuleOrNamespaceSig ([X], false, DeclaredNamespace, [Types @@ -140,4 +140,5 @@ SigFile PreXmlDocEmpty, [], None, (2,0--10,19), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleMember/Do 01.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Do 01.fs.bsl index 0db6971e934..f6827b5cca3 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Do 01.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Do 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Do 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Do 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -11,6 +11,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/ModuleMember/Do 02.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Do 02.fs.bsl index 581e4ff62c0..6838d51523f 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Do 02.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Do 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Do 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Do 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -11,6 +11,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,4) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/ModuleMember/Let 01.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Let 01.fs.bsl index 92101cded07..1623f819216 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Let 01.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Let 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Let 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Let 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleMember/Let 02.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Let 02.fs.bsl index cfa14a90cd0..5ee1e17fb11 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Let 02.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Let 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Let 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Let 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/ModuleMember/Let 03.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Let 03.fs.bsl index 374a64bda0e..3d562c39590 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Let 03.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Let 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Let 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Let 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Incomplete structured construct at or before this point in binding. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleMember/Let 04.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Let 04.fs.bsl index 7d2f30db848..d03ca1555db 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Let 04.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Let 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Let 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Let 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let (false, [], (3,0--3,3)); @@ -8,6 +8,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Incomplete structured construct at or before this point in binding diff --git a/tests/service/data/SyntaxTree/ModuleMember/Let 05.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Let 05.fs.bsl index 684cfa3cfb0..8f2b8b3bb5b 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Let 05.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Let 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Let 05.fs", false, QualifiedNameOfFile Let 05, [], [], + ("/root/ModuleMember/Let 05.fs", false, QualifiedNameOfFile Let 05, [], [SynModuleOrNamespace ([Let 05], false, AnonModule, [Let @@ -22,6 +22,7 @@ ImplFile Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDocEmpty, [], None, (1,0--3,2), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,1) parse error Incomplete structured construct at or before this point in binding. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleMember/Open 01.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Open 01.fs.bsl index 9ba9b81eb53..46136d486f5 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Open 01.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Open 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Open 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Open 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Open @@ -12,6 +12,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(4,0) parse error Incomplete structured construct at or before this point in open declaration. Expected identifier, 'global', 'type' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleMember/Open 02.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Open 02.fs.bsl index 2a17ef664a5..1b9e7cf4b25 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Open 02.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Open 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Open 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Open 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Open @@ -12,6 +12,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,10)-(4,0) parse error Incomplete structured construct at or before this point in open declaration diff --git a/tests/service/data/SyntaxTree/ModuleMember/Open 03.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Open 03.fs.bsl index 549a2c50a79..0e14ee764f0 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Open 03.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Open 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Open 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Open 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Open @@ -9,6 +9,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,10)-(5,0) parse error Incomplete structured construct at or before this point in open declaration diff --git a/tests/service/data/SyntaxTree/ModuleMember/Open 04.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Open 04.fs.bsl index 26532b885c0..b3e6f0cbafa 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Open 04.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Open 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Open 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Open 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Open @@ -9,6 +9,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,10)-(5,0) parse error Incomplete structured construct at or before this point in open declaration diff --git a/tests/service/data/SyntaxTree/ModuleMember/Open 05.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Open 05.fs.bsl index d6339de665b..943f383f438 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Open 05.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Open 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Open 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Open 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Open @@ -22,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(5,0) parse error Incomplete structured construct at or before this point in open declaration. Expected identifier, 'global', 'type' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleMember/Open 06.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Open 06.fs.bsl index 44453c403fa..89c4d60ac8e 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Open 06.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Open 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Open 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Open 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Open @@ -13,6 +13,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,10)-(4,0) parse error Incomplete structured construct at or before this point in open declaration diff --git a/tests/service/data/SyntaxTree/ModuleMember/Open 07.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Open 07.fs.bsl index 38af89635b8..a2557366856 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Open 07.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Open 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Open 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Open 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Open @@ -10,6 +10,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,10)-(5,0) parse error Incomplete structured construct at or before this point in open declaration diff --git a/tests/service/data/SyntaxTree/ModuleMember/Open 08.fs.bsl b/tests/service/data/SyntaxTree/ModuleMember/Open 08.fs.bsl index 5968d7456b1..731b88cc4e2 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Open 08.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Open 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/ModuleMember/Open 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Open 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Open @@ -10,4 +10,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,4), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleMember/Val 01.fsi.bsl b/tests/service/data/SyntaxTree/ModuleMember/Val 01.fsi.bsl index 33a28bec72c..54b0a1a1d57 100644 --- a/tests/service/data/SyntaxTree/ModuleMember/Val 01.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleMember/Val 01.fsi.bsl @@ -1,6 +1,6 @@ SigFile (ParsedSigFileInput - ("/root/ModuleMember/Val 01.fsi", QualifiedNameOfFile Module, [], [], + ("/root/ModuleMember/Val 01.fsi", QualifiedNameOfFile Module, [], [SynModuleOrNamespaceSig ([Module], false, NamedModule, [Val @@ -26,6 +26,7 @@ SigFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,20), { LeadingKeyword = Module (1,0--1,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,13)-(3,15) parse error Unexpected symbol '->' in value signature diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Anon module 01.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Anon module 01.fs.bsl index 11fc84ec748..b54f5371d0e 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Anon module 01.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Anon module 01.fs.bsl @@ -1,12 +1,13 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Anon module 01.fs", false, - QualifiedNameOfFile Anon module 01, [], [], + QualifiedNameOfFile Anon module 01, [], [SynModuleOrNamespace ([Anon module 01], false, AnonModule, [Expr (Const (Unit, (1,0--1,2)), (1,0--1,2))], PreXmlDocEmpty, [], None, (1,0--1,2), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,2) parse warning The declarations in this file will be placed in an implicit module 'Anon module 01' based on the file name 'Anon module 01.fs'. 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/tests/service/data/SyntaxTree/ModuleOrNamespace/Anon module 02.fsx.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Anon module 02.fsx.bsl index 448d9bae968..bf0721e59b7 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Anon module 02.fsx.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Anon module 02.fsx.bsl @@ -1,10 +1,11 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Anon module 02.fsx", true, - QualifiedNameOfFile Anon module 02$fsx, [], [], + QualifiedNameOfFile Anon module 02$fsx, [], [SynModuleOrNamespace ([Anon module 02], false, AnonModule, [Expr (Const (Unit, (1,0--1,2)), (1,0--1,2))], PreXmlDocEmpty, [], None, (1,0--1,2), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/DeclaredNamespaceRangeShouldStartAtNamespaceKeyword.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/DeclaredNamespaceRangeShouldStartAtNamespaceKeyword.fs.bsl index e45507b4a0d..da840787205 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/DeclaredNamespaceRangeShouldStartAtNamespaceKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/DeclaredNamespaceRangeShouldStartAtNamespaceKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/ModuleOrNamespace/DeclaredNamespaceRangeShouldStartAtNamespaceKeyword.fs", false, QualifiedNameOfFile DeclaredNamespaceRangeShouldStartAtNamespaceKeyword, - [], [], + [], [SynModuleOrNamespace ([TypeEquality], false, DeclaredNamespace, [Types @@ -27,4 +27,5 @@ ImplFile WithKeyword = None })], (4,0--5,8))], PreXmlDocEmpty, [], None, (2,0--5,8), { LeadingKeyword = Namespace (2,0--2,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/GlobalInOpenPathShouldContainTrivia.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/GlobalInOpenPathShouldContainTrivia.fs.bsl index 0d822c247fb..699f0ac585f 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/GlobalInOpenPathShouldContainTrivia.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/GlobalInOpenPathShouldContainTrivia.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/GlobalInOpenPathShouldContainTrivia.fs", false, - QualifiedNameOfFile GlobalInOpenPathShouldContainTrivia, [], [], + QualifiedNameOfFile GlobalInOpenPathShouldContainTrivia, [], [SynModuleOrNamespace ([Ionide; VSCode; FSharp], false, DeclaredNamespace, [Open @@ -12,4 +12,5 @@ ImplFile (4,0--4,16))], PreXmlDocEmpty, [], None, (2,0--4,16), { LeadingKeyword = Namespace (2,0--2,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/GlobalNamespaceShouldStartAtNamespaceKeyword.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/GlobalNamespaceShouldStartAtNamespaceKeyword.fs.bsl index ab4611ba1fc..34dfdc36a77 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/GlobalNamespaceShouldStartAtNamespaceKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/GlobalNamespaceShouldStartAtNamespaceKeyword.fs.bsl @@ -2,7 +2,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/GlobalNamespaceShouldStartAtNamespaceKeyword.fs", false, QualifiedNameOfFile GlobalNamespaceShouldStartAtNamespaceKeyword, - [], [], + [], [SynModuleOrNamespace ([], false, GlobalNamespace, [Types @@ -21,5 +21,6 @@ ImplFile None, (4,0--6,12), { LeadingKeyword = Namespace (4,0--4,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (2,0--2,6); LineComment (3,0--3,6)] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module - Attribute 01.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module - Attribute 01.fs.bsl index 70ca7f64fdb..d4b48f2982d 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module - Attribute 01.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module - Attribute 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Module - Attribute 01.fs", false, - QualifiedNameOfFile Bar, [], [], + QualifiedNameOfFile Bar, [], [SynModuleOrNamespace ([Bar], false, NamedModule, [Let @@ -32,4 +32,5 @@ ImplFile Range = (2,0--2,11) }], None, (2,0--5,20), { LeadingKeyword = Module (3,0--3,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 01.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 01.fs.bsl index 253b83115a7..bc44e7a4541 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 01.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 01.fs.bsl @@ -1,10 +1,11 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Module 01.fs", false, QualifiedNameOfFile A.B.C, - [], [], + [], [SynModuleOrNamespace ([A; B; C], false, NamedModule, [], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--1,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 02.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 02.fs.bsl index 1ca7710dfcb..ead7d2d8485 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 02.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 02.fs.bsl @@ -1,11 +1,12 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Module 02.fs", false, QualifiedNameOfFile A.B.C, - [], [], + [], [SynModuleOrNamespace ([A; B; C], false, NamedModule, [Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 03.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 03.fs.bsl index f71a5daa644..50121eb7488 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 03.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 03.fs.bsl @@ -1,11 +1,12 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Module 03.fs", false, QualifiedNameOfFile A.B.C, - [], [], + [], [SynModuleOrNamespace ([A; B; C], false, NamedModule, [Expr (Const (Unit, (3,2--3,4)), (3,2--3,4))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,4), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 04.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 04.fs.bsl index 226e6492957..ec78caa48c3 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 04.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 04.fs.bsl @@ -1,13 +1,14 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Module 04.fs", false, QualifiedNameOfFile A.B.C, - [], [], + [], [SynModuleOrNamespace ([A; B; C], false, NamedModule, [Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDoc ((1,2), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,2--3,2), { LeadingKeyword = Module (1,2--1,8) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (1:3). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 05.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 05.fs.bsl index 6f4c8c701d5..27186b63cb7 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 05.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 05.fs.bsl @@ -1,12 +1,12 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Module 05.fs", false, QualifiedNameOfFile A, [], - [], [SynModuleOrNamespace ([A], false, NamedModule, [Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,1) parse error Unexpected start of structured construct in definition diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 06.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 06.fs.bsl index ec0cd02e4ce..d89b334db26 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 06.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 06.fs.bsl @@ -1,12 +1,12 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Module 06.fs", false, QualifiedNameOfFile , [], - [], [SynModuleOrNamespace ([], false, NamedModule, [Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,1) parse error Unexpected start of structured construct in definition. Expected identifier, 'global' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 07.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 07.fs.bsl index b52a7bcdbf4..494bca7af64 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 07.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Module 07.fs.bsl @@ -1,12 +1,12 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Module 07.fs", false, QualifiedNameOfFile , [], - [], [SynModuleOrNamespace ([], true, NamedModule, [Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,1) parse error Unexpected start of structured construct in definition. Expected identifier, 'global' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/ModuleShouldContainModuleKeyword.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/ModuleShouldContainModuleKeyword.fs.bsl index 7e55d2eb57d..e020cf20444 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/ModuleShouldContainModuleKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/ModuleShouldContainModuleKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/ModuleShouldContainModuleKeyword.fs", false, - QualifiedNameOfFile FsAutoComplete.FCSPatches, [], [], + QualifiedNameOfFile FsAutoComplete.FCSPatches, [], [SynModuleOrNamespace ([FsAutoComplete; FCSPatches], false, NamedModule, [Open @@ -49,4 +49,5 @@ ImplFile PreXmlDoc ((5,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--13,14), { LeadingKeyword = Module (5,0--5,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/MultipleDeclaredNamespacesShouldHaveARangeThatStartsAtTheNamespaceKeyword.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/MultipleDeclaredNamespacesShouldHaveARangeThatStartsAtTheNamespaceKeyword.fs.bsl index 09880fab704..023212b2912 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/MultipleDeclaredNamespacesShouldHaveARangeThatStartsAtTheNamespaceKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/MultipleDeclaredNamespacesShouldHaveARangeThatStartsAtTheNamespaceKeyword.fs.bsl @@ -4,7 +4,7 @@ ImplFile false, QualifiedNameOfFile MultipleDeclaredNamespacesShouldHaveARangeThatStartsAtTheNamespaceKeyword, - [], [], + [], [SynModuleOrNamespace ([TypeEquality], false, DeclaredNamespace, [Types @@ -35,4 +35,5 @@ ImplFile PreXmlDocEmpty, [], None, (7,0--9,10), { LeadingKeyword = Namespace (7,0--7,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 01.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 01.fs.bsl index d4bb61b979b..e7c2d6c6d03 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 01.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Namespace 01.fs", false, - QualifiedNameOfFile Namespace 01, [], [], + QualifiedNameOfFile Namespace 01, [], [SynModuleOrNamespace ([Ns1], false, DeclaredNamespace, [Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDocEmpty, [], @@ -11,4 +11,5 @@ ImplFile [Expr (Const (Unit, (7,0--7,2)), (7,0--7,2))], PreXmlDocEmpty, [], None, (5,0--7,2), { LeadingKeyword = Namespace (5,0--5,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 02.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 02.fs.bsl index 1e5985485f2..a1538de84fe 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 02.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Namespace 02.fs", false, - QualifiedNameOfFile Namespace 02, [], [], + QualifiedNameOfFile Namespace 02, [], [SynModuleOrNamespace ([Ns1], false, DeclaredNamespace, [Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDocEmpty, [], @@ -11,6 +11,7 @@ ImplFile [Expr (Const (Unit, (7,0--7,2)), (7,0--7,2))], PreXmlDocEmpty, [], None, (5,0--7,2), { LeadingKeyword = Namespace (5,0--5,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,1) parse error Unexpected start of structured construct in implementation file. Expected identifier, 'global' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 03.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 03.fs.bsl index c822d41e48f..5c442eb837d 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 03.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Namespace 03.fs", false, - QualifiedNameOfFile Namespace 03, [], [], + QualifiedNameOfFile Namespace 03, [], [SynModuleOrNamespace ([Ns1], false, DeclaredNamespace, [Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDocEmpty, [], @@ -11,6 +11,7 @@ ImplFile [Expr (Const (Unit, (7,0--7,2)), (7,0--7,2))], PreXmlDocEmpty, [], None, (5,0--7,2), { LeadingKeyword = Namespace (5,0--5,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,1) parse error Unexpected start of structured construct in implementation file diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 04.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 04.fs.bsl index e012c095c25..bb006d2aaf8 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 04.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Namespace 04.fs", false, - QualifiedNameOfFile Namespace 04, [], [], + QualifiedNameOfFile Namespace 04, [], [SynModuleOrNamespace ([Ns1], false, DeclaredNamespace, [Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDocEmpty, [], @@ -11,6 +11,7 @@ ImplFile [Expr (Const (Unit, (7,0--7,2)), (7,0--7,2))], PreXmlDocEmpty, [], None, (5,0--7,2), { LeadingKeyword = Namespace (5,0--5,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,1) parse error Unexpected start of structured construct in implementation file. Expected identifier, 'global' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 05.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 05.fs.bsl index a41e32b6583..5f412ee2221 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 05.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 05.fs.bsl @@ -1,9 +1,10 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Namespace 05.fs", false, - QualifiedNameOfFile Namespace 05, [], [], + QualifiedNameOfFile Namespace 05, [], [SynModuleOrNamespace ([], false, DeclaredNamespace, [], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 06.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 06.fs.bsl index 06fd6804862..f63106c9620 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 06.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 06.fs.bsl @@ -1,12 +1,13 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Namespace 06.fs", false, - QualifiedNameOfFile Namespace 06, [], [], + QualifiedNameOfFile Namespace 06, [], [SynModuleOrNamespace ([], false, DeclaredNamespace, [Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDocEmpty, [], None, (1,0--3,2), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,1) parse error Unexpected start of structured construct in implementation file. Expected identifier, 'global' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 07.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 07.fs.bsl index 904371c96d7..4afb0f52f03 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 07.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 07.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Namespace 07.fs", false, - QualifiedNameOfFile Namespace 07, [], [], + QualifiedNameOfFile Namespace 07, [], [SynModuleOrNamespace ([], false, DeclaredNamespace, [Types @@ -19,6 +19,7 @@ ImplFile WithKeyword = None })], (3,0--3,12))], PreXmlDocEmpty, [], None, (1,0--3,12), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,4) parse error Unexpected start of structured construct in implementation file. Expected identifier, 'global' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 08.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 08.fs.bsl index 35984038851..36b919a7f82 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 08.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 08.fs.bsl @@ -1,9 +1,10 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Namespace 08.fs", false, - QualifiedNameOfFile Namespace 08, [], [], + QualifiedNameOfFile Namespace 08, [], [SynModuleOrNamespace ([], true, DeclaredNamespace, [], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 09.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 09.fs.bsl index c6f1e667ff6..9db89162a52 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 09.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Namespace 09.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Namespace 09.fs", false, - QualifiedNameOfFile Namespace 09, [], [], + QualifiedNameOfFile Namespace 09, [], [SynModuleOrNamespace ([], false, DeclaredNamespace, [Expr (Const (Unit, (3,0--3,2)), (3,0--3,2))], PreXmlDocEmpty, [], @@ -11,6 +11,7 @@ ImplFile [Expr (Const (Unit, (7,0--7,2)), (7,0--7,2))], PreXmlDocEmpty, [], None, (5,0--7,2), { LeadingKeyword = Namespace (5,0--5,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,0)-(3,1) parse error Unexpected start of structured construct in implementation file. Expected identifier, 'global' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/NamespaceShouldContainNamespaceKeyword.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/NamespaceShouldContainNamespaceKeyword.fs.bsl index fddeeca8a03..885b0b117c8 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/NamespaceShouldContainNamespaceKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/NamespaceShouldContainNamespaceKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/NamespaceShouldContainNamespaceKeyword.fs", false, - QualifiedNameOfFile NamespaceShouldContainNamespaceKeyword, [], [], + QualifiedNameOfFile NamespaceShouldContainNamespaceKeyword, [], [SynModuleOrNamespace ([Foo], false, DeclaredNamespace, [NestedModule @@ -27,4 +27,5 @@ ImplFile EqualsRange = Some (3,11--3,12) })], PreXmlDocEmpty, [], None, (2,0--4,14), { LeadingKeyword = Namespace (2,0--2,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 01.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 01.fs.bsl index 8b74425f9b6..e12ac1da401 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 01.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -16,4 +16,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 02.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 02.fs.bsl index e7761029d97..9724fa99d55 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 02.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 03.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 03.fs.bsl index 44ab73f81ad..a37acb38fda 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 03.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 03.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,9)-(5,0) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 04.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 04.fs.bsl index 4208cc94225..94a68e469af 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 04.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 04.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,7)-(5,0) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 05.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 05.fs.bsl index 53b4a1f12df..2b38fecef1e 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 05.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 05.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,11)-(5,0) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 06.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 06.fs.bsl index d6875779d2f..92a0fd598cf 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 06.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 06.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,13)-(5,0) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 07.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 07.fs.bsl index 569bdfe5811..bf4b8207050 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 07.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 07.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 07.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -22,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 08.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 08.fs.bsl index 1b6fcc1a41c..f2411c2682b 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 08.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 08.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 08.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -22,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,13)-(6,4) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 09.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 09.fs.bsl index 175f01fc0e0..c4e7b8b3451 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 09.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 09.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 09.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -22,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,5) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 10.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 10.fs.bsl index 4605fc9a35d..9cf96516449 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 10.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 10.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 10.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -22,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,11)-(6,4) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 11.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 11.fs.bsl index 181836a8b7f..135e3df2d10 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 11.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 11.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 11.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -14,6 +14,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,7)-(5,0) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 12.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 12.fs.bsl index eb79389bb5c..7d45479cb57 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 12.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 12.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 12.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -14,6 +14,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,0), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 13.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 13.fs.bsl index c57a57743cb..96edfc00dee 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 13.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 13.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 13.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -14,6 +14,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 14.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 14.fs.bsl index 708fae6dee0..d79064e294f 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 14.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 14.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 14.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [NestedModule @@ -14,6 +14,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 15.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 15.fs.bsl index e7aaa7fbdbc..f837a3cf675 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 15.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 15.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 15.fs", false, - QualifiedNameOfFile Nested module 15, [], [], + QualifiedNameOfFile Nested module 15, [], [SynModuleOrNamespace ([Ns], false, DeclaredNamespace, [NestedModule @@ -13,6 +13,7 @@ ImplFile EqualsRange = Some (3,9--3,10) })], PreXmlDocEmpty, [], None, (1,0--3,10), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 16.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 16.fs.bsl index 2ce127eef5d..c7401f2e650 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 16.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 16.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 16.fs", false, - QualifiedNameOfFile Nested module 16, [], [], + QualifiedNameOfFile Nested module 16, [], [SynModuleOrNamespace ([Ns], false, DeclaredNamespace, [NestedModule @@ -13,6 +13,7 @@ ImplFile EqualsRange = None })], PreXmlDocEmpty, [], None, (1,0--3,8), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 17.fs.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 17.fs.bsl index 4e5dd1a1914..c48299a6150 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 17.fs.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespace/Nested module 17.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/ModuleOrNamespace/Nested module 17.fs", false, - QualifiedNameOfFile Nested module 17, [], [], + QualifiedNameOfFile Nested module 17, [], [SynModuleOrNamespace ([Ns], false, DeclaredNamespace, [NestedModule @@ -13,6 +13,7 @@ ImplFile EqualsRange = None })], PreXmlDocEmpty, [], None, (1,0--4,0), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Incomplete structured construct at or before this point in definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/GlobalNamespaceShouldStartAtNamespaceKeyword.fsi.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/GlobalNamespaceShouldStartAtNamespaceKeyword.fsi.bsl index 13f845e312a..785521f5d0d 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/GlobalNamespaceShouldStartAtNamespaceKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/GlobalNamespaceShouldStartAtNamespaceKeyword.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/ModuleOrNamespaceSig/GlobalNamespaceShouldStartAtNamespaceKeyword.fsi", - QualifiedNameOfFile GlobalNamespaceShouldStartAtNamespaceKeyword, [], [], + QualifiedNameOfFile GlobalNamespaceShouldStartAtNamespaceKeyword, [], [SynModuleOrNamespaceSig ([], false, GlobalNamespace, [Types @@ -38,5 +38,6 @@ SigFile WithKeyword = None })], (6,0--6,32))], PreXmlDocEmpty, [], None, (4,0--6,32), { LeadingKeyword = Namespace (4,0--4,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (2,0--2,6); LineComment (3,0--3,6)] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleAbbreviation.fsi.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleAbbreviation.fsi.bsl index 045e4931a62..fbd3308bd1f 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleAbbreviation.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleAbbreviation.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/ModuleOrNamespaceSig/ModuleAbbreviation.fsi", - QualifiedNameOfFile Foo, [], [], + QualifiedNameOfFile Foo, [], [SynModuleOrNamespaceSig ([Foo], false, NamedModule, [Open @@ -49,4 +49,5 @@ SigFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--12,13), { LeadingKeyword = Module (1,0--1,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleRangeShouldStartAtFirstAttribute.fsi.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleRangeShouldStartAtFirstAttribute.fsi.bsl index 833995c7304..7455aeeea52 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleRangeShouldStartAtFirstAttribute.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleRangeShouldStartAtFirstAttribute.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/ModuleOrNamespaceSig/ModuleRangeShouldStartAtFirstAttribute.fsi", - QualifiedNameOfFile Bar, [], [], + QualifiedNameOfFile Bar, [], [SynModuleOrNamespaceSig ([Bar], false, NamedModule, [Val @@ -23,5 +23,6 @@ SigFile Range = (2,4--2,7) }] Range = (2,0--2,11) }], None, (2,0--5,14), { LeadingKeyword = Module (3,0--3,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleShouldContainModuleKeyword.fsi.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleShouldContainModuleKeyword.fsi.bsl index 9c4dbafc6cd..8544b0f17b5 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleShouldContainModuleKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/ModuleShouldContainModuleKeyword.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/ModuleOrNamespaceSig/ModuleShouldContainModuleKeyword.fsi", - QualifiedNameOfFile Bar, [], [], + QualifiedNameOfFile Bar, [], [SynModuleOrNamespaceSig ([Bar], false, NamedModule, [Val @@ -18,4 +18,5 @@ SigFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--4,10), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Namespace - Keyword 01.fsi.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Namespace - Keyword 01.fsi.bsl index a2d8deea5fe..33b397cbffe 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Namespace - Keyword 01.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Namespace - Keyword 01.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/ModuleOrNamespaceSig/Namespace - Keyword 01.fsi", - QualifiedNameOfFile Namespace - Keyword 01, [], [], + QualifiedNameOfFile Namespace - Keyword 01, [], [SynModuleOrNamespaceSig ([Foo], false, DeclaredNamespace, [NestedModule @@ -24,4 +24,5 @@ SigFile EqualsRange = Some (3,11--3,12) })], PreXmlDocEmpty, [], None, (1,0--4,14), { LeadingKeyword = Namespace (1,0--1,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Nested module 01.fsi.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Nested module 01.fsi.bsl index 2ca7d9b108a..a987306bfc6 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Nested module 01.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/Nested module 01.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/ModuleOrNamespaceSig/Nested module 01.fsi", - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespaceSig ([Module], false, NamedModule, [NestedModule @@ -36,4 +36,5 @@ SigFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,10), { LeadingKeyword = Module (1,0--1,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/RangeMemberReturnsRangeOfSynModuleOrNamespaceSig.fsi.bsl b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/RangeMemberReturnsRangeOfSynModuleOrNamespaceSig.fsi.bsl index 8a0f981091f..46bc6ef7b84 100644 --- a/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/RangeMemberReturnsRangeOfSynModuleOrNamespaceSig.fsi.bsl +++ b/tests/service/data/SyntaxTree/ModuleOrNamespaceSig/RangeMemberReturnsRangeOfSynModuleOrNamespaceSig.fsi.bsl @@ -2,7 +2,6 @@ SigFile (ParsedSigFileInput ("/root/ModuleOrNamespaceSig/RangeMemberReturnsRangeOfSynModuleOrNamespaceSig.fsi", QualifiedNameOfFile RangeMemberReturnsRangeOfSynModuleOrNamespaceSig, [], - [], [SynModuleOrNamespaceSig ([Foobar], false, DeclaredNamespace, [Types @@ -39,4 +38,5 @@ SigFile WithKeyword = None })], (4,0--4,32))], PreXmlDocEmpty, [], None, (2,0--4,32), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/NestedModule/IncompleteNestedModuleSigShouldBePresent.fsi.bsl b/tests/service/data/SyntaxTree/NestedModule/IncompleteNestedModuleSigShouldBePresent.fsi.bsl index d9d1e49ae74..7cd76d669db 100644 --- a/tests/service/data/SyntaxTree/NestedModule/IncompleteNestedModuleSigShouldBePresent.fsi.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/IncompleteNestedModuleSigShouldBePresent.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/NestedModule/IncompleteNestedModuleSigShouldBePresent.fsi", - QualifiedNameOfFile A.B, [], [], + QualifiedNameOfFile A.B, [], [SynModuleOrNamespaceSig ([A; B], false, NamedModule, [NestedModule @@ -25,6 +25,7 @@ SigFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,11), { LeadingKeyword = Module (1,0--1,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,9)-(5,0) parse error Incomplete structured construct at or before this point in signature file. Expected ':', '=' or other token. diff --git a/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fs.bsl b/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fs.bsl index 24837f66d09..23937834db6 100644 --- a/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fs.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/NestedModule/NestedModuleWithBeginEndAndDecls.fs", false, - QualifiedNameOfFile NestedModuleWithBeginEndAndDecls, [], [], + QualifiedNameOfFile NestedModuleWithBeginEndAndDecls, [], [SynModuleOrNamespace ([X], false, DeclaredNamespace, [NestedModule @@ -27,4 +27,5 @@ ImplFile EqualsRange = Some (3,9--3,10) })], PreXmlDocEmpty, [], None, (1,0--6,7), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fsi.bsl b/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fsi.bsl index 878125cde66..ca093b12f75 100644 --- a/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fsi.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/NestedModuleWithBeginEndAndDecls.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/NestedModule/NestedModuleWithBeginEndAndDecls.fsi", - QualifiedNameOfFile NestedModuleWithBeginEndAndDecls, [], [], + QualifiedNameOfFile NestedModuleWithBeginEndAndDecls, [], [SynModuleOrNamespaceSig ([X], false, DeclaredNamespace, [NestedModule @@ -37,4 +37,5 @@ SigFile EqualsRange = Some (3,9--3,10) })], PreXmlDocEmpty, [], None, (1,0--7,7), { LeadingKeyword = Namespace (1,0--1,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleDeclNestedModule.fs.bsl b/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleDeclNestedModule.fs.bsl index 0160f4068bf..8538ab3d4cc 100644 --- a/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleDeclNestedModule.fs.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleDeclNestedModule.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleDeclNestedModule.fs", - false, QualifiedNameOfFile TopLevel, [], [], + false, QualifiedNameOfFile TopLevel, [], [SynModuleOrNamespace ([TopLevel], false, NamedModule, [NestedModule @@ -20,4 +20,5 @@ ImplFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--6,6), { LeadingKeyword = Module (2,0--2,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleSigDeclNestedModule.fsi.bsl b/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleSigDeclNestedModule.fsi.bsl index 2d2eb425be6..eaac7dbed8e 100644 --- a/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleSigDeclNestedModule.fsi.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleSigDeclNestedModule.fsi.bsl @@ -2,7 +2,7 @@ SigFile (ParsedSigFileInput ("/root/NestedModule/RangeOfAttributeShouldBeIncludedInSynModuleSigDeclNestedModule.fsi", QualifiedNameOfFile - RangeOfAttributeShouldBeIncludedInSynModuleSigDeclNestedModule, [], [], + RangeOfAttributeShouldBeIncludedInSynModuleSigDeclNestedModule, [], [SynModuleOrNamespaceSig ([SomeNamespace], false, DeclaredNamespace, [NestedModule @@ -30,4 +30,5 @@ SigFile EqualsRange = Some (5,14--5,15) })], PreXmlDocEmpty, [], None, (2,0--6,15), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/NestedModule/RangeOfBeginEnd.fs.bsl b/tests/service/data/SyntaxTree/NestedModule/RangeOfBeginEnd.fs.bsl index 45d8f088c57..dfecd0d9c4d 100644 --- a/tests/service/data/SyntaxTree/NestedModule/RangeOfBeginEnd.fs.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/RangeOfBeginEnd.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/NestedModule/RangeOfBeginEnd.fs", false, - QualifiedNameOfFile RangeOfBeginEnd, [], [], + QualifiedNameOfFile RangeOfBeginEnd, [], [SynModuleOrNamespace ([X], false, DeclaredNamespace, [NestedModule @@ -13,4 +13,5 @@ ImplFile EqualsRange = Some (3,9--3,10) })], PreXmlDocEmpty, [], None, (1,0--4,13), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/NestedModule/RangeOfBeginEnd.fsi.bsl b/tests/service/data/SyntaxTree/NestedModule/RangeOfBeginEnd.fsi.bsl index 33815671eb9..1e08843a84a 100644 --- a/tests/service/data/SyntaxTree/NestedModule/RangeOfBeginEnd.fsi.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/RangeOfBeginEnd.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/NestedModule/RangeOfBeginEnd.fsi", - QualifiedNameOfFile RangeOfBeginEnd, [], [], + QualifiedNameOfFile RangeOfBeginEnd, [], [SynModuleOrNamespaceSig ([X], false, DeclaredNamespace, [NestedModule @@ -13,4 +13,5 @@ SigFile EqualsRange = Some (3,9--3,10) })], PreXmlDocEmpty, [], None, (1,0--4,13), { LeadingKeyword = Namespace (1,0--1,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresent.fs.bsl b/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresent.fs.bsl index da9c0e154f4..5b493568519 100644 --- a/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresent.fs.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresent.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/NestedModule/RangeOfEqualSignShouldBePresent.fs", false, - QualifiedNameOfFile RangeOfEqualSignShouldBePresent, [], [], + QualifiedNameOfFile RangeOfEqualSignShouldBePresent, [], [SynModuleOrNamespace ([RangeOfEqualSignShouldBePresent], false, AnonModule, [NestedModule @@ -14,4 +14,5 @@ ImplFile EqualsRange = Some (2,9--2,10) })], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresentSignatureFile.fsi.bsl b/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresentSignatureFile.fsi.bsl index d9575b21a86..627b1b608b9 100644 --- a/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresentSignatureFile.fsi.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/RangeOfEqualSignShouldBePresentSignatureFile.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/NestedModule/RangeOfEqualSignShouldBePresentSignatureFile.fsi", - QualifiedNameOfFile RangeOfEqualSignShouldBePresentSignatureFile, [], [], + QualifiedNameOfFile RangeOfEqualSignShouldBePresentSignatureFile, [], [SynModuleOrNamespaceSig ([Foo], false, DeclaredNamespace, [NestedModule @@ -24,4 +24,5 @@ SigFile EqualsRange = Some (4,9--4,10) })], PreXmlDocEmpty, [], None, (2,0--5,17), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/NestedModule/RangeOfNestedModuleInSignatureFileShouldEndAtTheLastSynModuleSigDecl.fsi.bsl b/tests/service/data/SyntaxTree/NestedModule/RangeOfNestedModuleInSignatureFileShouldEndAtTheLastSynModuleSigDecl.fsi.bsl index d1d8882f2a0..fc0b13845c2 100644 --- a/tests/service/data/SyntaxTree/NestedModule/RangeOfNestedModuleInSignatureFileShouldEndAtTheLastSynModuleSigDecl.fsi.bsl +++ b/tests/service/data/SyntaxTree/NestedModule/RangeOfNestedModuleInSignatureFileShouldEndAtTheLastSynModuleSigDecl.fsi.bsl @@ -3,7 +3,6 @@ SigFile ("/root/NestedModule/RangeOfNestedModuleInSignatureFileShouldEndAtTheLastSynModuleSigDecl.fsi", QualifiedNameOfFile RangeOfNestedModuleInSignatureFileShouldEndAtTheLastSynModuleSigDecl, [], - [], [SynModuleOrNamespaceSig ([Microsoft; FSharp; Core], false, DeclaredNamespace, [Open @@ -549,4 +548,5 @@ SigFile PreXmlDocEmpty, [], None, (2,0--61,26), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/AbstractClassProperty.fs.bsl b/tests/service/data/SyntaxTree/Nullness/AbstractClassProperty.fs.bsl index fa15e544c36..d544fd6cd7b 100644 --- a/tests/service/data/SyntaxTree/Nullness/AbstractClassProperty.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/AbstractClassProperty.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/AbstractClassProperty.fs", false, - QualifiedNameOfFile AbstractClassProperty, [], [], + QualifiedNameOfFile AbstractClassProperty, [], [SynModuleOrNamespace ([AbstractClassProperty], false, AnonModule, [Types @@ -57,4 +57,5 @@ ImplFile WithKeyword = None })], (1,0--3,51))], PreXmlDocEmpty, [], None, (1,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/DuCaseStringOrNull.fs.bsl b/tests/service/data/SyntaxTree/Nullness/DuCaseStringOrNull.fs.bsl index e60a05e853d..13161fa49f4 100644 --- a/tests/service/data/SyntaxTree/Nullness/DuCaseStringOrNull.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/DuCaseStringOrNull.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/DuCaseStringOrNull.fs", false, - QualifiedNameOfFile DuCaseStringOrNull, [], [], + QualifiedNameOfFile DuCaseStringOrNull, [], [SynModuleOrNamespace ([DuCaseStringOrNull], false, AnonModule, [Types @@ -36,4 +36,5 @@ ImplFile WithKeyword = None })], (1,0--1,35))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/DuCaseTuplePrecedence.fs.bsl b/tests/service/data/SyntaxTree/Nullness/DuCaseTuplePrecedence.fs.bsl index 1ae968787e3..51050a8e198 100644 --- a/tests/service/data/SyntaxTree/Nullness/DuCaseTuplePrecedence.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/DuCaseTuplePrecedence.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/DuCaseTuplePrecedence.fs", false, - QualifiedNameOfFile DuCaseTuplePrecedence, [], [], + QualifiedNameOfFile DuCaseTuplePrecedence, [], [SynModuleOrNamespace ([DuCaseTuplePrecedence], false, AnonModule, [Types @@ -43,4 +43,5 @@ ImplFile WithKeyword = None })], (1,0--1,41))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/ExplicitField.fs.bsl b/tests/service/data/SyntaxTree/Nullness/ExplicitField.fs.bsl index b590e85bce5..8626a3204af 100644 --- a/tests/service/data/SyntaxTree/Nullness/ExplicitField.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/ExplicitField.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/ExplicitField.fs", false, - QualifiedNameOfFile ExplicitField, [], [], + QualifiedNameOfFile ExplicitField, [], [SynModuleOrNamespace ([ExplicitField], false, AnonModule, [Types @@ -29,4 +29,5 @@ ImplFile WithKeyword = None })], (1,0--4,7))], PreXmlDocEmpty, [], None, (1,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/FunctionArgAsPatternWithNullCase.fs.bsl b/tests/service/data/SyntaxTree/Nullness/FunctionArgAsPatternWithNullCase.fs.bsl index 1d72ceec00a..9c06341d4c1 100644 --- a/tests/service/data/SyntaxTree/Nullness/FunctionArgAsPatternWithNullCase.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/FunctionArgAsPatternWithNullCase.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/FunctionArgAsPatternWithNullCase.fs", false, - QualifiedNameOfFile FunctionArgAsPatternWithNullCase, [], [], + QualifiedNameOfFile FunctionArgAsPatternWithNullCase, [], [SynModuleOrNamespace ([FunctionArgAsPatternWithNullCase], false, AnonModule, [Let @@ -45,4 +45,5 @@ ImplFile (1,0--1,52))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/GenericFunctionReturnTypeNotStructNull.fs.bsl b/tests/service/data/SyntaxTree/Nullness/GenericFunctionReturnTypeNotStructNull.fs.bsl index d155f74abba..bc7e62dbcf8 100644 --- a/tests/service/data/SyntaxTree/Nullness/GenericFunctionReturnTypeNotStructNull.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/GenericFunctionReturnTypeNotStructNull.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/GenericFunctionReturnTypeNotStructNull.fs", false, - QualifiedNameOfFile GenericFunctionReturnTypeNotStructNull, [], [], + QualifiedNameOfFile GenericFunctionReturnTypeNotStructNull, [], [SynModuleOrNamespace ([GenericFunctionReturnTypeNotStructNull], false, AnonModule, [Let @@ -39,4 +39,5 @@ ImplFile EqualsRange = Some (1,51--1,52) })], (1,0--1,57))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/GenericFunctionTyparNotNull.fs.bsl b/tests/service/data/SyntaxTree/Nullness/GenericFunctionTyparNotNull.fs.bsl index f03151197dd..93b7e56d1ec 100644 --- a/tests/service/data/SyntaxTree/Nullness/GenericFunctionTyparNotNull.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/GenericFunctionTyparNotNull.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/GenericFunctionTyparNotNull.fs", false, - QualifiedNameOfFile GenericFunctionTyparNotNull, [], [], + QualifiedNameOfFile GenericFunctionTyparNotNull, [], [SynModuleOrNamespace ([GenericFunctionTyparNotNull], false, AnonModule, [Let @@ -34,4 +34,5 @@ ImplFile EqualsRange = Some (1,37--1,38) })], (1,0--1,41))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/GenericFunctionTyparNull.fs.bsl b/tests/service/data/SyntaxTree/Nullness/GenericFunctionTyparNull.fs.bsl index db83d1ddcbf..07032a6b6a8 100644 --- a/tests/service/data/SyntaxTree/Nullness/GenericFunctionTyparNull.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/GenericFunctionTyparNull.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/GenericFunctionTyparNull.fs", false, - QualifiedNameOfFile GenericFunctionTyparNull, [], [], + QualifiedNameOfFile GenericFunctionTyparNull, [], [SynModuleOrNamespace ([GenericFunctionTyparNull], false, AnonModule, [Let @@ -33,4 +33,5 @@ ImplFile (1,0--1,37))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/GenericTypeNotNull.fs.bsl b/tests/service/data/SyntaxTree/Nullness/GenericTypeNotNull.fs.bsl index 92d0d1a136c..2e217784614 100644 --- a/tests/service/data/SyntaxTree/Nullness/GenericTypeNotNull.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/GenericTypeNotNull.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/GenericTypeNotNull.fs", false, - QualifiedNameOfFile GenericTypeNotNull, [], [], + QualifiedNameOfFile GenericTypeNotNull, [], [SynModuleOrNamespace ([GenericTypeNotNull], false, AnonModule, [Types @@ -25,4 +25,5 @@ ImplFile WithKeyword = None })], (1,0--1,40))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/GenericTypeNotNullAndOtherConstraint.fs.bsl b/tests/service/data/SyntaxTree/Nullness/GenericTypeNotNullAndOtherConstraint.fs.bsl index 0906d86df22..4f47caa397c 100644 --- a/tests/service/data/SyntaxTree/Nullness/GenericTypeNotNullAndOtherConstraint.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/GenericTypeNotNullAndOtherConstraint.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/GenericTypeNotNullAndOtherConstraint.fs", false, - QualifiedNameOfFile GenericTypeNotNullAndOtherConstraint, [], [], + QualifiedNameOfFile GenericTypeNotNullAndOtherConstraint, [], [SynModuleOrNamespace ([GenericTypeNotNullAndOtherConstraint], false, AnonModule, [Types @@ -28,4 +28,5 @@ ImplFile WithKeyword = None })], (1,0--1,56))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/GenericTypeNotStructAndOtherConstraint-I_am_Still_Sane.fs.bsl b/tests/service/data/SyntaxTree/Nullness/GenericTypeNotStructAndOtherConstraint-I_am_Still_Sane.fs.bsl index 6ebe197154b..0ea0210a109 100644 --- a/tests/service/data/SyntaxTree/Nullness/GenericTypeNotStructAndOtherConstraint-I_am_Still_Sane.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/GenericTypeNotStructAndOtherConstraint-I_am_Still_Sane.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Nullness/GenericTypeNotStructAndOtherConstraint-I_am_Still_Sane.fs", false, QualifiedNameOfFile GenericTypeNotStructAndOtherConstraint-I_am_Still_Sane, - [], [], + [], [SynModuleOrNamespace ([GenericTypeNotStructAndOtherConstraint-I_am_Still_Sane], false, AnonModule, @@ -29,6 +29,7 @@ ImplFile WithKeyword = None })], (1,0--1,58))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'GenericTypeNotStructAndOtherConstraint-I_am_Still_Sane' based on the file name 'GenericTypeNotStructAndOtherConstraint-I_am_Still_Sane.fs'. 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/tests/service/data/SyntaxTree/Nullness/GenericTypeNull.fs.bsl b/tests/service/data/SyntaxTree/Nullness/GenericTypeNull.fs.bsl index 184b29d69d3..59936ebce22 100644 --- a/tests/service/data/SyntaxTree/Nullness/GenericTypeNull.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/GenericTypeNull.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/GenericTypeNull.fs", false, - QualifiedNameOfFile GenericTypeNull, [], [], + QualifiedNameOfFile GenericTypeNull, [], [SynModuleOrNamespace ([GenericTypeNull], false, AnonModule, [Types @@ -24,4 +24,5 @@ ImplFile WithKeyword = None })], (1,0--1,36))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/GenericTypeOtherConstraintAndThenNotNull.fs.bsl b/tests/service/data/SyntaxTree/Nullness/GenericTypeOtherConstraintAndThenNotNull.fs.bsl index c6f6f52d871..59b59562625 100644 --- a/tests/service/data/SyntaxTree/Nullness/GenericTypeOtherConstraintAndThenNotNull.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/GenericTypeOtherConstraintAndThenNotNull.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/GenericTypeOtherConstraintAndThenNotNull.fs", false, - QualifiedNameOfFile GenericTypeOtherConstraintAndThenNotNull, [], [], + QualifiedNameOfFile GenericTypeOtherConstraintAndThenNotNull, [], [SynModuleOrNamespace ([GenericTypeOtherConstraintAndThenNotNull], false, AnonModule, [Types @@ -27,4 +27,5 @@ ImplFile WithKeyword = None })], (1,0--1,56))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/IntListOrNull.fs.bsl b/tests/service/data/SyntaxTree/Nullness/IntListOrNull.fs.bsl index c678aa83577..89aba46b669 100644 --- a/tests/service/data/SyntaxTree/Nullness/IntListOrNull.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/IntListOrNull.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/IntListOrNull.fs", false, - QualifiedNameOfFile IntListOrNull, [], [], + QualifiedNameOfFile IntListOrNull, [], [SynModuleOrNamespace ([IntListOrNull], false, AnonModule, [Let @@ -36,4 +36,5 @@ ImplFile (1,0--1,28))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/IntListOrNullOrNullOrNull.fs.bsl b/tests/service/data/SyntaxTree/Nullness/IntListOrNullOrNullOrNull.fs.bsl index 2ba94607f41..73acd0cd00d 100644 --- a/tests/service/data/SyntaxTree/Nullness/IntListOrNullOrNullOrNull.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/IntListOrNullOrNullOrNull.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/IntListOrNullOrNullOrNull.fs", false, - QualifiedNameOfFile IntListOrNullOrNullOrNull, [], [], + QualifiedNameOfFile IntListOrNullOrNullOrNull, [], [SynModuleOrNamespace ([IntListOrNullOrNullOrNull], false, AnonModule, [Let @@ -35,6 +35,7 @@ ImplFile EqualsRange = None })], (1,0--1,23))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,24)-(1,25) parse error Unexpected symbol '|' (directly before 'null') in binding. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCast.fs.bsl b/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCast.fs.bsl index 86094715714..773ff445618 100644 --- a/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCast.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCast.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/MatchWithTypeCast.fs", false, - QualifiedNameOfFile MatchWithTypeCast, [], [], + QualifiedNameOfFile MatchWithTypeCast, [], [SynModuleOrNamespace ([MatchWithTypeCast], false, AnonModule, [Expr @@ -20,4 +20,5 @@ ImplFile WithKeyword = (1,8--1,12) }), (1,0--2,24))], PreXmlDocEmpty, [], None, (1,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCastParens.fs.bsl b/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCastParens.fs.bsl index 2c465e58091..9576ea6b023 100644 --- a/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCastParens.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCastParens.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/MatchWithTypeCastParens.fs", false, - QualifiedNameOfFile MatchWithTypeCastParens, [], [], + QualifiedNameOfFile MatchWithTypeCastParens, [], [SynModuleOrNamespace ([MatchWithTypeCastParens], false, AnonModule, [Expr @@ -21,4 +21,5 @@ ImplFile WithKeyword = (1,8--1,12) }), (1,0--2,26))], PreXmlDocEmpty, [], None, (1,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCastParensAndSeparateNullCase.fs.bsl b/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCastParensAndSeparateNullCase.fs.bsl index aa2e5f0787c..00f7882ac7f 100644 --- a/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCastParensAndSeparateNullCase.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/MatchWithTypeCastParensAndSeparateNullCase.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/MatchWithTypeCastParensAndSeparateNullCase.fs", false, - QualifiedNameOfFile MatchWithTypeCastParensAndSeparateNullCase, [], [], + QualifiedNameOfFile MatchWithTypeCastParensAndSeparateNullCase, [], [SynModuleOrNamespace ([MatchWithTypeCastParensAndSeparateNullCase], false, AnonModule, [Expr @@ -23,4 +23,5 @@ ImplFile WithKeyword = (1,8--1,12) }), (1,0--2,33))], PreXmlDocEmpty, [], None, (1,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/NullAnnotatedExpression.fs.bsl b/tests/service/data/SyntaxTree/Nullness/NullAnnotatedExpression.fs.bsl index 207a76250e4..1b3916e4190 100644 --- a/tests/service/data/SyntaxTree/Nullness/NullAnnotatedExpression.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/NullAnnotatedExpression.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/NullAnnotatedExpression.fs", false, - QualifiedNameOfFile NullAnnotatedExpression, [], [], + QualifiedNameOfFile NullAnnotatedExpression, [], [SynModuleOrNamespace ([NullAnnotatedExpression], false, AnonModule, [Let @@ -70,4 +70,5 @@ ImplFile EqualsRange = Some (1,64--1,65) })], (1,0--1,70))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/RegressionAnnotatedInlinePatternMatch.fs.bsl b/tests/service/data/SyntaxTree/Nullness/RegressionAnnotatedInlinePatternMatch.fs.bsl index aaa2b2bafc3..2670129859e 100644 --- a/tests/service/data/SyntaxTree/Nullness/RegressionAnnotatedInlinePatternMatch.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/RegressionAnnotatedInlinePatternMatch.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/RegressionAnnotatedInlinePatternMatch.fs", false, - QualifiedNameOfFile RegressionAnnotatedInlinePatternMatch, [], [], + QualifiedNameOfFile RegressionAnnotatedInlinePatternMatch, [], [SynModuleOrNamespace ([RegressionAnnotatedInlinePatternMatch], false, AnonModule, [Expr @@ -26,4 +26,5 @@ ImplFile WithKeyword = (1,8--1,12) }), (1,0--2,37))], PreXmlDocEmpty, [], None, (1,0--2,37), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/RegressionChoiceType.fs.bsl b/tests/service/data/SyntaxTree/Nullness/RegressionChoiceType.fs.bsl index aa2b6752d76..79d2dfce12c 100644 --- a/tests/service/data/SyntaxTree/Nullness/RegressionChoiceType.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/RegressionChoiceType.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/RegressionChoiceType.fs", false, - QualifiedNameOfFile RegressionChoiceType, [], [], + QualifiedNameOfFile RegressionChoiceType, [], [SynModuleOrNamespace ([RegressionChoiceType], false, AnonModule, [Types @@ -52,4 +52,5 @@ ImplFile WithKeyword = None })], (1,0--7,19))], PreXmlDocEmpty, [], None, (1,0--8,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/RegressionListType.fs.bsl b/tests/service/data/SyntaxTree/Nullness/RegressionListType.fs.bsl index 5b1a914a438..749078efa17 100644 --- a/tests/service/data/SyntaxTree/Nullness/RegressionListType.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/RegressionListType.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/RegressionListType.fs", false, - QualifiedNameOfFile RegressionListType, [], [], + QualifiedNameOfFile RegressionListType, [], [SynModuleOrNamespace ([RegressionListType], false, AnonModule, [Types @@ -62,4 +62,5 @@ ImplFile WithKeyword = None })], (1,0--3,41))], PreXmlDocEmpty, [], None, (1,0--3,41), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/RegressionOneLinerOptionType.fs.bsl b/tests/service/data/SyntaxTree/Nullness/RegressionOneLinerOptionType.fs.bsl index 7a062070cb7..8d6a085bc09 100644 --- a/tests/service/data/SyntaxTree/Nullness/RegressionOneLinerOptionType.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/RegressionOneLinerOptionType.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/RegressionOneLinerOptionType.fs", false, - QualifiedNameOfFile RegressionOneLinerOptionType, [], [], + QualifiedNameOfFile RegressionOneLinerOptionType, [], [SynModuleOrNamespace ([RegressionOneLinerOptionType], false, AnonModule, [Types @@ -35,4 +35,5 @@ ImplFile WithKeyword = None })], (1,0--1,41))], PreXmlDocEmpty, [], None, (1,0--1,41), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/RegressionOptionType.fs.bsl b/tests/service/data/SyntaxTree/Nullness/RegressionOptionType.fs.bsl index 5491684ccaa..502b1ba39e7 100644 --- a/tests/service/data/SyntaxTree/Nullness/RegressionOptionType.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/RegressionOptionType.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/RegressionOptionType.fs", false, - QualifiedNameOfFile RegressionOptionType, [], [], + QualifiedNameOfFile RegressionOptionType, [], [SynModuleOrNamespace ([RegressionOptionType], false, AnonModule, [Types @@ -58,6 +58,7 @@ ImplFile WithKeyword = None })], (1,0--3,33))], PreXmlDocEmpty, [], None, (1,0--3,34), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (2,6)-(2,27) parse warning This construct is deprecated: it is only for use in the F# library diff --git a/tests/service/data/SyntaxTree/Nullness/RegressionOrPattern.fs.bsl b/tests/service/data/SyntaxTree/Nullness/RegressionOrPattern.fs.bsl index 82fe5cb33d5..be820f4de6c 100644 --- a/tests/service/data/SyntaxTree/Nullness/RegressionOrPattern.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/RegressionOrPattern.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/RegressionOrPattern.fs", false, - QualifiedNameOfFile RegressionOrPattern, [], [], + QualifiedNameOfFile RegressionOrPattern, [], [SynModuleOrNamespace ([RegressionOrPattern], false, AnonModule, [Expr @@ -37,4 +37,5 @@ ImplFile WithKeyword = (1,10--1,14) }), (1,0--3,24))], PreXmlDocEmpty, [], None, (1,0--3,24), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/RegressionResultType.fs.bsl b/tests/service/data/SyntaxTree/Nullness/RegressionResultType.fs.bsl index c36213899e7..e7de7e51e35 100644 --- a/tests/service/data/SyntaxTree/Nullness/RegressionResultType.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/RegressionResultType.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/RegressionResultType.fs", false, - QualifiedNameOfFile RegressionResultType, [], [], + QualifiedNameOfFile RegressionResultType, [], [SynModuleOrNamespace ([RegressionResultType], false, AnonModule, [Types @@ -53,4 +53,5 @@ ImplFile WithKeyword = None })], (1,4--7,35))], PreXmlDocEmpty, [], None, (1,4--7,35), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/SignatureInAbstractMember.fs.bsl b/tests/service/data/SyntaxTree/Nullness/SignatureInAbstractMember.fs.bsl index f1ba6080294..317752b3425 100644 --- a/tests/service/data/SyntaxTree/Nullness/SignatureInAbstractMember.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/SignatureInAbstractMember.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/SignatureInAbstractMember.fs", false, - QualifiedNameOfFile SignatureInAbstractMember, [], [], + QualifiedNameOfFile SignatureInAbstractMember, [], [SynModuleOrNamespace ([SignatureInAbstractMember], false, AnonModule, [Types @@ -57,4 +57,5 @@ ImplFile WithKeyword = None })], (1,0--2,61))], PreXmlDocEmpty, [], None, (1,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/StringOrNull.fs.bsl b/tests/service/data/SyntaxTree/Nullness/StringOrNull.fs.bsl index 4e8240dd5fb..14b3dde2c67 100644 --- a/tests/service/data/SyntaxTree/Nullness/StringOrNull.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/StringOrNull.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/StringOrNull.fs", false, QualifiedNameOfFile StringOrNull, - [], [], + [], [SynModuleOrNamespace ([StringOrNull], false, AnonModule, [Let @@ -29,4 +29,5 @@ ImplFile EqualsRange = Some (1,22--1,23) })], (1,0--1,28))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/StringOrNullInFunctionArg.fs.bsl b/tests/service/data/SyntaxTree/Nullness/StringOrNullInFunctionArg.fs.bsl index 864e6e38365..162ebbfbdf3 100644 --- a/tests/service/data/SyntaxTree/Nullness/StringOrNullInFunctionArg.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/StringOrNullInFunctionArg.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/StringOrNullInFunctionArg.fs", false, - QualifiedNameOfFile StringOrNullInFunctionArg, [], [], + QualifiedNameOfFile StringOrNullInFunctionArg, [], [SynModuleOrNamespace ([StringOrNullInFunctionArg], false, AnonModule, [Let @@ -34,4 +34,5 @@ ImplFile EqualsRange = Some (1,32--1,33) })], (1,0--1,36))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Nullness/TypeAbbreviationAddingWithNull.fs.bsl b/tests/service/data/SyntaxTree/Nullness/TypeAbbreviationAddingWithNull.fs.bsl index 61d17ea291a..20af4b08c2e 100644 --- a/tests/service/data/SyntaxTree/Nullness/TypeAbbreviationAddingWithNull.fs.bsl +++ b/tests/service/data/SyntaxTree/Nullness/TypeAbbreviationAddingWithNull.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Nullness/TypeAbbreviationAddingWithNull.fs", false, - QualifiedNameOfFile TypeAbbreviationAddingWithNull, [], [], + QualifiedNameOfFile TypeAbbreviationAddingWithNull, [], [SynModuleOrNamespace ([TypeAbbreviationAddingWithNull], false, AnonModule, [Types @@ -22,4 +22,5 @@ ImplFile WithKeyword = None })], (1,0--1,33))], PreXmlDocEmpty, [], None, (1,0--1,33), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 01.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 01.fs.bsl index 43d64f45a98..d181dbabbb8 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 01.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternAnd 01.fs", false, - QualifiedNameOfFile ActivePatternAnd 01, [], [], + QualifiedNameOfFile ActivePatternAnd 01, [], [SynModuleOrNamespace ([ActivePatternAnd 01], false, AnonModule, [Let @@ -29,6 +29,7 @@ ImplFile EqualsRange = Some (1,26--1,27) })], (1,0--1,34))], PreXmlDocEmpty, [], None, (1,0--1,34), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,34) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 01' based on the file name 'ActivePatternAnd 01.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 02.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 02.fs.bsl index 23ebdc7c8da..2197d608c40 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 02.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternAnd 02.fs", false, - QualifiedNameOfFile ActivePatternAnd 02, [], [], + QualifiedNameOfFile ActivePatternAnd 02, [], [SynModuleOrNamespace ([ActivePatternAnd 02], false, AnonModule, [Let @@ -30,6 +30,7 @@ ImplFile EqualsRange = Some (1,28--1,29) })], (1,0--1,36))], PreXmlDocEmpty, [], None, (1,0--1,36), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,36) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 02' based on the file name 'ActivePatternAnd 02.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 03.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 03.fs.bsl index f59e50d9403..bf6cf297f48 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 03.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternAnd 03.fs", false, - QualifiedNameOfFile ActivePatternAnd 03, [], [], + QualifiedNameOfFile ActivePatternAnd 03, [], [SynModuleOrNamespace ([ActivePatternAnd 03], false, AnonModule, [Let @@ -30,6 +30,7 @@ ImplFile EqualsRange = Some (1,28--1,29) })], (1,0--1,36))], PreXmlDocEmpty, [], None, (1,0--1,36), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,36) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 03' based on the file name 'ActivePatternAnd 03.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 04.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 04.fs.bsl index 37b343fad98..8da67b53c6f 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 04.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternAnd 04.fs", false, - QualifiedNameOfFile ActivePatternAnd 04, [], [], + QualifiedNameOfFile ActivePatternAnd 04, [], [SynModuleOrNamespace ([ActivePatternAnd 04], false, AnonModule, [Let @@ -31,6 +31,7 @@ ImplFile EqualsRange = Some (1,30--1,31) })], (1,0--1,38))], PreXmlDocEmpty, [], None, (1,0--1,38), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,38) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 04' based on the file name 'ActivePatternAnd 04.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 05.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 05.fs.bsl index 062a413ccde..290c17827df 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 05.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternAnd 05.fs", false, - QualifiedNameOfFile ActivePatternAnd 05, [], [], + QualifiedNameOfFile ActivePatternAnd 05, [], [SynModuleOrNamespace ([ActivePatternAnd 05], false, AnonModule, [Let @@ -31,6 +31,7 @@ ImplFile EqualsRange = Some (1,30--1,31) })], (1,0--1,38))], PreXmlDocEmpty, [], None, (1,0--1,38), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,38) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 05' based on the file name 'ActivePatternAnd 05.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 06.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 06.fs.bsl index 7c8649824d5..b4226cc1f83 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 06.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternAnd 06.fs", false, - QualifiedNameOfFile ActivePatternAnd 06, [], [], + QualifiedNameOfFile ActivePatternAnd 06, [], [SynModuleOrNamespace ([ActivePatternAnd 06], false, AnonModule, [Let @@ -34,6 +34,7 @@ ImplFile EqualsRange = Some (1,36--1,37) })], (1,0--1,44))], PreXmlDocEmpty, [], None, (1,0--1,44), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,44) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 06' based on the file name 'ActivePatternAnd 06.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 07.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 07.fs.bsl index 71db7cf842c..c4970b53599 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 07.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 07.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternAnd 07.fs", false, - QualifiedNameOfFile ActivePatternAnd 07, [], [], + QualifiedNameOfFile ActivePatternAnd 07, [], [SynModuleOrNamespace ([ActivePatternAnd 07], false, AnonModule, [Let @@ -33,6 +33,7 @@ ImplFile EqualsRange = Some (1,32--1,33) })], (1,0--1,40))], PreXmlDocEmpty, [], None, (1,0--1,40), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,40) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 07' based on the file name 'ActivePatternAnd 07.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 08.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 08.fs.bsl index c2c958503a8..277fb1aeac1 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 08.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAnd 08.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternAnd 08.fs", false, - QualifiedNameOfFile ActivePatternAnd 08, [], [], + QualifiedNameOfFile ActivePatternAnd 08, [], [SynModuleOrNamespace ([ActivePatternAnd 08], false, AnonModule, [Let @@ -33,6 +33,7 @@ ImplFile EqualsRange = Some (1,34--1,35) })], (1,0--1,42))], PreXmlDocEmpty, [], None, (1,0--1,42), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(1,42) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternAnd 08' based on the file name 'ActivePatternAnd 08.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternAsFunction.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAsFunction.fs.bsl index 83e6005fd33..6775b6d1846 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternAsFunction.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternAsFunction.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternAsFunction.fs", false, - QualifiedNameOfFile ActivePatternAsFunction, [], [], + QualifiedNameOfFile ActivePatternAsFunction, [], [SynModuleOrNamespace ([ActivePatternAsFunction], false, AnonModule, [Expr @@ -16,4 +16,5 @@ ImplFile (2,0--2,14))], PreXmlDocEmpty, [], None, (2,0--2,14), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternDefinition.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternDefinition.fs.bsl index 9741e505625..c4b9f6a0919 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternDefinition.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternDefinition.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternDefinition.fs", false, - QualifiedNameOfFile ActivePatternDefinition, [], [], + QualifiedNameOfFile ActivePatternDefinition, [], [SynModuleOrNamespace ([ActivePatternDefinition], false, AnonModule, [Let @@ -62,4 +62,5 @@ ImplFile EqualsRange = Some (2,26--2,27) })], (2,0--2,59))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 01.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 01.fs.bsl index f90393a139b..5862ca0ad2b 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 01.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternExceptionAnd 01.fs", false, - QualifiedNameOfFile ActivePatternExceptionAnd 01, [], [], + QualifiedNameOfFile ActivePatternExceptionAnd 01, [], [SynModuleOrNamespace ([ActivePatternExceptionAnd 01], false, AnonModule, [Exception @@ -38,6 +38,7 @@ ImplFile EqualsRange = Some (3,22--3,23) })], (3,0--3,30))], PreXmlDocEmpty, [], None, (1,0--3,30), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 01' based on the file name 'ActivePatternExceptionAnd 01.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 02.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 02.fs.bsl index ad1420869f1..8ebb6648227 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 02.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternExceptionAnd 02.fs", false, - QualifiedNameOfFile ActivePatternExceptionAnd 02, [], [], + QualifiedNameOfFile ActivePatternExceptionAnd 02, [], [SynModuleOrNamespace ([ActivePatternExceptionAnd 02], false, AnonModule, [Exception @@ -39,6 +39,7 @@ ImplFile EqualsRange = Some (3,24--3,25) })], (3,0--3,32))], PreXmlDocEmpty, [], None, (1,0--3,32), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 02' based on the file name 'ActivePatternExceptionAnd 02.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 03.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 03.fs.bsl index 1b4bdf7dfd9..2574d438123 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 03.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternExceptionAnd 03.fs", false, - QualifiedNameOfFile ActivePatternExceptionAnd 03, [], [], + QualifiedNameOfFile ActivePatternExceptionAnd 03, [], [SynModuleOrNamespace ([ActivePatternExceptionAnd 03], false, AnonModule, [Exception @@ -39,6 +39,7 @@ ImplFile EqualsRange = Some (3,24--3,25) })], (3,0--3,32))], PreXmlDocEmpty, [], None, (1,0--3,32), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 03' based on the file name 'ActivePatternExceptionAnd 03.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 04.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 04.fs.bsl index ea96f1966b4..74cdc1226cb 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 04.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternExceptionAnd 04.fs", false, - QualifiedNameOfFile ActivePatternExceptionAnd 04, [], [], + QualifiedNameOfFile ActivePatternExceptionAnd 04, [], [SynModuleOrNamespace ([ActivePatternExceptionAnd 04], false, AnonModule, [Exception @@ -40,6 +40,7 @@ ImplFile EqualsRange = Some (3,26--3,27) })], (3,0--3,34))], PreXmlDocEmpty, [], None, (1,0--3,34), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 04' based on the file name 'ActivePatternExceptionAnd 04.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 05.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 05.fs.bsl index 2517eb3918d..53656ca36c6 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 05.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternExceptionAnd 05.fs", false, - QualifiedNameOfFile ActivePatternExceptionAnd 05, [], [], + QualifiedNameOfFile ActivePatternExceptionAnd 05, [], [SynModuleOrNamespace ([ActivePatternExceptionAnd 05], false, AnonModule, [Exception @@ -40,6 +40,7 @@ ImplFile EqualsRange = Some (3,26--3,27) })], (3,0--3,34))], PreXmlDocEmpty, [], None, (1,0--3,34), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 05' based on the file name 'ActivePatternExceptionAnd 05.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 06.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 06.fs.bsl index 91e95536c83..e96412948a7 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 06.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternExceptionAnd 06.fs", false, - QualifiedNameOfFile ActivePatternExceptionAnd 06, [], [], + QualifiedNameOfFile ActivePatternExceptionAnd 06, [], [SynModuleOrNamespace ([ActivePatternExceptionAnd 06], false, AnonModule, [Exception @@ -43,6 +43,7 @@ ImplFile EqualsRange = Some (3,32--3,33) })], (3,0--3,40))], PreXmlDocEmpty, [], None, (1,0--3,40), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 06' based on the file name 'ActivePatternExceptionAnd 06.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 07.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 07.fs.bsl index 35c7d986cf3..5da96ee160d 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 07.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 07.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternExceptionAnd 07.fs", false, - QualifiedNameOfFile ActivePatternExceptionAnd 07, [], [], + QualifiedNameOfFile ActivePatternExceptionAnd 07, [], [SynModuleOrNamespace ([ActivePatternExceptionAnd 07], false, AnonModule, [Exception @@ -41,6 +41,7 @@ ImplFile EqualsRange = Some (3,28--3,29) })], (3,0--3,36))], PreXmlDocEmpty, [], None, (1,0--3,36), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 07' based on the file name 'ActivePatternExceptionAnd 07.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 08.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 08.fs.bsl index d61d4fa3ef0..b9c67aaa65a 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 08.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternExceptionAnd 08.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternExceptionAnd 08.fs", false, - QualifiedNameOfFile ActivePatternExceptionAnd 08, [], [], + QualifiedNameOfFile ActivePatternExceptionAnd 08, [], [SynModuleOrNamespace ([ActivePatternExceptionAnd 08], false, AnonModule, [Exception @@ -41,6 +41,7 @@ ImplFile EqualsRange = Some (3,30--3,31) })], (3,0--3,38))], PreXmlDocEmpty, [], None, (1,0--3,38), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'ActivePatternExceptionAnd 08' based on the file name 'ActivePatternExceptionAnd 08.fs'. 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/tests/service/data/SyntaxTree/OperatorName/ActivePatternIdentifierInPrivateMember.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ActivePatternIdentifierInPrivateMember.fs.bsl index a91a973e4e5..faa01ee9c32 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ActivePatternIdentifierInPrivateMember.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ActivePatternIdentifierInPrivateMember.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ActivePatternIdentifierInPrivateMember.fs", false, - QualifiedNameOfFile ActivePatternIdentifierInPrivateMember, [], [], + QualifiedNameOfFile ActivePatternIdentifierInPrivateMember, [], [SynModuleOrNamespace ([ActivePatternIdentifierInPrivateMember], false, AnonModule, [Types @@ -59,4 +59,5 @@ ImplFile WithKeyword = None })], (2,0--7,6))], PreXmlDocEmpty, [], None, (2,0--8,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/CustomOperatorDefinition.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/CustomOperatorDefinition.fs.bsl index 33ebeafb08c..af3de67443e 100644 --- a/tests/service/data/SyntaxTree/OperatorName/CustomOperatorDefinition.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/CustomOperatorDefinition.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/CustomOperatorDefinition.fs", false, - QualifiedNameOfFile CustomOperatorDefinition, [], [], + QualifiedNameOfFile CustomOperatorDefinition, [], [SynModuleOrNamespace ([CustomOperatorDefinition], false, AnonModule, [Let @@ -40,4 +40,5 @@ ImplFile EqualsRange = Some (2,12--2,13) })], (2,0--2,19))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/DetectDifferenceBetweenCompiledOperators.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/DetectDifferenceBetweenCompiledOperators.fs.bsl index 51389ae62c8..f004ea099bc 100644 --- a/tests/service/data/SyntaxTree/OperatorName/DetectDifferenceBetweenCompiledOperators.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/DetectDifferenceBetweenCompiledOperators.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/DetectDifferenceBetweenCompiledOperators.fs", false, - QualifiedNameOfFile DetectDifferenceBetweenCompiledOperators, [], [], + QualifiedNameOfFile DetectDifferenceBetweenCompiledOperators, [], [SynModuleOrNamespace ([DetectDifferenceBetweenCompiledOperators], false, AnonModule, [Expr @@ -25,4 +25,5 @@ ImplFile Ident b, (3,0--3,15)), (3,0--3,15))], PreXmlDocEmpty, [], None, (2,0--3,15), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/InfixOperation.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/InfixOperation.fs.bsl index 20572a95193..ca7dcac4ee8 100644 --- a/tests/service/data/SyntaxTree/OperatorName/InfixOperation.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/InfixOperation.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/InfixOperation.fs", false, - QualifiedNameOfFile InfixOperation, [], [], + QualifiedNameOfFile InfixOperation, [], [SynModuleOrNamespace ([InfixOperation], false, AnonModule, [Expr @@ -18,4 +18,5 @@ ImplFile (2,0--2,5))], PreXmlDocEmpty, [], None, (2,0--2,5), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/NamedParameter.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/NamedParameter.fs.bsl index bc0bf9748b4..a7508b0341d 100644 --- a/tests/service/data/SyntaxTree/OperatorName/NamedParameter.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/NamedParameter.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/NamedParameter.fs", false, - QualifiedNameOfFile NamedParameter, [], [], + QualifiedNameOfFile NamedParameter, [], [SynModuleOrNamespace ([NamedParameter], false, AnonModule, [Expr @@ -21,4 +21,5 @@ ImplFile Some (2,5--2,6), (2,1--2,6)), (2,0--2,6)), (2,0--2,6))], PreXmlDocEmpty, [], None, (2,0--2,6), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/NameofOperator.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/NameofOperator.fs.bsl index 49f2b8a4332..6ffa57b4ccb 100644 --- a/tests/service/data/SyntaxTree/OperatorName/NameofOperator.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/NameofOperator.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/NameofOperator.fs", false, - QualifiedNameOfFile NameofOperator, [], [], + QualifiedNameOfFile NameofOperator, [], [SynModuleOrNamespace ([NameofOperator], false, AnonModule, [Expr @@ -17,4 +17,5 @@ ImplFile (2,0--2,9)), (2,0--2,9))], PreXmlDocEmpty, [], None, (2,0--2,9), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/ObjectModelWithTwoMembers.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/ObjectModelWithTwoMembers.fs.bsl index 760c3f64ca3..c610b0e59d5 100644 --- a/tests/service/data/SyntaxTree/OperatorName/ObjectModelWithTwoMembers.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/ObjectModelWithTwoMembers.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/ObjectModelWithTwoMembers.fs", false, - QualifiedNameOfFile ObjectModelWithTwoMembers, [], [], + QualifiedNameOfFile ObjectModelWithTwoMembers, [], [SynModuleOrNamespace ([ObjectModelWithTwoMembers], false, AnonModule, [Types @@ -111,4 +111,5 @@ ImplFile WithKeyword = None })], (2,0--4,79))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/OperatorAsFunction.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/OperatorAsFunction.fs.bsl index a18485248e6..205db05cc54 100644 --- a/tests/service/data/SyntaxTree/OperatorName/OperatorAsFunction.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/OperatorAsFunction.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/OperatorAsFunction.fs", false, - QualifiedNameOfFile OperatorAsFunction, [], [], + QualifiedNameOfFile OperatorAsFunction, [], [SynModuleOrNamespace ([OperatorAsFunction], false, AnonModule, [Expr @@ -20,4 +20,5 @@ ImplFile Const (Int32 4, (2,6--2,7)), (2,0--2,7)), (2,0--2,7))], PreXmlDocEmpty, [], None, (2,0--2,7), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/OperatorInMemberDefinition.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/OperatorInMemberDefinition.fs.bsl index 4e05d9cbd83..5137e642c9a 100644 --- a/tests/service/data/SyntaxTree/OperatorName/OperatorInMemberDefinition.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/OperatorInMemberDefinition.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/OperatorInMemberDefinition.fs", false, - QualifiedNameOfFile OperatorInMemberDefinition, [], [], + QualifiedNameOfFile OperatorInMemberDefinition, [], [SynModuleOrNamespace ([OperatorInMemberDefinition], false, AnonModule, [Types @@ -60,4 +60,5 @@ ImplFile WithKeyword = None })], (2,0--3,28))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/OperatorNameInSynValSig.fsi.bsl b/tests/service/data/SyntaxTree/OperatorName/OperatorNameInSynValSig.fsi.bsl index b90adbf927e..bc0e4b085c3 100644 --- a/tests/service/data/SyntaxTree/OperatorName/OperatorNameInSynValSig.fsi.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/OperatorNameInSynValSig.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/OperatorName/OperatorNameInSynValSig.fsi", - QualifiedNameOfFile IntrinsicOperators, [], [], + QualifiedNameOfFile IntrinsicOperators, [], [SynModuleOrNamespaceSig ([IntrinsicOperators], false, NamedModule, [Val @@ -38,4 +38,5 @@ SigFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--3,37), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/OperatorNameInValConstraint.fsi.bsl b/tests/service/data/SyntaxTree/OperatorName/OperatorNameInValConstraint.fsi.bsl index d31043ea99c..fe765dd9532 100644 --- a/tests/service/data/SyntaxTree/OperatorName/OperatorNameInValConstraint.fsi.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/OperatorNameInValConstraint.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/OperatorName/OperatorNameInValConstraint.fsi", - QualifiedNameOfFile Operators, [], [], + QualifiedNameOfFile Operators, [], [SynModuleOrNamespaceSig ([Operators], false, NamedModule, [Val @@ -79,6 +79,7 @@ SigFile Range = (2,0--2,12) }], None, (2,0--12,94), { LeadingKeyword = Module (3,4--3,10) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (12,79)-(12,94) parse error This construct is deprecated: it is only for use in the F# library diff --git a/tests/service/data/SyntaxTree/OperatorName/OptionalExpression.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/OptionalExpression.fs.bsl index 2db0610b10d..1d2315c9cea 100644 --- a/tests/service/data/SyntaxTree/OperatorName/OptionalExpression.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/OptionalExpression.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/OptionalExpression.fs", false, - QualifiedNameOfFile OptionalExpression, [], [], + QualifiedNameOfFile OptionalExpression, [], [SynModuleOrNamespace ([OptionalExpression], false, AnonModule, [Expr @@ -24,4 +24,5 @@ ImplFile Some (2,8--2,9), (2,1--2,9)), (2,0--2,9)), (2,0--2,9))], PreXmlDocEmpty, [], None, (2,0--2,9), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternAsFunction.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternAsFunction.fs.bsl index 81d08cb1074..5a752bc892d 100644 --- a/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternAsFunction.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternAsFunction.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/PartialActivePatternAsFunction.fs", false, - QualifiedNameOfFile PartialActivePatternAsFunction, [], [], + QualifiedNameOfFile PartialActivePatternAsFunction, [], [SynModuleOrNamespace ([PartialActivePatternAsFunction], false, AnonModule, [Expr @@ -16,4 +16,5 @@ ImplFile (2,0--2,11))], PreXmlDocEmpty, [], None, (2,0--2,11), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternDefinition.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternDefinition.fs.bsl index 6b6c5b59524..1af2f13c764 100644 --- a/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternDefinition.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternDefinition.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/PartialActivePatternDefinition.fs", false, - QualifiedNameOfFile PartialActivePatternDefinition, [], [], + QualifiedNameOfFile PartialActivePatternDefinition, [], [SynModuleOrNamespace ([PartialActivePatternDefinition], false, AnonModule, [Let @@ -50,4 +50,5 @@ ImplFile EqualsRange = Some (2,35--2,36) })], (2,0--2,88))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternDefinitionWithoutParameters.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternDefinitionWithoutParameters.fs.bsl index be0b81e8577..d2f6c09c3a0 100644 --- a/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternDefinitionWithoutParameters.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/PartialActivePatternDefinitionWithoutParameters.fs.bsl @@ -2,7 +2,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/PartialActivePatternDefinitionWithoutParameters.fs", false, QualifiedNameOfFile PartialActivePatternDefinitionWithoutParameters, - [], [], + [], [SynModuleOrNamespace ([PartialActivePatternDefinitionWithoutParameters], false, AnonModule, [Let @@ -27,4 +27,5 @@ ImplFile EqualsRange = Some (2,18--2,19) })], (2,0--2,33))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/PrefixOperation.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/PrefixOperation.fs.bsl index 15193e63278..610d2c0f9f9 100644 --- a/tests/service/data/SyntaxTree/OperatorName/PrefixOperation.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/PrefixOperation.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/PrefixOperation.fs", false, - QualifiedNameOfFile PrefixOperation, [], [], + QualifiedNameOfFile PrefixOperation, [], [SynModuleOrNamespace ([PrefixOperation], false, AnonModule, [Expr @@ -15,4 +15,5 @@ ImplFile (2,0--2,5))], PreXmlDocEmpty, [], None, (2,0--2,5), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/PrefixOperationWithTwoCharacters.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/PrefixOperationWithTwoCharacters.fs.bsl index f73ff914587..c2a4b003dd8 100644 --- a/tests/service/data/SyntaxTree/OperatorName/PrefixOperationWithTwoCharacters.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/PrefixOperationWithTwoCharacters.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/PrefixOperationWithTwoCharacters.fs", false, - QualifiedNameOfFile PrefixOperationWithTwoCharacters, [], [], + QualifiedNameOfFile PrefixOperationWithTwoCharacters, [], [SynModuleOrNamespace ([PrefixOperationWithTwoCharacters], false, AnonModule, [Expr @@ -14,4 +14,5 @@ ImplFile None, (2,0--2,2)), Ident arg, (2,0--2,5)), (2,0--2,5))], PreXmlDocEmpty, [], None, (2,0--2,5), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/OperatorName/QualifiedOperatorExpression.fs.bsl b/tests/service/data/SyntaxTree/OperatorName/QualifiedOperatorExpression.fs.bsl index b83fc4ecf68..7db9838fe40 100644 --- a/tests/service/data/SyntaxTree/OperatorName/QualifiedOperatorExpression.fs.bsl +++ b/tests/service/data/SyntaxTree/OperatorName/QualifiedOperatorExpression.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/OperatorName/QualifiedOperatorExpression.fs", false, - QualifiedNameOfFile QualifiedOperatorExpression, [], [], + QualifiedNameOfFile QualifiedOperatorExpression, [], [SynModuleOrNamespace ([QualifiedOperatorExpression], false, AnonModule, [Let @@ -42,4 +42,5 @@ ImplFile EqualsRange = Some (2,23--2,24) })], (2,0--2,40))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ParsedHashDirective/RegularStringAsParsedHashDirectiveArgument.fs.bsl b/tests/service/data/SyntaxTree/ParsedHashDirective/RegularStringAsParsedHashDirectiveArgument.fs.bsl index 360f4117e4b..47e19577186 100644 --- a/tests/service/data/SyntaxTree/ParsedHashDirective/RegularStringAsParsedHashDirectiveArgument.fs.bsl +++ b/tests/service/data/SyntaxTree/ParsedHashDirective/RegularStringAsParsedHashDirectiveArgument.fs.bsl @@ -2,7 +2,6 @@ ImplFile (ParsedImplFileInput ("/root/ParsedHashDirective/RegularStringAsParsedHashDirectiveArgument.fs", false, QualifiedNameOfFile RegularStringAsParsedHashDirectiveArgument, [], - [], [SynModuleOrNamespace ([RegularStringAsParsedHashDirectiveArgument], false, AnonModule, [HashDirective @@ -11,4 +10,5 @@ ImplFile (2,0--2,9))], PreXmlDocEmpty, [], None, (2,0--2,9), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ParsedHashDirective/SourceIdentifierAsParsedHashDirectiveArgument.fs.bsl b/tests/service/data/SyntaxTree/ParsedHashDirective/SourceIdentifierAsParsedHashDirectiveArgument.fs.bsl index 8434a2be591..b833b566ae7 100644 --- a/tests/service/data/SyntaxTree/ParsedHashDirective/SourceIdentifierAsParsedHashDirectiveArgument.fs.bsl +++ b/tests/service/data/SyntaxTree/ParsedHashDirective/SourceIdentifierAsParsedHashDirectiveArgument.fs.bsl @@ -2,7 +2,7 @@ ImplFile (ParsedImplFileInput ("/root/ParsedHashDirective/SourceIdentifierAsParsedHashDirectiveArgument.fs", false, QualifiedNameOfFile SourceIdentifierAsParsedHashDirectiveArgument, - [], [], + [], [SynModuleOrNamespace ([SourceIdentifierAsParsedHashDirectiveArgument], false, AnonModule, [HashDirective @@ -13,4 +13,5 @@ ImplFile (0,0--0,0))], (0,0--0,0)), (2,0--2,23))], PreXmlDocEmpty, [], None, (2,0--2,23), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ParsedHashDirective/TripleQuoteStringAsParsedHashDirectiveArgument.fs.bsl b/tests/service/data/SyntaxTree/ParsedHashDirective/TripleQuoteStringAsParsedHashDirectiveArgument.fs.bsl index fd629563d32..6321ae9bfdd 100644 --- a/tests/service/data/SyntaxTree/ParsedHashDirective/TripleQuoteStringAsParsedHashDirectiveArgument.fs.bsl +++ b/tests/service/data/SyntaxTree/ParsedHashDirective/TripleQuoteStringAsParsedHashDirectiveArgument.fs.bsl @@ -2,13 +2,10 @@ ImplFile (ParsedImplFileInput ("/root/ParsedHashDirective/TripleQuoteStringAsParsedHashDirectiveArgument.fs", false, QualifiedNameOfFile TripleQuoteStringAsParsedHashDirectiveArgument, - [WarningOff ((2,8--2,16), 40)], [], + [], [SynModuleOrNamespace ([TripleQuoteStringAsParsedHashDirectiveArgument], false, AnonModule, - [HashDirective - (ParsedHashDirective - ("nowarn", [String ("40", TripleQuote, (2,8--2,16))], - (2,0--2,16)), (2,0--2,16))], PreXmlDocEmpty, [], None, - (2,0--2,16), { LeadingKeyword = None })], (true, true), - { ConditionalDirectives = [] - CodeComments = [] }, set [])) + [], PreXmlDocEmpty, [], None, (3,0--3,0), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + WarnDirectives = [Nowarn ([40], (2,0--2,16))] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/ParsedHashDirective/VerbatimStringAsParsedHashDirectiveArgument.fs.bsl b/tests/service/data/SyntaxTree/ParsedHashDirective/VerbatimStringAsParsedHashDirectiveArgument.fs.bsl index 2dbceeacd80..b6e9cdc8806 100644 --- a/tests/service/data/SyntaxTree/ParsedHashDirective/VerbatimStringAsParsedHashDirectiveArgument.fs.bsl +++ b/tests/service/data/SyntaxTree/ParsedHashDirective/VerbatimStringAsParsedHashDirectiveArgument.fs.bsl @@ -2,7 +2,6 @@ ImplFile (ParsedImplFileInput ("/root/ParsedHashDirective/VerbatimStringAsParsedHashDirectiveArgument.fs", false, QualifiedNameOfFile VerbatimStringAsParsedHashDirectiveArgument, [], - [], [SynModuleOrNamespace ([VerbatimStringAsParsedHashDirectiveArgument], false, AnonModule, [HashDirective @@ -11,4 +10,5 @@ ImplFile (2,0--2,14))], PreXmlDocEmpty, [], None, (2,0--2,14), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/And 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/And 01.fs.bsl index 679d264dfcc..dfc0b7f79b1 100644 --- a/tests/service/data/SyntaxTree/Pattern/And 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/And 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/And 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/And 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -52,4 +52,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/And 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/And 02.fs.bsl index f533ba83b0a..217728c591c 100644 --- a/tests/service/data/SyntaxTree/Pattern/And 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/And 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/And 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/And 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -54,4 +54,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/And 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/And 03.fs.bsl index b75921e2808..2e65f951157 100644 --- a/tests/service/data/SyntaxTree/Pattern/And 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/And 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/And 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/And 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -53,4 +53,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/And 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/And 04.fs.bsl index 7a0fa1f4c89..f049c2f689c 100644 --- a/tests/service/data/SyntaxTree/Pattern/And 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/And 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/And 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/And 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -55,4 +55,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/As 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 01.fs.bsl index f0277e7a075..eec702d3f47 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,4 +19,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,14), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/As 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 02.fs.bsl index dc9ff5caae9..bb58c950ff6 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,6) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/As 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 03.fs.bsl index 87eeb9e821a..95af9d360b3 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/As 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 04.fs.bsl index dbbdbdd9f3e..b7347690d10 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,6)-(3,8) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/As 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 05.fs.bsl index 07a1aac463e..9c877d54029 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,6) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/As 06.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 06.fs.bsl index 5ce6e55db4d..662ca2e2655 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,6)-(3,8) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/As 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 07.fs.bsl index b462b81d90b..0089a35011a 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,6)-(3,8) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/As 08.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 08.fs.bsl index bfe069db512..0ab7fd548d5 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,6) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/As 09.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 09.fs.bsl index ad9aa2247c1..77bb6b74bf2 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 09.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 09.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 09.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -30,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,6)-(3,8) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/As 10.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 10.fs.bsl index 384bd2c6d06..be2e28d3469 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 10.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 10.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 10.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,7)-(3,9) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/As 11.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 11.fs.bsl index 84773ba8ee6..a7fd1764123 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 11.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 11.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 11.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -23,6 +23,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,6)-(3,8) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/As 12.fs.bsl b/tests/service/data/SyntaxTree/Pattern/As 12.fs.bsl index f77b92aba46..87273a9a75b 100644 --- a/tests/service/data/SyntaxTree/Pattern/As 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/As 12.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/As 12.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/As 12.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,7)-(4,9) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Cons 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Cons 01.fs.bsl index c48f71c8ab2..d9bb73b0b58 100644 --- a/tests/service/data/SyntaxTree/Pattern/Cons 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Cons 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/Cons 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/Cons 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,4 +19,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Cons 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Cons 02.fs.bsl index a88741e666c..9608ac53f4c 100644 --- a/tests/service/data/SyntaxTree/Pattern/Cons 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Cons 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/Cons 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/Cons 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,6) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Cons 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Cons 03.fs.bsl index fda13199e97..954f68dadea 100644 --- a/tests/service/data/SyntaxTree/Pattern/Cons 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Cons 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/Cons 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/Cons 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,6) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Cons 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Cons 04.fs.bsl index 90d727b5f30..1b324a7e582 100644 --- a/tests/service/data/SyntaxTree/Pattern/Cons 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Cons 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/Cons 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/Cons 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -21,6 +21,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,6) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/InHeadPattern.fs.bsl b/tests/service/data/SyntaxTree/Pattern/InHeadPattern.fs.bsl index 13a1e99ea00..8ef79374ffa 100644 --- a/tests/service/data/SyntaxTree/Pattern/InHeadPattern.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/InHeadPattern.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/InHeadPattern.fs", false, QualifiedNameOfFile InHeadPattern, - [], [], + [], [SynModuleOrNamespace ([InHeadPattern], false, AnonModule, [Let @@ -29,4 +29,5 @@ ImplFile EqualsRange = Some (2,11--2,12) })], (2,0--2,24))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/IsInst 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/IsInst 01.fs.bsl index 3b690e54512..d68b03a2446 100644 --- a/tests/service/data/SyntaxTree/Pattern/IsInst 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/IsInst 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/IsInst 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/IsInst 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/IsInst 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/IsInst 02.fs.bsl index dd1e86fabe4..d30e522dc20 100644 --- a/tests/service/data/SyntaxTree/Pattern/IsInst 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/IsInst 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/IsInst 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/IsInst 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in pattern matching. Expected '->' or other token. diff --git a/tests/service/data/SyntaxTree/Pattern/IsInst 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/IsInst 03.fs.bsl index 320a8c97f75..7cd0f86d4eb 100644 --- a/tests/service/data/SyntaxTree/Pattern/IsInst 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/IsInst 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/IsInst 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/IsInst 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,2)-(4,4) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/Pattern/IsInst 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/IsInst 04.fs.bsl index 1cf58c17dbc..d26ed1e4af2 100644 --- a/tests/service/data/SyntaxTree/Pattern/IsInst 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/IsInst 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/IsInst 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/IsInst 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,2)-(4,4) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/Pattern/IsInst 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/IsInst 05.fs.bsl index 136e844c2ef..b1a0e756d19 100644 --- a/tests/service/data/SyntaxTree/Pattern/IsInst 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/IsInst 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/IsInst 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/IsInst 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,2)-(4,4) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl index 4a3050eb9f9..caa7e025499 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Named field 01.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -22,4 +21,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl index b7bfc84c6d6..a571440a741 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Named field 02.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -23,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,15)-(4,16) parse error Unexpected symbol ')' in pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl index 0740dee26d8..4902847118f 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Named field 03.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -23,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,18), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,12)-(4,13) parse error Unexpected symbol ')' in pattern. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl index 33a958c138e..8289d0b9bef 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Named field 04.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -21,4 +20,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl index 969fb6c2b32..9e12bc1e850 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Named field 05.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -22,6 +21,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,24), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,11)-(4,12) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/OperatorInMatchPattern.fs.bsl b/tests/service/data/SyntaxTree/Pattern/OperatorInMatchPattern.fs.bsl index d9f4fc99fd0..53eba0b1b3a 100644 --- a/tests/service/data/SyntaxTree/Pattern/OperatorInMatchPattern.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/OperatorInMatchPattern.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/OperatorInMatchPattern.fs", false, - QualifiedNameOfFile OperatorInMatchPattern, [], [], + QualifiedNameOfFile OperatorInMatchPattern, [], [SynModuleOrNamespace ([OperatorInMatchPattern], false, AnonModule, [Expr @@ -25,4 +25,5 @@ ImplFile WithKeyword = (2,8--2,12) }), (2,0--3,24))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/OperatorInSynPatLongIdent.fs.bsl b/tests/service/data/SyntaxTree/Pattern/OperatorInSynPatLongIdent.fs.bsl index 90a60008ec8..31b3ea1510c 100644 --- a/tests/service/data/SyntaxTree/Pattern/OperatorInSynPatLongIdent.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/OperatorInSynPatLongIdent.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/OperatorInSynPatLongIdent.fs", false, - QualifiedNameOfFile OperatorInSynPatLongIdent, [], [], + QualifiedNameOfFile OperatorInSynPatLongIdent, [], [SynModuleOrNamespace ([OperatorInSynPatLongIdent], false, AnonModule, [Let @@ -32,4 +32,5 @@ ImplFile EqualsRange = Some (2,17--2,18) })], (2,0--2,28))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl b/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl index e260f077c31..14fd4eb7b5b 100644 --- a/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs", false, - QualifiedNameOfFile ParenthesesOfSynArgPatsNamePatPairs, [], [], + QualifiedNameOfFile ParenthesesOfSynArgPatsNamePatPairs, [], [SynModuleOrNamespace ([ParenthesesOfSynArgPatsNamePatPairs], false, AnonModule, [Expr @@ -31,5 +31,6 @@ ImplFile WithKeyword = (2,11--2,15) }), (2,0--6,22))], PreXmlDocEmpty, [], None, (2,0--7,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (3,15--3,21); BlockComment (5,2--5,11)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl index 9feca15fc45..303bae43f43 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/Record 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/Record 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,4 +17,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl index 57d597dab55..ad2b42fb23d 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/Record 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/Record 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,24), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl index 6ce17ab990c..f4d874a415d 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/Record 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/Record 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,8)-(4,9) parse error Unexpected symbol '}' in pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl index e96ed95a57c..60303d5874d 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/Record 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/Record 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,6)-(4,7) parse error Unexpected symbol '}' in pattern. Expected '.', '=' or other token. diff --git a/tests/service/data/SyntaxTree/Pattern/Record 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 05.fs.bsl index ef0a9a11727..6438160b535 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/Record 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/Record 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,5) parse error Unexpected symbol '}' in pattern. Expected identifier, 'global' or other token. diff --git a/tests/service/data/SyntaxTree/Pattern/Record 06.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 06.fs.bsl index 7781aa39c9b..447cb1ac2e1 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Pattern/Record 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Pattern/Record 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,5) parse error Unexpected symbol '_' in pattern. Expected identifier, 'global' or other token. diff --git a/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl index 61afba6c7a8..75f26b45484 100644 --- a/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs", false, QualifiedNameOfFile SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign, - [], [], + [], [SynModuleOrNamespace ([SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign], false, AnonModule, @@ -25,4 +25,5 @@ ImplFile WithKeyword = (2,8--2,12) }), (2,0--3,16))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/SynPatOrContainsTheRangeOfTheBar.fs.bsl b/tests/service/data/SyntaxTree/Pattern/SynPatOrContainsTheRangeOfTheBar.fs.bsl index 61046ffea4e..4f60ec0e26f 100644 --- a/tests/service/data/SyntaxTree/Pattern/SynPatOrContainsTheRangeOfTheBar.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/SynPatOrContainsTheRangeOfTheBar.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/SynPatOrContainsTheRangeOfTheBar.fs", false, - QualifiedNameOfFile SynPatOrContainsTheRangeOfTheBar, [], [], + QualifiedNameOfFile SynPatOrContainsTheRangeOfTheBar, [], [SynModuleOrNamespace ([SynPatOrContainsTheRangeOfTheBar], false, AnonModule, [Expr @@ -27,4 +27,5 @@ ImplFile WithKeyword = (2,8--2,12) }), (2,0--5,9))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Tuple - HeadPat 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Tuple - HeadPat 01.fs.bsl index a81579964af..13e9f682663 100644 --- a/tests/service/data/SyntaxTree/Pattern/Tuple - HeadPat 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Tuple - HeadPat 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Tuple - HeadPat 01.fs", false, QualifiedNameOfFile Tuple, - [], [], + [], [SynModuleOrNamespace ([Tuple], false, NamedModule, [Let @@ -42,4 +42,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Tuple - HeadPat 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Tuple - HeadPat 02.fs.bsl index 61bc7ef99b7..6ec6d695f22 100644 --- a/tests/service/data/SyntaxTree/Pattern/Tuple - HeadPat 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Tuple - HeadPat 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Tuple - HeadPat 02.fs", false, QualifiedNameOfFile Tuple, - [], [], + [], [SynModuleOrNamespace ([Tuple], false, NamedModule, [Let @@ -27,4 +27,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,18), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 01.fs.bsl index ed30e1a4690..cb624d87691 100644 --- a/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Tuple - Recover 01.fs", false, QualifiedNameOfFile Tuple, - [], [], + [], [SynModuleOrNamespace ([Tuple], false, NamedModule, [Let @@ -22,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,0), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 02.fs.bsl index 5a07aa0debc..517795c13dd 100644 --- a/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Tuple - Recover 02.fs", false, QualifiedNameOfFile Tuple, - [], [], + [], [SynModuleOrNamespace ([Tuple], false, NamedModule, [Let @@ -23,6 +23,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,0), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 03.fs.bsl index ada6c9b8de0..c3a138387cb 100644 --- a/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Tuple - Recover 03.fs", false, QualifiedNameOfFile Tuple, - [], [], + [], [SynModuleOrNamespace ([Tuple], false, NamedModule, [Let @@ -47,6 +47,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,25), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,18)-(3,19) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 04.fs.bsl index 98ed45e9cfd..6931a6e0e33 100644 --- a/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Tuple - Recover 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Tuple - Recover 04.fs", false, QualifiedNameOfFile Tuple, - [], [], + [], [SynModuleOrNamespace ([Tuple], false, NamedModule, [Let @@ -55,6 +55,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,4)-(3,5) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Tuple - Struct 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Tuple - Struct 01.fs.bsl index 0b605142320..8a3c5863004 100644 --- a/tests/service/data/SyntaxTree/Pattern/Tuple - Struct 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Tuple - Struct 01.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Tuple - Struct 01.fs", false, QualifiedNameOfFile Tuple, [], - [], [SynModuleOrNamespace ([Tuple], false, NamedModule, [Let @@ -25,4 +24,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,25), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 01.fs.bsl index 39999d8f69c..c3b01295134 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Incomplete structured construct at or before this point in binding diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 02.fs.bsl index b5b4b6e28e2..d90f5c5d863 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -26,6 +26,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,7)-(3,8) parse error Unexpected symbol '=' in binding diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 03.fs.bsl index 609bc09a6fe..303709dc7fd 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 03.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -26,6 +26,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,20), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,8)-(3,9) parse error Unexpected symbol ')' in pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 04.fs.bsl index 6ac283f7a93..d6aa47ae861 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 04.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -24,6 +24,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,18), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,8)-(3,10) parse error Unexpected keyword 'as' in pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 05.fs.bsl index 7bd27b958c6..86cac0dc468 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 05.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -36,6 +36,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,5) parse error Incomplete structured construct at or before this point in binding diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 06.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 06.fs.bsl index 6120ff4f5fd..618cbcfcee8 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 06.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -32,6 +32,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,11)-(4,12) parse error Unexpected symbol '=' in binding diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 07.fs.bsl index c96b5fc8d5e..dc97ca9ea10 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 07.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 07.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,4), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Incomplete structured construct at or before this point in pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 08.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 08.fs.bsl index 394f1e21eac..98734d03de2 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 08.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 08.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,6 +19,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,5)-(4,7) parse error Unexpected symbol '->' in pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 09.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 09.fs.bsl index 0f2e4604d2b..bdac43a6b34 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 09.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 09.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -30,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,11)-(4,12) parse error Unexpected symbol ')' in pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 10.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 10.fs.bsl index 5e8ab0f26fd..b18b97bfe76 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 10.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 10.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -30,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,11)-(4,12) parse error Unexpected symbol ')' in pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 11.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 11.fs.bsl index dbf43bcf3b1..be2e2e830c2 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 11.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 11.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -36,6 +36,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,13)-(4,14) parse error Unexpected symbol ')' in pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 12.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 12.fs.bsl index 416dc67c859..9b2df1c8190 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 12.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Pattern/Typed - Missing type 12.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -44,6 +44,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,13)-(4,14) parse error Unexpected symbol ',' in pattern diff --git a/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigMember.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigMember.fsi.bsl index ab9078c270c..a27b46c979c 100644 --- a/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigMember.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigMember.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/EqualsTokenIsPresentInSynValSigMember.fsi", - QualifiedNameOfFile Meh, [], [], + QualifiedNameOfFile Meh, [], [SynModuleOrNamespaceSig ([Meh], false, NamedModule, [Types @@ -38,4 +38,5 @@ SigFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--5,23), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigValue.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigValue.fsi.bsl index c63121096fa..55bf2f683f4 100644 --- a/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigValue.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/EqualsTokenIsPresentInSynValSigValue.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/EqualsTokenIsPresentInSynValSigValue.fsi", - QualifiedNameOfFile Meh, [], [], + QualifiedNameOfFile Meh, [], [SynModuleOrNamespaceSig ([Meh], false, NamedModule, [Val @@ -18,4 +18,5 @@ SigFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--4,15), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/LeadingKeywordInRecursiveTypes.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/LeadingKeywordInRecursiveTypes.fsi.bsl index 8a2cf2cb845..2a904b29554 100644 --- a/tests/service/data/SyntaxTree/SignatureType/LeadingKeywordInRecursiveTypes.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/LeadingKeywordInRecursiveTypes.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/LeadingKeywordInRecursiveTypes.fsi", - QualifiedNameOfFile LeadingKeywordInRecursiveTypes, [], [], + QualifiedNameOfFile LeadingKeywordInRecursiveTypes, [], [SynModuleOrNamespaceSig ([LeadingKeywordInRecursiveTypes], false, AnonModule, [Types @@ -31,4 +31,5 @@ SigFile WithKeyword = None })], (2,0--3,11))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/MemberSigOfSynMemberSigMemberShouldContainsTheRangeOfTheWithKeyword.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/MemberSigOfSynMemberSigMemberShouldContainsTheRangeOfTheWithKeyword.fsi.bsl index 493d3b104ad..de5ad0828c3 100644 --- a/tests/service/data/SyntaxTree/SignatureType/MemberSigOfSynMemberSigMemberShouldContainsTheRangeOfTheWithKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/MemberSigOfSynMemberSigMemberShouldContainsTheRangeOfTheWithKeyword.fsi.bsl @@ -3,7 +3,6 @@ SigFile ("/root/SignatureType/MemberSigOfSynMemberSigMemberShouldContainsTheRangeOfTheWithKeyword.fsi", QualifiedNameOfFile MemberSigOfSynMemberSigMemberShouldContainsTheRangeOfTheWithKeyword, [], - [], [SynModuleOrNamespaceSig ([X], false, DeclaredNamespace, [Types @@ -42,4 +41,5 @@ SigFile WithKeyword = None })], (4,0--5,42))], PreXmlDocEmpty, [], None, (2,0--5,42), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/NestedTypeHasStaticTypeAsLeadingKeyword.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/NestedTypeHasStaticTypeAsLeadingKeyword.fsi.bsl index 1c3c8bc8d23..091be309d37 100644 --- a/tests/service/data/SyntaxTree/SignatureType/NestedTypeHasStaticTypeAsLeadingKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/NestedTypeHasStaticTypeAsLeadingKeyword.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/NestedTypeHasStaticTypeAsLeadingKeyword.fsi", - QualifiedNameOfFile NestedTypeHasStaticTypeAsLeadingKeyword, [], [], + QualifiedNameOfFile NestedTypeHasStaticTypeAsLeadingKeyword, [], [SynModuleOrNamespaceSig ([NestedTypeHasStaticTypeAsLeadingKeyword], false, AnonModule, [Types @@ -29,4 +29,5 @@ SigFile WithKeyword = None })], (2,0--6,0))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynExceptionDefnReprAndSynExceptionSig.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynExceptionDefnReprAndSynExceptionSig.fsi.bsl index e92edcc8113..870ef57c940 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynExceptionDefnReprAndSynExceptionSig.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynExceptionDefnReprAndSynExceptionSig.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/RangeOfAttributeShouldBeIncludedInSynExceptionDefnReprAndSynExceptionSig.fsi", - QualifiedNameOfFile FSharp.Compiler.ParseHelpers, [], [], + QualifiedNameOfFile FSharp.Compiler.ParseHelpers, [], [SynModuleOrNamespaceSig ([FSharp; Compiler; ParseHelpers], false, NamedModule, [Exception @@ -42,4 +42,5 @@ SigFile Some (Internal (2,7--2,15)), (2,0--6,43), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (4,0--4,90)] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynTypeDefnSig.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynTypeDefnSig.fsi.bsl index 0e7eac31934..e73e3ca6fee 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynTypeDefnSig.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynTypeDefnSig.fsi.bsl @@ -2,7 +2,6 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/RangeOfAttributeShouldBeIncludedInSynTypeDefnSig.fsi", QualifiedNameOfFile RangeOfAttributeShouldBeIncludedInSynTypeDefnSig, [], - [], [SynModuleOrNamespaceSig ([SomeNamespace], false, DeclaredNamespace, [Types @@ -23,4 +22,5 @@ SigFile WithKeyword = None })], (4,0--7,7))], PreXmlDocEmpty, [], None, (2,0--7,7), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynValSpfnAndMember.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynValSpfnAndMember.fsi.bsl index 920c9e5a472..101ec260450 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynValSpfnAndMember.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributeShouldBeIncludedInSynValSpfnAndMember.fsi.bsl @@ -2,7 +2,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/RangeOfAttributeShouldBeIncludedInSynValSpfnAndMember.fsi", QualifiedNameOfFile RangeOfAttributeShouldBeIncludedInSynValSpfnAndMember, - [], [], + [], [SynModuleOrNamespaceSig ([SomeNamespace], false, DeclaredNamespace, [Types @@ -45,4 +45,5 @@ SigFile PreXmlDocEmpty, [], None, (2,0--6,20), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (5,13--5,23)] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl index 9788067cd7c..af1c383c20c 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl @@ -2,7 +2,6 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi", QualifiedNameOfFile RangeOfAttributesShouldBeIncludedInRecursiveTypes, [], - [], [SynModuleOrNamespaceSig ([SomeNamespace], false, DeclaredNamespace, [Types @@ -73,4 +72,5 @@ SigFile WithKeyword = None })], (4,0--12,42))], PreXmlDocEmpty, [], None, (2,0--12,42), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfMembersShouldBeIncludedInSynExceptionSigAndSynModuleSigDeclException.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfMembersShouldBeIncludedInSynExceptionSigAndSynModuleSigDeclException.fsi.bsl index 7025f3aadc2..9659f6321f8 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfMembersShouldBeIncludedInSynExceptionSigAndSynModuleSigDeclException.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfMembersShouldBeIncludedInSynExceptionSigAndSynModuleSigDeclException.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/RangeOfMembersShouldBeIncludedInSynExceptionSigAndSynModuleSigDeclException.fsi", - QualifiedNameOfFile FSharp.Compiler.ParseHelpers, [], [], + QualifiedNameOfFile FSharp.Compiler.ParseHelpers, [], [SynModuleOrNamespaceSig ([FSharp; Compiler; ParseHelpers], false, NamedModule, [Exception @@ -56,5 +56,6 @@ SigFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], Some (Internal (2,7--2,15)), (2,0--7,8), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigDelegateOfShouldStartFromName.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigDelegateOfShouldStartFromName.fsi.bsl index 0dcb3eb2e73..a38d43e98c3 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigDelegateOfShouldStartFromName.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigDelegateOfShouldStartFromName.fsi.bsl @@ -2,7 +2,6 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/RangeOfSynTypeDefnSigDelegateOfShouldStartFromName.fsi", QualifiedNameOfFile RangeOfSynTypeDefnSigDelegateOfShouldStartFromName, [], - [], [SynModuleOrNamespaceSig ([Y], false, DeclaredNamespace, [Types @@ -49,4 +48,5 @@ SigFile PreXmlDocEmpty, [], None, (2,0--4,29), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigObjectModelShouldEndAtLastMember.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigObjectModelShouldEndAtLastMember.fsi.bsl index 4ed17f26304..cce6edadb6d 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigObjectModelShouldEndAtLastMember.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigObjectModelShouldEndAtLastMember.fsi.bsl @@ -2,7 +2,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/RangeOfSynTypeDefnSigObjectModelShouldEndAtLastMember.fsi", QualifiedNameOfFile RangeOfSynTypeDefnSigObjectModelShouldEndAtLastMember, - [], [], + [], [SynModuleOrNamespaceSig ([X], false, DeclaredNamespace, [Types @@ -41,4 +41,5 @@ SigFile WithKeyword = None })], (3,0--6,30))], PreXmlDocEmpty, [], None, (2,0--6,30), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl index 553c900522d..bcbb3398842 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl @@ -2,7 +2,6 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi", QualifiedNameOfFile RangeOfSynTypeDefnSigRecordShouldEndAtLastMember, [], - [], [SynModuleOrNamespaceSig ([X], false, DeclaredNamespace, [Types @@ -50,4 +49,5 @@ SigFile WithKeyword = None })], (3,0--5,30))], PreXmlDocEmpty, [], None, (2,0--5,30), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigSimpleShouldEndAtLastVal.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigSimpleShouldEndAtLastVal.fsi.bsl index 7829833143a..6b584fc5717 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigSimpleShouldEndAtLastVal.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigSimpleShouldEndAtLastVal.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/RangeOfSynTypeDefnSigSimpleShouldEndAtLastVal.fsi", - QualifiedNameOfFile RangeOfSynTypeDefnSigSimpleShouldEndAtLastVal, [], [], + QualifiedNameOfFile RangeOfSynTypeDefnSigSimpleShouldEndAtLastVal, [], [SynModuleOrNamespaceSig ([Z], false, DeclaredNamespace, [Types @@ -36,4 +36,5 @@ SigFile PreXmlDocEmpty, [], None, (2,0--5,37), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfTypeShouldEndAtEndKeyword.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfTypeShouldEndAtEndKeyword.fsi.bsl index ebb3921ac38..92a00ceca6b 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfTypeShouldEndAtEndKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfTypeShouldEndAtEndKeyword.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/RangeOfTypeShouldEndAtEndKeyword.fsi", - QualifiedNameOfFile RangeOfTypeShouldEndAtEndKeyword, [], [], + QualifiedNameOfFile RangeOfTypeShouldEndAtEndKeyword, [], [SynModuleOrNamespaceSig ([GreatProjectThing], false, DeclaredNamespace, [Types @@ -16,4 +16,5 @@ SigFile WithKeyword = None })], (4,0--6,11))], PreXmlDocEmpty, [], None, (2,0--6,11), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (9,0--9,6)] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/SynExceptionSigShouldContainsTheRangeOfTheWithKeyword.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/SynExceptionSigShouldContainsTheRangeOfTheWithKeyword.fsi.bsl index ef541678686..9e082007f68 100644 --- a/tests/service/data/SyntaxTree/SignatureType/SynExceptionSigShouldContainsTheRangeOfTheWithKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/SynExceptionSigShouldContainsTheRangeOfTheWithKeyword.fsi.bsl @@ -2,7 +2,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/SynExceptionSigShouldContainsTheRangeOfTheWithKeyword.fsi", QualifiedNameOfFile SynExceptionSigShouldContainsTheRangeOfTheWithKeyword, - [], [], + [], [SynModuleOrNamespaceSig ([X], false, DeclaredNamespace, [Exception @@ -40,4 +40,5 @@ SigFile PreXmlDocEmpty, [], None, (2,0--5,29), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithEnumContainsTheRangeOfTheEqualsSign.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithEnumContainsTheRangeOfTheEqualsSign.fsi.bsl index ab21d9a361f..313b1d493a0 100644 --- a/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithEnumContainsTheRangeOfTheEqualsSign.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithEnumContainsTheRangeOfTheEqualsSign.fsi.bsl @@ -2,7 +2,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/SynTypeDefnSigWithEnumContainsTheRangeOfTheEqualsSign.fsi", QualifiedNameOfFile SynTypeDefnSigWithEnumContainsTheRangeOfTheEqualsSign, - [], [], + [], [SynModuleOrNamespaceSig ([SomeNamespace], false, DeclaredNamespace, [Types @@ -31,4 +31,5 @@ SigFile WithKeyword = None })], (4,0--6,19))], PreXmlDocEmpty, [], None, (2,0--6,19), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelClassContainsTheRangeOfTheEqualsSign.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelClassContainsTheRangeOfTheEqualsSign.fsi.bsl index d512ca1ef68..6d2eafdbc7c 100644 --- a/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelClassContainsTheRangeOfTheEqualsSign.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelClassContainsTheRangeOfTheEqualsSign.fsi.bsl @@ -3,7 +3,6 @@ SigFile ("/root/SignatureType/SynTypeDefnSigWithObjectModelClassContainsTheRangeOfTheEqualsSign.fsi", QualifiedNameOfFile SynTypeDefnSigWithObjectModelClassContainsTheRangeOfTheEqualsSign, [], - [], [SynModuleOrNamespaceSig ([SomeNamespace], false, DeclaredNamespace, [Types @@ -18,4 +17,5 @@ SigFile WithKeyword = None })], (4,0--6,7))], PreXmlDocEmpty, [], None, (2,0--6,7), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fsi.bsl index 25b5feb9ae6..a1b964f3ac1 100644 --- a/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fsi.bsl @@ -3,7 +3,6 @@ SigFile ("/root/SignatureType/SynTypeDefnSigWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fsi", QualifiedNameOfFile SynTypeDefnSigWithObjectModelDelegateContainsTheRangeOfTheEqualsSign, [], - [], [SynModuleOrNamespaceSig ([Foo], false, DeclaredNamespace, [Types @@ -50,4 +49,5 @@ SigFile PreXmlDocEmpty, [], None, (2,0--4,37), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithUnionContainsTheRangeOfTheEqualsSign.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithUnionContainsTheRangeOfTheEqualsSign.fsi.bsl index bfc76db57f5..3afb8f5e0cf 100644 --- a/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithUnionContainsTheRangeOfTheEqualsSign.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/SynTypeDefnSigWithUnionContainsTheRangeOfTheEqualsSign.fsi.bsl @@ -2,7 +2,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/SynTypeDefnSigWithUnionContainsTheRangeOfTheEqualsSign.fsi", QualifiedNameOfFile SynTypeDefnSigWithUnionContainsTheRangeOfTheEqualsSign, - [], [], + [], [SynModuleOrNamespaceSig ([SomeNamespace], false, DeclaredNamespace, [Types @@ -51,4 +51,5 @@ SigFile WithKeyword = None })], (4,0--6,24))], PreXmlDocEmpty, [], None, (2,0--6,24), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/SynValSigContainsParameterNames.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/SynValSigContainsParameterNames.fsi.bsl index edb06fea795..e3b15af4481 100644 --- a/tests/service/data/SyntaxTree/SignatureType/SynValSigContainsParameterNames.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/SynValSigContainsParameterNames.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/SynValSigContainsParameterNames.fsi", - QualifiedNameOfFile Meh, [], [], + QualifiedNameOfFile Meh, [], [SynModuleOrNamespaceSig ([Meh], false, NamedModule, [Val @@ -67,4 +67,5 @@ SigFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--6,23), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/TriviaIsPresentInSynTypeDefnSig.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/TriviaIsPresentInSynTypeDefnSig.fsi.bsl index 53962cae2b9..0562bc80619 100644 --- a/tests/service/data/SyntaxTree/SignatureType/TriviaIsPresentInSynTypeDefnSig.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/TriviaIsPresentInSynTypeDefnSig.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/TriviaIsPresentInSynTypeDefnSig.fsi", - QualifiedNameOfFile Meh, [], [], + QualifiedNameOfFile Meh, [], [SynModuleOrNamespaceSig ([Meh], false, NamedModule, [Types @@ -87,4 +87,5 @@ SigFile { ConditionalDirectives = [If (Ident "CHECK_LINE0_TYPES", (8,0--8,21)); Else (10,0--10,5); EndIf (12,0--12,6)] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/ValKeywordIsPresentInSynValSig.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/ValKeywordIsPresentInSynValSig.fsi.bsl index 599315bef28..11d8b8ede65 100644 --- a/tests/service/data/SyntaxTree/SignatureType/ValKeywordIsPresentInSynValSig.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/ValKeywordIsPresentInSynValSig.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SignatureType/ValKeywordIsPresentInSynValSig.fsi", - QualifiedNameOfFile Meh, [], [], + QualifiedNameOfFile Meh, [], [SynModuleOrNamespaceSig ([Meh], false, NamedModule, [Val @@ -24,4 +24,5 @@ SigFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--6,11), { LeadingKeyword = Module (2,0--2,6) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (5,0--5,6)] }, set [])) diff --git a/tests/service/data/SyntaxTree/SignatureType/With 01.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/With 01.fsi.bsl index f6ef4571fd9..b51549de53b 100644 --- a/tests/service/data/SyntaxTree/SignatureType/With 01.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/With 01.fsi.bsl @@ -1,6 +1,6 @@ SigFile (ParsedSigFileInput - ("/root/SignatureType/With 01.fsi", QualifiedNameOfFile With 01, [], [], + ("/root/SignatureType/With 01.fsi", QualifiedNameOfFile With 01, [], [SynModuleOrNamespaceSig ([X], false, DeclaredNamespace, [Types @@ -39,4 +39,5 @@ SigFile PreXmlDocEmpty, [], None, (1,0--4,28), { LeadingKeyword = Namespace (1,0--1,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SimplePats/SimplePats - Recover 01.fs.bsl b/tests/service/data/SyntaxTree/SimplePats/SimplePats - Recover 01.fs.bsl index 9f74ed36236..9b7cc02ee66 100644 --- a/tests/service/data/SyntaxTree/SimplePats/SimplePats - Recover 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SimplePats/SimplePats - Recover 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SimplePats/SimplePats - Recover 01.fs", false, - QualifiedNameOfFile SimplePats, [], [], + QualifiedNameOfFile SimplePats, [], [SynModuleOrNamespace ([SimplePats], false, NamedModule, [Let @@ -202,6 +202,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,27), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,19)-(3,20) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/SimplePats/SimplePats 01.fs.bsl b/tests/service/data/SyntaxTree/SimplePats/SimplePats 01.fs.bsl index 512fa280b98..22d60a66606 100644 --- a/tests/service/data/SyntaxTree/SimplePats/SimplePats 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SimplePats/SimplePats 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SimplePats/SimplePats 01.fs", false, QualifiedNameOfFile SimplePats, - [], [], + [], [SynModuleOrNamespace ([SimplePats], false, NamedModule, [Let @@ -200,4 +200,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,24), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SimplePats/SimplePats 02.fs.bsl b/tests/service/data/SyntaxTree/SimplePats/SimplePats 02.fs.bsl index fc92f2e4767..939f5e095d7 100644 --- a/tests/service/data/SyntaxTree/SimplePats/SimplePats 02.fs.bsl +++ b/tests/service/data/SyntaxTree/SimplePats/SimplePats 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SimplePats/SimplePats 02.fs", false, QualifiedNameOfFile SimplePats, - [], [], + [], [SynModuleOrNamespace ([SimplePats], false, NamedModule, [Types @@ -177,4 +177,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SourceIdentifier/_LINE_.fs.bsl b/tests/service/data/SyntaxTree/SourceIdentifier/_LINE_.fs.bsl index 2ac2c71f433..11526d87b0f 100644 --- a/tests/service/data/SyntaxTree/SourceIdentifier/_LINE_.fs.bsl +++ b/tests/service/data/SyntaxTree/SourceIdentifier/_LINE_.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/SourceIdentifier/_LINE_.fs", false, QualifiedNameOfFile _LINE_, [], - [], [SynModuleOrNamespace ([_LINE_], false, AnonModule, [Expr @@ -9,4 +8,5 @@ ImplFile (2,0--2,8))], PreXmlDocEmpty, [], None, (2,0--2,8), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SourceIdentifier/_SOURCEDIRECTORY_.fs.bsl b/tests/service/data/SyntaxTree/SourceIdentifier/_SOURCEDIRECTORY_.fs.bsl index cc7fb97f4fa..5e1799630fe 100644 --- a/tests/service/data/SyntaxTree/SourceIdentifier/_SOURCEDIRECTORY_.fs.bsl +++ b/tests/service/data/SyntaxTree/SourceIdentifier/_SOURCEDIRECTORY_.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SourceIdentifier/_SOURCEDIRECTORY_.fs", false, - QualifiedNameOfFile _SOURCEDIRECTORY_, [], [], + QualifiedNameOfFile _SOURCEDIRECTORY_, [], [SynModuleOrNamespace ([_SOURCEDIRECTORY_], false, AnonModule, [Expr @@ -11,4 +11,5 @@ ImplFile (0,0--0,0)), (0,0--0,0))], PreXmlDocEmpty, [], None, (2,0--2,20), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SourceIdentifier/_SOURCEFILE_.fs.bsl b/tests/service/data/SyntaxTree/SourceIdentifier/_SOURCEFILE_.fs.bsl index abf6b7aca84..8284c2a2a77 100644 --- a/tests/service/data/SyntaxTree/SourceIdentifier/_SOURCEFILE_.fs.bsl +++ b/tests/service/data/SyntaxTree/SourceIdentifier/_SOURCEFILE_.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SourceIdentifier/_SOURCEFILE_.fs", false, - QualifiedNameOfFile _SOURCEFILE_, [], [], + QualifiedNameOfFile _SOURCEFILE_, [], [SynModuleOrNamespace ([_SOURCEFILE_], false, AnonModule, [Expr @@ -11,4 +11,5 @@ ImplFile (2,0--2,15)), (2,0--2,15))], PreXmlDocEmpty, [], None, (2,0--2,15), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInModule.fs.bsl b/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInModule.fs.bsl index 7e6563219a6..c042884e24f 100644 --- a/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInModule.fs.bsl +++ b/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInModule.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/String/InterpolatedStringOffsideInModule.fs", false, - QualifiedNameOfFile InterpolatedStringOffsideInModule, [], [], + QualifiedNameOfFile InterpolatedStringOffsideInModule, [], [SynModuleOrNamespace ([InterpolatedStringOffsideInModule], false, AnonModule, [NestedModule @@ -31,4 +31,5 @@ ImplFile EqualsRange = Some (1,9--1,10) })], PreXmlDocEmpty, [], None, (1,0--4,4), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInNestedLet.fs.bsl b/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInNestedLet.fs.bsl index 1dfe5586b56..5d675200d7c 100644 --- a/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInNestedLet.fs.bsl +++ b/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInNestedLet.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/String/InterpolatedStringOffsideInNestedLet.fs", false, - QualifiedNameOfFile InterpolatedStringOffsideInNestedLet, [], [], + QualifiedNameOfFile InterpolatedStringOffsideInNestedLet, [], [SynModuleOrNamespace ([InterpolatedStringOffsideInNestedLet], false, AnonModule, [Let @@ -38,4 +38,5 @@ ImplFile EqualsRange = Some (1,6--1,7) })], (1,0--5,5))], PreXmlDocEmpty, [], None, (1,0--5,5), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/SynConstBytesWithSynByteStringKindRegular.fs.bsl b/tests/service/data/SyntaxTree/String/SynConstBytesWithSynByteStringKindRegular.fs.bsl index be0c3ae5c30..9e98e92eb3b 100644 --- a/tests/service/data/SyntaxTree/String/SynConstBytesWithSynByteStringKindRegular.fs.bsl +++ b/tests/service/data/SyntaxTree/String/SynConstBytesWithSynByteStringKindRegular.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/String/SynConstBytesWithSynByteStringKindRegular.fs", false, - QualifiedNameOfFile SynConstBytesWithSynByteStringKindRegular, [], [], + QualifiedNameOfFile SynConstBytesWithSynByteStringKindRegular, [], [SynModuleOrNamespace ([SynConstBytesWithSynByteStringKindRegular], false, AnonModule, [Let @@ -20,4 +20,5 @@ ImplFile EqualsRange = Some (2,10--2,11) })], (2,0--2,17))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/SynConstBytesWithSynByteStringKindVerbatim.fs.bsl b/tests/service/data/SyntaxTree/String/SynConstBytesWithSynByteStringKindVerbatim.fs.bsl index 178873fb61e..d6108dd914e 100644 --- a/tests/service/data/SyntaxTree/String/SynConstBytesWithSynByteStringKindVerbatim.fs.bsl +++ b/tests/service/data/SyntaxTree/String/SynConstBytesWithSynByteStringKindVerbatim.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/String/SynConstBytesWithSynByteStringKindVerbatim.fs", false, - QualifiedNameOfFile SynConstBytesWithSynByteStringKindVerbatim, [], [], + QualifiedNameOfFile SynConstBytesWithSynByteStringKindVerbatim, [], [SynModuleOrNamespace ([SynConstBytesWithSynByteStringKindVerbatim], false, AnonModule, [Let @@ -20,4 +20,5 @@ ImplFile EqualsRange = Some (2,10--2,11) })], (2,0--2,18))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindRegular.fs.bsl b/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindRegular.fs.bsl index aaba1c57606..fca6ec7f61f 100644 --- a/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindRegular.fs.bsl +++ b/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindRegular.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/String/SynConstStringWithSynStringKindRegular.fs", false, - QualifiedNameOfFile SynConstStringWithSynStringKindRegular, [], [], + QualifiedNameOfFile SynConstStringWithSynStringKindRegular, [], [SynModuleOrNamespace ([SynConstStringWithSynStringKindRegular], false, AnonModule, [Let @@ -19,4 +19,5 @@ ImplFile (2,0--2,12))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindTripleQuote.fs.bsl b/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindTripleQuote.fs.bsl index 2ad18580156..c78c9cbfd83 100644 --- a/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindTripleQuote.fs.bsl +++ b/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindTripleQuote.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/String/SynConstStringWithSynStringKindTripleQuote.fs", false, - QualifiedNameOfFile SynConstStringWithSynStringKindTripleQuote, [], [], + QualifiedNameOfFile SynConstStringWithSynStringKindTripleQuote, [], [SynModuleOrNamespace ([SynConstStringWithSynStringKindTripleQuote], false, AnonModule, [Let @@ -19,4 +19,5 @@ ImplFile (2,0--2,16))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindVerbatim.fs.bsl b/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindVerbatim.fs.bsl index 2bbac831810..48535a0d130 100644 --- a/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindVerbatim.fs.bsl +++ b/tests/service/data/SyntaxTree/String/SynConstStringWithSynStringKindVerbatim.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/String/SynConstStringWithSynStringKindVerbatim.fs", false, - QualifiedNameOfFile SynConstStringWithSynStringKindVerbatim, [], [], + QualifiedNameOfFile SynConstStringWithSynStringKindVerbatim, [], [SynModuleOrNamespace ([SynConstStringWithSynStringKindVerbatim], false, AnonModule, [Let @@ -19,4 +19,5 @@ ImplFile (2,0--2,13))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindRegular.fs.bsl b/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindRegular.fs.bsl index 601a0e5e9da..70937d3b1a7 100644 --- a/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindRegular.fs.bsl +++ b/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindRegular.fs.bsl @@ -2,7 +2,6 @@ ImplFile (ParsedImplFileInput ("/root/String/SynExprInterpolatedStringWithSynStringKindRegular.fs", false, QualifiedNameOfFile SynExprInterpolatedStringWithSynStringKindRegular, [], - [], [SynModuleOrNamespace ([SynExprInterpolatedStringWithSynStringKindRegular], false, AnonModule, [Let @@ -23,4 +22,5 @@ ImplFile (2,0--2,18))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindTripleQuote.fs.bsl b/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindTripleQuote.fs.bsl index 8eafe3c8745..4810ae97d20 100644 --- a/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindTripleQuote.fs.bsl +++ b/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindTripleQuote.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/String/SynExprInterpolatedStringWithSynStringKindTripleQuote.fs", false, QualifiedNameOfFile SynExprInterpolatedStringWithSynStringKindTripleQuote, - [], [], + [], [SynModuleOrNamespace ([SynExprInterpolatedStringWithSynStringKindTripleQuote], false, AnonModule, @@ -25,4 +25,5 @@ ImplFile (2,0--2,22))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindVerbatim.fs.bsl b/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindVerbatim.fs.bsl index 486b527607a..1be7aa3c720 100644 --- a/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindVerbatim.fs.bsl +++ b/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithSynStringKindVerbatim.fs.bsl @@ -3,7 +3,6 @@ ImplFile ("/root/String/SynExprInterpolatedStringWithSynStringKindVerbatim.fs", false, QualifiedNameOfFile SynExprInterpolatedStringWithSynStringKindVerbatim, [], - [], [SynModuleOrNamespace ([SynExprInterpolatedStringWithSynStringKindVerbatim], false, AnonModule, @@ -26,4 +25,5 @@ ImplFile EqualsRange = Some (2,6--2,7) })], (2,0--2,70))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithTripleQuoteMultipleDollars.fs.bsl b/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithTripleQuoteMultipleDollars.fs.bsl index db6d4bcdc96..69aaf6b57a2 100644 --- a/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithTripleQuoteMultipleDollars.fs.bsl +++ b/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithTripleQuoteMultipleDollars.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/String/SynExprInterpolatedStringWithTripleQuoteMultipleDollars.fs", false, QualifiedNameOfFile - SynExprInterpolatedStringWithTripleQuoteMultipleDollars, [], [], + SynExprInterpolatedStringWithTripleQuoteMultipleDollars, [], [SynModuleOrNamespace ([SynExprInterpolatedStringWithTripleQuoteMultipleDollars], false, AnonModule, @@ -27,4 +27,5 @@ ImplFile (2,0--2,43))], PreXmlDocEmpty, [], None, (2,0--2,43), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithTripleQuoteMultipleDollars2.fs.bsl b/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithTripleQuoteMultipleDollars2.fs.bsl index 152cb27e9b3..ca0ac31fffc 100644 --- a/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithTripleQuoteMultipleDollars2.fs.bsl +++ b/tests/service/data/SyntaxTree/String/SynExprInterpolatedStringWithTripleQuoteMultipleDollars2.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/String/SynExprInterpolatedStringWithTripleQuoteMultipleDollars2.fs", false, QualifiedNameOfFile - SynExprInterpolatedStringWithTripleQuoteMultipleDollars2, [], [], + SynExprInterpolatedStringWithTripleQuoteMultipleDollars2, [], [SynModuleOrNamespace ([SynExprInterpolatedStringWithTripleQuoteMultipleDollars2], false, AnonModule, @@ -15,4 +15,5 @@ ImplFile (2,0--2,16))], PreXmlDocEmpty, [], None, (2,0--2,16), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynIdent/IncompleteLongIdent 01.fs.bsl b/tests/service/data/SyntaxTree/SynIdent/IncompleteLongIdent 01.fs.bsl index 493efcfa2b7..a71035a5e4b 100644 --- a/tests/service/data/SyntaxTree/SynIdent/IncompleteLongIdent 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SynIdent/IncompleteLongIdent 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynIdent/IncompleteLongIdent 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -10,6 +10,7 @@ ImplFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--4,2), { LeadingKeyword = Module (2,0--2,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,1)-(4,2) parse error Missing qualification after '.' diff --git a/tests/service/data/SyntaxTree/SynIdent/IncompleteLongIdent 02.fs.bsl b/tests/service/data/SyntaxTree/SynIdent/IncompleteLongIdent 02.fs.bsl index 9df8951773d..94b81e612c2 100644 --- a/tests/service/data/SyntaxTree/SynIdent/IncompleteLongIdent 02.fs.bsl +++ b/tests/service/data/SyntaxTree/SynIdent/IncompleteLongIdent 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynIdent/IncompleteLongIdent 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -12,6 +12,7 @@ ImplFile PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (2,0--4,4), { LeadingKeyword = Module (2,0--2,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,3)-(4,4) parse error Missing qualification after '.' diff --git a/tests/service/data/SyntaxTree/SynTyparDecl/Constraint intersection 01.fs.bsl b/tests/service/data/SyntaxTree/SynTyparDecl/Constraint intersection 01.fs.bsl index 96d2a16e16c..53050c358a9 100644 --- a/tests/service/data/SyntaxTree/SynTyparDecl/Constraint intersection 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SynTyparDecl/Constraint intersection 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynTyparDecl/Constraint intersection 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -99,4 +99,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,34), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Constraint intersection 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Constraint intersection 01.fs.bsl index 64e8fd7c7a8..406f8286369 100644 --- a/tests/service/data/SyntaxTree/SynType/Constraint intersection 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Constraint intersection 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/Constraint intersection 01.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -55,4 +55,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,46), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Constraint intersection 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Constraint intersection 02.fs.bsl index 039915cb522..84ad6fcff41 100644 --- a/tests/service/data/SyntaxTree/SynType/Constraint intersection 02.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Constraint intersection 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/Constraint intersection 02.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -53,4 +53,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,56), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Constraint intersection 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Constraint intersection 03.fs.bsl index f28ed328e25..aba7c4ea07e 100644 --- a/tests/service/data/SyntaxTree/SynType/Constraint intersection 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Constraint intersection 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/Constraint intersection 03.fs", false, - QualifiedNameOfFile Module, [], [], + QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -62,4 +62,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,53), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Div 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Div 01.fs.bsl index ea6b5ee5e6d..e6cc46f1a92 100644 --- a/tests/service/data/SyntaxTree/SynType/Div 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Div 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Div 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Div 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,4 +17,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Div 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Div 02.fs.bsl index 2ed151d5ecf..2b17f414619 100644 --- a/tests/service/data/SyntaxTree/SynType/Div 02.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Div 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Div 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Div 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,4 +19,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Div 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Div 03.fs.bsl index 411cff73657..9bdbbe2d84d 100644 --- a/tests/service/data/SyntaxTree/SynType/Div 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Div 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Div 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Div 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -16,4 +16,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Div 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Div 04.fs.bsl index 9b036b95e12..f20777ecd5d 100644 --- a/tests/service/data/SyntaxTree/SynType/Div 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Div 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Div 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Div 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,14), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Div 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Div 05.fs.bsl index 56f07e3876e..3181899d0e0 100644 --- a/tests/service/data/SyntaxTree/SynType/Div 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Div 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Div 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Div 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,14), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,13)-(3,14) parse error Unexpected symbol ')' in type diff --git a/tests/service/data/SyntaxTree/SynType/Div 06.fs.bsl b/tests/service/data/SyntaxTree/SynType/Div 06.fs.bsl index 354ee8e4e9b..b41c0e93917 100644 --- a/tests/service/data/SyntaxTree/SynType/Div 06.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Div 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Div 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Div 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,9)-(3,10) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/SynType/Fun 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Fun 01.fs.bsl index d723fe968b4..a2a0cb6f454 100644 --- a/tests/service/data/SyntaxTree/SynType/Fun 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Fun 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Fun 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Fun 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,4 +15,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Fun 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Fun 02.fs.bsl index 4413b33b2c2..7d821d5f076 100644 --- a/tests/service/data/SyntaxTree/SynType/Fun 02.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Fun 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Fun 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Fun 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Fun 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Fun 03.fs.bsl index c92a2eaa29a..27e57c94397 100644 --- a/tests/service/data/SyntaxTree/SynType/Fun 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Fun 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Fun 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Fun 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -15,6 +15,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,10)-(3,11) parse error Unexpected symbol ')' in type diff --git a/tests/service/data/SyntaxTree/SynType/Fun 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Fun 04.fs.bsl index 90cb7ec281f..22e338af3d0 100644 --- a/tests/service/data/SyntaxTree/SynType/Fun 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Fun 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Fun 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Fun 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,15)-(3,16) parse error Unexpected symbol ')' in type diff --git a/tests/service/data/SyntaxTree/SynType/Fun 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Fun 05.fs.bsl index 51bd3d1f6c3..cadbc3cccd8 100644 --- a/tests/service/data/SyntaxTree/SynType/Fun 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Fun 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Fun 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Fun 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,10)-(3,12) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/SynType/Fun 06.fs.bsl b/tests/service/data/SyntaxTree/SynType/Fun 06.fs.bsl index 79fba7f21d4..d9cb647dde9 100644 --- a/tests/service/data/SyntaxTree/SynType/Fun 06.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Fun 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Fun 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Fun 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -31,4 +31,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,18), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Fun 07.fs.bsl b/tests/service/data/SyntaxTree/SynType/Fun 07.fs.bsl index fc09b3f737f..fb62b6e501f 100644 --- a/tests/service/data/SyntaxTree/SynType/Fun 07.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Fun 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Fun 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Fun 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -37,4 +37,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Fun 08.fs.bsl b/tests/service/data/SyntaxTree/SynType/Fun 08.fs.bsl index 914be23e3c5..0abcf541d5c 100644 --- a/tests/service/data/SyntaxTree/SynType/Fun 08.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Fun 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Fun 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Fun 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -31,6 +31,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,12)-(3,13) parse error Unexpected symbol '=' in binding diff --git a/tests/service/data/SyntaxTree/SynType/Fun 09.fs.bsl b/tests/service/data/SyntaxTree/SynType/Fun 09.fs.bsl index 3a7ecdba3cf..3dff98415d7 100644 --- a/tests/service/data/SyntaxTree/SynType/Fun 09.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Fun 09.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Fun 09.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Fun 09.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -37,6 +37,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,17)-(3,18) parse error Unexpected symbol '=' in binding diff --git a/tests/service/data/SyntaxTree/SynType/Fun 10.fs.bsl b/tests/service/data/SyntaxTree/SynType/Fun 10.fs.bsl index 061982252ad..b3cda4839cc 100644 --- a/tests/service/data/SyntaxTree/SynType/Fun 10.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Fun 10.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Fun 10.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Fun 10.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -31,6 +31,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,12)-(3,14) parse error Unexpected symbol '->' in binding diff --git a/tests/service/data/SyntaxTree/SynType/Named 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 01.fs.bsl index 0781e30ef03..0d39ab9c888 100644 --- a/tests/service/data/SyntaxTree/SynType/Named 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Named 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Named 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Named 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -18,4 +18,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,14), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 02.fs.bsl index 524fced7a9a..b81f6b1f3f9 100644 --- a/tests/service/data/SyntaxTree/SynType/Named 02.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Named 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Named 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Named 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -20,4 +20,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 03.fs.bsl index 6cddbf89cae..d28f17a263d 100644 --- a/tests/service/data/SyntaxTree/SynType/Named 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Named 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Named 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Named 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -21,4 +21,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 04.fs.bsl index c205d9d5518..38104718dfb 100644 --- a/tests/service/data/SyntaxTree/SynType/Named 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Named 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Named 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Named 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -21,4 +21,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 05.fs.bsl index fafa4eb0a3f..828b8de599c 100644 --- a/tests/service/data/SyntaxTree/SynType/Named 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Named 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Named 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Named 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -27,4 +27,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 06.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 06.fs.bsl index 75f20e20fdd..c2a24350cd2 100644 --- a/tests/service/data/SyntaxTree/SynType/Named 06.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Named 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Named 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Named 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -29,4 +29,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,31), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 07.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 07.fs.bsl index 65e957b2058..45d7be65073 100644 --- a/tests/service/data/SyntaxTree/SynType/Named 07.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Named 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Named 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Named 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -28,4 +28,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Named 08.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 08.fs.bsl index c6f0d6cbd6d..c235cb210ba 100644 --- a/tests/service/data/SyntaxTree/SynType/Named 08.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Named 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Named 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Named 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -22,6 +22,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,13)-(3,14) parse error Unexpected integer literal in binding diff --git a/tests/service/data/SyntaxTree/SynType/Named 09.fs.bsl b/tests/service/data/SyntaxTree/SynType/Named 09.fs.bsl index a97b6dd3461..e9fc68b3fd8 100644 --- a/tests/service/data/SyntaxTree/SynType/Named 09.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Named 09.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Named 09.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Named 09.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,4 +17,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/NestedSynTypeOrInsideSynExprTraitCall.fs.bsl b/tests/service/data/SyntaxTree/SynType/NestedSynTypeOrInsideSynExprTraitCall.fs.bsl index 1c58087b0d8..1f03d7f33ac 100644 --- a/tests/service/data/SyntaxTree/SynType/NestedSynTypeOrInsideSynExprTraitCall.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/NestedSynTypeOrInsideSynExprTraitCall.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/NestedSynTypeOrInsideSynExprTraitCall.fs", false, - QualifiedNameOfFile NestedSynTypeOrInsideSynExprTraitCall, [], [], + QualifiedNameOfFile NestedSynTypeOrInsideSynExprTraitCall, [], [SynModuleOrNamespace ([NestedSynTypeOrInsideSynExprTraitCall], false, AnonModule, [Let @@ -102,4 +102,5 @@ ImplFile EqualsRange = Some (2,34--2,35) })], (2,0--2,100))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/SingleSynTypeInsideSynExprTraitCall.fs.bsl b/tests/service/data/SyntaxTree/SynType/SingleSynTypeInsideSynExprTraitCall.fs.bsl index 5c1cd55a5bf..1e3e4c88ac6 100644 --- a/tests/service/data/SyntaxTree/SynType/SingleSynTypeInsideSynExprTraitCall.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/SingleSynTypeInsideSynExprTraitCall.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/SingleSynTypeInsideSynExprTraitCall.fs", false, - QualifiedNameOfFile SingleSynTypeInsideSynExprTraitCall, [], [], + QualifiedNameOfFile SingleSynTypeInsideSynExprTraitCall, [], [SynModuleOrNamespace ([SingleSynTypeInsideSynExprTraitCall], false, AnonModule, [Types @@ -191,4 +191,5 @@ ImplFile WithKeyword = None })], (2,0--4,60))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynExprTraitCall.fs.bsl b/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynExprTraitCall.fs.bsl index 24fb731523f..ea2f15e0487 100644 --- a/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynExprTraitCall.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynExprTraitCall.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/SynTypeOrInsideSynExprTraitCall.fs", false, - QualifiedNameOfFile SynTypeOrInsideSynExprTraitCall, [], [], + QualifiedNameOfFile SynTypeOrInsideSynExprTraitCall, [], [SynModuleOrNamespace ([SynTypeOrInsideSynExprTraitCall], false, AnonModule, [Let @@ -79,4 +79,5 @@ ImplFile EqualsRange = Some (2,29--2,30) })], (2,0--2,84))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember.fs.bsl b/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember.fs.bsl index c2de9ccff5c..31f3fe5e4c6 100644 --- a/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/SynType/SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember.fs", false, QualifiedNameOfFile - SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember, [], [], + SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember, [], [SynModuleOrNamespace ([SynTypeOrInsideSynTypeConstraintWhereTyparSupportsMember], false, AnonModule, @@ -86,4 +86,5 @@ ImplFile (2,0--3,6))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/SynTypeOrWithAppTypeOnTheRightHandSide.fs.bsl b/tests/service/data/SyntaxTree/SynType/SynTypeOrWithAppTypeOnTheRightHandSide.fs.bsl index f509494f211..3a17a731f00 100644 --- a/tests/service/data/SyntaxTree/SynType/SynTypeOrWithAppTypeOnTheRightHandSide.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/SynTypeOrWithAppTypeOnTheRightHandSide.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/SynTypeOrWithAppTypeOnTheRightHandSide.fs", false, - QualifiedNameOfFile SynTypeOrWithAppTypeOnTheRightHandSide, [], [], + QualifiedNameOfFile SynTypeOrWithAppTypeOnTheRightHandSide, [], [SynModuleOrNamespace ([SynTypeOrWithAppTypeOnTheRightHandSide], false, AnonModule, [Let @@ -60,4 +60,5 @@ ImplFile EqualsRange = Some (2,21--2,22) })], (2,0--2,64))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterAttributes.fsi.bsl b/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterAttributes.fsi.bsl index 6d0202252ea..c65846b5121 100644 --- a/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterAttributes.fsi.bsl +++ b/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterAttributes.fsi.bsl @@ -2,7 +2,6 @@ SigFile (ParsedSigFileInput ("/root/SynType/SynTypeTupleDoesIncludeLeadingParameterAttributes.fsi", QualifiedNameOfFile SynTypeTupleDoesIncludeLeadingParameterAttributes, [], - [], [SynModuleOrNamespaceSig ([SynTypeTupleDoesIncludeLeadingParameterAttributes], false, AnonModule, [Types @@ -92,4 +91,5 @@ SigFile WithKeyword = None })], (2,0--3,63))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterName.fsi.bsl b/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterName.fsi.bsl index 662002f0c87..6519bc1260e 100644 --- a/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterName.fsi.bsl +++ b/tests/service/data/SyntaxTree/SynType/SynTypeTupleDoesIncludeLeadingParameterName.fsi.bsl @@ -1,7 +1,7 @@ SigFile (ParsedSigFileInput ("/root/SynType/SynTypeTupleDoesIncludeLeadingParameterName.fsi", - QualifiedNameOfFile SynTypeTupleDoesIncludeLeadingParameterName, [], [], + QualifiedNameOfFile SynTypeTupleDoesIncludeLeadingParameterName, [], [SynModuleOrNamespaceSig ([SynTypeTupleDoesIncludeLeadingParameterName], false, AnonModule, [Types @@ -55,4 +55,5 @@ SigFile WithKeyword = None })], (2,0--3,34))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 01.fs.bsl index cb47bf69176..2ab3f8be161 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/Tuple - Nested 01.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -27,4 +27,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,19), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 02.fs.bsl index 31c6f32e32e..b2c6071dc34 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 02.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/Tuple - Nested 02.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -26,4 +26,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,19), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 03.fs.bsl index d2a8a234b88..deb1bf19996 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/Tuple - Nested 03.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -30,4 +30,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,24), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 04.fs.bsl index 5ceab06a988..4df779116b0 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/Tuple - Nested 04.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -29,6 +29,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,11)-(3,12) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 05.fs.bsl index e72167dde44..86b1794b8ef 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/Tuple - Nested 05.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -29,6 +29,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,15)-(3,16) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 06.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 06.fs.bsl index f90be5ac2f2..0eebe72bbd3 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple - Nested 06.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple - Nested 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/SynType/Tuple - Nested 06.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -29,6 +29,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,20)-(3,21) parse error Unexpected symbol ')' in type diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 01.fs.bsl index 85497901333..4aaaa3906ac 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -17,4 +17,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 02.fs.bsl index b35e5fb5bda..9dff41a4bb0 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 02.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -19,4 +19,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 03.fs.bsl index c83be44e69b..861e9ccf2bd 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -21,4 +21,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,19), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 04.fs.bsl index de61cb515a6..11516716f00 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,9)-(3,10) parse error Unexpected symbol ')' in type diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 05.fs.bsl index 7d02d692052..805333cbd6d 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(3,6) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 06.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 06.fs.bsl index aa3c77a6051..8a787d25260 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 06.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,9)-(3,10) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 07.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 07.fs.bsl index af8c1af77d0..a04ebce56b4 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 07.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,16)-(3,17) parse error Unexpected symbol ')' in type diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 08.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 08.fs.bsl index 658dd4661e2..be8a9c788da 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 08.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Expr @@ -18,6 +18,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,14), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,13)-(3,14) parse error Unexpected symbol ')' in type diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 09.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 09.fs.bsl index c0d052bcc9f..65df0ba18f4 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 09.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 09.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 09.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 09.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -39,6 +39,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,20), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,16)-(3,17) parse error Unexpected symbol '=' in binding diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 10.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 10.fs.bsl index dc553f72214..d38b3e89d5f 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 10.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 10.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 10.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 10.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -39,6 +39,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,20), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,11)-(3,13) parse error Unexpected symbol '->' in binding diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 11.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 11.fs.bsl index 31ca0e7d595..ed9a34731d9 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 11.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 11.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 11.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 11.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -45,6 +45,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,26), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,22)-(3,23) parse error Unexpected symbol '=' in binding diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 12.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 12.fs.bsl index 48dd1654f53..aab9c322a38 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 12.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 12.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 12.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 12.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -45,6 +45,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,26), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,17)-(3,19) parse error Unexpected symbol '->' in binding diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 13.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 13.fs.bsl index 1c4baa1ad5b..c0d6e8ddce2 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 13.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 13.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 13.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 13.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -47,6 +47,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,26), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,17)-(3,18) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/SynType/Tuple 14.fs.bsl b/tests/service/data/SyntaxTree/SynType/Tuple 14.fs.bsl index 8f40539042b..6a54173ea3e 100644 --- a/tests/service/data/SyntaxTree/SynType/Tuple 14.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Tuple 14.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/SynType/Tuple 14.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/SynType/Tuple 14.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -47,6 +47,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,26), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,12)-(3,13) parse error Expecting type diff --git a/tests/service/data/SyntaxTree/Type/Abbreviation 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Abbreviation 01.fs.bsl index f5ca6da29e6..8161ef11d05 100644 --- a/tests/service/data/SyntaxTree/Type/Abbreviation 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Abbreviation 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Abbreviation 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Abbreviation 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -19,4 +19,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Abbreviation 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Abbreviation 02.fs.bsl index 6d0a7728993..69efd4467a5 100644 --- a/tests/service/data/SyntaxTree/Type/Abbreviation 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Abbreviation 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Abbreviation 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Abbreviation 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -23,4 +23,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,19), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Abbreviation 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Abbreviation 03.fs.bsl index d2fb3a0cb2b..3d81221a098 100644 --- a/tests/service/data/SyntaxTree/Type/Abbreviation 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Abbreviation 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Abbreviation 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Abbreviation 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -25,4 +25,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Abbreviation 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Abbreviation 04.fs.bsl index 53dd6bbce50..4b2d945ae86 100644 --- a/tests/service/data/SyntaxTree/Type/Abbreviation 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Abbreviation 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Abbreviation 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Abbreviation 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -24,4 +24,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/And 01.fs.bsl b/tests/service/data/SyntaxTree/Type/And 01.fs.bsl index a9d16c93758..4c6d6d9d69d 100644 --- a/tests/service/data/SyntaxTree/Type/And 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/And 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/And 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/And 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,6 +40,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,3) parse error Unexpected keyword 'and' in type name diff --git a/tests/service/data/SyntaxTree/Type/And 02.fs.bsl b/tests/service/data/SyntaxTree/Type/And 02.fs.bsl index 9c68fa0b125..d8ed54e6278 100644 --- a/tests/service/data/SyntaxTree/Type/And 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/And 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/And 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/And 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,4 +40,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/And 03.fs.bsl b/tests/service/data/SyntaxTree/Type/And 03.fs.bsl index 0334d8da564..75c21712b48 100644 --- a/tests/service/data/SyntaxTree/Type/And 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/And 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/And 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/And 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,6 +40,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,4)-(5,7) parse error A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. diff --git a/tests/service/data/SyntaxTree/Type/And 04.fs.bsl b/tests/service/data/SyntaxTree/Type/And 04.fs.bsl index 05c052ddda5..43cdb517f1f 100644 --- a/tests/service/data/SyntaxTree/Type/And 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/And 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/And 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/And 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -28,6 +28,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,0), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,0) parse error Incomplete structured construct at or before this point in type name diff --git a/tests/service/data/SyntaxTree/Type/And 05.fs.bsl b/tests/service/data/SyntaxTree/Type/And 05.fs.bsl index 60a23a89c19..e830f0923ad 100644 --- a/tests/service/data/SyntaxTree/Type/And 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/And 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/And 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/And 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -28,4 +28,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/And 06.fs.bsl b/tests/service/data/SyntaxTree/Type/And 06.fs.bsl index cb3337443f1..88650dda065 100644 --- a/tests/service/data/SyntaxTree/Type/And 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/And 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/And 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/And 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -28,6 +28,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Type/As 01.fs.bsl b/tests/service/data/SyntaxTree/Type/As 01.fs.bsl index bec2d3a7121..6ee3982d866 100644 --- a/tests/service/data/SyntaxTree/Type/As 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/As 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/As 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/As 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,4 +27,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,28), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/As 02.fs.bsl b/tests/service/data/SyntaxTree/Type/As 02.fs.bsl index f40ff1a13d0..d9175ab67c2 100644 --- a/tests/service/data/SyntaxTree/Type/As 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/As 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/As 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/As 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +27,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,12)-(3,13) parse error Unexpected symbol '=' in type definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/As 03.fs.bsl b/tests/service/data/SyntaxTree/Type/As 03.fs.bsl index 42c054e0dbf..c6d3679b645 100644 --- a/tests/service/data/SyntaxTree/Type/As 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/As 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/As 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/As 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,26), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,7)-(3,14) parse error This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. diff --git a/tests/service/data/SyntaxTree/Type/As 04.fs.bsl b/tests/service/data/SyntaxTree/Type/As 04.fs.bsl index 82bef8fffce..72a2470ba19 100644 --- a/tests/service/data/SyntaxTree/Type/As 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/As 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/As 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/As 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,10)-(3,11) parse error Unexpected symbol '=' in type definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/As 05.fs.bsl b/tests/service/data/SyntaxTree/Type/As 05.fs.bsl index 52ea9524fef..a95fbbe8e9c 100644 --- a/tests/service/data/SyntaxTree/Type/As 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/As 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/As 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/As 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Incomplete structured construct at or before this point in type definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/Type/As 06.fs.bsl b/tests/service/data/SyntaxTree/Type/As 06.fs.bsl index ed933552272..9f32f95a557 100644 --- a/tests/service/data/SyntaxTree/Type/As 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/As 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/As 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/As 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Incomplete structured construct at or before this point in type definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/As 07.fs.bsl b/tests/service/data/SyntaxTree/Type/As 07.fs.bsl index a491491159b..c984cc41133 100644 --- a/tests/service/data/SyntaxTree/Type/As 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/As 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/As 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/As 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -21,6 +21,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,17)-(5,0) parse error Incomplete structured construct at or before this point in type definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/Type/As 08.fs.bsl b/tests/service/data/SyntaxTree/Type/As 08.fs.bsl index 24254ea6064..949d6732cb3 100644 --- a/tests/service/data/SyntaxTree/Type/As 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/As 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/As 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/As 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,12)-(5,0) parse error Incomplete structured construct at or before this point in type definition. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/AttributesInOptionalNamedMemberParameter.fs.bsl b/tests/service/data/SyntaxTree/Type/AttributesInOptionalNamedMemberParameter.fs.bsl index 6ed7fe97af5..478489a67f7 100644 --- a/tests/service/data/SyntaxTree/Type/AttributesInOptionalNamedMemberParameter.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/AttributesInOptionalNamedMemberParameter.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Type/AttributesInOptionalNamedMemberParameter.fs", false, - QualifiedNameOfFile AttributesInOptionalNamedMemberParameter, [], [], + QualifiedNameOfFile AttributesInOptionalNamedMemberParameter, [], [SynModuleOrNamespace ([AttributesInOptionalNamedMemberParameter], false, AnonModule, [Types @@ -72,4 +72,5 @@ ImplFile WithKeyword = None })], (2,0--3,46))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Class 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Class 01.fs.bsl index fe8be852708..319b6a1799c 100644 --- a/tests/service/data/SyntaxTree/Type/Class 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Class 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Class 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Class 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -17,4 +17,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Class 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Class 02.fs.bsl index f7e959d10a0..b3d84e0003e 100644 --- a/tests/service/data/SyntaxTree/Type/Class 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Class 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Class 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Class 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -42,4 +42,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Class 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Class 03.fs.bsl index 77f8ca8cea0..1b1edb27290 100644 --- a/tests/service/data/SyntaxTree/Type/Class 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Class 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Class 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Class 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,4 +27,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Class 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Class 04.fs.bsl index 80c75b7d5da..ae98b2f4211 100644 --- a/tests/service/data/SyntaxTree/Type/Class 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Class 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Class 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Class 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -29,4 +29,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Class 05.fs.bsl b/tests/service/data/SyntaxTree/Type/Class 05.fs.bsl index 6516bdc8320..a47c0c4fc45 100644 --- a/tests/service/data/SyntaxTree/Type/Class 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Class 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Class 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Class 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -43,4 +43,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Enum 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Enum 01.fs.bsl index e10f9194831..1d8dfd6a8ff 100644 --- a/tests/service/data/SyntaxTree/Type/Enum 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Enum 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Enum 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Enum 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -25,4 +25,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Enum 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Enum 02.fs.bsl index e586e137997..f9ea108dd50 100644 --- a/tests/service/data/SyntaxTree/Type/Enum 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Enum 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Enum 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Enum 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -24,4 +24,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Enum 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Enum 03.fs.bsl index 17ed2baa172..7bce3a3aa62 100644 --- a/tests/service/data/SyntaxTree/Type/Enum 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Enum 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Enum 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Enum 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -26,6 +26,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in union case diff --git a/tests/service/data/SyntaxTree/Type/Enum 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Enum 04.fs.bsl index faed14098e3..710fdf83368 100644 --- a/tests/service/data/SyntaxTree/Type/Enum 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Enum 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Enum 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Enum 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -32,6 +32,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,4)-(5,5) parse error Unexpected symbol '|' in union case diff --git a/tests/service/data/SyntaxTree/Type/Enum 05.fs.bsl b/tests/service/data/SyntaxTree/Type/Enum 05.fs.bsl index fd808927027..4d1063812b5 100644 --- a/tests/service/data/SyntaxTree/Type/Enum 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Enum 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Enum 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Enum 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -26,6 +26,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in type definition diff --git a/tests/service/data/SyntaxTree/Type/Enum 06.fs.bsl b/tests/service/data/SyntaxTree/Type/Enum 06.fs.bsl index b7fd06cbbd2..3382f753b9f 100644 --- a/tests/service/data/SyntaxTree/Type/Enum 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Enum 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Enum 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Enum 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -32,6 +32,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,4)-(5,5) parse error Unexpected symbol '|' in type definition diff --git a/tests/service/data/SyntaxTree/Type/Enum 07 - Eof.fs.bsl b/tests/service/data/SyntaxTree/Type/Enum 07 - Eof.fs.bsl index 5278e60ecd8..6d424af5776 100644 --- a/tests/service/data/SyntaxTree/Type/Enum 07 - Eof.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Enum 07 - Eof.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Enum 07 - Eof.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Enum 07 - Eof.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Incomplete structured construct at or before this point in union case diff --git a/tests/service/data/SyntaxTree/Type/Enum 08 - Eof.fs.bsl b/tests/service/data/SyntaxTree/Type/Enum 08 - Eof.fs.bsl index b715aa57067..40680d4d737 100644 --- a/tests/service/data/SyntaxTree/Type/Enum 08 - Eof.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Enum 08 - Eof.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Enum 08 - Eof.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Enum 08 - Eof.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Incomplete structured construct at or before this point in type definition diff --git a/tests/service/data/SyntaxTree/Type/Enum 09 - Eof.fs.bsl b/tests/service/data/SyntaxTree/Type/Enum 09 - Eof.fs.bsl index c1756aeb77a..5604912f25c 100644 --- a/tests/service/data/SyntaxTree/Type/Enum 09 - Eof.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Enum 09 - Eof.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Enum 09 - Eof.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Enum 09 - Eof.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,9) parse error Incomplete structured construct at or before this point in union case diff --git a/tests/service/data/SyntaxTree/Type/Enum 10 - Eof.fs.bsl b/tests/service/data/SyntaxTree/Type/Enum 10 - Eof.fs.bsl index 6a6bf175b1d..c85ef4a38c1 100644 --- a/tests/service/data/SyntaxTree/Type/Enum 10 - Eof.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Enum 10 - Eof.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Enum 10 - Eof.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Enum 10 - Eof.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,7) parse error Incomplete structured construct at or before this point in type definition diff --git a/tests/service/data/SyntaxTree/Type/Interface 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Interface 01.fs.bsl index 27d0bc70287..0736baeb450 100644 --- a/tests/service/data/SyntaxTree/Type/Interface 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Interface 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Interface 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Interface 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -17,4 +17,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Interface 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Interface 02.fs.bsl index 9a516b1a4a4..00f511cf97b 100644 --- a/tests/service/data/SyntaxTree/Type/Interface 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Interface 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Interface 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Interface 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -17,4 +17,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Interface 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Interface 03.fs.bsl index beaa9fae234..9bd8891abe6 100644 --- a/tests/service/data/SyntaxTree/Type/Interface 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Interface 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Interface 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Interface 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -38,4 +38,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Interface 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Interface 04.fs.bsl index 3c5776cc025..2f68afd4da1 100644 --- a/tests/service/data/SyntaxTree/Type/Interface 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Interface 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Interface 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Interface 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -38,4 +38,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Interface 05.fs.bsl b/tests/service/data/SyntaxTree/Type/Interface 05.fs.bsl index 25c830d341d..e6801e0c2fc 100644 --- a/tests/service/data/SyntaxTree/Type/Interface 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Interface 05.fs.bsl @@ -1,11 +1,11 @@ ImplFile (ParsedImplFileInput ("/root/Type/Interface 05.fs", false, QualifiedNameOfFile Interface 05, [], - [], [SynModuleOrNamespace ([Interface 05], false, AnonModule, [], PreXmlDocEmpty, [], None, (8,0--8,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,0)-(7,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Type/Interface 06.fs.bsl b/tests/service/data/SyntaxTree/Type/Interface 06.fs.bsl index b8201474aa2..fcb667c6f0a 100644 --- a/tests/service/data/SyntaxTree/Type/Interface 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Interface 06.fs.bsl @@ -1,11 +1,11 @@ ImplFile (ParsedImplFileInput ("/root/Type/Interface 06.fs", false, QualifiedNameOfFile Interface 06, [], - [], [SynModuleOrNamespace ([Interface 06], false, AnonModule, [], PreXmlDocEmpty, [], None, (7,0--7,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Type/Interface 07.fs.bsl b/tests/service/data/SyntaxTree/Type/Interface 07.fs.bsl index 7776c39507b..07799f674ef 100644 --- a/tests/service/data/SyntaxTree/Type/Interface 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Interface 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Interface 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Interface 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -39,6 +39,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,19), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,14)-(5,4) parse error Incomplete structured construct at or before this point in member definition diff --git a/tests/service/data/SyntaxTree/Type/MultipleSynEnumCaseContainsRangeOfConstant.fs.bsl b/tests/service/data/SyntaxTree/Type/MultipleSynEnumCaseContainsRangeOfConstant.fs.bsl index 85c646eae41..26f912fd463 100644 --- a/tests/service/data/SyntaxTree/Type/MultipleSynEnumCaseContainsRangeOfConstant.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/MultipleSynEnumCaseContainsRangeOfConstant.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Type/MultipleSynEnumCaseContainsRangeOfConstant.fs", false, - QualifiedNameOfFile MultipleSynEnumCaseContainsRangeOfConstant, [], [], + QualifiedNameOfFile MultipleSynEnumCaseContainsRangeOfConstant, [], [SynModuleOrNamespace ([MultipleSynEnumCaseContainsRangeOfConstant], false, AnonModule, [Types @@ -30,4 +30,5 @@ ImplFile WithKeyword = None })], (2,0--4,13))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/NamedParametersInDelegateType.fs.bsl b/tests/service/data/SyntaxTree/Type/NamedParametersInDelegateType.fs.bsl index daea0ab5026..cd9f16db52b 100644 --- a/tests/service/data/SyntaxTree/Type/NamedParametersInDelegateType.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/NamedParametersInDelegateType.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Type/NamedParametersInDelegateType.fs", false, - QualifiedNameOfFile NamedParametersInDelegateType, [], [], + QualifiedNameOfFile NamedParametersInDelegateType, [], [SynModuleOrNamespace ([NamedParametersInDelegateType], false, AnonModule, [Types @@ -87,4 +87,5 @@ ImplFile WithKeyword = None })], (2,0--2,46))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/NestedTypeHasStaticTypeAsLeadingKeyword.fs.bsl b/tests/service/data/SyntaxTree/Type/NestedTypeHasStaticTypeAsLeadingKeyword.fs.bsl index ae482a08271..536c4cc9e54 100644 --- a/tests/service/data/SyntaxTree/Type/NestedTypeHasStaticTypeAsLeadingKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/NestedTypeHasStaticTypeAsLeadingKeyword.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Type/NestedTypeHasStaticTypeAsLeadingKeyword.fs", false, - QualifiedNameOfFile NestedTypeHasStaticTypeAsLeadingKeyword, [], [], + QualifiedNameOfFile NestedTypeHasStaticTypeAsLeadingKeyword, [], [SynModuleOrNamespace ([NestedTypeHasStaticTypeAsLeadingKeyword], false, AnonModule, [Types @@ -30,4 +30,5 @@ ImplFile WithKeyword = None })], (2,0--6,0))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Primary ctor 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Primary ctor 01.fs.bsl index 6717cb55b41..fe0302ab859 100644 --- a/tests/service/data/SyntaxTree/Type/Primary ctor 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Primary ctor 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Primary ctor 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Primary ctor 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -26,4 +26,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,20), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Primary ctor 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Primary ctor 02.fs.bsl index fbb48e2fd0a..72bc51bf468 100644 --- a/tests/service/data/SyntaxTree/Type/Primary ctor 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Primary ctor 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Primary ctor 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Primary ctor 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +27,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(3,7) parse error A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. diff --git a/tests/service/data/SyntaxTree/Type/Primary ctor 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Primary ctor 03.fs.bsl index 7bf4dedee58..99c099de787 100644 --- a/tests/service/data/SyntaxTree/Type/Primary ctor 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Primary ctor 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Primary ctor 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Primary ctor 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -21,6 +21,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,9)-(5,0) parse error Incomplete structured construct at or before this point in type definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/Type/Primary ctor 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Primary ctor 04.fs.bsl index a46c198cdfe..057d2f4c5b5 100644 --- a/tests/service/data/SyntaxTree/Type/Primary ctor 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Primary ctor 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Primary ctor 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Primary ctor 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -26,6 +26,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Type/Primary ctor 05.fs.bsl b/tests/service/data/SyntaxTree/Type/Primary ctor 05.fs.bsl index 17215f552fc..9a347eecea8 100644 --- a/tests/service/data/SyntaxTree/Type/Primary ctor 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Primary ctor 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Primary ctor 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Primary ctor 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -20,6 +20,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Incomplete structured construct at or before this point in type definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/Type/RangeOfAttributeShouldBeIncludedInSynTypeDefn.fs.bsl b/tests/service/data/SyntaxTree/Type/RangeOfAttributeShouldBeIncludedInSynTypeDefn.fs.bsl index 3d954e3c37d..79bbd17b1a6 100644 --- a/tests/service/data/SyntaxTree/Type/RangeOfAttributeShouldBeIncludedInSynTypeDefn.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/RangeOfAttributeShouldBeIncludedInSynTypeDefn.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Type/RangeOfAttributeShouldBeIncludedInSynTypeDefn.fs", false, - QualifiedNameOfFile RangeOfAttributeShouldBeIncludedInSynTypeDefn, [], [], + QualifiedNameOfFile RangeOfAttributeShouldBeIncludedInSynTypeDefn, [], [SynModuleOrNamespace ([RangeOfAttributeShouldBeIncludedInSynTypeDefn], false, AnonModule, [Types @@ -22,4 +22,5 @@ ImplFile WithKeyword = None })], (2,0--5,7))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fs.bsl b/tests/service/data/SyntaxTree/Type/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fs.bsl index 0b685986fc4..ad592dd5cbb 100644 --- a/tests/service/data/SyntaxTree/Type/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fs.bsl @@ -2,7 +2,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fs", false, QualifiedNameOfFile RangeOfAttributesShouldBeIncludedInRecursiveTypes, [], - [], [SynModuleOrNamespace ([RangeOfAttributesShouldBeIncludedInRecursiveTypes], false, AnonModule, [Types @@ -112,4 +111,5 @@ ImplFile WithKeyword = None })], (2,0--10,5))], PreXmlDocEmpty, [], None, (2,0--11,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Record - Access 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Access 01.fs.bsl index 95895538080..e2c49be6c8e 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Access 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Access 01.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Record - Access 01.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -26,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,5) parse error Unexpected symbol '}' in field declaration. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/Record - Access 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Access 02.fs.bsl index dac1c3f6255..3540dbcc68c 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Access 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Access 02.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Record - Access 02.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +26,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,5) parse error Unexpected symbol '}' in field declaration. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/Record - Access 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Access 03.fs.bsl index f819d61d7c4..353570298cd 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Access 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Access 03.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Record - Access 03.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -28,6 +27,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,8)-(5,31) parse error Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. diff --git a/tests/service/data/SyntaxTree/Type/Record - Access 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Access 04.fs.bsl index 1bcbe107b49..37ad416ff25 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Access 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Access 04.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Record - Access 04.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +26,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,8)-(5,23) parse error Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. diff --git a/tests/service/data/SyntaxTree/Type/Record - Mutable 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Mutable 01.fs.bsl index 1b629ceaf6f..37da69f67aa 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Mutable 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Mutable 01.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Record - Mutable 01.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +26,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,5) parse error Unexpected symbol '}' in field declaration. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/Record - Mutable 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Mutable 02.fs.bsl index 6d7a08f3caa..7b80fa8e08f 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Mutable 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Mutable 02.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Record - Mutable 02.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -33,6 +32,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,4)-(7,5) parse error Unexpected symbol '}' in field declaration. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/Record - Mutable 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Mutable 03.fs.bsl index 34b8bfe0d51..64b6dba2775 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Mutable 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Mutable 03.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Record - Mutable 03.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -33,6 +32,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,16)-(6,8) parse error Incomplete structured construct at or before this point in field declaration. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/Record - Mutable 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Mutable 04.fs.bsl index e8067343cd8..c3b99f04619 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Mutable 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Mutable 04.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Record - Mutable 04.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -39,6 +38,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--10,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,16)-(7,8) parse error Incomplete structured construct at or before this point in field declaration. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/Record - Mutable 05.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Mutable 05.fs.bsl index 3679671665f..6443e19b43b 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Mutable 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Mutable 05.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Record - Mutable 05.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,4 +39,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--10,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Record 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Record 01.fs.bsl index 1eabb2b2f62..ce490f4890d 100644 --- a/tests/service/data/SyntaxTree/Type/Record 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Record 01.fs", false, QualifiedNameOfFile Foo, [], [], + ("/root/Type/Record 01.fs", false, QualifiedNameOfFile Foo, [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Types @@ -42,6 +42,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,4)-(7,5) parse error Unexpected symbol '}' in field declaration. Expected ':' or other token. diff --git a/tests/service/data/SyntaxTree/Type/Record 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Record 02.fs.bsl index 11cabe541de..2805bef72c4 100644 --- a/tests/service/data/SyntaxTree/Type/Record 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Record 02.fs", false, QualifiedNameOfFile Foo, [], [], + ("/root/Type/Record 02.fs", false, QualifiedNameOfFile Foo, [], [SynModuleOrNamespace ([Foo], false, NamedModule, [Types @@ -43,6 +43,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,4)-(7,5) parse error Unexpected symbol '}' in field declaration diff --git a/tests/service/data/SyntaxTree/Type/Record 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Record 03.fs.bsl index 8777aa1b200..e53b6c858d4 100644 --- a/tests/service/data/SyntaxTree/Type/Record 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Record 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Record 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,6)-(4,7) parse error Expecting record field diff --git a/tests/service/data/SyntaxTree/Type/Record 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Record 04.fs.bsl index db457dd8de3..bc34db45a45 100644 --- a/tests/service/data/SyntaxTree/Type/Record 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Record 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Record 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -25,6 +25,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,6)-(5,7) parse error Unexpected symbol ';' in field declaration. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/Record 05.fs.bsl b/tests/service/data/SyntaxTree/Type/Record 05.fs.bsl index 19883a9e8c9..65f78f4d5d3 100644 --- a/tests/service/data/SyntaxTree/Type/Record 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Record 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Record 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -37,6 +37,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,6)-(5,7) parse error Unexpected symbol ';' in field declaration. Expected identifier or other token. diff --git a/tests/service/data/SyntaxTree/Type/SingleSynEnumCaseContainsRangeOfConstant.fs.bsl b/tests/service/data/SyntaxTree/Type/SingleSynEnumCaseContainsRangeOfConstant.fs.bsl index e901d3eac2f..eebe5e89043 100644 --- a/tests/service/data/SyntaxTree/Type/SingleSynEnumCaseContainsRangeOfConstant.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SingleSynEnumCaseContainsRangeOfConstant.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Type/SingleSynEnumCaseContainsRangeOfConstant.fs", false, - QualifiedNameOfFile SingleSynEnumCaseContainsRangeOfConstant, [], [], + QualifiedNameOfFile SingleSynEnumCaseContainsRangeOfConstant, [], [SynModuleOrNamespace ([SingleSynEnumCaseContainsRangeOfConstant], false, AnonModule, [Types @@ -24,4 +24,5 @@ ImplFile WithKeyword = None })], (2,0--2,27))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Struct 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Struct 01.fs.bsl index 9996befe9da..7a1e7f126b6 100644 --- a/tests/service/data/SyntaxTree/Type/Struct 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Struct 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Struct 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Struct 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -16,4 +16,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,19), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Struct 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Struct 02.fs.bsl index 3ca9cf08ae3..50148b6ee14 100644 --- a/tests/service/data/SyntaxTree/Type/Struct 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Struct 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Struct 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Struct 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -26,4 +26,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/SynMemberDefnInterfaceContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Type/SynMemberDefnInterfaceContainsTheRangeOfTheWithKeyword.fs.bsl index cc2e1a3997f..4a03a8854ac 100644 --- a/tests/service/data/SyntaxTree/Type/SynMemberDefnInterfaceContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynMemberDefnInterfaceContainsTheRangeOfTheWithKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Type/SynMemberDefnInterfaceContainsTheRangeOfTheWithKeyword.fs", false, QualifiedNameOfFile SynMemberDefnInterfaceContainsTheRangeOfTheWithKeyword, - [], [], + [], [SynModuleOrNamespace ([SynMemberDefnInterfaceContainsTheRangeOfTheWithKeyword], false, AnonModule, @@ -65,4 +65,5 @@ ImplFile WithKeyword = None })], (2,0--5,19))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithAttributeContainsTheRangeOfTheTypeKeyword.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithAttributeContainsTheRangeOfTheTypeKeyword.fs.bsl index 6b465047993..bdf9ec74f42 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithAttributeContainsTheRangeOfTheTypeKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithAttributeContainsTheRangeOfTheTypeKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Type/SynTypeDefnWithAttributeContainsTheRangeOfTheTypeKeyword.fs", false, QualifiedNameOfFile - SynTypeDefnWithAttributeContainsTheRangeOfTheTypeKeyword, [], [], + SynTypeDefnWithAttributeContainsTheRangeOfTheTypeKeyword, [], [SynModuleOrNamespace ([SynTypeDefnWithAttributeContainsTheRangeOfTheTypeKeyword], false, AnonModule, @@ -28,4 +28,5 @@ ImplFile WithKeyword = None })], (2,0--4,10))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (3,0--3,8)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithAugmentationContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithAugmentationContainsTheRangeOfTheWithKeyword.fs.bsl index 285ecf0975e..200a42bb6be 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithAugmentationContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithAugmentationContainsTheRangeOfTheWithKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Type/SynTypeDefnWithAugmentationContainsTheRangeOfTheWithKeyword.fs", false, QualifiedNameOfFile - SynTypeDefnWithAugmentationContainsTheRangeOfTheWithKeyword, [], [], + SynTypeDefnWithAugmentationContainsTheRangeOfTheWithKeyword, [], [SynModuleOrNamespace ([SynTypeDefnWithAugmentationContainsTheRangeOfTheWithKeyword], false, AnonModule, @@ -42,4 +42,5 @@ ImplFile WithKeyword = None })], (2,0--3,21))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithEnumContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithEnumContainsTheRangeOfTheEqualsSign.fs.bsl index f4a425b596d..4ebef606401 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithEnumContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithEnumContainsTheRangeOfTheEqualsSign.fs.bsl @@ -2,7 +2,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/SynTypeDefnWithEnumContainsTheRangeOfTheEqualsSign.fs", false, QualifiedNameOfFile SynTypeDefnWithEnumContainsTheRangeOfTheEqualsSign, [], - [], [SynModuleOrNamespace ([SynTypeDefnWithEnumContainsTheRangeOfTheEqualsSign], false, AnonModule, @@ -32,4 +31,5 @@ ImplFile WithKeyword = None })], (2,0--4,19))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fs.bsl index 3809962658a..ac4171bbf00 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithObjectModelDelegateContainsTheRangeOfTheEqualsSign.fs.bsl @@ -4,7 +4,6 @@ ImplFile false, QualifiedNameOfFile SynTypeDefnWithObjectModelDelegateContainsTheRangeOfTheEqualsSign, [], - [], [SynModuleOrNamespace ([SynTypeDefnWithObjectModelDelegateContainsTheRangeOfTheEqualsSign], false, AnonModule, @@ -51,4 +50,5 @@ ImplFile WithKeyword = None })], (2,0--2,37))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithRecordContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithRecordContainsTheRangeOfTheWithKeyword.fs.bsl index 35e334478f0..7cb9f5a2af5 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithRecordContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithRecordContainsTheRangeOfTheWithKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Type/SynTypeDefnWithRecordContainsTheRangeOfTheWithKeyword.fs", false, QualifiedNameOfFile SynTypeDefnWithRecordContainsTheRangeOfTheWithKeyword, - [], [], + [], [SynModuleOrNamespace ([SynTypeDefnWithRecordContainsTheRangeOfTheWithKeyword], false, AnonModule, @@ -77,4 +77,5 @@ ImplFile (2,0--5,46))], PreXmlDocEmpty, [], None, (2,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithUnionContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithUnionContainsTheRangeOfTheEqualsSign.fs.bsl index 5e5b3b7fc3b..561ab54725d 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithUnionContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithUnionContainsTheRangeOfTheEqualsSign.fs.bsl @@ -2,7 +2,7 @@ ImplFile (ParsedImplFileInput ("/root/Type/SynTypeDefnWithUnionContainsTheRangeOfTheEqualsSign.fs", false, QualifiedNameOfFile SynTypeDefnWithUnionContainsTheRangeOfTheEqualsSign, - [], [], + [], [SynModuleOrNamespace ([SynTypeDefnWithUnionContainsTheRangeOfTheEqualsSign], false, AnonModule, @@ -52,4 +52,5 @@ ImplFile WithKeyword = None })], (2,0--4,28))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithXmlDocContainsTheRangeOfTheTypeKeyword.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithXmlDocContainsTheRangeOfTheTypeKeyword.fs.bsl index 06a95ae7aa5..98690850046 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithXmlDocContainsTheRangeOfTheTypeKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithXmlDocContainsTheRangeOfTheTypeKeyword.fs.bsl @@ -3,7 +3,7 @@ ImplFile ("/root/Type/SynTypeDefnWithXmlDocContainsTheRangeOfTheTypeKeyword.fs", false, QualifiedNameOfFile SynTypeDefnWithXmlDocContainsTheRangeOfTheTypeKeyword, - [], [], + [], [SynModuleOrNamespace ([SynTypeDefnWithXmlDocContainsTheRangeOfTheTypeKeyword], false, AnonModule, @@ -34,4 +34,5 @@ ImplFile WithKeyword = None })], (2,0--5,9))], PreXmlDocEmpty, [], None, (4,0--6,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (3,0--3,8)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/SynTypeFunHasRangeOfArrow.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeFunHasRangeOfArrow.fs.bsl index 21eb149bb10..18cf4ffe778 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeFunHasRangeOfArrow.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeFunHasRangeOfArrow.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Type/SynTypeFunHasRangeOfArrow.fs", false, - QualifiedNameOfFile SynTypeFunHasRangeOfArrow, [], [], + QualifiedNameOfFile SynTypeFunHasRangeOfArrow, [], [SynModuleOrNamespace ([SynTypeFunHasRangeOfArrow], false, AnonModule, [Types @@ -23,4 +23,5 @@ ImplFile WithKeyword = None })], (2,0--3,20))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (2,19--2,59)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/SynTypeTupleWithStruct.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeTupleWithStruct.fs.bsl index e0f51c6ee46..2091682bac4 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeTupleWithStruct.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeTupleWithStruct.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Type/SynTypeTupleWithStruct.fs", false, - QualifiedNameOfFile SynTypeTupleWithStruct, [], [], + QualifiedNameOfFile SynTypeTupleWithStruct, [], [SynModuleOrNamespace ([SynTypeTupleWithStruct], false, AnonModule, [Let @@ -34,4 +34,5 @@ ImplFile EqualsRange = Some (2,26--2,27) })], (2,0--2,30))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/SynTypeTupleWithStructRecovery.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeTupleWithStructRecovery.fs.bsl index c69d94938c8..243e4f59db4 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeTupleWithStructRecovery.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeTupleWithStructRecovery.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/Type/SynTypeTupleWithStructRecovery.fs", false, - QualifiedNameOfFile SynTypeTupleWithStructRecovery, [], [], + QualifiedNameOfFile SynTypeTupleWithStructRecovery, [], [SynModuleOrNamespace ([SynTypeTupleWithStructRecovery], false, AnonModule, [Let @@ -34,6 +34,7 @@ ImplFile EqualsRange = Some (2,25--2,26) })], (2,0--2,29))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (2,25)-(2,26) parse error Unexpected symbol '=' in binding. Expected ')' or other token. diff --git a/tests/service/data/SyntaxTree/Type/Type 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 01.fs.bsl index f34d5eb126b..6d2a653d3c3 100644 --- a/tests/service/data/SyntaxTree/Type/Type 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Type 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(5,0) parse error Incomplete structured construct at or before this point in type name diff --git a/tests/service/data/SyntaxTree/Type/Type 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 02.fs.bsl index a670186b978..1612c6d364a 100644 --- a/tests/service/data/SyntaxTree/Type/Type 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Type 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -17,4 +17,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Type 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 03.fs.bsl index 9cb15932e4c..d852d9f5b0c 100644 --- a/tests/service/data/SyntaxTree/Type/Type 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Type 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(3,8) parse error A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. diff --git a/tests/service/data/SyntaxTree/Type/Type 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 04.fs.bsl index 83a744a8417..25829050752 100644 --- a/tests/service/data/SyntaxTree/Type/Type 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Type 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -29,6 +29,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(3,9) parse error A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. diff --git a/tests/service/data/SyntaxTree/Type/Type 05.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 05.fs.bsl index ab92f140113..3b6a0da3290 100644 --- a/tests/service/data/SyntaxTree/Type/Type 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Type 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -28,6 +28,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(3,9) parse error A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. diff --git a/tests/service/data/SyntaxTree/Type/Type 06.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 06.fs.bsl index c987c0d38f5..9fbbe27cb68 100644 --- a/tests/service/data/SyntaxTree/Type/Type 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Type 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Type/Type 07.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 07.fs.bsl index 0eb812102a6..fc4e61c33cd 100644 --- a/tests/service/data/SyntaxTree/Type/Type 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Type 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -41,6 +41,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(3,6) parse error Unexpected symbol '=' in type name diff --git a/tests/service/data/SyntaxTree/Type/Type 08.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 08.fs.bsl index fea4942c9fa..787da13b0e8 100644 --- a/tests/service/data/SyntaxTree/Type/Type 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 08.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 08.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Type 08.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -24,4 +24,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Type 09.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 09.fs.bsl index c4361033429..0105941f2d9 100644 --- a/tests/service/data/SyntaxTree/Type/Type 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 09.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 09.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Type 09.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -24,6 +24,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,1) parse error Incomplete structured construct at or before this point in union case diff --git a/tests/service/data/SyntaxTree/Type/Type 10.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 10.fs.bsl index 979759d4dbf..7cbdc0524f8 100644 --- a/tests/service/data/SyntaxTree/Type/Type 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 10.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 10.fs", false, QualifiedNameOfFile Type 10, [], [], + ("/root/Type/Type 10.fs", false, QualifiedNameOfFile Type 10, [], [SynModuleOrNamespace ([N], false, DeclaredNamespace, [NestedModule @@ -51,6 +51,7 @@ ImplFile PreXmlDocEmpty, [], None, (4,0--9,16), { LeadingKeyword = Namespace (4,0--4,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [LineComment (1,0--1,25)] }, set [])) (7,9)-(7,10) parse error Unexpected character '�' in type name diff --git a/tests/service/data/SyntaxTree/Type/Type 11.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 11.fs.bsl index 074cead59e8..18c53db2380 100644 --- a/tests/service/data/SyntaxTree/Type/Type 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 11.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 11.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Type 11.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -27,6 +27,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,5)-(3,7) parse error A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. diff --git a/tests/service/data/SyntaxTree/Type/Type 12.fs.bsl b/tests/service/data/SyntaxTree/Type/Type 12.fs.bsl index 9bacae3a626..49cd0e01aff 100644 --- a/tests/service/data/SyntaxTree/Type/Type 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Type 12.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Type 12.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Type 12.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,7)-(3,8) parse error Unexpected symbol '|' in type definition. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/Type/Union - Field 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Union - Field 01.fs.bsl index bb78f6b332f..da9b04d91b5 100644 --- a/tests/service/data/SyntaxTree/Type/Union - Field 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Union - Field 01.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Union - Field 01.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -32,4 +31,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Union - Field 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Union - Field 02.fs.bsl index 4d3b58b4440..d649bbb87ad 100644 --- a/tests/service/data/SyntaxTree/Type/Union - Field 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Union - Field 02.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Union - Field 02.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -31,6 +30,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Incomplete structured construct at or before this point in union case diff --git a/tests/service/data/SyntaxTree/Type/Union - Field 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Union - Field 03.fs.bsl index 378ecc0220d..45a33b76422 100644 --- a/tests/service/data/SyntaxTree/Type/Union - Field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Union - Field 03.fs.bsl @@ -1,7 +1,6 @@ ImplFile (ParsedImplFileInput ("/root/Type/Union - Field 03.fs", false, QualifiedNameOfFile Module, [], - [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -38,6 +37,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,19), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,14)-(4,15) parse error Unexpected symbol '*' in union case diff --git a/tests/service/data/SyntaxTree/Type/Union 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Union 01.fs.bsl index d652bfba1e6..95b3750a979 100644 --- a/tests/service/data/SyntaxTree/Type/Union 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Union 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Union 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Union 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -23,4 +23,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Union 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Union 02.fs.bsl index 55d2c0c07e6..01aad19db35 100644 --- a/tests/service/data/SyntaxTree/Type/Union 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Union 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Union 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Union 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -38,4 +38,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,20), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/Union 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Union 03.fs.bsl index 2906039ff99..9623dd96ac7 100644 --- a/tests/service/data/SyntaxTree/Type/Union 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Union 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Union 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Union 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -36,6 +36,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Type/Union 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Union 04.fs.bsl index 65be844f376..a83e76cb5a0 100644 --- a/tests/service/data/SyntaxTree/Type/Union 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Union 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Union 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Union 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -43,6 +43,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (4:5). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Type/Union 05.fs.bsl b/tests/service/data/SyntaxTree/Type/Union 05.fs.bsl index 36eb5dae412..055cbe1b68b 100644 --- a/tests/service/data/SyntaxTree/Type/Union 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Union 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Union 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Union 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -43,6 +43,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,17)-(4,18) parse error Expecting union case field diff --git a/tests/service/data/SyntaxTree/Type/Union 06.fs.bsl b/tests/service/data/SyntaxTree/Type/Union 06.fs.bsl index 90b09522783..5648e1559f0 100644 --- a/tests/service/data/SyntaxTree/Type/Union 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Union 06.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Union 06.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Union 06.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -43,6 +43,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,11)-(4,12) parse error Expecting union case field diff --git a/tests/service/data/SyntaxTree/Type/Union 07.fs.bsl b/tests/service/data/SyntaxTree/Type/Union 07.fs.bsl index 2f0f76e6131..756c74260c8 100644 --- a/tests/service/data/SyntaxTree/Type/Union 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Union 07.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/Union 07.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/Union 07.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,6 +40,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,4)-(5,5) parse error Unexpected symbol '|' in union case diff --git a/tests/service/data/SyntaxTree/Type/With 01.fs.bsl b/tests/service/data/SyntaxTree/Type/With 01.fs.bsl index 7fd1e7479f6..5b6217dfe21 100644 --- a/tests/service/data/SyntaxTree/Type/With 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/With 01.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/With 01.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/With 01.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,4 +40,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/With 02.fs.bsl b/tests/service/data/SyntaxTree/Type/With 02.fs.bsl index afef8b79973..f319074e37e 100644 --- a/tests/service/data/SyntaxTree/Type/With 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/With 02.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/With 02.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/With 02.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -16,6 +16,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,0)-(4,6) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Type/With 03.fs.bsl b/tests/service/data/SyntaxTree/Type/With 03.fs.bsl index 690a827af17..197d6d3efc9 100644 --- a/tests/service/data/SyntaxTree/Type/With 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/With 03.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/With 03.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/With 03.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -17,6 +17,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,1) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/Type/With 04.fs.bsl b/tests/service/data/SyntaxTree/Type/With 04.fs.bsl index 99ddf674425..1eda3d63210 100644 --- a/tests/service/data/SyntaxTree/Type/With 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/With 04.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/With 04.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/With 04.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -47,4 +47,5 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Type/With 05.fs.bsl b/tests/service/data/SyntaxTree/Type/With 05.fs.bsl index af2e4a0317a..8dedec200dd 100644 --- a/tests/service/data/SyntaxTree/Type/With 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/With 05.fs.bsl @@ -1,6 +1,6 @@ ImplFile (ParsedImplFileInput - ("/root/Type/With 05.fs", false, QualifiedNameOfFile Module, [], [], + ("/root/Type/With 05.fs", false, QualifiedNameOfFile Module, [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -23,6 +23,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,6) parse error Unexpected syntax or possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this further. diff --git a/tests/service/data/SyntaxTree/UnionCase/Missing keyword of.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Missing keyword of.fs.bsl index 2bac019ca23..88799b9de0d 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Missing keyword of.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Missing keyword of.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Missing keyword of.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Let @@ -83,6 +83,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--11,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (7,6)-(7,18) parse error Missing keyword 'of' diff --git a/tests/service/data/SyntaxTree/UnionCase/Missing name 01.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Missing name 01.fs.bsl index a67e4eb8783..f4722cd1688 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Missing name 01.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Missing name 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Missing name 01.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -24,6 +24,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,0)-(5,0) parse error Incomplete structured construct at or before this point in union case diff --git a/tests/service/data/SyntaxTree/UnionCase/Missing name 02.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Missing name 02.fs.bsl index 02c674e6a1f..1d96591c282 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Missing name 02.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Missing name 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Missing name 02.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -32,6 +32,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,5) parse error Unexpected symbol '|' in union case diff --git a/tests/service/data/SyntaxTree/UnionCase/Missing name 03.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Missing name 03.fs.bsl index 4a272764df0..acbcf5624b1 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Missing name 03.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Missing name 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Missing name 03.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -45,6 +45,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (4,4)-(4,6) parse error Missing union case name diff --git a/tests/service/data/SyntaxTree/UnionCase/Missing name 04.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Missing name 04.fs.bsl index 8913b904cea..f7225a0927b 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Missing name 04.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Missing name 04.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Missing name 04.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,6 +40,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,6)-(5,8) parse error Missing union case name diff --git a/tests/service/data/SyntaxTree/UnionCase/Missing name 05.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Missing name 05.fs.bsl index 9d7a69011ef..d1d8fe0cce1 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Missing name 05.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Missing name 05.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Missing name 05.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -40,6 +40,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,15)-(5,17) parse error Missing union case name diff --git a/tests/service/data/SyntaxTree/UnionCase/Missing name 06.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Missing name 06.fs.bsl index 27516955a99..44085d99dcf 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Missing name 06.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Missing name 06.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Missing name 06.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -32,6 +32,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,5) parse error Unexpected symbol '|' in union case diff --git a/tests/service/data/SyntaxTree/UnionCase/Missing name 07.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Missing name 07.fs.bsl index c4d3efa237f..86769a68dd1 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Missing name 07.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Missing name 07.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Missing name 07.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -36,6 +36,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,4)-(6,5) parse error Unexpected symbol '|' in union case diff --git a/tests/service/data/SyntaxTree/UnionCase/Missing name 08.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Missing name 08.fs.bsl index 238d9916e07..1f0a8ebdcac 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Missing name 08.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Missing name 08.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Missing name 08.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -37,6 +37,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--6,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (6,0)-(6,4) parse error Incomplete structured construct at or before this point in type definition diff --git a/tests/service/data/SyntaxTree/UnionCase/Missing name 09.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Missing name 09.fs.bsl index 47c92aa67e0..458228278e4 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Missing name 09.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Missing name 09.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Missing name 09.fs", false, QualifiedNameOfFile Module, - [], [], + [], [SynModuleOrNamespace ([Module], false, NamedModule, [Types @@ -28,6 +28,7 @@ ImplFile PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (5,4)-(5,5) parse error Unexpected symbol '|' in type definition diff --git a/tests/service/data/SyntaxTree/UnionCase/MultipleSynUnionCasesHaveBarRange.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/MultipleSynUnionCasesHaveBarRange.fs.bsl index 8691d476cc6..7b2aafa30de 100644 --- a/tests/service/data/SyntaxTree/UnionCase/MultipleSynUnionCasesHaveBarRange.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/MultipleSynUnionCasesHaveBarRange.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/MultipleSynUnionCasesHaveBarRange.fs", false, - QualifiedNameOfFile MultipleSynUnionCasesHaveBarRange, [], [], + QualifiedNameOfFile MultipleSynUnionCasesHaveBarRange, [], [SynModuleOrNamespace ([MultipleSynUnionCasesHaveBarRange], false, AnonModule, [Types @@ -43,4 +43,5 @@ ImplFile WithKeyword = None })], (2,0--4,17))], PreXmlDocEmpty, [], None, (2,0--5,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/UnionCase/PrivateKeywordHasRange.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/PrivateKeywordHasRange.fs.bsl index 21d1081b55d..732c0e0b8bf 100644 --- a/tests/service/data/SyntaxTree/UnionCase/PrivateKeywordHasRange.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/PrivateKeywordHasRange.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/PrivateKeywordHasRange.fs", false, - QualifiedNameOfFile PrivateKeywordHasRange, [], [], + QualifiedNameOfFile PrivateKeywordHasRange, [], [SynModuleOrNamespace ([PrivateKeywordHasRange], false, AnonModule, [Types @@ -32,5 +32,6 @@ ImplFile None, (2,0--10,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [If (Not (Ident "FABLE_COMPILER"), (6,0--6,19)); EndIf (8,0--8,6)] + WarnDirectives = [] CodeComments = [LineComment (3,4--3,67); LineComment (4,4--4,56)] }, set [])) diff --git a/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 01.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 01.fs.bsl index 4817546864d..ff412468614 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 01.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 01.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Recover Function Type 01.fs", false, - QualifiedNameOfFile Recover Function Type 01, [], [], + QualifiedNameOfFile Recover Function Type 01, [], [SynModuleOrNamespace ([Foo], false, DeclaredNamespace, [Types @@ -49,6 +49,7 @@ ImplFile WithKeyword = None })], (4,0--4,16))], PreXmlDocEmpty, [], None, (1,0--4,16), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,20)-(3,30) parse error Unexpected function type in union case field definition. If you intend the field to be a function, consider wrapping the function signature with parens, e.g. | Case of a -> b into | Case of (a -> b). diff --git a/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 02.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 02.fs.bsl index 0b908ef60f6..e1c73af2833 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 02.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 02.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Recover Function Type 02.fs", false, - QualifiedNameOfFile Recover Function Type 02, [], [], + QualifiedNameOfFile Recover Function Type 02, [], [SynModuleOrNamespace ([Foo], false, DeclaredNamespace, [Types @@ -49,6 +49,7 @@ ImplFile WithKeyword = None })], (4,0--4,16))], PreXmlDocEmpty, [], None, (1,0--4,16), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,19)-(3,29) parse error Unexpected function type in union case field definition. If you intend the field to be a function, consider wrapping the function signature with parens, e.g. | Case of a -> b into | Case of (a -> b). diff --git a/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 03.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 03.fs.bsl index 97defcda3ce..32f2f4bb2a1 100644 --- a/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 03.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/Recover Function Type 03.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/Recover Function Type 03.fs", false, - QualifiedNameOfFile Recover Function Type 03, [], [], + QualifiedNameOfFile Recover Function Type 03, [], [SynModuleOrNamespace ([Foo], false, DeclaredNamespace, [Types @@ -54,6 +54,7 @@ ImplFile WithKeyword = None })], (4,0--4,16))], PreXmlDocEmpty, [], None, (1,0--4,16), { LeadingKeyword = Namespace (1,0--1,9) })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,16)-(3,33) parse error Unexpected function type in union case field definition. If you intend the field to be a function, consider wrapping the function signature with parens, e.g. | Case of a -> b into | Case of (a -> b). diff --git a/tests/service/data/SyntaxTree/UnionCase/SingleSynUnionCaseHasBarRange.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/SingleSynUnionCaseHasBarRange.fs.bsl index d5c4b3f2f80..7ed7778c9c9 100644 --- a/tests/service/data/SyntaxTree/UnionCase/SingleSynUnionCaseHasBarRange.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/SingleSynUnionCaseHasBarRange.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/SingleSynUnionCaseHasBarRange.fs", false, - QualifiedNameOfFile SingleSynUnionCaseHasBarRange, [], [], + QualifiedNameOfFile SingleSynUnionCaseHasBarRange, [], [SynModuleOrNamespace ([SingleSynUnionCaseHasBarRange], false, AnonModule, [Types @@ -31,4 +31,5 @@ ImplFile WithKeyword = None })], (2,0--2,26))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/UnionCase/SingleSynUnionCaseWithoutBar.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/SingleSynUnionCaseWithoutBar.fs.bsl index 32910732a1c..a2888b02b10 100644 --- a/tests/service/data/SyntaxTree/UnionCase/SingleSynUnionCaseWithoutBar.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/SingleSynUnionCaseWithoutBar.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/SingleSynUnionCaseWithoutBar.fs", false, - QualifiedNameOfFile SingleSynUnionCaseWithoutBar, [], [], + QualifiedNameOfFile SingleSynUnionCaseWithoutBar, [], [SynModuleOrNamespace ([SingleSynUnionCaseWithoutBar], false, AnonModule, [Types @@ -31,4 +31,5 @@ ImplFile WithKeyword = None })], (2,0--2,24))], PreXmlDocEmpty, [], None, (2,0--3,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/UnionCase/SynUnionCaseKindFullType.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/SynUnionCaseKindFullType.fs.bsl index 20e3a15d262..cd3e454e196 100644 --- a/tests/service/data/SyntaxTree/UnionCase/SynUnionCaseKindFullType.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/SynUnionCaseKindFullType.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/SynUnionCaseKindFullType.fs", false, - QualifiedNameOfFile SynUnionCaseKindFullType, [], [], + QualifiedNameOfFile SynUnionCaseKindFullType, [], [SynModuleOrNamespace ([SynUnionCaseKindFullType], false, AnonModule, [Types @@ -37,6 +37,7 @@ ImplFile WithKeyword = None })], (2,0--3,20))], PreXmlDocEmpty, [], None, (2,0--4,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) (3,6)-(3,20) parse warning This construct is deprecated: it is only for use in the F# library diff --git a/tests/service/data/SyntaxTree/UnionCase/UnionCaseFieldsCanHaveComments.fs.bsl b/tests/service/data/SyntaxTree/UnionCase/UnionCaseFieldsCanHaveComments.fs.bsl index 51363b02c37..57c3921ba18 100644 --- a/tests/service/data/SyntaxTree/UnionCase/UnionCaseFieldsCanHaveComments.fs.bsl +++ b/tests/service/data/SyntaxTree/UnionCase/UnionCaseFieldsCanHaveComments.fs.bsl @@ -1,7 +1,7 @@ ImplFile (ParsedImplFileInput ("/root/UnionCase/UnionCaseFieldsCanHaveComments.fs", false, - QualifiedNameOfFile UnionCaseFieldsCanHaveComments, [], [], + QualifiedNameOfFile UnionCaseFieldsCanHaveComments, [], [SynModuleOrNamespace ([UnionCaseFieldsCanHaveComments], false, AnonModule, [Types @@ -38,4 +38,5 @@ ImplFile WithKeyword = None })], (2,0--8,6))], PreXmlDocEmpty, [], None, (2,0--9,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Val/InlineKeyword.fsi.bsl b/tests/service/data/SyntaxTree/Val/InlineKeyword.fsi.bsl index 8c04d7ba275..32c245bd262 100644 --- a/tests/service/data/SyntaxTree/Val/InlineKeyword.fsi.bsl +++ b/tests/service/data/SyntaxTree/Val/InlineKeyword.fsi.bsl @@ -1,6 +1,6 @@ SigFile (ParsedSigFileInput - ("/root/Val/InlineKeyword.fsi", QualifiedNameOfFile InlineKeyword, [], [], + ("/root/Val/InlineKeyword.fsi", QualifiedNameOfFile InlineKeyword, [], [SynModuleOrNamespaceSig ([X], false, DeclaredNamespace, [Val @@ -21,4 +21,5 @@ SigFile EqualsRange = None }), (4,0--4,26))], PreXmlDocEmpty, [], None, (2,0--4,26), { LeadingKeyword = Namespace (2,0--2,9) })], { ConditionalDirectives = [] + WarnDirectives = [] CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/WarnScope/WarnScope.fs b/tests/service/data/SyntaxTree/WarnScope/WarnScope.fs new file mode 100644 index 00000000000..5192d49c270 --- /dev/null +++ b/tests/service/data/SyntaxTree/WarnScope/WarnScope.fs @@ -0,0 +1,4 @@ +#nowarn 20 +() +#warnon 20 // a comment +() \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/WarnScope/WarnScope.fs.bsl b/tests/service/data/SyntaxTree/WarnScope/WarnScope.fs.bsl new file mode 100644 index 00000000000..ae8bcd1dbd2 --- /dev/null +++ b/tests/service/data/SyntaxTree/WarnScope/WarnScope.fs.bsl @@ -0,0 +1,12 @@ +ImplFile + (ParsedImplFileInput + ("/root/WarnScope/WarnScope.fs", false, QualifiedNameOfFile WarnScope, [], + [SynModuleOrNamespace + ([WarnScope], false, AnonModule, + [Expr (Const (Unit, (2,0--2,2)), (2,0--2,2)); + Expr (Const (Unit, (4,0--4,2)), (4,0--4,2))], PreXmlDocEmpty, [], + None, (2,0--4,2), { LeadingKeyword = None })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = + [Nowarn ([20], (1,0--1,10)); Warnon ([20], (3,0--3,10))] + CodeComments = [LineComment (3,12--3,24)] }, set [])) diff --git a/tests/service/data/SyntaxTree/WarnScope/WarnScopeInSubmodule.fs b/tests/service/data/SyntaxTree/WarnScope/WarnScopeInSubmodule.fs new file mode 100644 index 00000000000..5140c05731b --- /dev/null +++ b/tests/service/data/SyntaxTree/WarnScope/WarnScopeInSubmodule.fs @@ -0,0 +1,7 @@ +module M +module N = + #nowarn 20 25 + () + #warnon 20 25 // a comment + () +() \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/WarnScope/WarnScopeInSubmodule.fs.bsl b/tests/service/data/SyntaxTree/WarnScope/WarnScopeInSubmodule.fs.bsl new file mode 100644 index 00000000000..40470a3603c --- /dev/null +++ b/tests/service/data/SyntaxTree/WarnScope/WarnScopeInSubmodule.fs.bsl @@ -0,0 +1,22 @@ +ImplFile + (ParsedImplFileInput + ("/root/WarnScope/WarnScopeInSubmodule.fs", false, QualifiedNameOfFile M, + [], + [SynModuleOrNamespace + ([M], false, NamedModule, + [NestedModule + (SynComponentInfo + ([], None, [], [N], + PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), false, + None, (2,0--2,8)), false, + [Expr (Const (Unit, (4,4--4,6)), (4,4--4,6)); + Expr (Const (Unit, (6,4--6,6)), (6,4--6,6))], false, (2,0--6,6), + { ModuleKeyword = Some (2,0--2,6) + EqualsRange = Some (2,9--2,10) }); + Expr (Const (Unit, (7,0--7,2)), (7,0--7,2))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = + [Nowarn ([20; 25], (3,4--3,17)); Warnon ([20; 25], (5,4--5,17))] + CodeComments = [LineComment (5,18--5,30)] }, set [])) diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs index b5cc13f4501..85182b0ca5f 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs @@ -519,7 +519,7 @@ type staticInInterface = |> List.exists(fun error -> (error.ToString().Contains("新規baProgram")))) // In this bug, particular warns were still present after nowarn - [] + [] member public this.``NoWarn.Bug5424``() = let fileContent = """ #nowarn "67" // this type test or downcast will always hold diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs index 852758363c5..cef4a0e71aa 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs @@ -517,8 +517,9 @@ type UsingMSBuild() as this = let script1 = OpenFile(project,"Script1.fsx") MoveCursorToEndOfMarker(script1,"let y = f") - TakeCoffeeBreak(this.VS) - AssertNoErrorsOrWarnings(project) + TakeCoffeeBreak(this.VS) + AssertNoErrorsOrWarnings(project) + // AssertExactlyOneErrorSeenContaining(project, "This construct is deprecated. x") // This is expected for langVersion >= 10.0 /// FEATURE: #r in .fsx to a .dll name works. [] From 230df0ca7dc10aef62f9ea72ec44c086536a8ef3 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Wed, 14 May 2025 08:54:24 +0100 Subject: [PATCH 17/38] Make attribute target mismatch a warning and not an error. (#18492) * make attribute targets mismatches a warning and not an error. * release notes * update tests * update baselines * Update baselines * Move attribute form logic to an AP * Fix merge --- .../.FSharp.Compiler.Service/9.0.300.md | 1 + .../Checking/Expressions/CheckExpressions.fs | 57 +++-- .../AttributeUsage/AttributeUsage.fs | 215 +++++++++--------- .../CustomAttributes/Basic/Basic.fs | 7 +- .../EntryPoint/EntryPoint.fs | 2 +- .../LetBindings/Basic/Basic.fs | 4 +- .../UnitsOfMeasure/WithOOP/E_GenericUOM01.fsx | 2 +- .../UnitsOfMeasure/WithOOP/WithOOP.fs | 2 +- .../ErrorMessages/TailCallAttribute.fs | 32 +-- .../PatternMatchCompilationTests.fs | 1 + .../Language/StructActivePatternTests.fs | 2 +- 11 files changed, 162 insertions(+), 163 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index 14bb14be5a3..a3bda7c0c9c 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -54,6 +54,7 @@ * Warning for "useless null handling" works with piped syntax constructs now ([PR #18331](https://github.com/dotnet/fsharp/pull/18331)) * Make indent in generated overridden member code depend on the context, not fix to 4. ([PR #18341](https://github.com/dotnet/fsharp/pull/18341)) * Adjust caller info attribute error message range ([PR #18388](https://github.com/dotnet/fsharp/pull/18388)) +* Make attribute targets mismatch a warning and not an error ([PR #18492](https://github.com/dotnet/fsharp/pull/18492)) ### Breaking Changes * Struct unions with overlapping fields now generate mappings needed for reading via reflection ([Issue #18121](https://github.com/dotnet/fsharp/issues/17797), [PR #18274](https://github.com/dotnet/fsharp/pull/17877)) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 5f390038e35..567e1da0310 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -3187,6 +3187,24 @@ let BuildRecdFieldSet g m objExpr (rfinfo: RecdFieldInfo) argExpr = let wrap, objExpr, _readonly, _writeonly = mkExprAddrOfExpr g boxity false DefinitelyMutates objExpr None m wrap (mkRecdFieldSetViaExprAddr (objExpr, rfinfo.RecdFieldRef, rfinfo.TypeInst, argExpr, m) ) +// This is used to check the target of an attribute with the form of +// Long Form: [] +// Short Form: [] +let (|LongFormAttrTarget|UnrecognizedLongAttrTarget|ShortFormAttributeTarget|) (targetIndicator: Ident option) = + match targetIndicator with + | Some id when id.idText = "assembly" -> LongFormAttrTarget AttributeTargets.Assembly + | Some id when id.idText = "module" -> LongFormAttrTarget AttributeTargets.Module + | Some id when id.idText = "return" -> LongFormAttrTarget AttributeTargets.ReturnValue + | Some id when id.idText = "field" -> LongFormAttrTarget AttributeTargets.Field + | Some id when id.idText = "property" -> LongFormAttrTarget AttributeTargets.Property + | Some id when id.idText = "method" -> LongFormAttrTarget AttributeTargets.Method + | Some id when id.idText = "param" -> LongFormAttrTarget AttributeTargets.Parameter + | Some id when id.idText = "type" -> LongFormAttrTarget AttributeTargets.TyconDecl + | Some id when id.idText = "constructor" -> LongFormAttrTarget AttributeTargets.Constructor + | Some id when id.idText = "event" -> LongFormAttrTarget AttributeTargets.Event + | Some id -> UnrecognizedLongAttrTarget id + | None -> ShortFormAttributeTarget + //------------------------------------------------------------------------- // Helpers dealing with named and optional args at callsites //------------------------------------------------------------------------- @@ -11344,30 +11362,21 @@ and TcAttributeEx canFail (cenv: cenv) (env: TcEnv) attrTgt attrEx (synAttr: Syn (validOnDefault, inheritedDefault) | _ -> (validOnDefault, inheritedDefault) - let possibleTgts = enum validOn &&& attrTgt - let directedTgts = + let attributeTargets = enum validOn &&& attrTgt + let directedTargets = match targetIndicator with - | Some id when id.idText = "assembly" -> AttributeTargets.Assembly - | Some id when id.idText = "module" -> AttributeTargets.Module - | Some id when id.idText = "return" -> AttributeTargets.ReturnValue - | Some id when id.idText = "field" -> AttributeTargets.Field - | Some id when id.idText = "property" -> AttributeTargets.Property - | Some id when id.idText = "method" -> AttributeTargets.Method - | Some id when id.idText = "param" -> AttributeTargets.Parameter - | Some id when id.idText = "type" -> AttributeTargets.TyconDecl - | Some id when id.idText = "constructor" -> AttributeTargets.Constructor - | Some id when id.idText = "event" -> AttributeTargets.Event - | Some id -> - errorR(Error(FSComp.SR.tcUnrecognizedAttributeTarget(), id.idRange)) - possibleTgts - // mask explicit targets - | _ -> possibleTgts &&& ~~~ attrEx - let constrainedTgts = possibleTgts &&& directedTgts - if constrainedTgts = enum 0 then - if (directedTgts = AttributeTargets.Assembly || directedTgts = AttributeTargets.Module) then + | LongFormAttrTarget attrTarget -> attrTarget + | UnrecognizedLongAttrTarget attrTarget -> + errorR(Error(FSComp.SR.tcUnrecognizedAttributeTarget(), attrTarget.idRange)) + attributeTargets + | ShortFormAttributeTarget -> attributeTargets &&& ~~~ attrEx + + let constrainedTargets = attributeTargets &&& directedTargets + if constrainedTargets = enum 0 then + if (directedTargets = AttributeTargets.Assembly || directedTargets = AttributeTargets.Module) then error(Error(FSComp.SR.tcAttributeIsNotValidForLanguageElementUseDo(), mAttr)) else - error(Error(FSComp.SR.tcAttributeIsNotValidForLanguageElement(), mAttr)) + warning(Error(FSComp.SR.tcAttributeIsNotValidForLanguageElement(), mAttr)) match ResolveObjectConstructor cenv.nameResolver env.DisplayEnv mAttr ad ty with | Exception _ when canFail = TcCanFail.IgnoreAllErrors || canFail = TcCanFail.IgnoreMemberResoutionError -> [ ], true @@ -11428,11 +11437,11 @@ and TcAttributeEx canFail (cenv: cenv) (env: TcEnv) attrTgt attrEx (synAttr: Syn if isStruct then error (Error(FSComp.SR.tcCustomAttributeMustBeReferenceType(), m)) if args.Length <> ilMethRef.ArgTypes.Length then error (Error(FSComp.SR.tcCustomAttributeArgumentMismatch(), m)) let args = args |> List.map mkAttribExpr - Attrib(tcref, ILAttrib ilMethRef, args, namedAttribArgMap, isAppliedToGetterOrSetter, Some constrainedTgts, m) + Attrib(tcref, ILAttrib ilMethRef, args, namedAttribArgMap, isAppliedToGetterOrSetter, Some constrainedTargets, m) | Expr.App (InnerExprPat(ExprValWithPossibleTypeInst(vref, _, _, _)), _, _, args, _) -> let args = args |> List.collect (function Expr.Const (Const.Unit, _, _) -> [] | expr -> tryDestRefTupleExpr expr) |> List.map mkAttribExpr - Attrib(tcref, FSAttrib vref, args, namedAttribArgMap, isAppliedToGetterOrSetter, Some constrainedTgts, mAttr) + Attrib(tcref, FSAttrib vref, args, namedAttribArgMap, isAppliedToGetterOrSetter, Some constrainedTargets, mAttr) | _ -> error (Error(FSComp.SR.tcCustomAttributeMustInvokeConstructor(), mAttr)) @@ -11440,7 +11449,7 @@ and TcAttributeEx canFail (cenv: cenv) (env: TcEnv) attrTgt attrEx (synAttr: Syn | _ -> error(Error(FSComp.SR.tcAttributeExpressionsMustBeConstructorCalls(), mAttr)) - [ (constrainedTgts, attrib) ], false + [ (constrainedTargets, attrib) ], false and TcAttributesWithPossibleTargetsEx canFail (cenv: cenv) env attrTgt attrEx synAttribs = diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs index c7c2cf72eca..f027745b73e 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs @@ -104,10 +104,10 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 21, Col 21, Line 21, Col 22, "This attribute is not valid for use on this language element") - (Error 842, Line 24, Col 21, Line 24, Col 29, "This attribute is not valid for use on this language element") - (Error 842, Line 27, Col 7, Line 27, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 18, Col 7, Line 18, Col 8, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 21, Line 21, Col 22, "This attribute is not valid for use on this language element") + (Warning 842, Line 24, Col 21, Line 24, Col 29, "This attribute is not valid for use on this language element") + (Warning 842, Line 27, Col 7, Line 27, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 18, Col 7, Line 18, Col 8, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargets02.fs # E_AttributeTargets02.fs @@ -117,9 +117,10 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 14, Col 7, Line 14, Col 34, "This attribute is not valid for use on this language element") - (Error 842, Line 24, Col 7, Line 24, Col 36, "This attribute is not valid for use on this language element") - (Error 842, Line 29, Col 15, Line 29, Col 47, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 7, Line 14, Col 34, "This attribute is not valid for use on this language element") + (Warning 842, Line 24, Col 7, Line 24, Col 36, "This attribute is not valid for use on this language element") + (Warning 842, Line 29, Col 15, Line 29, Col 47, "This attribute is not valid for use on this language element") + (Error 3172, Line 28, Col 14, Line 28, Col 17, "A property's getter and setter must have the same type. Property 'Foo' has getter of type 'int' but setter of type 'obj'.") ] // SOURCE=E_AttributeTargetIsField01.fs # E_AttributeTargetIsField01.fs @@ -140,23 +141,23 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 9, Col 3, Line 9, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 12, Col 3, Line 12, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 15, Col 3, Line 15, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 18, Col 3, Line 18, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 21, Col 3, Line 21, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 24, Col 3, Line 24, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 27, Col 3, Line 27, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 30, Col 3, Line 30, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 33, Col 3, Line 33, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 36, Col 3, Line 36, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 39, Col 3, Line 39, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 42, Col 3, Line 42, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 45, Col 3, Line 45, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 49, Col 3, Line 49, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 56, Col 3, Line 56, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 64, Col 3, Line 64, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 66, Col 7, Line 66, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 9, Col 3, Line 9, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 12, Col 3, Line 12, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 3, Line 15, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 18, Col 3, Line 18, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 3, Line 21, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 24, Col 3, Line 24, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 27, Col 3, Line 27, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 30, Col 3, Line 30, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 33, Col 3, Line 33, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 36, Col 3, Line 36, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 39, Col 3, Line 39, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 42, Col 3, Line 42, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 45, Col 3, Line 45, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 49, Col 3, Line 49, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 56, Col 3, Line 56, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 64, Col 3, Line 64, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 66, Col 7, Line 66, Col 16, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsField02.fs # E_AttributeTargetIsField02.fs @@ -194,17 +195,17 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 9, Col 3, Line 9, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 12, Col 3, Line 12, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 15, Col 3, Line 15, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 18, Col 3, Line 18, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 21, Col 3, Line 21, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 24, Col 3, Line 24, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 26, Col 7, Line 26, Col 17, "This attribute is not valid for use on this language element") - (Error 842, Line 28, Col 3, Line 28, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 31, Col 3, Line 31, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 34, Col 3, Line 34, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 39, Col 3, Line 39, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 9, Col 3, Line 9, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 12, Col 3, Line 12, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 3, Line 15, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 18, Col 3, Line 18, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 3, Line 21, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 24, Col 3, Line 24, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 26, Col 7, Line 26, Col 17, "This attribute is not valid for use on this language element") + (Warning 842, Line 28, Col 3, Line 28, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 31, Col 3, Line 31, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 34, Col 3, Line 34, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 39, Col 3, Line 39, Col 13, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsMethod03.fs # E_AttributeTargetIsMethod03.fs @@ -225,21 +226,21 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 12, Col 6, Line 12, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 15, Col 6, Line 15, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 18, Col 6, Line 18, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 20, Col 10, Line 20, Col 20, "This attribute is not valid for use on this language element") - (Error 842, Line 22, Col 6, Line 22, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 25, Col 6, Line 25, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 28, Col 6, Line 28, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 31, Col 6, Line 31, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 34, Col 6, Line 34, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 37, Col 6, Line 37, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 39, Col 10, Line 39, Col 20, "This attribute is not valid for use on this language element") - (Error 842, Line 41, Col 6, Line 41, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 44, Col 6, Line 44, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 47, Col 6, Line 47, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 52, Col 6, Line 52, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 12, Col 6, Line 12, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 6, Line 15, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 18, Col 6, Line 18, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 20, Col 10, Line 20, Col 20, "This attribute is not valid for use on this language element") + (Warning 842, Line 22, Col 6, Line 22, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 25, Col 6, Line 25, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 28, Col 6, Line 28, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 31, Col 6, Line 31, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 34, Col 6, Line 34, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 37, Col 6, Line 37, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 39, Col 10, Line 39, Col 20, "This attribute is not valid for use on this language element") + (Warning 842, Line 41, Col 6, Line 41, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 44, Col 6, Line 44, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 47, Col 6, Line 47, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 52, Col 6, Line 52, Col 16, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsMethod04.fs # E_AttributeTargetIsMethod04.fs @@ -250,8 +251,8 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 10, Col 3, Line 10, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 13, Col 3, Line 13, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 10, Col 3, Line 10, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 13, Col 3, Line 13, Col 15, "This attribute is not valid for use on this language element") ] // SOURCE=E_ConditionalAttribute.fs SCFLAGS="--test:ErrorRanges" # E_ConditionalAttribute.fs @@ -293,7 +294,7 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 12, Col 3, Line 12, Col 6, "This attribute is not valid for use on this language element") + (Warning 842, Line 12, Col 3, Line 12, Col 6, "This attribute is not valid for use on this language element") ] // SOURCE=AttributeTargetIsStruct.fs # AttributeTargetIsStruct.fs @@ -342,18 +343,18 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 13, Col 3, Line 13, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 19, Col 3, Line 19, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 22, Col 11, Line 22, Col 22, "This attribute is not valid for use on this language element") - (Error 842, Line 25, Col 3, Line 25, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 34, Col 3, Line 34, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 35, Col 3, Line 35, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 40, Col 3, Line 40, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 41, Col 3, Line 41, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 49, Col 3, Line 49, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 50, Col 3, Line 50, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 53, Col 3, Line 53, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 54, Col 3, Line 54, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 13, Col 3, Line 13, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 19, Col 3, Line 19, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 22, Col 11, Line 22, Col 22, "This attribute is not valid for use on this language element") + (Warning 842, Line 25, Col 3, Line 25, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 34, Col 3, Line 34, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 35, Col 3, Line 35, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 40, Col 3, Line 40, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 41, Col 3, Line 41, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 49, Col 3, Line 49, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 50, Col 3, Line 50, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 53, Col 3, Line 53, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 54, Col 3, Line 54, Col 18, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsClass.fs # E_AttributeTargetIsClass.fs @@ -372,9 +373,9 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 13, Col 3, Line 13, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 22, Col 10, Line 22, Col 22, "This attribute is not valid for use on this language element") + (Warning 842, Line 13, Col 3, Line 13, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 22, Col 10, Line 22, Col 22, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsClass01.fs # E_AttributeTargetIsClass01.fs @@ -393,8 +394,8 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 7, Col 3, Line 7, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 10, Col 10, Line 10, Col 25, "This attribute is not valid for use on this language element") + (Warning 842, Line 7, Col 3, Line 7, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 10, Col 10, Line 10, Col 25, "This attribute is not valid for use on this language element") ] // SOURCE=MarshalAsAttribute.fs # MarshalAsAttribute.fs @@ -480,7 +481,7 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 14, Col 5, Line 14, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 5, Line 14, Col 15, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsField03.fs # E_AttributeTargetIsField03.fs @@ -491,8 +492,8 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 14, Col 5, Line 14, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 15, Col 5, Line 15, Col 25, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 5, Line 14, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 5, Line 15, Col 25, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsProperty01.fs # E_AttributeTargetIsField03.fs @@ -511,8 +512,8 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 14, Col 5, Line 14, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 15, Col 5, Line 15, Col 25, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 5, Line 14, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 5, Line 15, Col 25, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsCtor01.fs # E_AttributeTargetIsCtor01.fs @@ -531,10 +532,10 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 9, Col 15, Line 9, Col 27, "This attribute is not valid for use on this language element") - (Error 842, Line 11, Col 16, Line 11, Col 28, "This attribute is not valid for use on this language element") - (Error 842, Line 14, Col 15, Line 14, Col 27, "This attribute is not valid for use on this language element") - (Error 842, Line 17, Col 16, Line 17, Col 28, "This attribute is not valid for use on this language element") + (Warning 842, Line 9, Col 15, Line 9, Col 27, "This attribute is not valid for use on this language element") + (Warning 842, Line 11, Col 16, Line 11, Col 28, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 15, Line 14, Col 27, "This attribute is not valid for use on this language element") + (Warning 842, Line 17, Col 16, Line 17, Col 28, "This attribute is not valid for use on this language element") ] // SOURCE=AttributeTargetsIsEnum01.fs # AttributeTargetsIsEnum01.fs @@ -568,10 +569,10 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 20, Col 3, Line 20, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 22, Col 3, Line 22, Col 17, "This attribute is not valid for use on this language element") + (Warning 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 20, Col 3, Line 20, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 22, Col 3, Line 22, Col 17, "This attribute is not valid for use on this language element") ] // SOURCE=AttributeTargetsIsDelegate01.fs # AttributeTargetsIsDelegate01.fs @@ -605,10 +606,10 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 19, Col 3, Line 19, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 20, Col 3, Line 20, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 22, Col 3, Line 22, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 19, Col 3, Line 19, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 20, Col 3, Line 20, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 22, Col 3, Line 22, Col 13, "This attribute is not valid for use on this language element") ] [] @@ -654,10 +655,10 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 11, Col 3, Line 11, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 14, Col 3, Line 14, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 18, Col 3, Line 18, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 11, Col 3, Line 11, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 3, Line 14, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 18, Col 3, Line 18, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") ] // SOURCE= E_AttributeTargetIsClass02.fs # E_AttributeTargetIsClass02.fs @@ -676,18 +677,18 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 15, Col 3, Line 15, Col 18, "This attribute is not valid for use on this language element"); - (Error 842, Line 16, Col 3, Line 16, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 20, Col 3, Line 20, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 26, Col 3, Line 26, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 27, Col 3, Line 27, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 34, Col 3, Line 34, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 35, Col 3, Line 35, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 43, Col 3, Line 43, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 44, Col 3, Line 44, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 47, Col 3, Line 47, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 48, Col 3, Line 48, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 3, Line 15, Col 18, "This attribute is not valid for use on this language element"); + (Warning 842, Line 16, Col 3, Line 16, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 20, Col 3, Line 20, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 26, Col 3, Line 26, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 27, Col 3, Line 27, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 34, Col 3, Line 34, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 35, Col 3, Line 35, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 43, Col 3, Line 43, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 44, Col 3, Line 44, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 47, Col 3, Line 47, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 48, Col 3, Line 48, Col 18, "This attribute is not valid for use on this language element") ] // SOURCE= CLIMutableAttribute01.fs # CLIMutableAttribute01.fs @@ -756,8 +757,8 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = (Error 934, Line 33, Col 10, Line 33, Col 11, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") (Error 934, Line 36, Col 10, Line 36, Col 11, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") (Error 934, Line 39, Col 10, Line 39, Col 13, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") - (Error 842, Line 41, Col 7, Line 41, Col 23, "This attribute is not valid for use on this language element") - (Error 842, Line 44, Col 7, Line 44, Col 23, "This attribute is not valid for use on this language element") + (Warning 842, Line 41, Col 7, Line 41, Col 23, "This attribute is not valid for use on this language element") + (Warning 842, Line 44, Col 7, Line 44, Col 23, "This attribute is not valid for use on this language element") (Error 935, Line 54, Col 10, Line 54, Col 11, "Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal") ] @@ -775,8 +776,8 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = (Error 934, Line 33, Col 10, Line 33, Col 11, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") (Error 934, Line 36, Col 10, Line 36, Col 11, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") (Error 934, Line 39, Col 10, Line 39, Col 13, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") - (Error 842, Line 41, Col 7, Line 41, Col 23, "This attribute is not valid for use on this language element") - (Error 842, Line 44, Col 7, Line 44, Col 23, "This attribute is not valid for use on this language element") + (Warning 842, Line 41, Col 7, Line 41, Col 23, "This attribute is not valid for use on this language element") + (Warning 842, Line 44, Col 7, Line 44, Col 23, "This attribute is not valid for use on this language element") (Error 935, Line 54, Col 10, Line 54, Col 11, "Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal") ] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs index 1e3c99dc8a5..44ee388af9d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs @@ -61,7 +61,7 @@ module CustomAttributes_Basic = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 15, Col 7, Line 15, Col 17, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 7, Line 15, Col 17, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeApplication04.fs SCFLAGS="--test:ErrorRanges" # E_AttributeApplication04.fs @@ -71,7 +71,7 @@ module CustomAttributes_Basic = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 14, Col 3, Line 14, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 3, Line 14, Col 13, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeApplication05.fs SCFLAGS="--test:ErrorRanges" # E_AttributeApplication05.fs @@ -81,7 +81,8 @@ module CustomAttributes_Basic = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 8, Col 7, Line 8, Col 8, "This attribute is not valid for use on this language element") + (Warning 842, Line 8, Col 7, Line 8, Col 8, "This attribute is not valid for use on this language element") + (Error 824, Line 8, Col 7, Line 8, Col 8, "Attributes are not permitted on 'let' bindings in expressions") (Warning 20, Line 8, Col 1, Line 8, Col 31, "The result of this expression has type 'int' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'.") ] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs index ce51bcf6c14..38b84fb6498 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs @@ -75,7 +75,7 @@ module EntryPoint = |> compile |> shouldFail |> withDiagnostics [ - (Error 842, Line 9, Col 3, Line 9, Col 13, """This attribute is not valid for use on this language element""") + (Warning 842, Line 9, Col 3, Line 9, Col 13, """This attribute is not valid for use on this language element""") ] // SOURCE=E_twoattributesonsamefunction001.fs SCFLAGS="--test:ErrorRanges" # E_twoattributesonsamefunction001.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs index c0a19c9ad3e..b59d28cbdd2 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs @@ -53,9 +53,9 @@ module LetBindings_Basic = |> shouldFail |> withDiagnostics [ (Error 683, Line 14, Col 6, Line 14, Col 27, "Attributes are not allowed within patterns") - (Error 842, Line 14, Col 8, Line 14, Col 25, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 8, Line 14, Col 25, "This attribute is not valid for use on this language element") (Error 683, Line 14, Col 42, Line 14, Col 63, "Attributes are not allowed within patterns") - (Error 842, Line 14, Col 44, Line 14, Col 61, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 44, Line 14, Col 61, "This attribute is not valid for use on this language element") ] // SOURCE=E_ErrorsForInlineValue.fs SCFLAGS="--test:ErrorRanges" # E_ErrorsForInlineValue.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fsx b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fsx index 369697935e3..0f27193b5a7 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fsx +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fsx @@ -1,7 +1,7 @@ // #Regression #Conformance #UnitsOfMeasure #ObjectOrientedTypes // Verify error when putting invalid attributes on type arguments // (We should only allow [].) -//This attribute is not valid for use on this language element +//This attribute is not valid for use on this language element open System diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/WithOOP.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/WithOOP.fs index 3b416979e43..b915fe62341 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/WithOOP.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/UnitsOfMeasure/WithOOP/WithOOP.fs @@ -48,7 +48,7 @@ module WithOOP = compilation |> getCompilation |> shouldFailWithDiagnostics [ - (Error 842, Line 8, Col 36, Line 8, Col 51, "This attribute is not valid for use on this language element") + (Warning 842, Line 8, Col 36, Line 8, Col 51, "This attribute is not valid for use on this language element") ] [] diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs index 1b68505ab1e..81ce04fc05a 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs @@ -245,7 +245,7 @@ namespace N [] let ``Warn successfully for invalid tailcalls in type methods`` () = - """ + FSharp """ namespace N module M = @@ -261,29 +261,12 @@ namespace N printfn "M2 called" this.M1() + 2 // should warn """ - |> FSharp |> withLangVersion80 |> compile |> shouldFail - |> withResults [ - { Error = Warning 3569 - Range = { StartLine = 10 - StartColumn = 17 - EndLine = 10 - EndColumn = 26 } - Message = - "The member or function 'M2' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way." } - { Error = Warning 3569 - Range = { StartLine = 15 - StartColumn = 17 - EndLine = 15 - EndColumn = 26 } - Message = -#if Debug - "The member or function 'M2' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way." } -#else - "The member or function 'M1' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way." } -#endif + |> withDiagnostics [ + (Warning 3569, Line 10, Col 17, Line 10, Col 26, "The member or function 'M2' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way."); + (Warning 3569, Line 15, Col 17, Line 15, Col 26, "The member or function 'M1' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way.") ] [] @@ -1481,7 +1464,10 @@ namespace N |> withLangVersionPreview |> compile |> shouldFail - |> withSingleDiagnostic (Error 842, Line 6, Col 11, Line 6, Col 19, "This attribute is not valid for use on this language element") + |> withDiagnostics [ + (Warning 842, Line 6, Col 11, Line 6, Col 19, "This attribute is not valid for use on this language element") + (Warning 3861, Line 7, Col 13, Line 7, Col 18, "The TailCall attribute should only be applied to recursive functions.") + ] [] let ``Error about attribute on recursive let-bound value`` () = @@ -1497,7 +1483,7 @@ namespace N |> withLangVersionPreview |> compile |> shouldFail - |> withSingleDiagnostic (Error 842, Line 6, Col 11, Line 6, Col 19, "This attribute is not valid for use on this language element") + |> withSingleDiagnostic (Warning 842, Line 6, Col 11, Line 6, Col 19, "This attribute is not valid for use on this language element") [] let ``Warn about self-defined attribute`` () = // is the analysis available for users of older FSharp.Core versions diff --git a/tests/FSharp.Compiler.Service.Tests/PatternMatchCompilationTests.fs b/tests/FSharp.Compiler.Service.Tests/PatternMatchCompilationTests.fs index 1b6d54d3577..cf870698077 100644 --- a/tests/FSharp.Compiler.Service.Tests/PatternMatchCompilationTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/PatternMatchCompilationTests.fs @@ -41,6 +41,7 @@ match () with dumpDiagnostics checkResults |> shouldEqual [ "(3,2--3,25): Attributes are not allowed within patterns" "(3,4--3,23): This attribute is not valid for use on this language element" + "(3,17--3,22): This is not a valid constant expression or custom attribute value" ] diff --git a/tests/fsharp/Compiler/Language/StructActivePatternTests.fs b/tests/fsharp/Compiler/Language/StructActivePatternTests.fs index aac654f549c..4c2451142fa 100644 --- a/tests/fsharp/Compiler/Language/StructActivePatternTests.fs +++ b/tests/fsharp/Compiler/Language/StructActivePatternTests.fs @@ -176,7 +176,7 @@ let (|Foo|_|) x = ValueNone [] let (|Foo|_|) x = ValueNone """ - [|(FSharpDiagnosticSeverity.Error, 842, (2, 3, 2, 9), + [|(FSharpDiagnosticSeverity.Warning, 842, (2, 3, 2, 9), "This attribute is not valid for use on this language element"); (FSharpDiagnosticSeverity.Error, 3350, (3, 6, 3, 13), "Feature 'Boolean-returning and return-type-directed partial active patterns' is not available in F# 8.0. Please use language version 9.0 or greater.")|] From 9e74c0eeac1491cede0a95612d964aaea16d24f6 Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Wed, 14 May 2025 10:18:40 +0200 Subject: [PATCH 18/38] Fix race in cache eviction (#18528) --- src/Compiler/Utilities/Caches.fs | 88 ++++++++++++++------------------ 1 file changed, 38 insertions(+), 50 deletions(-) diff --git a/src/Compiler/Utilities/Caches.fs b/src/Compiler/Utilities/Caches.fs index 04829d4d1f3..a3cebd93161 100644 --- a/src/Compiler/Utilities/Caches.fs +++ b/src/Compiler/Utilities/Caches.fs @@ -29,29 +29,27 @@ type CacheOptions = [] [] type CachedEntity<'Key, 'Value> = - val mutable Key: 'Key - val mutable Value: 'Value - val mutable AccessCount: int64 - val mutable Node: LinkedListNode> voption + val mutable private key: 'Key + val mutable private value: 'Value - new(key, value) = - { - Key = key - Value = value - AccessCount = 0L - Node = ValueNone - } + [] + val mutable private node: LinkedListNode> - // This is one time initialization, outside of the constructor because of circular reference. - // The contract is that each CachedEntity that the EntityPool produces, has Node assigned. - member this.WithNode() = - this.Node <- ValueSome(LinkedListNode this) - this + private new(key, value) = { key = key; value = value } + + member this.Node = this.node + member this.Key = this.key + member this.Value = this.value + + static member Create(key: 'Key, value: 'Value) = + let entity = CachedEntity(key, value) + // The contract is that each CachedEntity produced by the EntityPool always has Node referencing itself. + entity.node <- LinkedListNode(entity) + entity member this.ReUse(key, value) = - this.Key <- key - this.Value <- value - this.AccessCount <- 0L + this.key <- key + this.value <- value this override this.ToString() = $"{this.Key}" @@ -142,21 +140,15 @@ type CacheMetrics(cacheId) = // More than totalCapacity can be created, but it will hold for reuse at most totalCapacity. type EntityPool<'Key, 'Value>(totalCapacity, cacheId) = let pool = ConcurrentBag>() - let mutable created = 0 - let overCapacity = - CacheMetrics.Meter.CreateCounter("over-capacity", "count", cacheId) + let created = CacheMetrics.Meter.CreateCounter("created", "count", cacheId) member _.Acquire(key, value) = match pool.TryTake() with | true, entity -> entity.ReUse(key, value) | _ -> - if Interlocked.Increment &created > totalCapacity then - overCapacity.Add 1L - - // Associate a LinkedListNode with freshly created entity. - // This is a one time initialization. - CachedEntity(key, value).WithNode() + created.Add 1L + CachedEntity.Create(key, value) member _.Reclaim(entity: CachedEntity<'Key, 'Value>) = if pool.Count < totalCapacity then @@ -223,13 +215,10 @@ type Cache<'Key, 'Value when 'Key: not null and 'Key: equality> internal (totalC async { match! mb.Receive() with | EvictionQueueMessage.Add entity -> - - assert entity.Node.IsSome - - evictionQueue.AddLast(entity.Node.Value) + evictionQueue.AddLast(entity.Node) // Evict one immediately if necessary. - while evictionQueue.Count > capacity do + if evictionQueue.Count > capacity then let first = nonNull evictionQueue.First match store.TryRemove(first.Value.Key) with @@ -240,16 +229,13 @@ type Cache<'Key, 'Value when 'Key: not null and 'Key: equality> internal (totalC evicted.Trigger() | _ -> evictionFails.Add 1L - | EvictionQueueMessage.Update entity -> - entity.AccessCount <- entity.AccessCount + 1L - - assert entity.Node.IsSome + // Store updates are not synchronized. It is possible the entity is no longer in the queue. + | EvictionQueueMessage.Update entity when isNull entity.Node.List -> () - let node = entity.Node.Value - assert (node.List = evictionQueue) + | EvictionQueueMessage.Update entity -> // Just move this node to the end of the list. - evictionQueue.Remove(node) - evictionQueue.AddLast(node) + evictionQueue.Remove(entity.Node) + evictionQueue.AddLast(entity.Node) return! processNext () } @@ -264,10 +250,10 @@ type Cache<'Key, 'Value when 'Key: not null and 'Key: equality> internal (totalC member _.TryGetValue(key: 'Key, value: outref<'Value>) = match store.TryGetValue(key) with - | true, cachedEntity -> + | true, entity -> hits.Add 1L - evictionProcessor.Post(EvictionQueueMessage.Update cachedEntity) - value <- cachedEntity.Value + evictionProcessor.Post(EvictionQueueMessage.Update entity) + value <- entity.Value true | _ -> misses.Add 1L @@ -275,14 +261,16 @@ type Cache<'Key, 'Value when 'Key: not null and 'Key: equality> internal (totalC false member _.TryAdd(key: 'Key, value: 'Value) = - let cachedEntity = pool.Acquire(key, value) + let entity = pool.Acquire(key, value) - if store.TryAdd(key, cachedEntity) then - evictionProcessor.Post(EvictionQueueMessage.Add cachedEntity) - true + let added = store.TryAdd(key, entity) + + if added then + evictionProcessor.Post(EvictionQueueMessage.Add entity) else - pool.Reclaim(cachedEntity) - false + pool.Reclaim(entity) + + added interface IDisposable with member this.Dispose() = From 29bcaf10b50912fba7f87be28a534ac58957cbc7 Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Wed, 14 May 2025 10:20:04 +0200 Subject: [PATCH 19/38] Cancellable: always catch internal cancellations (#18531) --- src/Compiler/Utilities/Cancellable.fs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Compiler/Utilities/Cancellable.fs b/src/Compiler/Utilities/Cancellable.fs index 20e220b7e9f..bae9c6f8299 100644 --- a/src/Compiler/Utilities/Cancellable.fs +++ b/src/Compiler/Utilities/Cancellable.fs @@ -73,7 +73,11 @@ module Cancellable = if ct.IsCancellationRequested then ValueOrCancelled.Cancelled(OperationCanceledException ct) else - oper ct + try + oper ct + with + | :? OperationCanceledException as e when ct.IsCancellationRequested -> ValueOrCancelled.Cancelled e + | :? OperationCanceledException as e -> InvalidOperationException("Wrong cancellation token", e) |> raise let fold f acc seq = Cancellable(fun ct -> @@ -101,14 +105,10 @@ module Cancellable = let! ct = Async.CancellationToken return! - Async.FromContinuations(fun (cont, econt, ccont) -> - try - match run ct c with - | ValueOrCancelled.Value v -> cont v - | ValueOrCancelled.Cancelled ce -> ccont ce - with - | :? OperationCanceledException as ce when ct.IsCancellationRequested -> ccont ce - | :? OperationCanceledException as e -> InvalidOperationException("Wrong cancellation token", e) |> econt) + Async.FromContinuations(fun (cont, _econt, ccont) -> + match run ct c with + | ValueOrCancelled.Value v -> cont v + | ValueOrCancelled.Cancelled ce -> ccont ce) } let token () = Cancellable(ValueOrCancelled.Value) From c77db373104d62b80e1f42320e9891135694686d Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Thu, 15 May 2025 15:03:32 +0200 Subject: [PATCH 20/38] VS Insertion pipeline update - main (#18548) * VS Insertion pipeline update * fs version changed --- azure-pipelines.yml | 2 +- eng/Versions.props | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 08c20d1ef4f..dae90331bba 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,7 +29,7 @@ variables: # Should be 'current' release branch name, i.e. 'release/dev17.10' in dotnet/fsharp/refs/heads/main, 'release/dev17.10' in dotnet/fsharp/refs/heads/release/dev17.10 and 'release/dev17.9' in dotnet/fsharp/refs/heads/release/dev17.9 # Should **never** be 'main' in dotnet/fsharp/refs/heads/main, since it will start inserting to VS twice. - name: FSharpReleaseBranchName - value: release/dev17.14 + value: release/dev18.0 # VS Insertion branch name (NOT the same as F# branch) # Should be previous release branch or 'main' in 'main' and 'main' in release branch # (since for all *new* release branches we insert into VS main and for all *previous* releases we insert into corresponding VS release), diff --git a/eng/Versions.props b/eng/Versions.props index 2bbd93c22ac..624e01fe94c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -12,9 +12,9 @@ beta - 9 + 10 0 - 300 + 100 0 @@ -29,7 +29,7 @@ 43 - 9 + 10 $(FSBuildVersion) $(FSRevisionVersion) $(FCSMajorVersion).$(FCSMinorVersion).$(FCSBuildVersion) From 1a76355d413133b7cd3a8c63cc755b9f84d68942 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 16 May 2025 09:04:06 +0200 Subject: [PATCH 21/38] [main] Update dependencies from dotnet/arcade (#18559) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update dependencies from https://github.com/dotnet/arcade build 20250513.5 Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.25255.5 -> To Version 9.0.0-beta.25263.5 * Delete wrong src/arcade folder See https://github.com/dotnet/arcade-services/issues/4837 --------- Co-authored-by: dotnet-maestro[bot] Co-authored-by: Alexander Köplinger --- eng/Version.Details.xml | 4 +- global.json | 2 +- .../build-configuration.json | 4 - .../eng/common/PSScriptAnalyzerSettings.psd1 | 11 - src/arcade/eng/common/README.md | 28 -- src/arcade/eng/common/SetupNugetSources.ps1 | 171 -------- src/arcade/eng/common/SetupNugetSources.sh | 167 -------- src/arcade/eng/common/build.cmd | 3 - .../common/core-templates/job/onelocbuild.yml | 121 ------ .../core-templates/jobs/source-build.yml | 58 --- .../post-build/common-variables.yml | 22 - .../post-build/setup-maestro-vars.yml | 74 ---- .../steps/component-governance.yml | 16 - .../steps/enable-internal-runtimes.yml | 32 -- .../steps/enable-internal-sources.yml | 47 -- .../steps/get-federated-access-token.yml | 42 -- .../steps/publish-build-artifacts.yml | 20 - .../steps/publish-pipeline-artifacts.yml | 20 - .../core-templates/steps/retain-build.yml | 28 -- .../core-templates/steps/send-to-helix.yml | 93 ---- .../variables/pool-providers.yml | 8 - .../eng/common/cross/arm/tizen/tizen.patch | 9 - .../eng/common/cross/armel/tizen/tizen.patch | 9 - .../common/cross/riscv64/tizen/tizen.patch | 9 - .../eng/common/cross/tizen-build-rootfs.sh | 82 ---- .../eng/common/cross/x64/tizen/tizen.patch | 9 - .../eng/common/cross/x86/tizen/tizen.patch | 9 - src/arcade/eng/common/darc-init.ps1 | 47 -- src/arcade/eng/common/darc-init.sh | 82 ---- src/arcade/eng/common/dotnet-install.cmd | 2 - src/arcade/eng/common/dotnet-install.ps1 | 28 -- src/arcade/eng/common/dotnet-install.sh | 94 ---- .../common/enable-cross-org-publishing.ps1 | 13 - src/arcade/eng/common/generate-locproject.ps1 | 189 --------- src/arcade/eng/common/generate-sbom-prep.ps1 | 29 -- src/arcade/eng/common/generate-sbom-prep.sh | 39 -- src/arcade/eng/common/helixpublish.proj | 27 -- src/arcade/eng/common/init-tools-native.ps1 | 203 --------- src/arcade/eng/common/init-tools-native.sh | 238 ----------- .../eng/common/internal-feed-operations.ps1 | 132 ------ .../eng/common/internal-feed-operations.sh | 141 ------ .../eng/common/internal/Directory.Build.props | 11 - src/arcade/eng/common/internal/NuGet.config | 7 - src/arcade/eng/common/internal/Tools.csproj | 22 - .../common/loc/P22DotNetHtmlLocalization.lss | 29 -- src/arcade/eng/common/msbuild.ps1 | 28 -- src/arcade/eng/common/msbuild.sh | 58 --- .../eng/common/native/CommonLibrary.psm1 | 401 ------------------ .../eng/common/native/common-library.sh | 172 -------- src/arcade/eng/common/native/init-compiler.sh | 146 ------- .../eng/common/native/init-distro-rid.sh | 110 ----- .../eng/common/native/init-os-and-arch.sh | 85 ---- .../eng/common/native/install-cmake-test.sh | 117 ----- src/arcade/eng/common/native/install-cmake.sh | 117 ----- src/arcade/eng/common/native/install-tool.ps1 | 132 ------ .../eng/common/pipeline-logging-functions.ps1 | 260 ------------ .../eng/common/pipeline-logging-functions.sh | 206 --------- .../post-build/check-channel-consistency.ps1 | 48 --- .../common/post-build/nuget-validation.ps1 | 22 - .../common/post-build/nuget-verification.ps1 | 121 ------ .../eng/common/post-build/redact-logs.ps1 | 89 ---- .../post-build/sourcelink-validation.ps1 | 327 -------------- .../common/post-build/symbols-validation.ps1 | 337 --------------- src/arcade/eng/common/retain-build.ps1 | 45 -- src/arcade/eng/common/sdl/NuGet.config | 18 - .../eng/common/sdl/configure-sdl-tool.ps1 | 130 ------ .../eng/common/sdl/execute-all-sdl-tools.ps1 | 167 -------- .../common/sdl/extract-artifact-archives.ps1 | 63 --- .../common/sdl/extract-artifact-packages.ps1 | 82 ---- src/arcade/eng/common/sdl/init-sdl.ps1 | 55 --- src/arcade/eng/common/sdl/run-sdl.ps1 | 49 --- src/arcade/eng/common/sdl/sdl.ps1 | 38 -- .../eng/common/sdl/trim-assets-version.ps1 | 75 ---- src/arcade/eng/common/template-guidance.md | 133 ------ .../templates-official/job/onelocbuild.yml | 7 - .../job/publish-build-assets.yml | 7 - .../templates-official/job/source-build.yml | 7 - .../job/source-index-stage1.yml | 7 - .../templates-official/jobs/codeql-build.yml | 7 - .../common/templates-official/jobs/jobs.yml | 7 - .../templates-official/jobs/source-build.yml | 7 - .../post-build/common-variables.yml | 8 - .../post-build/post-build.yml | 8 - .../post-build/setup-maestro-vars.yml | 8 - .../steps/component-governance.yml | 7 - .../steps/enable-internal-runtimes.yml | 9 - .../steps/enable-internal-sources.yml | 7 - .../steps/generate-sbom.yml | 7 - .../steps/get-delegation-sas.yml | 7 - .../steps/get-federated-access-token.yml | 7 - .../templates-official/steps/publish-logs.yml | 7 - .../steps/publish-pipeline-artifacts.yml | 28 -- .../templates-official/steps/retain-build.yml | 7 - .../steps/send-to-helix.yml | 7 - .../templates-official/steps/source-build.yml | 7 - .../variables/pool-providers.yml | 45 -- .../variables/sdl-variables.yml | 7 - .../eng/common/templates/job/onelocbuild.yml | 7 - .../templates/job/publish-build-assets.yml | 7 - .../eng/common/templates/job/source-build.yml | 7 - .../templates/job/source-index-stage1.yml | 7 - .../common/templates/jobs/codeql-build.yml | 7 - src/arcade/eng/common/templates/jobs/jobs.yml | 7 - .../common/templates/jobs/source-build.yml | 7 - .../templates/post-build/common-variables.yml | 8 - .../templates/post-build/post-build.yml | 8 - .../post-build/setup-maestro-vars.yml | 8 - .../templates/steps/component-governance.yml | 7 - .../steps/enable-internal-runtimes.yml | 10 - .../steps/enable-internal-sources.yml | 7 - .../common/templates/steps/generate-sbom.yml | 7 - .../templates/steps/get-delegation-sas.yml | 7 - .../steps/get-federated-access-token.yml | 7 - .../common/templates/steps/publish-logs.yml | 7 - .../steps/publish-pipeline-artifacts.yml | 34 -- .../common/templates/steps/retain-build.yml | 7 - .../common/templates/steps/send-to-helix.yml | 7 - .../common/templates/steps/source-build.yml | 7 - .../templates/variables/pool-providers.yml | 59 --- 119 files changed, 3 insertions(+), 6523 deletions(-) delete mode 100644 src/arcade/eng/common/BuildConfiguration/build-configuration.json delete mode 100644 src/arcade/eng/common/PSScriptAnalyzerSettings.psd1 delete mode 100644 src/arcade/eng/common/README.md delete mode 100644 src/arcade/eng/common/SetupNugetSources.ps1 delete mode 100644 src/arcade/eng/common/SetupNugetSources.sh delete mode 100644 src/arcade/eng/common/build.cmd delete mode 100644 src/arcade/eng/common/core-templates/job/onelocbuild.yml delete mode 100644 src/arcade/eng/common/core-templates/jobs/source-build.yml delete mode 100644 src/arcade/eng/common/core-templates/post-build/common-variables.yml delete mode 100644 src/arcade/eng/common/core-templates/post-build/setup-maestro-vars.yml delete mode 100644 src/arcade/eng/common/core-templates/steps/component-governance.yml delete mode 100644 src/arcade/eng/common/core-templates/steps/enable-internal-runtimes.yml delete mode 100644 src/arcade/eng/common/core-templates/steps/enable-internal-sources.yml delete mode 100644 src/arcade/eng/common/core-templates/steps/get-federated-access-token.yml delete mode 100644 src/arcade/eng/common/core-templates/steps/publish-build-artifacts.yml delete mode 100644 src/arcade/eng/common/core-templates/steps/publish-pipeline-artifacts.yml delete mode 100644 src/arcade/eng/common/core-templates/steps/retain-build.yml delete mode 100644 src/arcade/eng/common/core-templates/steps/send-to-helix.yml delete mode 100644 src/arcade/eng/common/core-templates/variables/pool-providers.yml delete mode 100644 src/arcade/eng/common/cross/arm/tizen/tizen.patch delete mode 100644 src/arcade/eng/common/cross/armel/tizen/tizen.patch delete mode 100644 src/arcade/eng/common/cross/riscv64/tizen/tizen.patch delete mode 100644 src/arcade/eng/common/cross/tizen-build-rootfs.sh delete mode 100644 src/arcade/eng/common/cross/x64/tizen/tizen.patch delete mode 100644 src/arcade/eng/common/cross/x86/tizen/tizen.patch delete mode 100644 src/arcade/eng/common/darc-init.ps1 delete mode 100644 src/arcade/eng/common/darc-init.sh delete mode 100644 src/arcade/eng/common/dotnet-install.cmd delete mode 100644 src/arcade/eng/common/dotnet-install.ps1 delete mode 100644 src/arcade/eng/common/dotnet-install.sh delete mode 100644 src/arcade/eng/common/enable-cross-org-publishing.ps1 delete mode 100644 src/arcade/eng/common/generate-locproject.ps1 delete mode 100644 src/arcade/eng/common/generate-sbom-prep.ps1 delete mode 100644 src/arcade/eng/common/generate-sbom-prep.sh delete mode 100644 src/arcade/eng/common/helixpublish.proj delete mode 100644 src/arcade/eng/common/init-tools-native.ps1 delete mode 100644 src/arcade/eng/common/init-tools-native.sh delete mode 100644 src/arcade/eng/common/internal-feed-operations.ps1 delete mode 100644 src/arcade/eng/common/internal-feed-operations.sh delete mode 100644 src/arcade/eng/common/internal/Directory.Build.props delete mode 100644 src/arcade/eng/common/internal/NuGet.config delete mode 100644 src/arcade/eng/common/internal/Tools.csproj delete mode 100644 src/arcade/eng/common/loc/P22DotNetHtmlLocalization.lss delete mode 100644 src/arcade/eng/common/msbuild.ps1 delete mode 100644 src/arcade/eng/common/msbuild.sh delete mode 100644 src/arcade/eng/common/native/CommonLibrary.psm1 delete mode 100644 src/arcade/eng/common/native/common-library.sh delete mode 100644 src/arcade/eng/common/native/init-compiler.sh delete mode 100644 src/arcade/eng/common/native/init-distro-rid.sh delete mode 100644 src/arcade/eng/common/native/init-os-and-arch.sh delete mode 100644 src/arcade/eng/common/native/install-cmake-test.sh delete mode 100644 src/arcade/eng/common/native/install-cmake.sh delete mode 100644 src/arcade/eng/common/native/install-tool.ps1 delete mode 100644 src/arcade/eng/common/pipeline-logging-functions.ps1 delete mode 100644 src/arcade/eng/common/pipeline-logging-functions.sh delete mode 100644 src/arcade/eng/common/post-build/check-channel-consistency.ps1 delete mode 100644 src/arcade/eng/common/post-build/nuget-validation.ps1 delete mode 100644 src/arcade/eng/common/post-build/nuget-verification.ps1 delete mode 100644 src/arcade/eng/common/post-build/redact-logs.ps1 delete mode 100644 src/arcade/eng/common/post-build/sourcelink-validation.ps1 delete mode 100644 src/arcade/eng/common/post-build/symbols-validation.ps1 delete mode 100644 src/arcade/eng/common/retain-build.ps1 delete mode 100644 src/arcade/eng/common/sdl/NuGet.config delete mode 100644 src/arcade/eng/common/sdl/configure-sdl-tool.ps1 delete mode 100644 src/arcade/eng/common/sdl/execute-all-sdl-tools.ps1 delete mode 100644 src/arcade/eng/common/sdl/extract-artifact-archives.ps1 delete mode 100644 src/arcade/eng/common/sdl/extract-artifact-packages.ps1 delete mode 100644 src/arcade/eng/common/sdl/init-sdl.ps1 delete mode 100644 src/arcade/eng/common/sdl/run-sdl.ps1 delete mode 100644 src/arcade/eng/common/sdl/sdl.ps1 delete mode 100644 src/arcade/eng/common/sdl/trim-assets-version.ps1 delete mode 100644 src/arcade/eng/common/template-guidance.md delete mode 100644 src/arcade/eng/common/templates-official/job/onelocbuild.yml delete mode 100644 src/arcade/eng/common/templates-official/job/publish-build-assets.yml delete mode 100644 src/arcade/eng/common/templates-official/job/source-build.yml delete mode 100644 src/arcade/eng/common/templates-official/job/source-index-stage1.yml delete mode 100644 src/arcade/eng/common/templates-official/jobs/codeql-build.yml delete mode 100644 src/arcade/eng/common/templates-official/jobs/jobs.yml delete mode 100644 src/arcade/eng/common/templates-official/jobs/source-build.yml delete mode 100644 src/arcade/eng/common/templates-official/post-build/common-variables.yml delete mode 100644 src/arcade/eng/common/templates-official/post-build/post-build.yml delete mode 100644 src/arcade/eng/common/templates-official/post-build/setup-maestro-vars.yml delete mode 100644 src/arcade/eng/common/templates-official/steps/component-governance.yml delete mode 100644 src/arcade/eng/common/templates-official/steps/enable-internal-runtimes.yml delete mode 100644 src/arcade/eng/common/templates-official/steps/enable-internal-sources.yml delete mode 100644 src/arcade/eng/common/templates-official/steps/generate-sbom.yml delete mode 100644 src/arcade/eng/common/templates-official/steps/get-delegation-sas.yml delete mode 100644 src/arcade/eng/common/templates-official/steps/get-federated-access-token.yml delete mode 100644 src/arcade/eng/common/templates-official/steps/publish-logs.yml delete mode 100644 src/arcade/eng/common/templates-official/steps/publish-pipeline-artifacts.yml delete mode 100644 src/arcade/eng/common/templates-official/steps/retain-build.yml delete mode 100644 src/arcade/eng/common/templates-official/steps/send-to-helix.yml delete mode 100644 src/arcade/eng/common/templates-official/steps/source-build.yml delete mode 100644 src/arcade/eng/common/templates-official/variables/pool-providers.yml delete mode 100644 src/arcade/eng/common/templates-official/variables/sdl-variables.yml delete mode 100644 src/arcade/eng/common/templates/job/onelocbuild.yml delete mode 100644 src/arcade/eng/common/templates/job/publish-build-assets.yml delete mode 100644 src/arcade/eng/common/templates/job/source-build.yml delete mode 100644 src/arcade/eng/common/templates/job/source-index-stage1.yml delete mode 100644 src/arcade/eng/common/templates/jobs/codeql-build.yml delete mode 100644 src/arcade/eng/common/templates/jobs/jobs.yml delete mode 100644 src/arcade/eng/common/templates/jobs/source-build.yml delete mode 100644 src/arcade/eng/common/templates/post-build/common-variables.yml delete mode 100644 src/arcade/eng/common/templates/post-build/post-build.yml delete mode 100644 src/arcade/eng/common/templates/post-build/setup-maestro-vars.yml delete mode 100644 src/arcade/eng/common/templates/steps/component-governance.yml delete mode 100644 src/arcade/eng/common/templates/steps/enable-internal-runtimes.yml delete mode 100644 src/arcade/eng/common/templates/steps/enable-internal-sources.yml delete mode 100644 src/arcade/eng/common/templates/steps/generate-sbom.yml delete mode 100644 src/arcade/eng/common/templates/steps/get-delegation-sas.yml delete mode 100644 src/arcade/eng/common/templates/steps/get-federated-access-token.yml delete mode 100644 src/arcade/eng/common/templates/steps/publish-logs.yml delete mode 100644 src/arcade/eng/common/templates/steps/publish-pipeline-artifacts.yml delete mode 100644 src/arcade/eng/common/templates/steps/retain-build.yml delete mode 100644 src/arcade/eng/common/templates/steps/send-to-helix.yml delete mode 100644 src/arcade/eng/common/templates/steps/source-build.yml delete mode 100644 src/arcade/eng/common/templates/variables/pool-providers.yml diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 08868123018..e49b408685d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -31,9 +31,9 @@ - + https://github.com/dotnet/arcade - 1cfa39f82d00b3659a3d367bc344241946e10681 + 93823d49ca01742464ad1c0b49ea940e693b1be3 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/global.json b/global.json index 809fed994d0..d599c421142 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25255.5", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25263.5", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } diff --git a/src/arcade/eng/common/BuildConfiguration/build-configuration.json b/src/arcade/eng/common/BuildConfiguration/build-configuration.json deleted file mode 100644 index 3d1cc89894c..00000000000 --- a/src/arcade/eng/common/BuildConfiguration/build-configuration.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "RetryCountLimit": 1, - "RetryByAnyError": false -} diff --git a/src/arcade/eng/common/PSScriptAnalyzerSettings.psd1 b/src/arcade/eng/common/PSScriptAnalyzerSettings.psd1 deleted file mode 100644 index 4c1ea7c98ea..00000000000 --- a/src/arcade/eng/common/PSScriptAnalyzerSettings.psd1 +++ /dev/null @@ -1,11 +0,0 @@ -@{ - IncludeRules=@('PSAvoidUsingCmdletAliases', - 'PSAvoidUsingWMICmdlet', - 'PSAvoidUsingPositionalParameters', - 'PSAvoidUsingInvokeExpression', - 'PSUseDeclaredVarsMoreThanAssignments', - 'PSUseCmdletCorrectly', - 'PSStandardDSCFunctionsInResource', - 'PSUseIdenticalMandatoryParametersForDSC', - 'PSUseIdenticalParametersForDSC') -} \ No newline at end of file diff --git a/src/arcade/eng/common/README.md b/src/arcade/eng/common/README.md deleted file mode 100644 index ff49c371527..00000000000 --- a/src/arcade/eng/common/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Don't touch this folder - - uuuuuuuuuuuuuuuuuuuu - u" uuuuuuuuuuuuuuuuuu "u - u" u$$$$$$$$$$$$$$$$$$$$u "u - u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u - u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u - u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u - u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u - $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ - $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ - $ $$$" ... "$... ...$" ... "$$$ ... "$$$ $ - $ $$$u `"$$$$$$$ $$$ $$$$$ $$ $$$ $$$ $ - $ $$$$$$uu "$$$$ $$$ $$$$$ $$ """ u$$$ $ - $ $$$""$$$ $$$$ $$$u "$$$" u$$ $$$$$$$$ $ - $ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $ - $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ - "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" - "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" - "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" - "u "$$$$$$$$$$$$$$$$$$$$$$$$" u" - "u "$$$$$$$$$$$$$$$$$$$$" u" - "u """""""""""""""""" u" - """""""""""""""""""" - -!!! Changes made in this directory are subject to being overwritten by automation !!! - -The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first. diff --git a/src/arcade/eng/common/SetupNugetSources.ps1 b/src/arcade/eng/common/SetupNugetSources.ps1 deleted file mode 100644 index 5db4ad71ee2..00000000000 --- a/src/arcade/eng/common/SetupNugetSources.ps1 +++ /dev/null @@ -1,171 +0,0 @@ -# This script adds internal feeds required to build commits that depend on internal package sources. For instance, -# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables -# disabled internal Maestro (darc-int*) feeds. -# -# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. -# -# See example call for this script below. -# -# - task: PowerShell@2 -# displayName: Setup Private Feeds Credentials -# condition: eq(variables['Agent.OS'], 'Windows_NT') -# inputs: -# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 -# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token -# env: -# Token: $(dn-bot-dnceng-artifact-feeds-rw) -# -# Note that the NuGetAuthenticate task should be called after SetupNugetSources. -# This ensures that: -# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt) -# - The credential provider is installed. -# -# This logic is also abstracted into enable-internal-sources.yml. - -[CmdletBinding()] -param ( - [Parameter(Mandatory = $true)][string]$ConfigFile, - $Password -) - -$ErrorActionPreference = "Stop" -Set-StrictMode -Version 2.0 -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -. $PSScriptRoot\tools.ps1 - -# Add source entry to PackageSources -function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) { - $packageSource = $sources.SelectSingleNode("add[@key='$SourceName']") - - if ($packageSource -eq $null) - { - $packageSource = $doc.CreateElement("add") - $packageSource.SetAttribute("key", $SourceName) - $packageSource.SetAttribute("value", $SourceEndPoint) - $sources.AppendChild($packageSource) | Out-Null - } - else { - Write-Host "Package source $SourceName already present." - } - - AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd -} - -# Add a credential node for the specified source -function AddCredential($creds, $source, $username, $pwd) { - # If no cred supplied, don't do anything. - if (!$pwd) { - return; - } - - # Looks for credential configuration for the given SourceName. Create it if none is found. - $sourceElement = $creds.SelectSingleNode($Source) - if ($sourceElement -eq $null) - { - $sourceElement = $doc.CreateElement($Source) - $creds.AppendChild($sourceElement) | Out-Null - } - - # Add the node to the credential if none is found. - $usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']") - if ($usernameElement -eq $null) - { - $usernameElement = $doc.CreateElement("add") - $usernameElement.SetAttribute("key", "Username") - $sourceElement.AppendChild($usernameElement) | Out-Null - } - $usernameElement.SetAttribute("value", $Username) - - # Add the to the credential if none is found. - # Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs. - # -> https://github.com/NuGet/Home/issues/5526 - $passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']") - if ($passwordElement -eq $null) - { - $passwordElement = $doc.CreateElement("add") - $passwordElement.SetAttribute("key", "ClearTextPassword") - $sourceElement.AppendChild($passwordElement) | Out-Null - } - - $passwordElement.SetAttribute("value", $pwd) -} - -function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) { - $maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]") - - Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds." - - ForEach ($PackageSource in $maestroPrivateSources) { - Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key - AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd - } -} - -function EnablePrivatePackageSources($DisabledPackageSources) { - $maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]") - ForEach ($DisabledPackageSource in $maestroPrivateSources) { - Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource" - # Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries - $DisabledPackageSources.RemoveChild($DisabledPackageSource) - } -} - -if (!(Test-Path $ConfigFile -PathType Leaf)) { - Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" - ExitWithExitCode 1 -} - -# Load NuGet.config -$doc = New-Object System.Xml.XmlDocument -$filename = (Get-Item $ConfigFile).FullName -$doc.Load($filename) - -# Get reference to or create one if none exist already -$sources = $doc.DocumentElement.SelectSingleNode("packageSources") -if ($sources -eq $null) { - $sources = $doc.CreateElement("packageSources") - $doc.DocumentElement.AppendChild($sources) | Out-Null -} - -$creds = $null -if ($Password) { - # Looks for a node. Create it if none is found. - $creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") - if ($creds -eq $null) { - $creds = $doc.CreateElement("packageSourceCredentials") - $doc.DocumentElement.AppendChild($creds) | Out-Null - } -} - -# Check for disabledPackageSources; we'll enable any darc-int ones we find there -$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources") -if ($disabledSources -ne $null) { - Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node" - EnablePrivatePackageSources -DisabledPackageSources $disabledSources -} - -$userName = "dn-bot" - -# Insert credential nodes for Maestro's private feeds -InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password - -# 3.1 uses a different feed url format so it's handled differently here -$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']") -if ($dotnet31Source -ne $null) { - AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password - AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password -} - -$dotnetVersions = @('5','6','7','8','9') - -foreach ($dotnetVersion in $dotnetVersions) { - $feedPrefix = "dotnet" + $dotnetVersion; - $dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']") - if ($dotnetSource -ne $null) { - AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password - AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password - } -} - -$doc.Save($filename) diff --git a/src/arcade/eng/common/SetupNugetSources.sh b/src/arcade/eng/common/SetupNugetSources.sh deleted file mode 100644 index 4604b61b032..00000000000 --- a/src/arcade/eng/common/SetupNugetSources.sh +++ /dev/null @@ -1,167 +0,0 @@ -#!/usr/bin/env bash - -# This script adds internal feeds required to build commits that depend on internal package sources. For instance, -# dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables -# disabled internal Maestro (darc-int*) feeds. -# -# Optionally, this script also adds a credential entry for each of the internal feeds if supplied. -# -# See example call for this script below. -# -# - task: Bash@3 -# displayName: Setup Internal Feeds -# inputs: -# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh -# arguments: $(Build.SourcesDirectory)/NuGet.config -# condition: ne(variables['Agent.OS'], 'Windows_NT') -# - task: NuGetAuthenticate@1 -# -# Note that the NuGetAuthenticate task should be called after SetupNugetSources. -# This ensures that: -# - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt) -# - The credential provider is installed. -# -# This logic is also abstracted into enable-internal-sources.yml. - -ConfigFile=$1 -CredToken=$2 -NL='\n' -TB=' ' - -source="${BASH_SOURCE[0]}" - -# resolve $source until the file is no longer a symlink -while [[ -h "$source" ]]; do - scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - source="$(readlink "$source")" - # if $source was a relative symlink, we need to resolve it relative to the path where the - # symlink file was located - [[ $source != /* ]] && source="$scriptroot/$source" -done -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -. "$scriptroot/tools.sh" - -if [ ! -f "$ConfigFile" ]; then - Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" - ExitWithExitCode 1 -fi - -if [[ `uname -s` == "Darwin" ]]; then - NL=$'\\\n' - TB='' -fi - -# Ensure there is a ... section. -grep -i "" $ConfigFile -if [ "$?" != "0" ]; then - echo "Adding ... section." - ConfigNodeHeader="" - PackageSourcesTemplate="${TB}${NL}${TB}" - - sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" $ConfigFile -fi - -# Ensure there is a ... section. -grep -i "" $ConfigFile -if [ "$?" != "0" ]; then - echo "Adding ... section." - - PackageSourcesNodeFooter="" - PackageSourceCredentialsTemplate="${TB}${NL}${TB}" - - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" $ConfigFile -fi - -PackageSources=() - -# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present -grep -i "" - - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile - fi - PackageSources+=('dotnet3.1-internal') - - grep -i "" $ConfigFile - if [ "$?" != "0" ]; then - echo "Adding dotnet3.1-internal-transport to the packageSources." - PackageSourcesNodeFooter="" - PackageSourceTemplate="${TB}" - - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile - fi - PackageSources+=('dotnet3.1-internal-transport') -fi - -DotNetVersions=('5' '6' '7' '8' '9') - -for DotNetVersion in ${DotNetVersions[@]} ; do - FeedPrefix="dotnet${DotNetVersion}"; - grep -i "" - - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile - fi - PackageSources+=("$FeedPrefix-internal") - - grep -i "" $ConfigFile - if [ "$?" != "0" ]; then - echo "Adding $FeedPrefix-internal-transport to the packageSources." - PackageSourcesNodeFooter="" - PackageSourceTemplate="${TB}" - - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile - fi - PackageSources+=("$FeedPrefix-internal-transport") - fi -done - -# I want things split line by line -PrevIFS=$IFS -IFS=$'\n' -PackageSources+="$IFS" -PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') -IFS=$PrevIFS - -if [ "$CredToken" ]; then - for FeedName in ${PackageSources[@]} ; do - # Check if there is no existing credential for this FeedName - grep -i "<$FeedName>" $ConfigFile - if [ "$?" != "0" ]; then - echo "Adding credentials for $FeedName." - - PackageSourceCredentialsNodeFooter="" - NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}" - - sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile - fi - done -fi - -# Re-enable any entries in disabledPackageSources where the feed name contains darc-int -grep -i "" $ConfigFile -if [ "$?" == "0" ]; then - DisabledDarcIntSources=() - echo "Re-enabling any disabled \"darc-int\" package sources in $ConfigFile" - DisabledDarcIntSources+=$(grep -oh '"darc-int-[^"]*" value="true"' $ConfigFile | tr -d '"') - for DisabledSourceName in ${DisabledDarcIntSources[@]} ; do - if [[ $DisabledSourceName == darc-int* ]] - then - OldDisableValue="" - NewDisableValue="" - sed -i.bak "s|$OldDisableValue|$NewDisableValue|" $ConfigFile - echo "Neutralized disablePackageSources entry for '$DisabledSourceName'" - fi - done -fi diff --git a/src/arcade/eng/common/build.cmd b/src/arcade/eng/common/build.cmd deleted file mode 100644 index 99daf368aba..00000000000 --- a/src/arcade/eng/common/build.cmd +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0build.ps1""" %*" -exit /b %ErrorLevel% diff --git a/src/arcade/eng/common/core-templates/job/onelocbuild.yml b/src/arcade/eng/common/core-templates/job/onelocbuild.yml deleted file mode 100644 index 00feec8ebbc..00000000000 --- a/src/arcade/eng/common/core-templates/job/onelocbuild.yml +++ /dev/null @@ -1,121 +0,0 @@ -parameters: - # Optional: dependencies of the job - dependsOn: '' - - # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool - pool: '' - - CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex - GithubPat: $(BotAccount-dotnet-bot-repo-PAT) - - SourcesDirectory: $(Build.SourcesDirectory) - CreatePr: true - AutoCompletePr: false - ReusePr: true - UseLfLineEndings: true - UseCheckedInLocProjectJson: false - SkipLocProjectJsonGeneration: false - LanguageSet: VS_Main_Languages - LclSource: lclFilesInRepo - LclPackageId: '' - RepoType: gitHub - GitHubOrg: dotnet - MirrorRepo: '' - MirrorBranch: main - condition: '' - JobNameSuffix: '' - is1ESPipeline: '' -jobs: -- job: OneLocBuild${{ parameters.JobNameSuffix }} - - dependsOn: ${{ parameters.dependsOn }} - - displayName: OneLocBuild${{ parameters.JobNameSuffix }} - - variables: - - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat - - name: _GenerateLocProjectArguments - value: -SourcesDirectory ${{ parameters.SourcesDirectory }} - -LanguageSet "${{ parameters.LanguageSet }}" - -CreateNeutralXlfs - - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: - - name: _GenerateLocProjectArguments - value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson - - template: /eng/common/core-templates/variables/pool-providers.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - - ${{ if ne(parameters.pool, '') }}: - pool: ${{ parameters.pool }} - ${{ if eq(parameters.pool, '') }}: - pool: - # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: - name: AzurePipelines-EO - image: 1ESPT-Windows2022 - demands: Cmd - os: windows - # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: $(DncEngInternalBuildPool) - image: 1es-windows-2022 - os: windows - - steps: - - ${{ if eq(parameters.is1ESPipeline, '') }}: - - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error - - - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: - - task: Powershell@2 - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 - arguments: $(_GenerateLocProjectArguments) - displayName: Generate LocProject.json - condition: ${{ parameters.condition }} - - - task: OneLocBuild@2 - displayName: OneLocBuild - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - inputs: - locProj: eng/Localize/LocProject.json - outDir: $(Build.ArtifactStagingDirectory) - lclSource: ${{ parameters.LclSource }} - lclPackageId: ${{ parameters.LclPackageId }} - isCreatePrSelected: ${{ parameters.CreatePr }} - isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} - ${{ if eq(parameters.CreatePr, true) }}: - isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }} - ${{ if eq(parameters.RepoType, 'gitHub') }}: - isShouldReusePrSelected: ${{ parameters.ReusePr }} - packageSourceAuth: patAuth - patVariable: ${{ parameters.CeapexPat }} - ${{ if eq(parameters.RepoType, 'gitHub') }}: - repoType: ${{ parameters.RepoType }} - gitHubPatVariable: "${{ parameters.GithubPat }}" - ${{ if ne(parameters.MirrorRepo, '') }}: - isMirrorRepoSelected: true - gitHubOrganization: ${{ parameters.GitHubOrg }} - mirrorRepo: ${{ parameters.MirrorRepo }} - mirrorBranch: ${{ parameters.MirrorBranch }} - condition: ${{ parameters.condition }} - - - template: /eng/common/core-templates/steps/publish-build-artifacts.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - args: - displayName: Publish Localization Files - pathToPublish: '$(Build.ArtifactStagingDirectory)/loc' - publishLocation: Container - artifactName: Loc - condition: ${{ parameters.condition }} - - - template: /eng/common/core-templates/steps/publish-build-artifacts.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - args: - displayName: Publish LocProject.json - pathToPublish: '$(Build.SourcesDirectory)/eng/Localize/' - publishLocation: Container - artifactName: Loc - condition: ${{ parameters.condition }} \ No newline at end of file diff --git a/src/arcade/eng/common/core-templates/jobs/source-build.yml b/src/arcade/eng/common/core-templates/jobs/source-build.yml deleted file mode 100644 index a10ccfbee6d..00000000000 --- a/src/arcade/eng/common/core-templates/jobs/source-build.yml +++ /dev/null @@ -1,58 +0,0 @@ -parameters: - # This template adds arcade-powered source-build to CI. A job is created for each platform, as - # well as an optional server job that completes when all platform jobs complete. - - # The name of the "join" job for all source-build platforms. If set to empty string, the job is - # not included. Existing repo pipelines can use this job depend on all source-build jobs - # completing without maintaining a separate list of every single job ID: just depend on this one - # server job. By default, not included. Recommended name if used: 'Source_Build_Complete'. - allCompletedJobId: '' - - # See /eng/common/core-templates/job/source-build.yml - jobNamePrefix: 'Source_Build' - - # This is the default platform provided by Arcade, intended for use by a managed-only repo. - defaultManagedPlatform: - name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9' - - # Defines the platforms on which to run build jobs. One job is created for each platform, and the - # object in this array is sent to the job template as 'platform'. If no platforms are specified, - # one job runs on 'defaultManagedPlatform'. - platforms: [] - - is1ESPipeline: '' - - # If set to true and running on a non-public project, - # Internal nuget and blob storage locations will be enabled. - # This is not enabled by default because many repositories do not need internal sources - # and do not need to have the required service connections approved in the pipeline. - enableInternalSources: false - -jobs: - -- ${{ if ne(parameters.allCompletedJobId, '') }}: - - job: ${{ parameters.allCompletedJobId }} - displayName: Source-Build Complete - pool: server - dependsOn: - - ${{ each platform in parameters.platforms }}: - - ${{ parameters.jobNamePrefix }}_${{ platform.name }} - - ${{ if eq(length(parameters.platforms), 0) }}: - - ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }} - -- ${{ each platform in parameters.platforms }}: - - template: /eng/common/core-templates/job/source-build.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - jobNamePrefix: ${{ parameters.jobNamePrefix }} - platform: ${{ platform }} - enableInternalSources: ${{ parameters.enableInternalSources }} - -- ${{ if eq(length(parameters.platforms), 0) }}: - - template: /eng/common/core-templates/job/source-build.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - jobNamePrefix: ${{ parameters.jobNamePrefix }} - platform: ${{ parameters.defaultManagedPlatform }} - enableInternalSources: ${{ parameters.enableInternalSources }} diff --git a/src/arcade/eng/common/core-templates/post-build/common-variables.yml b/src/arcade/eng/common/core-templates/post-build/common-variables.yml deleted file mode 100644 index d5627a994ae..00000000000 --- a/src/arcade/eng/common/core-templates/post-build/common-variables.yml +++ /dev/null @@ -1,22 +0,0 @@ -variables: - - group: Publish-Build-Assets - - # Whether the build is internal or not - - name: IsInternalBuild - value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }} - - # Default Maestro++ API Endpoint and API Version - - name: MaestroApiEndPoint - value: "https://maestro.dot.net" - - name: MaestroApiVersion - value: "2020-02-20" - - - name: SourceLinkCLIVersion - value: 3.0.0 - - name: SymbolToolVersion - value: 1.0.1 - - name: BinlogToolVersion - value: 1.0.11 - - - name: runCodesignValidationInjection - value: false diff --git a/src/arcade/eng/common/core-templates/post-build/setup-maestro-vars.yml b/src/arcade/eng/common/core-templates/post-build/setup-maestro-vars.yml deleted file mode 100644 index f7602980dbe..00000000000 --- a/src/arcade/eng/common/core-templates/post-build/setup-maestro-vars.yml +++ /dev/null @@ -1,74 +0,0 @@ -parameters: - BARBuildId: '' - PromoteToChannelIds: '' - is1ESPipeline: '' - -steps: - - ${{ if eq(parameters.is1ESPipeline, '') }}: - - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error - - - ${{ if eq(coalesce(parameters.PromoteToChannelIds, 0), 0) }}: - - task: DownloadBuildArtifacts@0 - displayName: Download Release Configs - inputs: - buildType: current - artifactName: ReleaseConfigs - checkDownloadedFiles: true - - - task: AzureCLI@2 - name: setReleaseVars - displayName: Set Release Configs Vars - inputs: - azureSubscription: "Darc: Maestro Production" - scriptType: pscore - scriptLocation: inlineScript - inlineScript: | - try { - if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { - $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt - - $BarId = $Content | Select -Index 0 - $Channels = $Content | Select -Index 1 - $IsStableBuild = $Content | Select -Index 2 - - $AzureDevOpsProject = $Env:System_TeamProject - $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId - $AzureDevOpsBuildId = $Env:Build_BuildId - } - else { - . $(Build.SourcesDirectory)\eng\common\tools.ps1 - $darc = Get-Darc - $buildInfo = & $darc get-build ` - --id ${{ parameters.BARBuildId }} ` - --extended ` - --output-format json ` - --ci ` - | convertFrom-Json - - $BarId = ${{ parameters.BARBuildId }} - $Channels = $Env:PromoteToMaestroChannels -split "," - $Channels = $Channels -join "][" - $Channels = "[$Channels]" - - $IsStableBuild = $buildInfo.stable - $AzureDevOpsProject = $buildInfo.azureDevOpsProject - $AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId - $AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId - } - - Write-Host "##vso[task.setvariable variable=BARBuildId]$BarId" - Write-Host "##vso[task.setvariable variable=TargetChannels]$Channels" - Write-Host "##vso[task.setvariable variable=IsStableBuild]$IsStableBuild" - - Write-Host "##vso[task.setvariable variable=AzDOProjectName]$AzureDevOpsProject" - Write-Host "##vso[task.setvariable variable=AzDOPipelineId]$AzureDevOpsBuildDefinitionId" - Write-Host "##vso[task.setvariable variable=AzDOBuildId]$AzureDevOpsBuildId" - } - catch { - Write-Host $_ - Write-Host $_.Exception - Write-Host $_.ScriptStackTrace - exit 1 - } - env: - PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} diff --git a/src/arcade/eng/common/core-templates/steps/component-governance.yml b/src/arcade/eng/common/core-templates/steps/component-governance.yml deleted file mode 100644 index cf0649aa956..00000000000 --- a/src/arcade/eng/common/core-templates/steps/component-governance.yml +++ /dev/null @@ -1,16 +0,0 @@ -parameters: - disableComponentGovernance: false - componentGovernanceIgnoreDirectories: '' - is1ESPipeline: false - displayName: 'Component Detection' - -steps: -- ${{ if eq(parameters.disableComponentGovernance, 'true') }}: - - script: echo "##vso[task.setvariable variable=skipComponentGovernanceDetection]true" - displayName: Set skipComponentGovernanceDetection variable -- ${{ if ne(parameters.disableComponentGovernance, 'true') }}: - - task: ComponentGovernanceComponentDetection@0 - continueOnError: true - displayName: ${{ parameters.displayName }} - inputs: - ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} diff --git a/src/arcade/eng/common/core-templates/steps/enable-internal-runtimes.yml b/src/arcade/eng/common/core-templates/steps/enable-internal-runtimes.yml deleted file mode 100644 index 6bdbf62ac50..00000000000 --- a/src/arcade/eng/common/core-templates/steps/enable-internal-runtimes.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' -# variable with the base64-encoded SAS token, by default - -parameters: -- name: federatedServiceConnection - type: string - default: 'dotnetbuilds-internal-read' -- name: outputVariableName - type: string - default: 'dotnetbuilds-internal-container-read-token-base64' -- name: expiryInHours - type: number - default: 1 -- name: base64Encode - type: boolean - default: true -- name: is1ESPipeline - type: boolean - default: false - -steps: -- ${{ if ne(variables['System.TeamProject'], 'public') }}: - - template: /eng/common/core-templates/steps/get-delegation-sas.yml - parameters: - federatedServiceConnection: ${{ parameters.federatedServiceConnection }} - outputVariableName: ${{ parameters.outputVariableName }} - expiryInHours: ${{ parameters.expiryInHours }} - base64Encode: ${{ parameters.base64Encode }} - storageAccount: dotnetbuilds - container: internal - permissions: rl - is1ESPipeline: ${{ parameters.is1ESPipeline }} \ No newline at end of file diff --git a/src/arcade/eng/common/core-templates/steps/enable-internal-sources.yml b/src/arcade/eng/common/core-templates/steps/enable-internal-sources.yml deleted file mode 100644 index 64f881bffc3..00000000000 --- a/src/arcade/eng/common/core-templates/steps/enable-internal-sources.yml +++ /dev/null @@ -1,47 +0,0 @@ -parameters: -# This is the Azure federated service connection that we log into to get an access token. -- name: nugetFederatedServiceConnection - type: string - default: 'dnceng-artifacts-feeds-read' -- name: is1ESPipeline - type: boolean - default: false -# Legacy parameters to allow for PAT usage -- name: legacyCredential - type: string - default: '' - -steps: -- ${{ if ne(variables['System.TeamProject'], 'public') }}: - - ${{ if ne(parameters.legacyCredential, '') }}: - - task: PowerShell@2 - displayName: Setup Internal Feeds - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token - env: - Token: ${{ parameters.legacyCredential }} - # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. - # If running on DevDiv, NuGetAuthenticate is not really an option. It's scoped to a single feed, and we have many feeds that - # may be added. Instead, we'll use the traditional approach (add cred to nuget.config), but use an account token. - - ${{ else }}: - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - task: PowerShell@2 - displayName: Setup Internal Feeds - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config - - ${{ else }}: - - template: /eng/common/templates/steps/get-federated-access-token.yml - parameters: - federatedServiceConnection: ${{ parameters.nugetFederatedServiceConnection }} - outputVariableName: 'dnceng-artifacts-feeds-read-access-token' - - task: PowerShell@2 - displayName: Setup Internal Feeds - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) - # This is required in certain scenarios to install the ADO credential provider. - # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others - # (e.g. dotnet msbuild). - - task: NuGetAuthenticate@1 diff --git a/src/arcade/eng/common/core-templates/steps/get-federated-access-token.yml b/src/arcade/eng/common/core-templates/steps/get-federated-access-token.yml deleted file mode 100644 index 3a4d4410c48..00000000000 --- a/src/arcade/eng/common/core-templates/steps/get-federated-access-token.yml +++ /dev/null @@ -1,42 +0,0 @@ -parameters: -- name: federatedServiceConnection - type: string -- name: outputVariableName - type: string -- name: is1ESPipeline - type: boolean -- name: stepName - type: string - default: 'getFederatedAccessToken' -- name: condition - type: string - default: '' -# Resource to get a token for. Common values include: -# - '499b84ac-1321-427f-aa17-267ca6975798' for Azure DevOps -# - 'https://storage.azure.com/' for storage -# Defaults to Azure DevOps -- name: resource - type: string - default: '499b84ac-1321-427f-aa17-267ca6975798' -- name: isStepOutputVariable - type: boolean - default: false - -steps: -- task: AzureCLI@2 - displayName: 'Getting federated access token for feeds' - name: ${{ parameters.stepName }} - ${{ if ne(parameters.condition, '') }}: - condition: ${{ parameters.condition }} - inputs: - azureSubscription: ${{ parameters.federatedServiceConnection }} - scriptType: 'pscore' - scriptLocation: 'inlineScript' - inlineScript: | - $accessToken = az account get-access-token --query accessToken --resource ${{ parameters.resource }} --output tsv - if ($LASTEXITCODE -ne 0) { - Write-Error "Failed to get access token for resource '${{ parameters.resource }}'" - exit 1 - } - Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value" - Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken" \ No newline at end of file diff --git a/src/arcade/eng/common/core-templates/steps/publish-build-artifacts.yml b/src/arcade/eng/common/core-templates/steps/publish-build-artifacts.yml deleted file mode 100644 index f24ce346684..00000000000 --- a/src/arcade/eng/common/core-templates/steps/publish-build-artifacts.yml +++ /dev/null @@ -1,20 +0,0 @@ -parameters: -- name: is1ESPipeline - type: boolean - default: false -- name: args - type: object - default: {} -steps: -- ${{ if ne(parameters.is1ESPipeline, true) }}: - - template: /eng/common/templates/steps/publish-build-artifacts.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - ${{ each parameter in parameters.args }}: - ${{ parameter.key }}: ${{ parameter.value }} -- ${{ else }}: - - template: /eng/common/templates-official/steps/publish-build-artifacts.yml - parameters: - is1ESPipeline: ${{ parameters.is1ESPipeline }} - ${{ each parameter in parameters.args }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/core-templates/steps/publish-pipeline-artifacts.yml b/src/arcade/eng/common/core-templates/steps/publish-pipeline-artifacts.yml deleted file mode 100644 index 2efec04dc2c..00000000000 --- a/src/arcade/eng/common/core-templates/steps/publish-pipeline-artifacts.yml +++ /dev/null @@ -1,20 +0,0 @@ -parameters: -- name: is1ESPipeline - type: boolean - default: false - -- name: args - type: object - default: {} - -steps: -- ${{ if ne(parameters.is1ESPipeline, true) }}: - - template: /eng/common/templates/steps/publish-pipeline-artifacts.yml - parameters: - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} -- ${{ else }}: - - template: /eng/common/templates-official/steps/publish-pipeline-artifacts.yml - parameters: - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/core-templates/steps/retain-build.yml b/src/arcade/eng/common/core-templates/steps/retain-build.yml deleted file mode 100644 index 83d97a26a01..00000000000 --- a/src/arcade/eng/common/core-templates/steps/retain-build.yml +++ /dev/null @@ -1,28 +0,0 @@ -parameters: - # Optional azure devops PAT with build execute permissions for the build's organization, - # only needed if the build that should be retained ran on a different organization than - # the pipeline where this template is executing from - Token: '' - # Optional BuildId to retain, defaults to the current running build - BuildId: '' - # Azure devops Organization URI for the build in the https://dev.azure.com/ format. - # Defaults to the organization the current pipeline is running on - AzdoOrgUri: '$(System.CollectionUri)' - # Azure devops project for the build. Defaults to the project the current pipeline is running on - AzdoProject: '$(System.TeamProject)' - -steps: - - task: powershell@2 - inputs: - targetType: 'filePath' - filePath: eng/common/retain-build.ps1 - pwsh: true - arguments: > - -AzdoOrgUri: ${{parameters.AzdoOrgUri}} - -AzdoProject ${{parameters.AzdoProject}} - -Token ${{coalesce(parameters.Token, '$env:SYSTEM_ACCESSTOKEN') }} - -BuildId ${{coalesce(parameters.BuildId, '$env:BUILD_ID')}} - displayName: Enable permanent build retention - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - BUILD_ID: $(Build.BuildId) \ No newline at end of file diff --git a/src/arcade/eng/common/core-templates/steps/send-to-helix.yml b/src/arcade/eng/common/core-templates/steps/send-to-helix.yml deleted file mode 100644 index 68fa739c4ab..00000000000 --- a/src/arcade/eng/common/core-templates/steps/send-to-helix.yml +++ /dev/null @@ -1,93 +0,0 @@ -# Please remember to update the documentation if you make changes to these parameters! -parameters: - HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/ - HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/' - HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number - HelixTargetQueues: '' # required -- semicolon-delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues - HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group - HelixProjectPath: 'eng/common/helixpublish.proj' # optional -- path to the project file to build relative to BUILD_SOURCESDIRECTORY - HelixProjectArguments: '' # optional -- arguments passed to the build command - HelixConfiguration: '' # optional -- additional property attached to a job - HelixPreCommands: '' # optional -- commands to run before Helix work item execution - HelixPostCommands: '' # optional -- commands to run after Helix work item execution - WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects - WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects - WorkItemTimeout: '' # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects - CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload - XUnitProjects: '' # optional -- semicolon-delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true - XUnitWorkItemTimeout: '' # optional -- the workitem timeout in seconds for all workitems created from the xUnit projects specified by XUnitProjects - XUnitPublishTargetFramework: '' # optional -- framework to use to publish your xUnit projects - XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner - XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects - IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion - DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json - DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json - WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." - IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set - HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting https://helix.int-dot.net ) - Creator: '' # optional -- if the build is external, use this to specify who is sending the job - DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO - condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() - continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false - -steps: - - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY/${{ parameters.HelixProjectPath }} /restore /p:TreatWarningsAsErrors=false ${{ parameters.HelixProjectArguments }} /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"' - displayName: ${{ parameters.DisplayNamePrefix }} (Windows) - env: - BuildConfig: $(_BuildConfig) - HelixSource: ${{ parameters.HelixSource }} - HelixType: ${{ parameters.HelixType }} - HelixBuild: ${{ parameters.HelixBuild }} - HelixConfiguration: ${{ parameters.HelixConfiguration }} - HelixTargetQueues: ${{ parameters.HelixTargetQueues }} - HelixAccessToken: ${{ parameters.HelixAccessToken }} - HelixPreCommands: ${{ parameters.HelixPreCommands }} - HelixPostCommands: ${{ parameters.HelixPostCommands }} - WorkItemDirectory: ${{ parameters.WorkItemDirectory }} - WorkItemCommand: ${{ parameters.WorkItemCommand }} - WorkItemTimeout: ${{ parameters.WorkItemTimeout }} - CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} - XUnitProjects: ${{ parameters.XUnitProjects }} - XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} - XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} - XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} - XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} - IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} - DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} - DotNetCliVersion: ${{ parameters.DotNetCliVersion }} - WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} - HelixBaseUri: ${{ parameters.HelixBaseUri }} - Creator: ${{ parameters.Creator }} - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT')) - continueOnError: ${{ parameters.continueOnError }} - - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/${{ parameters.HelixProjectPath }} /restore /p:TreatWarningsAsErrors=false ${{ parameters.HelixProjectArguments }} /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog - displayName: ${{ parameters.DisplayNamePrefix }} (Unix) - env: - BuildConfig: $(_BuildConfig) - HelixSource: ${{ parameters.HelixSource }} - HelixType: ${{ parameters.HelixType }} - HelixBuild: ${{ parameters.HelixBuild }} - HelixConfiguration: ${{ parameters.HelixConfiguration }} - HelixTargetQueues: ${{ parameters.HelixTargetQueues }} - HelixAccessToken: ${{ parameters.HelixAccessToken }} - HelixPreCommands: ${{ parameters.HelixPreCommands }} - HelixPostCommands: ${{ parameters.HelixPostCommands }} - WorkItemDirectory: ${{ parameters.WorkItemDirectory }} - WorkItemCommand: ${{ parameters.WorkItemCommand }} - WorkItemTimeout: ${{ parameters.WorkItemTimeout }} - CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} - XUnitProjects: ${{ parameters.XUnitProjects }} - XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} - XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} - XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} - XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} - IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} - DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} - DotNetCliVersion: ${{ parameters.DotNetCliVersion }} - WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} - HelixBaseUri: ${{ parameters.HelixBaseUri }} - Creator: ${{ parameters.Creator }} - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT')) - continueOnError: ${{ parameters.continueOnError }} diff --git a/src/arcade/eng/common/core-templates/variables/pool-providers.yml b/src/arcade/eng/common/core-templates/variables/pool-providers.yml deleted file mode 100644 index 41053d382a2..00000000000 --- a/src/arcade/eng/common/core-templates/variables/pool-providers.yml +++ /dev/null @@ -1,8 +0,0 @@ -parameters: - is1ESPipeline: false - -variables: - - ${{ if eq(parameters.is1ESPipeline, 'true') }}: - - template: /eng/common/templates-official/variables/pool-providers.yml - - ${{ else }}: - - template: /eng/common/templates/variables/pool-providers.yml \ No newline at end of file diff --git a/src/arcade/eng/common/cross/arm/tizen/tizen.patch b/src/arcade/eng/common/cross/arm/tizen/tizen.patch deleted file mode 100644 index fb12ade7250..00000000000 --- a/src/arcade/eng/common/cross/arm/tizen/tizen.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so ---- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900 -+++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900 -@@ -2,4 +2,4 @@ - Use the shared library, but some functions are only in - the static library, so try that secondarily. */ - OUTPUT_FORMAT(elf32-littlearm) --GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) ) -+GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-armhf.so.3 ) ) diff --git a/src/arcade/eng/common/cross/armel/tizen/tizen.patch b/src/arcade/eng/common/cross/armel/tizen/tizen.patch deleted file mode 100644 index ca7c7c1ff75..00000000000 --- a/src/arcade/eng/common/cross/armel/tizen/tizen.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so ---- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900 -+++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900 -@@ -2,4 +2,4 @@ - Use the shared library, but some functions are only in - the static library, so try that secondarily. */ - OUTPUT_FORMAT(elf32-littlearm) --GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.3 ) ) -+GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.3 ) ) diff --git a/src/arcade/eng/common/cross/riscv64/tizen/tizen.patch b/src/arcade/eng/common/cross/riscv64/tizen/tizen.patch deleted file mode 100644 index eb6d1c07470..00000000000 --- a/src/arcade/eng/common/cross/riscv64/tizen/tizen.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so ---- a/usr/lib64/libc.so 2016-12-30 23:00:08.284951863 +0900 -+++ b/usr/lib64/libc.so 2016-12-30 23:00:32.140951815 +0900 -@@ -2,4 +2,4 @@ - Use the shared library, but some functions are only in - the static library, so try that secondarily. */ - OUTPUT_FORMAT(elf64-littleriscv) --GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-riscv64-lp64d.so.1 ) ) -+GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-riscv64-lp64d.so.1 ) ) diff --git a/src/arcade/eng/common/cross/tizen-build-rootfs.sh b/src/arcade/eng/common/cross/tizen-build-rootfs.sh deleted file mode 100644 index ba31c93285f..00000000000 --- a/src/arcade/eng/common/cross/tizen-build-rootfs.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env bash -set -e - -ARCH=$1 -LINK_ARCH=$ARCH - -case "$ARCH" in - arm) - TIZEN_ARCH="armv7hl" - ;; - armel) - TIZEN_ARCH="armv7l" - LINK_ARCH="arm" - ;; - arm64) - TIZEN_ARCH="aarch64" - ;; - x86) - TIZEN_ARCH="i686" - ;; - x64) - TIZEN_ARCH="x86_64" - LINK_ARCH="x86" - ;; - riscv64) - TIZEN_ARCH="riscv64" - LINK_ARCH="riscv" - ;; - *) - echo "Unsupported architecture for tizen: $ARCH" - exit 1 -esac - -__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -__TIZEN_CROSSDIR="$__CrossDir/${ARCH}/tizen" - -if [[ -z "$ROOTFS_DIR" ]]; then - echo "ROOTFS_DIR is not defined." - exit 1; -fi - -TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp -mkdir -p $TIZEN_TMP_DIR - -# Download files -echo ">>Start downloading files" -VERBOSE=1 $__CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR $TIZEN_ARCH -echo "<>Start constructing Tizen rootfs" -TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm` -cd $ROOTFS_DIR -for f in $TIZEN_RPM_FILES; do - rpm2cpio $f | cpio -idm --quiet -done -echo "<>Start configuring Tizen rootfs" -ln -sfn asm-${LINK_ARCH} ./usr/include/asm -patch -p1 < $__TIZEN_CROSSDIR/tizen.patch -if [[ "$TIZEN_ARCH" == "riscv64" ]]; then - echo "Fixing broken symlinks in $PWD" - rm ./usr/lib64/libresolv.so - ln -s ../../lib64/libresolv.so.2 ./usr/lib64/libresolv.so - rm ./usr/lib64/libpthread.so - ln -s ../../lib64/libpthread.so.0 ./usr/lib64/libpthread.so - rm ./usr/lib64/libdl.so - ln -s ../../lib64/libdl.so.2 ./usr/lib64/libdl.so - rm ./usr/lib64/libutil.so - ln -s ../../lib64/libutil.so.1 ./usr/lib64/libutil.so - rm ./usr/lib64/libm.so - ln -s ../../lib64/libm.so.6 ./usr/lib64/libm.so - rm ./usr/lib64/librt.so - ln -s ../../lib64/librt.so.1 ./usr/lib64/librt.so - rm ./lib/ld-linux-riscv64-lp64d.so.1 - ln -s ../lib64/ld-linux-riscv64-lp64d.so.1 ./lib/ld-linux-riscv64-lp64d.so.1 -fi -echo "< 0 ]]; do - opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" - case "$opt" in - --darcversion) - darcVersion=$2 - shift - ;; - --versionendpoint) - versionEndpoint=$2 - shift - ;; - --verbosity) - verbosity=$2 - shift - ;; - --toolpath) - toolpath=$2 - shift - ;; - *) - echo "Invalid argument: $1" - usage - exit 1 - ;; - esac - - shift -done - -# resolve $source until the file is no longer a symlink -while [[ -h "$source" ]]; do - scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - source="$(readlink "$source")" - # if $source was a relative symlink, we need to resolve it relative to the path where the - # symlink file was located - [[ $source != /* ]] && source="$scriptroot/$source" -done -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -. "$scriptroot/tools.sh" - -if [ -z "$darcVersion" ]; then - darcVersion=$(curl -X GET "$versionEndpoint" -H "accept: text/plain") -fi - -function InstallDarcCli { - local darc_cli_package_name="microsoft.dotnet.darc" - - InitializeDotNetCli true - local dotnet_root=$_InitializeDotNetCli - - if [ -z "$toolpath" ]; then - local tool_list=$($dotnet_root/dotnet tool list -g) - if [[ $tool_list = *$darc_cli_package_name* ]]; then - echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g) - fi - else - local tool_list=$($dotnet_root/dotnet tool list --tool-path "$toolpath") - if [[ $tool_list = *$darc_cli_package_name* ]]; then - echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path "$toolpath") - fi - fi - - local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" - - echo "Installing Darc CLI version $darcVersion..." - echo "You may need to restart your command shell if this is the first dotnet tool you have installed." - if [ -z "$toolpath" ]; then - echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g) - else - echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath") - fi -} - -InstallDarcCli diff --git a/src/arcade/eng/common/dotnet-install.cmd b/src/arcade/eng/common/dotnet-install.cmd deleted file mode 100644 index b1c2642e76f..00000000000 --- a/src/arcade/eng/common/dotnet-install.cmd +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*" \ No newline at end of file diff --git a/src/arcade/eng/common/dotnet-install.ps1 b/src/arcade/eng/common/dotnet-install.ps1 deleted file mode 100644 index 811f0f717f7..00000000000 --- a/src/arcade/eng/common/dotnet-install.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -[CmdletBinding(PositionalBinding=$false)] -Param( - [string] $verbosity = 'minimal', - [string] $architecture = '', - [string] $version = 'Latest', - [string] $runtime = 'dotnet', - [string] $RuntimeSourceFeed = '', - [string] $RuntimeSourceFeedKey = '' -) - -. $PSScriptRoot\tools.ps1 - -$dotnetRoot = Join-Path $RepoRoot '.dotnet' - -$installdir = $dotnetRoot -try { - if ($architecture -and $architecture.Trim() -eq 'x86') { - $installdir = Join-Path $installdir 'x86' - } - InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ - ExitWithExitCode 1 -} - -ExitWithExitCode 0 diff --git a/src/arcade/eng/common/dotnet-install.sh b/src/arcade/eng/common/dotnet-install.sh deleted file mode 100644 index 7b9d97e3bd4..00000000000 --- a/src/arcade/eng/common/dotnet-install.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env bash - -source="${BASH_SOURCE[0]}" -# resolve $source until the file is no longer a symlink -while [[ -h "$source" ]]; do - scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - source="$(readlink "$source")" - # if $source was a relative symlink, we need to resolve it relative to the path where the - # symlink file was located - [[ $source != /* ]] && source="$scriptroot/$source" -done -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -. "$scriptroot/tools.sh" - -version='Latest' -architecture='' -runtime='dotnet' -runtimeSourceFeed='' -runtimeSourceFeedKey='' -while [[ $# > 0 ]]; do - opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" - case "$opt" in - -version|-v) - shift - version="$1" - ;; - -architecture|-a) - shift - architecture="$1" - ;; - -runtime|-r) - shift - runtime="$1" - ;; - -runtimesourcefeed) - shift - runtimeSourceFeed="$1" - ;; - -runtimesourcefeedkey) - shift - runtimeSourceFeedKey="$1" - ;; - *) - Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1" - exit 1 - ;; - esac - shift -done - -# Use uname to determine what the CPU is, see https://en.wikipedia.org/wiki/Uname#Examples -cpuname=$(uname -m) -case $cpuname in - arm64|aarch64) - buildarch=arm64 - if [ "$(getconf LONG_BIT)" -lt 64 ]; then - # This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS) - buildarch=arm - fi - ;; - loongarch64) - buildarch=loongarch64 - ;; - amd64|x86_64) - buildarch=x64 - ;; - armv*l) - buildarch=arm - ;; - i[3-6]86) - buildarch=x86 - ;; - riscv64) - buildarch=riscv64 - ;; - *) - echo "Unknown CPU $cpuname detected, treating it as x64" - buildarch=x64 - ;; -esac - -dotnetRoot="${repo_root}.dotnet" -if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then - dotnetRoot="$dotnetRoot/$architecture" -fi - -InstallDotNet "$dotnetRoot" $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || { - local exit_code=$? - Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2 - ExitWithExitCode $exit_code -} - -ExitWithExitCode 0 diff --git a/src/arcade/eng/common/enable-cross-org-publishing.ps1 b/src/arcade/eng/common/enable-cross-org-publishing.ps1 deleted file mode 100644 index da09da4f1fc..00000000000 --- a/src/arcade/eng/common/enable-cross-org-publishing.ps1 +++ /dev/null @@ -1,13 +0,0 @@ -param( - [string] $token -) - - -. $PSScriptRoot\pipeline-logging-functions.ps1 - -# Write-PipelineSetVariable will no-op if a variable named $ci is not defined -# Since this script is only ever called in AzDO builds, just universally set it -$ci = $true - -Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false -Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false diff --git a/src/arcade/eng/common/generate-locproject.ps1 b/src/arcade/eng/common/generate-locproject.ps1 deleted file mode 100644 index 524aaa57f2b..00000000000 --- a/src/arcade/eng/common/generate-locproject.ps1 +++ /dev/null @@ -1,189 +0,0 @@ -Param( - [Parameter(Mandatory=$true)][string] $SourcesDirectory, # Directory where source files live; if using a Localize directory it should live in here - [string] $LanguageSet = 'VS_Main_Languages', # Language set to be used in the LocProject.json - [switch] $UseCheckedInLocProjectJson, # When set, generates a LocProject.json and compares it to one that already exists in the repo; otherwise just generates one - [switch] $CreateNeutralXlfs # Creates neutral xlf files. Only set to false when running locally -) - -# Generates LocProject.json files for the OneLocBuild task. OneLocBuildTask is described here: -# https://ceapex.visualstudio.com/CEINTL/_wiki/wikis/CEINTL.wiki/107/Localization-with-OneLocBuild-Task - -Set-StrictMode -Version 2.0 -$ErrorActionPreference = "Stop" -. $PSScriptRoot\pipeline-logging-functions.ps1 - -$exclusionsFilePath = "$SourcesDirectory\eng\Localize\LocExclusions.json" -$exclusions = @{ Exclusions = @() } -if (Test-Path -Path $exclusionsFilePath) -{ - $exclusions = Get-Content "$exclusionsFilePath" | ConvertFrom-Json -} - -Push-Location "$SourcesDirectory" # push location for Resolve-Path -Relative to work - -# Template files -$jsonFiles = @() -$jsonTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\.template\.config\\localize\\.+\.en\.json" } # .NET templating pattern -$jsonTemplateFiles | ForEach-Object { - $null = $_.Name -Match "(.+)\.[\w-]+\.json" # matches '[filename].[langcode].json - - $destinationFile = "$($_.Directory.FullName)\$($Matches.1).json" - $jsonFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru -} - -$jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern - -$wxlFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\.+\.wxl" -And -Not( $_.Directory.Name -Match "\d{4}" ) } # localized files live in four digit lang ID directories; this excludes them -if (-not $wxlFiles) { - $wxlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\1033\\.+\.wxl" } # pick up en files (1033 = en) specifically so we can copy them to use as the neutral xlf files - if ($wxlEnFiles) { - $wxlFiles = @() - $wxlEnFiles | ForEach-Object { - $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)" - $wxlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru - } - } -} - -$macosHtmlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\.lproj\\.+\.html$" } # add installer HTML files -$macosHtmlFiles = @() -if ($macosHtmlEnFiles) { - $macosHtmlEnFiles | ForEach-Object { - $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)" - $macosHtmlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru - } -} - -$xlfFiles = @() - -$allXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.xlf" -$langXlfFiles = @() -if ($allXlfFiles) { - $null = $allXlfFiles[0].FullName -Match "\.([\w-]+)\.xlf" # matches '[langcode].xlf' - $firstLangCode = $Matches.1 - $langXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.$firstLangCode.xlf" -} -$langXlfFiles | ForEach-Object { - $null = $_.Name -Match "(.+)\.[\w-]+\.xlf" # matches '[filename].[langcode].xlf - - $destinationFile = "$($_.Directory.FullName)\$($Matches.1).xlf" - $xlfFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru -} - -$locFiles = $jsonFiles + $jsonWinformsTemplateFiles + $xlfFiles - -$locJson = @{ - Projects = @( - @{ - LanguageSet = $LanguageSet - LocItems = @( - $locFiles | ForEach-Object { - $outputPath = "$(($_.DirectoryName | Resolve-Path -Relative) + "\")" - $continue = $true - foreach ($exclusion in $exclusions.Exclusions) { - if ($_.FullName.Contains($exclusion)) - { - $continue = $false - } - } - $sourceFile = ($_.FullName | Resolve-Path -Relative) - if (!$CreateNeutralXlfs -and $_.Extension -eq '.xlf') { - Remove-Item -Path $sourceFile - } - if ($continue) - { - if ($_.Directory.Name -eq 'en' -and $_.Extension -eq '.json') { - return @{ - SourceFile = $sourceFile - CopyOption = "LangIDOnPath" - OutputPath = "$($_.Directory.Parent.FullName | Resolve-Path -Relative)\" - } - } else { - return @{ - SourceFile = $sourceFile - CopyOption = "LangIDOnName" - OutputPath = $outputPath - } - } - } - } - ) - }, - @{ - LanguageSet = $LanguageSet - CloneLanguageSet = "WiX_CloneLanguages" - LssFiles = @( "wxl_loc.lss" ) - LocItems = @( - $wxlFiles | ForEach-Object { - $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" - $continue = $true - foreach ($exclusion in $exclusions.Exclusions) { - if ($_.FullName.Contains($exclusion)) { - $continue = $false - } - } - $sourceFile = ($_.FullName | Resolve-Path -Relative) - if ($continue) - { - return @{ - SourceFile = $sourceFile - CopyOption = "LangIDOnPath" - OutputPath = $outputPath - } - } - } - ) - }, - @{ - LanguageSet = $LanguageSet - CloneLanguageSet = "VS_macOS_CloneLanguages" - LssFiles = @( ".\eng\common\loc\P22DotNetHtmlLocalization.lss" ) - LocItems = @( - $macosHtmlFiles | ForEach-Object { - $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" - $continue = $true - foreach ($exclusion in $exclusions.Exclusions) { - if ($_.FullName.Contains($exclusion)) { - $continue = $false - } - } - $sourceFile = ($_.FullName | Resolve-Path -Relative) - $lciFile = $sourceFile + ".lci" - if ($continue) { - $result = @{ - SourceFile = $sourceFile - CopyOption = "LangIDOnPath" - OutputPath = $outputPath - } - if (Test-Path $lciFile -PathType Leaf) { - $result["LciFile"] = $lciFile - } - return $result - } - } - ) - } - ) -} - -$json = ConvertTo-Json $locJson -Depth 5 -Write-Host "LocProject.json generated:`n`n$json`n`n" -Pop-Location - -if (!$UseCheckedInLocProjectJson) { - New-Item "$SourcesDirectory\eng\Localize\LocProject.json" -Force # Need this to make sure the Localize directory is created - Set-Content "$SourcesDirectory\eng\Localize\LocProject.json" $json -} -else { - New-Item "$SourcesDirectory\eng\Localize\LocProject-generated.json" -Force # Need this to make sure the Localize directory is created - Set-Content "$SourcesDirectory\eng\Localize\LocProject-generated.json" $json - - if ((Get-FileHash "$SourcesDirectory\eng\Localize\LocProject-generated.json").Hash -ne (Get-FileHash "$SourcesDirectory\eng\Localize\LocProject.json").Hash) { - Write-PipelineTelemetryError -Category "OneLocBuild" -Message "Existing LocProject.json differs from generated LocProject.json. Download LocProject-generated.json and compare them." - - exit 1 - } - else { - Write-Host "Generated LocProject.json and current LocProject.json are identical." - } -} diff --git a/src/arcade/eng/common/generate-sbom-prep.ps1 b/src/arcade/eng/common/generate-sbom-prep.ps1 deleted file mode 100644 index a0c7d792a76..00000000000 --- a/src/arcade/eng/common/generate-sbom-prep.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -Param( - [Parameter(Mandatory=$true)][string] $ManifestDirPath # Manifest directory where sbom will be placed -) - -. $PSScriptRoot\pipeline-logging-functions.ps1 - -# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly -# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. -$ArtifactName = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" -$SafeArtifactName = $ArtifactName -replace '["/:<>\\|?@*"() ]', '_' -$SbomGenerationDir = Join-Path $ManifestDirPath $SafeArtifactName - -Write-Host "Artifact name before : $ArtifactName" -Write-Host "Artifact name after : $SafeArtifactName" - -Write-Host "Creating dir $ManifestDirPath" - -# create directory for sbom manifest to be placed -if (!(Test-Path -path $SbomGenerationDir)) -{ - New-Item -ItemType Directory -path $SbomGenerationDir - Write-Host "Successfully created directory $SbomGenerationDir" -} -else{ - Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." -} - -Write-Host "Updating artifact name" -Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$SafeArtifactName" diff --git a/src/arcade/eng/common/generate-sbom-prep.sh b/src/arcade/eng/common/generate-sbom-prep.sh deleted file mode 100644 index b8ecca72bbf..00000000000 --- a/src/arcade/eng/common/generate-sbom-prep.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -source="${BASH_SOURCE[0]}" - -# resolve $SOURCE until the file is no longer a symlink -while [[ -h $source ]]; do - scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - source="$(readlink "$source")" - - # if $source was a relative symlink, we need to resolve it relative to the path where the - # symlink file was located - [[ $source != /* ]] && source="$scriptroot/$source" -done -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" -. $scriptroot/pipeline-logging-functions.sh - - -# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts. -artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM" -safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}" -manifest_dir=$1 - -# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly -# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. -sbom_generation_dir="$manifest_dir/$safe_artifact_name" - -if [ ! -d "$sbom_generation_dir" ] ; then - mkdir -p "$sbom_generation_dir" - echo "Sbom directory created." $sbom_generation_dir -else - Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." -fi - -echo "Artifact name before : "$artifact_name -echo "Artifact name after : "$safe_artifact_name -export ARTIFACT_NAME=$safe_artifact_name -echo "##vso[task.setvariable variable=ARTIFACT_NAME]$safe_artifact_name" - -exit 0 diff --git a/src/arcade/eng/common/helixpublish.proj b/src/arcade/eng/common/helixpublish.proj deleted file mode 100644 index c1323bf4121..00000000000 --- a/src/arcade/eng/common/helixpublish.proj +++ /dev/null @@ -1,27 +0,0 @@ - - - - - msbuild - - - - - %(Identity) - - - - - - $(WorkItemDirectory) - $(WorkItemCommand) - $(WorkItemTimeout) - - - - - - - - - diff --git a/src/arcade/eng/common/init-tools-native.ps1 b/src/arcade/eng/common/init-tools-native.ps1 deleted file mode 100644 index 27ccdb9ecc9..00000000000 --- a/src/arcade/eng/common/init-tools-native.ps1 +++ /dev/null @@ -1,203 +0,0 @@ -<# -.SYNOPSIS -Entry point script for installing native tools - -.DESCRIPTION -Reads $RepoRoot\global.json file to determine native assets to install -and executes installers for those tools - -.PARAMETER BaseUri -Base file directory or Url from which to acquire tool archives - -.PARAMETER InstallDirectory -Directory to install native toolset. This is a command-line override for the default -Install directory precedence order: -- InstallDirectory command-line override -- NETCOREENG_INSTALL_DIRECTORY environment variable -- (default) %USERPROFILE%/.netcoreeng/native - -.PARAMETER Clean -Switch specifying to not install anything, but cleanup native asset folders - -.PARAMETER Force -Clean and then install tools - -.PARAMETER DownloadRetries -Total number of retry attempts - -.PARAMETER RetryWaitTimeInSeconds -Wait time between retry attempts in seconds - -.PARAMETER GlobalJsonFile -File path to global.json file - -.PARAMETER PathPromotion -Optional switch to enable either promote native tools specified in the global.json to the path (in Azure Pipelines) -or break the build if a native tool is not found on the path (on a local dev machine) - -.NOTES -#> -[CmdletBinding(PositionalBinding=$false)] -Param ( - [string] $BaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external', - [string] $InstallDirectory, - [switch] $Clean = $False, - [switch] $Force = $False, - [int] $DownloadRetries = 5, - [int] $RetryWaitTimeInSeconds = 30, - [string] $GlobalJsonFile, - [switch] $PathPromotion -) - -if (!$GlobalJsonFile) { - $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName 'global.json' -} - -Set-StrictMode -version 2.0 -$ErrorActionPreference='Stop' - -. $PSScriptRoot\pipeline-logging-functions.ps1 -Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1') - -try { - # Define verbose switch if undefined - $Verbose = $VerbosePreference -Eq 'Continue' - - $EngCommonBaseDir = Join-Path $PSScriptRoot 'native\' - $NativeBaseDir = $InstallDirectory - if (!$NativeBaseDir) { - $NativeBaseDir = CommonLibrary\Get-NativeInstallDirectory - } - $Env:CommonLibrary_NativeInstallDir = $NativeBaseDir - $InstallBin = Join-Path $NativeBaseDir 'bin' - $InstallerPath = Join-Path $EngCommonBaseDir 'install-tool.ps1' - - # Process tools list - Write-Host "Processing $GlobalJsonFile" - If (-Not (Test-Path $GlobalJsonFile)) { - Write-Host "Unable to find '$GlobalJsonFile'" - exit 0 - } - $NativeTools = Get-Content($GlobalJsonFile) -Raw | - ConvertFrom-Json | - Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue - if ($NativeTools) { - if ($PathPromotion -eq $True) { - $ArcadeToolsDirectory = "$env:SYSTEMDRIVE\arcade-tools" - if (Test-Path $ArcadeToolsDirectory) { # if this directory exists, we should use native tools on machine - $NativeTools.PSObject.Properties | ForEach-Object { - $ToolName = $_.Name - $ToolVersion = $_.Value - $InstalledTools = @{} - - if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) { - if ($ToolVersion -eq "latest") { - $ToolVersion = "" - } - $ToolDirectories = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending) - if ($ToolDirectories -eq $null) { - Write-Error "Unable to find directory for $ToolName $ToolVersion; please make sure the tool is installed on this image." - exit 1 - } - $ToolDirectory = $ToolDirectories[0] - $BinPathFile = "$($ToolDirectory.FullName)\binpath.txt" - if (-not (Test-Path -Path "$BinPathFile")) { - Write-Error "Unable to find binpath.txt in '$($ToolDirectory.FullName)' ($ToolName $ToolVersion); artifact is either installed incorrectly or is not a bootstrappable tool." - exit 1 - } - $BinPath = Get-Content "$BinPathFile" - $ToolPath = Convert-Path -Path $BinPath - Write-Host "Adding $ToolName to the path ($ToolPath)..." - Write-Host "##vso[task.prependpath]$ToolPath" - $env:PATH = "$ToolPath;$env:PATH" - $InstalledTools += @{ $ToolName = $ToolDirectory.FullName } - } - } - return $InstalledTools - } else { - $NativeTools.PSObject.Properties | ForEach-Object { - $ToolName = $_.Name - $ToolVersion = $_.Value - - if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) { - Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "$ToolName not found on path. Please install $ToolName $ToolVersion before proceeding." - Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "If this is running on a build machine, the arcade-tools directory was not found, which means there's an error with the image." - } - } - exit 0 - } - } else { - $NativeTools.PSObject.Properties | ForEach-Object { - $ToolName = $_.Name - $ToolVersion = $_.Value - $LocalInstallerArguments = @{ ToolName = "$ToolName" } - $LocalInstallerArguments += @{ InstallPath = "$InstallBin" } - $LocalInstallerArguments += @{ BaseUri = "$BaseUri" } - $LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" } - $LocalInstallerArguments += @{ Version = "$ToolVersion" } - - if ($Verbose) { - $LocalInstallerArguments += @{ Verbose = $True } - } - if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') { - if($Force) { - $LocalInstallerArguments += @{ Force = $True } - } - } - if ($Clean) { - $LocalInstallerArguments += @{ Clean = $True } - } - - Write-Verbose "Installing $ToolName version $ToolVersion" - Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'" - & $InstallerPath @LocalInstallerArguments - if ($LASTEXITCODE -Ne "0") { - $errMsg = "$ToolName installation failed" - if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) { - $showNativeToolsWarning = $true - if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) { - $showNativeToolsWarning = $false - } - if ($showNativeToolsWarning) { - Write-Warning $errMsg - } - $toolInstallationFailure = $true - } else { - # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 - Write-Host $errMsg - exit 1 - } - } - } - - if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) { - # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 - Write-Host 'Native tools bootstrap failed' - exit 1 - } - } - } - else { - Write-Host 'No native tools defined in global.json' - exit 0 - } - - if ($Clean) { - exit 0 - } - if (Test-Path $InstallBin) { - Write-Host 'Native tools are available from ' (Convert-Path -Path $InstallBin) - Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)" - return $InstallBin - } - elseif (-not ($PathPromotion)) { - Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed' - exit 1 - } - exit 0 -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_ - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/init-tools-native.sh b/src/arcade/eng/common/init-tools-native.sh deleted file mode 100644 index 3e6a8d6acf2..00000000000 --- a/src/arcade/eng/common/init-tools-native.sh +++ /dev/null @@ -1,238 +0,0 @@ -#!/usr/bin/env bash - -source="${BASH_SOURCE[0]}" -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -base_uri='https://netcorenativeassets.blob.core.windows.net/resource-packages/external' -install_directory='' -clean=false -force=false -download_retries=5 -retry_wait_time_seconds=30 -global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json" -declare -a native_assets - -. $scriptroot/pipeline-logging-functions.sh -. $scriptroot/native/common-library.sh - -while (($# > 0)); do - lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" - case $lowerI in - --baseuri) - base_uri=$2 - shift 2 - ;; - --installdirectory) - install_directory=$2 - shift 2 - ;; - --clean) - clean=true - shift 1 - ;; - --force) - force=true - shift 1 - ;; - --donotabortonfailure) - donotabortonfailure=true - shift 1 - ;; - --donotdisplaywarnings) - donotdisplaywarnings=true - shift 1 - ;; - --downloadretries) - download_retries=$2 - shift 2 - ;; - --retrywaittimeseconds) - retry_wait_time_seconds=$2 - shift 2 - ;; - --help) - echo "Common settings:" - echo " --installdirectory Directory to install native toolset." - echo " This is a command-line override for the default" - echo " Install directory precedence order:" - echo " - InstallDirectory command-line override" - echo " - NETCOREENG_INSTALL_DIRECTORY environment variable" - echo " - (default) %USERPROFILE%/.netcoreeng/native" - echo "" - echo " --clean Switch specifying not to install anything, but cleanup native asset folders" - echo " --donotabortonfailure Switch specifiying whether to abort native tools installation on failure" - echo " --donotdisplaywarnings Switch specifiying whether to display warnings during native tools installation on failure" - echo " --force Clean and then install tools" - echo " --help Print help and exit" - echo "" - echo "Advanced settings:" - echo " --baseuri Base URI for where to download native tools from" - echo " --downloadretries Number of times a download should be attempted" - echo " --retrywaittimeseconds Wait time between download attempts" - echo "" - exit 0 - ;; - esac -done - -function ReadGlobalJsonNativeTools { - # happy path: we have a proper JSON parsing tool `jq(1)` in PATH! - if command -v jq &> /dev/null; then - - # jq: read each key/value pair under "native-tools" entry and emit: - # KEY="" VALUE="" - # followed by a null byte. - # - # bash: read line with null byte delimeter and push to array (for later `eval`uation). - - while IFS= read -rd '' line; do - native_assets+=("$line") - done < <(jq -r '. | - select(has("native-tools")) | - ."native-tools" | - keys[] as $k | - @sh "KEY=\($k) VALUE=\(.[$k])\u0000"' "$global_json_file") - - return - fi - - # Warning: falling back to manually parsing JSON, which is not recommended. - - # Following routine matches the output and escaping logic of jq(1)'s @sh formatter used above. - # It has been tested with several weird strings with escaped characters in entries (key and value) - # and results were compared with the output of jq(1) in binary representation using xxd(1); - # just before the assignment to 'native_assets' array (above and below). - - # try to capture the section under "native-tools". - if [[ ! "$(cat "$global_json_file")" =~ \"native-tools\"[[:space:]\:\{]*([^\}]+) ]]; then - return - fi - - section="${BASH_REMATCH[1]}" - - parseStarted=0 - possibleEnd=0 - escaping=0 - escaped=0 - isKey=1 - - for (( i=0; i<${#section}; i++ )); do - char="${section:$i:1}" - if ! ((parseStarted)) && [[ "$char" =~ [[:space:],:] ]]; then continue; fi - - if ! ((escaping)) && [[ "$char" == "\\" ]]; then - escaping=1 - elif ((escaping)) && ! ((escaped)); then - escaped=1 - fi - - if ! ((parseStarted)) && [[ "$char" == "\"" ]]; then - parseStarted=1 - possibleEnd=0 - elif [[ "$char" == "'" ]]; then - token="$token'\\\''" - possibleEnd=0 - elif ((escaping)) || [[ "$char" != "\"" ]]; then - token="$token$char" - possibleEnd=1 - fi - - if ((possibleEnd)) && ! ((escaping)) && [[ "$char" == "\"" ]]; then - # Use printf to unescape token to match jq(1)'s @sh formatting rules. - # do not use 'token="$(printf "$token")"' syntax, as $() eats the trailing linefeed. - printf -v token "'$token'" - - if ((isKey)); then - KEY="$token" - isKey=0 - else - line="KEY=$KEY VALUE=$token" - native_assets+=("$line") - isKey=1 - fi - - # reset for next token - parseStarted=0 - token= - elif ((escaping)) && ((escaped)); then - escaping=0 - escaped=0 - fi - done -} - -native_base_dir=$install_directory -if [[ -z $install_directory ]]; then - native_base_dir=$(GetNativeInstallDirectory) -fi - -install_bin="${native_base_dir}/bin" -installed_any=false - -ReadGlobalJsonNativeTools - -if [[ ${#native_assets[@]} -eq 0 ]]; then - echo "No native tools defined in global.json" - exit 0; -else - native_installer_dir="$scriptroot/native" - for index in "${!native_assets[@]}"; do - eval "${native_assets["$index"]}" - - installer_path="$native_installer_dir/install-$KEY.sh" - installer_command="$installer_path" - installer_command+=" --baseuri $base_uri" - installer_command+=" --installpath $install_bin" - installer_command+=" --version $VALUE" - echo $installer_command - - if [[ $force = true ]]; then - installer_command+=" --force" - fi - - if [[ $clean = true ]]; then - installer_command+=" --clean" - fi - - if [[ -a $installer_path ]]; then - $installer_command - if [[ $? != 0 ]]; then - if [[ $donotabortonfailure = true ]]; then - if [[ $donotdisplaywarnings != true ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed" - fi - else - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed" - exit 1 - fi - else - $installed_any = true - fi - else - if [[ $donotabortonfailure == true ]]; then - if [[ $donotdisplaywarnings != true ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed: no install script" - fi - else - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed: no install script" - exit 1 - fi - fi - done -fi - -if [[ $clean = true ]]; then - exit 0 -fi - -if [[ -d $install_bin ]]; then - echo "Native tools are available from $install_bin" - echo "##vso[task.prependpath]$install_bin" -else - if [[ $installed_any = true ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Native tools install directory does not exist, installation failed" - exit 1 - fi -fi - -exit 0 diff --git a/src/arcade/eng/common/internal-feed-operations.ps1 b/src/arcade/eng/common/internal-feed-operations.ps1 deleted file mode 100644 index 92b77347d99..00000000000 --- a/src/arcade/eng/common/internal-feed-operations.ps1 +++ /dev/null @@ -1,132 +0,0 @@ -param( - [Parameter(Mandatory=$true)][string] $Operation, - [string] $AuthToken, - [string] $CommitSha, - [string] $RepoName, - [switch] $IsFeedPrivate -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2.0 -. $PSScriptRoot\tools.ps1 - -# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed -# in build agents by CredProvider to authenticate the restore requests to internal feeds as specified in -# https://github.com/microsoft/artifacts-credprovider/blob/0f53327cd12fd893d8627d7b08a2171bf5852a41/README.md#environment-variables. This should ONLY be called from identified -# internal builds -function SetupCredProvider { - param( - [string] $AuthToken - ) - - # Install the Cred Provider NuGet plugin - Write-Host 'Setting up Cred Provider NuGet plugin in the agent...' - Write-Host "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..." - - $url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1' - - Write-Host "Writing the contents of 'installcredprovider.ps1' locally..." - Invoke-WebRequest $url -OutFile installcredprovider.ps1 - - Write-Host 'Installing plugin...' - .\installcredprovider.ps1 -Force - - Write-Host "Deleting local copy of 'installcredprovider.ps1'..." - Remove-Item .\installcredprovider.ps1 - - if (-Not("$env:USERPROFILE\.nuget\plugins\netcore")) { - Write-PipelineTelemetryError -Category 'Arcade' -Message 'CredProvider plugin was not installed correctly!' - ExitWithExitCode 1 - } - else { - Write-Host 'CredProvider plugin was installed correctly!' - } - - # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable - # feeds successfully - - $nugetConfigPath = Join-Path $RepoRoot "NuGet.config" - - if (-Not (Test-Path -Path $nugetConfigPath)) { - Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!' - ExitWithExitCode 1 - } - - $endpoints = New-Object System.Collections.ArrayList - $nugetConfigPackageSources = Select-Xml -Path $nugetConfigPath -XPath "//packageSources/add[contains(@key, 'darc-int-')]/@value" | foreach{$_.Node.Value} - - if (($nugetConfigPackageSources | Measure-Object).Count -gt 0 ) { - foreach ($stableRestoreResource in $nugetConfigPackageSources) { - $trimmedResource = ([string]$stableRestoreResource).Trim() - [void]$endpoints.Add(@{endpoint="$trimmedResource"; password="$AuthToken"}) - } - } - - if (($endpoints | Measure-Object).Count -gt 0) { - $endpointCredentials = @{endpointCredentials=$endpoints} | ConvertTo-Json -Compress - - # Create the environment variables the AzDo way - Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $endpointCredentials -Properties @{ - 'variable' = 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' - 'issecret' = 'false' - } - - # We don't want sessions cached since we will be updating the endpoints quite frequently - Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data 'False' -Properties @{ - 'variable' = 'NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED' - 'issecret' = 'false' - } - } - else - { - Write-Host 'No internal endpoints found in NuGet.config' - } -} - -#Workaround for https://github.com/microsoft/msbuild/issues/4430 -function InstallDotNetSdkAndRestoreArcade { - $dotnetTempDir = Join-Path $RepoRoot "dotnet" - $dotnetSdkVersion="2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*) - $dotnet = "$dotnetTempDir\dotnet.exe" - $restoreProjPath = "$PSScriptRoot\restore.proj" - - Write-Host "Installing dotnet SDK version $dotnetSdkVersion to restore Arcade SDK..." - InstallDotNetSdk "$dotnetTempDir" "$dotnetSdkVersion" - - '' | Out-File "$restoreProjPath" - - & $dotnet restore $restoreProjPath - - Write-Host 'Arcade SDK restored!' - - if (Test-Path -Path $restoreProjPath) { - Remove-Item $restoreProjPath - } - - if (Test-Path -Path $dotnetTempDir) { - Remove-Item $dotnetTempDir -Recurse - } -} - -try { - Push-Location $PSScriptRoot - - if ($Operation -like 'setup') { - SetupCredProvider $AuthToken - } - elseif ($Operation -like 'install-restore') { - InstallDotNetSdkAndRestoreArcade - } - else { - Write-PipelineTelemetryError -Category 'Arcade' -Message "Unknown operation '$Operation'!" - ExitWithExitCode 1 - } -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'Arcade' -Message $_ - ExitWithExitCode 1 -} -finally { - Pop-Location -} diff --git a/src/arcade/eng/common/internal-feed-operations.sh b/src/arcade/eng/common/internal-feed-operations.sh deleted file mode 100644 index 9378223ba09..00000000000 --- a/src/arcade/eng/common/internal-feed-operations.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed -# in build agents by CredProvider to authenticate the restore requests to internal feeds as specified in -# https://github.com/microsoft/artifacts-credprovider/blob/0f53327cd12fd893d8627d7b08a2171bf5852a41/README.md#environment-variables. -# This should ONLY be called from identified internal builds -function SetupCredProvider { - local authToken=$1 - - # Install the Cred Provider NuGet plugin - echo "Setting up Cred Provider NuGet plugin in the agent..."... - echo "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..." - - local url="https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh" - - echo "Writing the contents of 'installcredprovider.ps1' locally..." - local installcredproviderPath="installcredprovider.sh" - if command -v curl > /dev/null; then - curl $url > "$installcredproviderPath" - else - wget -q -O "$installcredproviderPath" "$url" - fi - - echo "Installing plugin..." - . "$installcredproviderPath" - - echo "Deleting local copy of 'installcredprovider.sh'..." - rm installcredprovider.sh - - if [ ! -d "$HOME/.nuget/plugins" ]; then - Write-PipelineTelemetryError -category 'Build' 'CredProvider plugin was not installed correctly!' - ExitWithExitCode 1 - else - echo "CredProvider plugin was installed correctly!" - fi - - # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable - # feeds successfully - - local nugetConfigPath="{$repo_root}NuGet.config" - - if [ ! "$nugetConfigPath" ]; then - Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!" - ExitWithExitCode 1 - fi - - local endpoints='[' - local nugetConfigPackageValues=`cat "$nugetConfigPath" | grep "key=\"darc-int-"` - local pattern="value=\"(.*)\"" - - for value in $nugetConfigPackageValues - do - if [[ $value =~ $pattern ]]; then - local endpoint="${BASH_REMATCH[1]}" - endpoints+="{\"endpoint\": \"$endpoint\", \"password\": \"$authToken\"}," - fi - done - - endpoints=${endpoints%?} - endpoints+=']' - - if [ ${#endpoints} -gt 2 ]; then - local endpointCredentials="{\"endpointCredentials\": "$endpoints"}" - - echo "##vso[task.setvariable variable=VSS_NUGET_EXTERNAL_FEED_ENDPOINTS]$endpointCredentials" - echo "##vso[task.setvariable variable=NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED]False" - else - echo "No internal endpoints found in NuGet.config" - fi -} - -# Workaround for https://github.com/microsoft/msbuild/issues/4430 -function InstallDotNetSdkAndRestoreArcade { - local dotnetTempDir="$repo_root/dotnet" - local dotnetSdkVersion="2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*) - local restoreProjPath="$repo_root/eng/common/restore.proj" - - echo "Installing dotnet SDK version $dotnetSdkVersion to restore Arcade SDK..." - echo "" > "$restoreProjPath" - - InstallDotNetSdk "$dotnetTempDir" "$dotnetSdkVersion" - - local res=`$dotnetTempDir/dotnet restore $restoreProjPath` - echo "Arcade SDK restored!" - - # Cleanup - if [ "$restoreProjPath" ]; then - rm "$restoreProjPath" - fi - - if [ "$dotnetTempDir" ]; then - rm -r $dotnetTempDir - fi -} - -source="${BASH_SOURCE[0]}" -operation='' -authToken='' -repoName='' - -while [[ $# > 0 ]]; do - opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" - case "$opt" in - --operation) - operation=$2 - shift - ;; - --authtoken) - authToken=$2 - shift - ;; - *) - echo "Invalid argument: $1" - usage - exit 1 - ;; - esac - - shift -done - -while [[ -h "$source" ]]; do - scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - source="$(readlink "$source")" - # if $source was a relative symlink, we need to resolve it relative to the path where the - # symlink file was located - [[ $source != /* ]] && source="$scriptroot/$source" -done -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -. "$scriptroot/tools.sh" - -if [ "$operation" = "setup" ]; then - SetupCredProvider $authToken -elif [ "$operation" = "install-restore" ]; then - InstallDotNetSdkAndRestoreArcade -else - echo "Unknown operation '$operation'!" -fi diff --git a/src/arcade/eng/common/internal/Directory.Build.props b/src/arcade/eng/common/internal/Directory.Build.props deleted file mode 100644 index f1d041c33da..00000000000 --- a/src/arcade/eng/common/internal/Directory.Build.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - - false - false - - - - - diff --git a/src/arcade/eng/common/internal/NuGet.config b/src/arcade/eng/common/internal/NuGet.config deleted file mode 100644 index 19d3d311b16..00000000000 --- a/src/arcade/eng/common/internal/NuGet.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/arcade/eng/common/internal/Tools.csproj b/src/arcade/eng/common/internal/Tools.csproj deleted file mode 100644 index feaa6d20812..00000000000 --- a/src/arcade/eng/common/internal/Tools.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - - net472 - false - false - - - - - - - - - - - - - - - diff --git a/src/arcade/eng/common/loc/P22DotNetHtmlLocalization.lss b/src/arcade/eng/common/loc/P22DotNetHtmlLocalization.lss deleted file mode 100644 index 5d892d61939..00000000000 --- a/src/arcade/eng/common/loc/P22DotNetHtmlLocalization.lss +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/arcade/eng/common/msbuild.ps1 b/src/arcade/eng/common/msbuild.ps1 deleted file mode 100644 index f041e5ddd95..00000000000 --- a/src/arcade/eng/common/msbuild.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -[CmdletBinding(PositionalBinding=$false)] -Param( - [string] $verbosity = 'minimal', - [bool] $warnAsError = $true, - [bool] $nodeReuse = $true, - [switch] $ci, - [switch] $prepareMachine, - [switch] $excludePrereleaseVS, - [string] $msbuildEngine = $null, - [Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs -) - -. $PSScriptRoot\tools.ps1 - -try { - if ($ci) { - $nodeReuse = $false - } - - MSBuild @extraArgs -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'Build' -Message $_ - ExitWithExitCode 1 -} - -ExitWithExitCode 0 \ No newline at end of file diff --git a/src/arcade/eng/common/msbuild.sh b/src/arcade/eng/common/msbuild.sh deleted file mode 100644 index 20d3dad5435..00000000000 --- a/src/arcade/eng/common/msbuild.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash - -source="${BASH_SOURCE[0]}" - -# resolve $source until the file is no longer a symlink -while [[ -h "$source" ]]; do - scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - source="$(readlink "$source")" - # if $source was a relative symlink, we need to resolve it relative to the path where the - # symlink file was located - [[ $source != /* ]] && source="$scriptroot/$source" -done -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -verbosity='minimal' -warn_as_error=true -node_reuse=true -prepare_machine=false -extra_args='' - -while (($# > 0)); do - lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" - case $lowerI in - --verbosity) - verbosity=$2 - shift 2 - ;; - --warnaserror) - warn_as_error=$2 - shift 2 - ;; - --nodereuse) - node_reuse=$2 - shift 2 - ;; - --ci) - ci=true - shift 1 - ;; - --preparemachine) - prepare_machine=true - shift 1 - ;; - *) - extra_args="$extra_args $1" - shift 1 - ;; - esac -done - -. "$scriptroot/tools.sh" - -if [[ "$ci" == true ]]; then - node_reuse=false -fi - -MSBuild $extra_args -ExitWithExitCode 0 diff --git a/src/arcade/eng/common/native/CommonLibrary.psm1 b/src/arcade/eng/common/native/CommonLibrary.psm1 deleted file mode 100644 index f71f6af6cdb..00000000000 --- a/src/arcade/eng/common/native/CommonLibrary.psm1 +++ /dev/null @@ -1,401 +0,0 @@ -<# -.SYNOPSIS -Helper module to install an archive to a directory - -.DESCRIPTION -Helper module to download and extract an archive to a specified directory - -.PARAMETER Uri -Uri of artifact to download - -.PARAMETER InstallDirectory -Directory to extract artifact contents to - -.PARAMETER Force -Force download / extraction if file or contents already exist. Default = False - -.PARAMETER DownloadRetries -Total number of retry attempts. Default = 5 - -.PARAMETER RetryWaitTimeInSeconds -Wait time between retry attempts in seconds. Default = 30 - -.NOTES -Returns False if download or extraction fail, True otherwise -#> -function DownloadAndExtract { - [CmdletBinding(PositionalBinding=$false)] - Param ( - [Parameter(Mandatory=$True)] - [string] $Uri, - [Parameter(Mandatory=$True)] - [string] $InstallDirectory, - [switch] $Force = $False, - [int] $DownloadRetries = 5, - [int] $RetryWaitTimeInSeconds = 30 - ) - # Define verbose switch if undefined - $Verbose = $VerbosePreference -Eq "Continue" - - $TempToolPath = CommonLibrary\Get-TempPathFilename -Path $Uri - - # Download native tool - $DownloadStatus = CommonLibrary\Get-File -Uri $Uri ` - -Path $TempToolPath ` - -DownloadRetries $DownloadRetries ` - -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds ` - -Force:$Force ` - -Verbose:$Verbose - - if ($DownloadStatus -Eq $False) { - Write-Error "Download failed from $Uri" - return $False - } - - # Extract native tool - $UnzipStatus = CommonLibrary\Expand-Zip -ZipPath $TempToolPath ` - -OutputDirectory $InstallDirectory ` - -Force:$Force ` - -Verbose:$Verbose - - if ($UnzipStatus -Eq $False) { - # Retry Download one more time with Force=true - $DownloadRetryStatus = CommonLibrary\Get-File -Uri $Uri ` - -Path $TempToolPath ` - -DownloadRetries 1 ` - -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds ` - -Force:$True ` - -Verbose:$Verbose - - if ($DownloadRetryStatus -Eq $False) { - Write-Error "Last attempt of download failed as well" - return $False - } - - # Retry unzip again one more time with Force=true - $UnzipRetryStatus = CommonLibrary\Expand-Zip -ZipPath $TempToolPath ` - -OutputDirectory $InstallDirectory ` - -Force:$True ` - -Verbose:$Verbose - if ($UnzipRetryStatus -Eq $False) - { - Write-Error "Last attempt of unzip failed as well" - # Clean up partial zips and extracts - if (Test-Path $TempToolPath) { - Remove-Item $TempToolPath -Force - } - if (Test-Path $InstallDirectory) { - Remove-Item $InstallDirectory -Force -Recurse - } - return $False - } - } - - return $True -} - -<# -.SYNOPSIS -Download a file, retry on failure - -.DESCRIPTION -Download specified file and retry if attempt fails - -.PARAMETER Uri -Uri of file to download. If Uri is a local path, the file will be copied instead of downloaded - -.PARAMETER Path -Path to download or copy uri file to - -.PARAMETER Force -Overwrite existing file if present. Default = False - -.PARAMETER DownloadRetries -Total number of retry attempts. Default = 5 - -.PARAMETER RetryWaitTimeInSeconds -Wait time between retry attempts in seconds Default = 30 - -#> -function Get-File { - [CmdletBinding(PositionalBinding=$false)] - Param ( - [Parameter(Mandatory=$True)] - [string] $Uri, - [Parameter(Mandatory=$True)] - [string] $Path, - [int] $DownloadRetries = 5, - [int] $RetryWaitTimeInSeconds = 30, - [switch] $Force = $False - ) - $Attempt = 0 - - if ($Force) { - if (Test-Path $Path) { - Remove-Item $Path -Force - } - } - if (Test-Path $Path) { - Write-Host "File '$Path' already exists, skipping download" - return $True - } - - $DownloadDirectory = Split-Path -ErrorAction Ignore -Path "$Path" -Parent - if (-Not (Test-Path $DownloadDirectory)) { - New-Item -path $DownloadDirectory -force -itemType "Directory" | Out-Null - } - - $TempPath = "$Path.tmp" - if (Test-Path -IsValid -Path $Uri) { - Write-Verbose "'$Uri' is a file path, copying temporarily to '$TempPath'" - Copy-Item -Path $Uri -Destination $TempPath - Write-Verbose "Moving temporary file to '$Path'" - Move-Item -Path $TempPath -Destination $Path - return $? - } - else { - Write-Verbose "Downloading $Uri" - # Don't display the console progress UI - it's a huge perf hit - $ProgressPreference = 'SilentlyContinue' - while($Attempt -Lt $DownloadRetries) - { - try { - Invoke-WebRequest -UseBasicParsing -Uri $Uri -OutFile $TempPath - Write-Verbose "Downloaded to temporary location '$TempPath'" - Move-Item -Path $TempPath -Destination $Path - Write-Verbose "Moved temporary file to '$Path'" - return $True - } - catch { - $Attempt++ - if ($Attempt -Lt $DownloadRetries) { - $AttemptsLeft = $DownloadRetries - $Attempt - Write-Warning "Download failed, $AttemptsLeft attempts remaining, will retry in $RetryWaitTimeInSeconds seconds" - Start-Sleep -Seconds $RetryWaitTimeInSeconds - } - else { - Write-Error $_ - Write-Error $_.Exception - } - } - } - } - - return $False -} - -<# -.SYNOPSIS -Generate a shim for a native tool - -.DESCRIPTION -Creates a wrapper script (shim) that passes arguments forward to native tool assembly - -.PARAMETER ShimName -The name of the shim - -.PARAMETER ShimDirectory -The directory where shims are stored - -.PARAMETER ToolFilePath -Path to file that shim forwards to - -.PARAMETER Force -Replace shim if already present. Default = False - -.NOTES -Returns $True if generating shim succeeds, $False otherwise -#> -function New-ScriptShim { - [CmdletBinding(PositionalBinding=$false)] - Param ( - [Parameter(Mandatory=$True)] - [string] $ShimName, - [Parameter(Mandatory=$True)] - [string] $ShimDirectory, - [Parameter(Mandatory=$True)] - [string] $ToolFilePath, - [Parameter(Mandatory=$True)] - [string] $BaseUri, - [switch] $Force - ) - try { - Write-Verbose "Generating '$ShimName' shim" - - if (-Not (Test-Path $ToolFilePath)){ - Write-Error "Specified tool file path '$ToolFilePath' does not exist" - return $False - } - - # WinShimmer is a small .NET Framework program that creates .exe shims to bootstrapped programs - # Many of the checks for installed programs expect a .exe extension for Windows tools, rather - # than a .bat or .cmd file. - # Source: https://github.com/dotnet/arcade/tree/master/src/WinShimmer - if (-Not (Test-Path "$ShimDirectory\WinShimmer\winshimmer.exe")) { - $InstallStatus = DownloadAndExtract -Uri "$BaseUri/windows/winshimmer/WinShimmer.zip" ` - -InstallDirectory $ShimDirectory\WinShimmer ` - -Force:$Force ` - -DownloadRetries 2 ` - -RetryWaitTimeInSeconds 5 ` - -Verbose:$Verbose - } - - if ((Test-Path (Join-Path $ShimDirectory "$ShimName.exe"))) { - Write-Host "$ShimName.exe already exists; replacing..." - Remove-Item (Join-Path $ShimDirectory "$ShimName.exe") - } - - & "$ShimDirectory\WinShimmer\winshimmer.exe" $ShimName $ToolFilePath $ShimDirectory - return $True - } - catch { - Write-Host $_ - Write-Host $_.Exception - return $False - } -} - -<# -.SYNOPSIS -Returns the machine architecture of the host machine - -.NOTES -Returns 'x64' on 64 bit machines - Returns 'x86' on 32 bit machines -#> -function Get-MachineArchitecture { - $ProcessorArchitecture = $Env:PROCESSOR_ARCHITECTURE - $ProcessorArchitectureW6432 = $Env:PROCESSOR_ARCHITEW6432 - if($ProcessorArchitecture -Eq "X86") - { - if(($ProcessorArchitectureW6432 -Eq "") -Or - ($ProcessorArchitectureW6432 -Eq "X86")) { - return "x86" - } - $ProcessorArchitecture = $ProcessorArchitectureW6432 - } - if (($ProcessorArchitecture -Eq "AMD64") -Or - ($ProcessorArchitecture -Eq "IA64") -Or - ($ProcessorArchitecture -Eq "ARM64") -Or - ($ProcessorArchitecture -Eq "LOONGARCH64") -Or - ($ProcessorArchitecture -Eq "RISCV64")) { - return "x64" - } - return "x86" -} - -<# -.SYNOPSIS -Get the name of a temporary folder under the native install directory -#> -function Get-TempDirectory { - return Join-Path (Get-NativeInstallDirectory) "temp/" -} - -function Get-TempPathFilename { - [CmdletBinding(PositionalBinding=$false)] - Param ( - [Parameter(Mandatory=$True)] - [string] $Path - ) - $TempDir = CommonLibrary\Get-TempDirectory - $TempFilename = Split-Path $Path -leaf - $TempPath = Join-Path $TempDir $TempFilename - return $TempPath -} - -<# -.SYNOPSIS -Returns the base directory to use for native tool installation - -.NOTES -Returns the value of the NETCOREENG_INSTALL_DIRECTORY if that environment variable -is set, or otherwise returns an install directory under the %USERPROFILE% -#> -function Get-NativeInstallDirectory { - $InstallDir = $Env:NETCOREENG_INSTALL_DIRECTORY - if (!$InstallDir) { - $InstallDir = Join-Path $Env:USERPROFILE ".netcoreeng/native/" - } - return $InstallDir -} - -<# -.SYNOPSIS -Unzip an archive - -.DESCRIPTION -Powershell module to unzip an archive to a specified directory - -.PARAMETER ZipPath (Required) -Path to archive to unzip - -.PARAMETER OutputDirectory (Required) -Output directory for archive contents - -.PARAMETER Force -Overwrite output directory contents if they already exist - -.NOTES -- Returns True and does not perform an extraction if output directory already exists but Overwrite is not True. -- Returns True if unzip operation is successful -- Returns False if Overwrite is True and it is unable to remove contents of OutputDirectory -- Returns False if unable to extract zip archive -#> -function Expand-Zip { - [CmdletBinding(PositionalBinding=$false)] - Param ( - [Parameter(Mandatory=$True)] - [string] $ZipPath, - [Parameter(Mandatory=$True)] - [string] $OutputDirectory, - [switch] $Force - ) - - Write-Verbose "Extracting '$ZipPath' to '$OutputDirectory'" - try { - if ((Test-Path $OutputDirectory) -And (-Not $Force)) { - Write-Host "Directory '$OutputDirectory' already exists, skipping extract" - return $True - } - if (Test-Path $OutputDirectory) { - Write-Verbose "'Force' is 'True', but '$OutputDirectory' exists, removing directory" - Remove-Item $OutputDirectory -Force -Recurse - if ($? -Eq $False) { - Write-Error "Unable to remove '$OutputDirectory'" - return $False - } - } - - $TempOutputDirectory = Join-Path "$(Split-Path -Parent $OutputDirectory)" "$(Split-Path -Leaf $OutputDirectory).tmp" - if (Test-Path $TempOutputDirectory) { - Remove-Item $TempOutputDirectory -Force -Recurse - } - New-Item -Path $TempOutputDirectory -Force -ItemType "Directory" | Out-Null - - Add-Type -assembly "system.io.compression.filesystem" - [io.compression.zipfile]::ExtractToDirectory("$ZipPath", "$TempOutputDirectory") - if ($? -Eq $False) { - Write-Error "Unable to extract '$ZipPath'" - return $False - } - - Move-Item -Path $TempOutputDirectory -Destination $OutputDirectory - } - catch { - Write-Host $_ - Write-Host $_.Exception - - return $False - } - return $True -} - -export-modulemember -function DownloadAndExtract -export-modulemember -function Expand-Zip -export-modulemember -function Get-File -export-modulemember -function Get-MachineArchitecture -export-modulemember -function Get-NativeInstallDirectory -export-modulemember -function Get-TempDirectory -export-modulemember -function Get-TempPathFilename -export-modulemember -function New-ScriptShim diff --git a/src/arcade/eng/common/native/common-library.sh b/src/arcade/eng/common/native/common-library.sh deleted file mode 100644 index 080c2c283ae..00000000000 --- a/src/arcade/eng/common/native/common-library.sh +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env bash - -function GetNativeInstallDirectory { - local install_dir - - if [[ -z $NETCOREENG_INSTALL_DIRECTORY ]]; then - install_dir=$HOME/.netcoreeng/native/ - else - install_dir=$NETCOREENG_INSTALL_DIRECTORY - fi - - echo $install_dir - return 0 -} - -function GetTempDirectory { - - echo $(GetNativeInstallDirectory)temp/ - return 0 -} - -function ExpandZip { - local zip_path=$1 - local output_directory=$2 - local force=${3:-false} - - echo "Extracting $zip_path to $output_directory" - if [[ -d $output_directory ]] && [[ $force = false ]]; then - echo "Directory '$output_directory' already exists, skipping extract" - return 0 - fi - - if [[ -d $output_directory ]]; then - echo "'Force flag enabled, but '$output_directory' exists. Removing directory" - rm -rf $output_directory - if [[ $? != 0 ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to remove '$output_directory'" - return 1 - fi - fi - - echo "Creating directory: '$output_directory'" - mkdir -p $output_directory - - echo "Extracting archive" - tar -xf $zip_path -C $output_directory - if [[ $? != 0 ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to extract '$zip_path'" - return 1 - fi - - return 0 -} - -function GetCurrentOS { - local unameOut="$(uname -s)" - case $unameOut in - Linux*) echo "Linux";; - Darwin*) echo "MacOS";; - esac - return 0 -} - -function GetFile { - local uri=$1 - local path=$2 - local force=${3:-false} - local download_retries=${4:-5} - local retry_wait_time_seconds=${5:-30} - - if [[ -f $path ]]; then - if [[ $force = false ]]; then - echo "File '$path' already exists. Skipping download" - return 0 - else - rm -rf $path - fi - fi - - if [[ -f $uri ]]; then - echo "'$uri' is a file path, copying file to '$path'" - cp $uri $path - return $? - fi - - echo "Downloading $uri" - # Use curl if available, otherwise use wget - if command -v curl > /dev/null; then - curl "$uri" -sSL --retry $download_retries --retry-delay $retry_wait_time_seconds --create-dirs -o "$path" --fail - else - wget -q -O "$path" "$uri" --tries="$download_retries" - fi - - return $? -} - -function GetTempPathFileName { - local path=$1 - - local temp_dir=$(GetTempDirectory) - local temp_file_name=$(basename $path) - echo $temp_dir$temp_file_name - return 0 -} - -function DownloadAndExtract { - local uri=$1 - local installDir=$2 - local force=${3:-false} - local download_retries=${4:-5} - local retry_wait_time_seconds=${5:-30} - - local temp_tool_path=$(GetTempPathFileName $uri) - - echo "downloading to: $temp_tool_path" - - # Download file - GetFile "$uri" "$temp_tool_path" $force $download_retries $retry_wait_time_seconds - if [[ $? != 0 ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to download '$uri' to '$temp_tool_path'." - return 1 - fi - - # Extract File - echo "extracting from $temp_tool_path to $installDir" - ExpandZip "$temp_tool_path" "$installDir" $force $download_retries $retry_wait_time_seconds - if [[ $? != 0 ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to extract '$temp_tool_path' to '$installDir'." - return 1 - fi - - return 0 -} - -function NewScriptShim { - local shimpath=$1 - local tool_file_path=$2 - local force=${3:-false} - - echo "Generating '$shimpath' shim" - if [[ -f $shimpath ]]; then - if [[ $force = false ]]; then - echo "File '$shimpath' already exists." >&2 - return 1 - else - rm -rf $shimpath - fi - fi - - if [[ ! -f $tool_file_path ]]; then - # try to see if the path is lower cased - tool_file_path="$(echo $tool_file_path | tr "[:upper:]" "[:lower:]")" - if [[ ! -f $tool_file_path ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist" - return 1 - fi - fi - - local shim_contents=$'#!/usr/bin/env bash\n' - shim_contents+="SHIMARGS="$'$1\n' - shim_contents+="$tool_file_path"$' $SHIMARGS\n' - - # Write shim file - echo "$shim_contents" > $shimpath - - chmod +x $shimpath - - echo "Finished generating shim '$shimpath'" - - return $? -} - diff --git a/src/arcade/eng/common/native/init-compiler.sh b/src/arcade/eng/common/native/init-compiler.sh deleted file mode 100644 index 9a0e1f2b456..00000000000 --- a/src/arcade/eng/common/native/init-compiler.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/sh -# -# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables -# -# NOTE: some scripts source this file and rely on stdout being empty, make sure -# to not output *anything* here, unless it is an error message that fails the -# build. - -if [ -z "$build_arch" ] || [ -z "$compiler" ]; then - echo "Usage..." - echo "build_arch= compiler= init-compiler.sh" - echo "Specify the target architecture." - echo "Specify the name of compiler (clang or gcc)." - exit 1 -fi - -case "$compiler" in - clang*|-clang*|--clang*) - # clangx.y or clang-x.y - version="$(echo "$compiler" | tr -d '[:alpha:]-=')" - majorVersion="${version%%.*}" - - # LLVM based on v18 released in early 2024, with two releases per year - maxVersion="$((18 + ((($(date +%Y) - 2024) * 12 + $(date +%-m) - 3) / 6)))" - compiler=clang - ;; - - gcc*|-gcc*|--gcc*) - # gccx.y or gcc-x.y - version="$(echo "$compiler" | tr -d '[:alpha:]-=')" - majorVersion="${version%%.*}" - - # GCC based on v14 released in early 2024, with one release per year - maxVersion="$((14 + ((($(date +%Y) - 2024) * 12 + $(date +%-m) - 3) / 12)))" - compiler=gcc - ;; -esac - -cxxCompiler="$compiler++" - -# clear the existing CC and CXX from environment -CC= -CXX= -LDFLAGS= - -if [ "$compiler" = "gcc" ]; then cxxCompiler="g++"; fi - -check_version_exists() { - desired_version=-1 - - # Set up the environment to be used for building with the desired compiler. - if command -v "$compiler-$1" > /dev/null; then - desired_version="-$1" - elif command -v "$compiler$1" > /dev/null; then - desired_version="$1" - fi - - echo "$desired_version" -} - -__baseOS="$(uname)" -set_compiler_version_from_CC() { - if [ "$__baseOS" = "Darwin" ]; then - # On Darwin, the versions from -version/-dumpversion refer to Xcode - # versions, not llvm versions, so we can't rely on them. - return - fi - - version="$("$CC" -dumpversion)" - if [ -z "$version" ]; then - echo "Error: $CC -dumpversion didn't provide a version" - exit 1 - fi - - # gcc and clang often display 3 part versions. However, gcc can show only 1 part in some environments. - IFS=. read -r majorVersion _ < /dev/null; then - echo "Error: No compatible version of $compiler was found within the range of $minVersion to $maxVersion. Please upgrade your toolchain or specify the compiler explicitly using CLR_CC and CLR_CXX environment variables." - exit 1 - fi - - CC="$(command -v "$compiler" 2> /dev/null)" - CXX="$(command -v "$cxxCompiler" 2> /dev/null)" - set_compiler_version_from_CC - fi - else - desired_version="$(check_version_exists "$majorVersion")" - if [ "$desired_version" = "-1" ]; then - echo "Error: Could not find specific version of $compiler: $majorVersion." - exit 1 - fi - fi - - if [ -z "$CC" ]; then - CC="$(command -v "$compiler$desired_version" 2> /dev/null)" - CXX="$(command -v "$cxxCompiler$desired_version" 2> /dev/null)" - if [ -z "$CXX" ]; then CXX="$(command -v "$cxxCompiler" 2> /dev/null)"; fi - set_compiler_version_from_CC - fi -else - if [ ! -f "$CLR_CC" ]; then - echo "Error: CLR_CC is set but path '$CLR_CC' does not exist" - exit 1 - fi - CC="$CLR_CC" - CXX="$CLR_CXX" - set_compiler_version_from_CC -fi - -if [ -z "$CC" ]; then - echo "Error: Unable to find $compiler." - exit 1 -fi - -if [ "$__baseOS" != "Darwin" ]; then - # On Darwin, we always want to use the Apple linker. - - # Only lld version >= 9 can be considered stable. lld supports s390x starting from 18.0. - if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && { [ "$build_arch" != "s390x" ] || [ "$majorVersion" -ge 18 ]; }; then - if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then - LDFLAGS="-fuse-ld=lld" - fi - fi -fi - -SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version" 2> /dev/null)" - -export CC CXX LDFLAGS SCAN_BUILD_COMMAND diff --git a/src/arcade/eng/common/native/init-distro-rid.sh b/src/arcade/eng/common/native/init-distro-rid.sh deleted file mode 100644 index 83ea7aab0e0..00000000000 --- a/src/arcade/eng/common/native/init-distro-rid.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/sh - -# getNonPortableDistroRid -# -# Input: -# targetOs: (str) -# targetArch: (str) -# rootfsDir: (str) -# -# Return: -# non-portable rid -getNonPortableDistroRid() -{ - targetOs="$1" - targetArch="$2" - rootfsDir="$3" - nonPortableRid="" - - if [ "$targetOs" = "linux" ]; then - # shellcheck disable=SC1091 - if [ -e "${rootfsDir}/etc/os-release" ]; then - . "${rootfsDir}/etc/os-release" - if echo "${VERSION_ID:-}" | grep -qE '^([[:digit:]]|\.)+$'; then - nonPortableRid="${ID}.${VERSION_ID}-${targetArch}" - else - # Rolling release distros either do not set VERSION_ID, set it as blank or - # set it to non-version looking string (such as TEMPLATE_VERSION_ID on ArchLinux); - # so omit it here to be consistent with everything else. - nonPortableRid="${ID}-${targetArch}" - fi - elif [ -e "${rootfsDir}/android_platform" ]; then - # shellcheck disable=SC1091 - . "${rootfsDir}/android_platform" - nonPortableRid="$RID" - fi - fi - - if [ "$targetOs" = "freebsd" ]; then - # $rootfsDir can be empty. freebsd-version is a shell script and should always work. - __freebsd_major_version=$("$rootfsDir"/bin/freebsd-version | cut -d'.' -f1) - nonPortableRid="freebsd.$__freebsd_major_version-${targetArch}" - elif command -v getprop >/dev/null && getprop ro.product.system.model | grep -qi android; then - __android_sdk_version=$(getprop ro.build.version.sdk) - nonPortableRid="android.$__android_sdk_version-${targetArch}" - elif [ "$targetOs" = "illumos" ]; then - __uname_version=$(uname -v) - nonPortableRid="illumos-${targetArch}" - elif [ "$targetOs" = "solaris" ]; then - __uname_version=$(uname -v) - __solaris_major_version=$(echo "$__uname_version" | cut -d'.' -f1) - nonPortableRid="solaris.$__solaris_major_version-${targetArch}" - elif [ "$targetOs" = "haiku" ]; then - __uname_release="$(uname -r)" - nonPortableRid=haiku.r"$__uname_release"-"$targetArch" - fi - - echo "$nonPortableRid" | tr '[:upper:]' '[:lower:]' -} - -# initDistroRidGlobal -# -# Input: -# os: (str) -# arch: (str) -# rootfsDir?: (nullable:string) -# -# Return: -# None -# -# Notes: -# It is important to note that the function does not return anything, but it -# exports the following variables on success: -# __DistroRid : Non-portable rid of the target platform. -# __PortableTargetOS : OS-part of the portable rid that corresponds to the target platform. -initDistroRidGlobal() -{ - targetOs="$1" - targetArch="$2" - rootfsDir="" - if [ $# -ge 3 ]; then - rootfsDir="$3" - fi - - if [ -n "${rootfsDir}" ]; then - # We may have a cross build. Check for the existence of the rootfsDir - if [ ! -e "${rootfsDir}" ]; then - echo "Error: rootfsDir has been passed, but the location is not valid." - exit 1 - fi - fi - - __DistroRid=$(getNonPortableDistroRid "${targetOs}" "${targetArch}" "${rootfsDir}") - - if [ -z "${__PortableTargetOS:-}" ]; then - __PortableTargetOS="$targetOs" - - STRINGS="$(command -v strings || true)" - if [ -z "$STRINGS" ]; then - STRINGS="$(command -v llvm-strings || true)" - fi - - # Check for musl-based distros (e.g. Alpine Linux, Void Linux). - if "${rootfsDir}/usr/bin/ldd" --version 2>&1 | grep -q musl || - ( [ -n "$STRINGS" ] && "$STRINGS" "${rootfsDir}/usr/bin/ldd" 2>&1 | grep -q musl ); then - __PortableTargetOS="linux-musl" - fi - fi - - export __DistroRid __PortableTargetOS -} diff --git a/src/arcade/eng/common/native/init-os-and-arch.sh b/src/arcade/eng/common/native/init-os-and-arch.sh deleted file mode 100644 index 38921d4338f..00000000000 --- a/src/arcade/eng/common/native/init-os-and-arch.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh - -# Use uname to determine what the OS is. -OSName=$(uname -s | tr '[:upper:]' '[:lower:]') - -if command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then - OSName="android" -fi - -case "$OSName" in -freebsd|linux|netbsd|openbsd|sunos|android|haiku) - os="$OSName" ;; -darwin) - os=osx ;; -*) - echo "Unsupported OS $OSName detected!" - exit 1 ;; -esac - -# On Solaris, `uname -m` is discouraged, see https://docs.oracle.com/cd/E36784_01/html/E36870/uname-1.html -# and `uname -p` returns processor type (e.g. i386 on amd64). -# The appropriate tool to determine CPU is isainfo(1) https://docs.oracle.com/cd/E36784_01/html/E36870/isainfo-1.html. -if [ "$os" = "sunos" ]; then - if uname -o 2>&1 | grep -q illumos; then - os="illumos" - else - os="solaris" - fi - CPUName=$(isainfo -n) -else - # For the rest of the operating systems, use uname(1) to determine what the CPU is. - CPUName=$(uname -m) -fi - -case "$CPUName" in - arm64|aarch64) - arch=arm64 - if [ "$(getconf LONG_BIT)" -lt 64 ]; then - # This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS) - arch=arm - fi - ;; - - loongarch64) - arch=loongarch64 - ;; - - riscv64) - arch=riscv64 - ;; - - amd64|x86_64) - arch=x64 - ;; - - armv7l|armv8l) - # shellcheck disable=SC1091 - if (NAME=""; . /etc/os-release; test "$NAME" = "Tizen"); then - arch=armel - else - arch=arm - fi - ;; - - armv6l) - arch=armv6 - ;; - - i[3-6]86) - echo "Unsupported CPU $CPUName detected, build might not succeed!" - arch=x86 - ;; - - s390x) - arch=s390x - ;; - - ppc64le) - arch=ppc64le - ;; - *) - echo "Unknown CPU $CPUName detected!" - exit 1 - ;; -esac diff --git a/src/arcade/eng/common/native/install-cmake-test.sh b/src/arcade/eng/common/native/install-cmake-test.sh deleted file mode 100644 index 8a5e7cf0db5..00000000000 --- a/src/arcade/eng/common/native/install-cmake-test.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env bash - -source="${BASH_SOURCE[0]}" -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -. $scriptroot/common-library.sh - -base_uri= -install_path= -version= -clean=false -force=false -download_retries=5 -retry_wait_time_seconds=30 - -while (($# > 0)); do - lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" - case $lowerI in - --baseuri) - base_uri=$2 - shift 2 - ;; - --installpath) - install_path=$2 - shift 2 - ;; - --version) - version=$2 - shift 2 - ;; - --clean) - clean=true - shift 1 - ;; - --force) - force=true - shift 1 - ;; - --downloadretries) - download_retries=$2 - shift 2 - ;; - --retrywaittimeseconds) - retry_wait_time_seconds=$2 - shift 2 - ;; - --help) - echo "Common settings:" - echo " --baseuri Base file directory or Url wrom which to acquire tool archives" - echo " --installpath Base directory to install native tool to" - echo " --clean Don't install the tool, just clean up the current install of the tool" - echo " --force Force install of tools even if they previously exist" - echo " --help Print help and exit" - echo "" - echo "Advanced settings:" - echo " --downloadretries Total number of retry attempts" - echo " --retrywaittimeseconds Wait time between retry attempts in seconds" - echo "" - exit 0 - ;; - esac -done - -tool_name="cmake-test" -tool_os=$(GetCurrentOS) -tool_folder="$(echo $tool_os | tr "[:upper:]" "[:lower:]")" -tool_arch="x86_64" -tool_name_moniker="$tool_name-$version-$tool_os-$tool_arch" -tool_install_directory="$install_path/$tool_name/$version" -tool_file_path="$tool_install_directory/$tool_name_moniker/bin/$tool_name" -shim_path="$install_path/$tool_name.sh" -uri="${base_uri}/$tool_folder/$tool_name/$tool_name_moniker.tar.gz" - -# Clean up tool and installers -if [[ $clean = true ]]; then - echo "Cleaning $tool_install_directory" - if [[ -d $tool_install_directory ]]; then - rm -rf $tool_install_directory - fi - - echo "Cleaning $shim_path" - if [[ -f $shim_path ]]; then - rm -rf $shim_path - fi - - tool_temp_path=$(GetTempPathFileName $uri) - echo "Cleaning $tool_temp_path" - if [[ -f $tool_temp_path ]]; then - rm -rf $tool_temp_path - fi - - exit 0 -fi - -# Install tool -if [[ -f $tool_file_path ]] && [[ $force = false ]]; then - echo "$tool_name ($version) already exists, skipping install" - exit 0 -fi - -DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds - -if [[ $? != 0 ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed' - exit 1 -fi - -# Generate Shim -# Always rewrite shims so that we are referencing the expected version -NewScriptShim $shim_path $tool_file_path true - -if [[ $? != 0 ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed' - exit 1 -fi - -exit 0 diff --git a/src/arcade/eng/common/native/install-cmake.sh b/src/arcade/eng/common/native/install-cmake.sh deleted file mode 100644 index de496beebc5..00000000000 --- a/src/arcade/eng/common/native/install-cmake.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env bash - -source="${BASH_SOURCE[0]}" -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -. $scriptroot/common-library.sh - -base_uri= -install_path= -version= -clean=false -force=false -download_retries=5 -retry_wait_time_seconds=30 - -while (($# > 0)); do - lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" - case $lowerI in - --baseuri) - base_uri=$2 - shift 2 - ;; - --installpath) - install_path=$2 - shift 2 - ;; - --version) - version=$2 - shift 2 - ;; - --clean) - clean=true - shift 1 - ;; - --force) - force=true - shift 1 - ;; - --downloadretries) - download_retries=$2 - shift 2 - ;; - --retrywaittimeseconds) - retry_wait_time_seconds=$2 - shift 2 - ;; - --help) - echo "Common settings:" - echo " --baseuri Base file directory or Url wrom which to acquire tool archives" - echo " --installpath Base directory to install native tool to" - echo " --clean Don't install the tool, just clean up the current install of the tool" - echo " --force Force install of tools even if they previously exist" - echo " --help Print help and exit" - echo "" - echo "Advanced settings:" - echo " --downloadretries Total number of retry attempts" - echo " --retrywaittimeseconds Wait time between retry attempts in seconds" - echo "" - exit 0 - ;; - esac -done - -tool_name="cmake" -tool_os=$(GetCurrentOS) -tool_folder="$(echo $tool_os | tr "[:upper:]" "[:lower:]")" -tool_arch="x86_64" -tool_name_moniker="$tool_name-$version-$tool_os-$tool_arch" -tool_install_directory="$install_path/$tool_name/$version" -tool_file_path="$tool_install_directory/$tool_name_moniker/bin/$tool_name" -shim_path="$install_path/$tool_name.sh" -uri="${base_uri}/$tool_folder/$tool_name/$tool_name_moniker.tar.gz" - -# Clean up tool and installers -if [[ $clean = true ]]; then - echo "Cleaning $tool_install_directory" - if [[ -d $tool_install_directory ]]; then - rm -rf $tool_install_directory - fi - - echo "Cleaning $shim_path" - if [[ -f $shim_path ]]; then - rm -rf $shim_path - fi - - tool_temp_path=$(GetTempPathFileName $uri) - echo "Cleaning $tool_temp_path" - if [[ -f $tool_temp_path ]]; then - rm -rf $tool_temp_path - fi - - exit 0 -fi - -# Install tool -if [[ -f $tool_file_path ]] && [[ $force = false ]]; then - echo "$tool_name ($version) already exists, skipping install" - exit 0 -fi - -DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds - -if [[ $? != 0 ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed' - exit 1 -fi - -# Generate Shim -# Always rewrite shims so that we are referencing the expected version -NewScriptShim $shim_path $tool_file_path true - -if [[ $? != 0 ]]; then - Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed' - exit 1 -fi - -exit 0 diff --git a/src/arcade/eng/common/native/install-tool.ps1 b/src/arcade/eng/common/native/install-tool.ps1 deleted file mode 100644 index 78f2d84a4e4..00000000000 --- a/src/arcade/eng/common/native/install-tool.ps1 +++ /dev/null @@ -1,132 +0,0 @@ -<# -.SYNOPSIS -Install native tool - -.DESCRIPTION -Install cmake native tool from Azure blob storage - -.PARAMETER InstallPath -Base directory to install native tool to - -.PARAMETER BaseUri -Base file directory or Url from which to acquire tool archives - -.PARAMETER CommonLibraryDirectory -Path to folder containing common library modules - -.PARAMETER Force -Force install of tools even if they previously exist - -.PARAMETER Clean -Don't install the tool, just clean up the current install of the tool - -.PARAMETER DownloadRetries -Total number of retry attempts - -.PARAMETER RetryWaitTimeInSeconds -Wait time between retry attempts in seconds - -.NOTES -Returns 0 if install succeeds, 1 otherwise -#> -[CmdletBinding(PositionalBinding=$false)] -Param ( - [Parameter(Mandatory=$True)] - [string] $ToolName, - [Parameter(Mandatory=$True)] - [string] $InstallPath, - [Parameter(Mandatory=$True)] - [string] $BaseUri, - [Parameter(Mandatory=$True)] - [string] $Version, - [string] $CommonLibraryDirectory = $PSScriptRoot, - [switch] $Force = $False, - [switch] $Clean = $False, - [int] $DownloadRetries = 5, - [int] $RetryWaitTimeInSeconds = 30 -) - -. $PSScriptRoot\..\pipeline-logging-functions.ps1 - -# Import common library modules -Import-Module -Name (Join-Path $CommonLibraryDirectory "CommonLibrary.psm1") - -try { - # Define verbose switch if undefined - $Verbose = $VerbosePreference -Eq "Continue" - - $Arch = CommonLibrary\Get-MachineArchitecture - $ToolOs = "win64" - if($Arch -Eq "x32") { - $ToolOs = "win32" - } - $ToolNameMoniker = "$ToolName-$Version-$ToolOs-$Arch" - $ToolInstallDirectory = Join-Path $InstallPath "$ToolName\$Version\" - $Uri = "$BaseUri/windows/$ToolName/$ToolNameMoniker.zip" - $ShimPath = Join-Path $InstallPath "$ToolName.exe" - - if ($Clean) { - Write-Host "Cleaning $ToolInstallDirectory" - if (Test-Path $ToolInstallDirectory) { - Remove-Item $ToolInstallDirectory -Force -Recurse - } - Write-Host "Cleaning $ShimPath" - if (Test-Path $ShimPath) { - Remove-Item $ShimPath -Force - } - $ToolTempPath = CommonLibrary\Get-TempPathFilename -Path $Uri - Write-Host "Cleaning $ToolTempPath" - if (Test-Path $ToolTempPath) { - Remove-Item $ToolTempPath -Force - } - exit 0 - } - - # Install tool - if ((Test-Path $ToolInstallDirectory) -And (-Not $Force)) { - Write-Verbose "$ToolName ($Version) already exists, skipping install" - } - else { - $InstallStatus = CommonLibrary\DownloadAndExtract -Uri $Uri ` - -InstallDirectory $ToolInstallDirectory ` - -Force:$Force ` - -DownloadRetries $DownloadRetries ` - -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds ` - -Verbose:$Verbose - - if ($InstallStatus -Eq $False) { - Write-PipelineTelemetryError "Installation failed" -Category "NativeToolsetBootstrapping" - exit 1 - } - } - - $ToolFilePath = Get-ChildItem $ToolInstallDirectory -Recurse -Filter "$ToolName.exe" | % { $_.FullName } - if (@($ToolFilePath).Length -Gt 1) { - Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))" - exit 1 - } elseif (@($ToolFilePath).Length -Lt 1) { - Write-Host "$ToolName was not found in $ToolInstallDirectory." - exit 1 - } - - # Generate shim - # Always rewrite shims so that we are referencing the expected version - $GenerateShimStatus = CommonLibrary\New-ScriptShim -ShimName $ToolName ` - -ShimDirectory $InstallPath ` - -ToolFilePath "$ToolFilePath" ` - -BaseUri $BaseUri ` - -Force:$Force ` - -Verbose:$Verbose - - if ($GenerateShimStatus -Eq $False) { - Write-PipelineTelemetryError "Generate shim failed" -Category "NativeToolsetBootstrapping" - return 1 - } - - exit 0 -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category "NativeToolsetBootstrapping" -Message $_ - exit 1 -} diff --git a/src/arcade/eng/common/pipeline-logging-functions.ps1 b/src/arcade/eng/common/pipeline-logging-functions.ps1 deleted file mode 100644 index 8e422c561e4..00000000000 --- a/src/arcade/eng/common/pipeline-logging-functions.ps1 +++ /dev/null @@ -1,260 +0,0 @@ -# Source for this file was taken from https://github.com/microsoft/azure-pipelines-task-lib/blob/11c9439d4af17e6475d9fe058e6b2e03914d17e6/powershell/VstsTaskSdk/LoggingCommandFunctions.ps1 and modified. - -# NOTE: You should not be calling these method directly as they are likely to change. Instead you should be calling the Write-Pipeline* functions defined in tools.ps1 - -$script:loggingCommandPrefix = '##vso[' -$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"? - New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' } - New-Object psobject -Property @{ Token = "`r" ; Replacement = '%0D' } - New-Object psobject -Property @{ Token = "`n" ; Replacement = '%0A' } - New-Object psobject -Property @{ Token = "]" ; Replacement = '%5D' } -) -# TODO: BUG: Escape % ??? -# TODO: Add test to verify don't need to escape "=". - -# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set -function Write-PipelineTelemetryError { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Category, - [Parameter(Mandatory = $true)] - [string]$Message, - [Parameter(Mandatory = $false)] - [string]$Type = 'error', - [string]$ErrCode, - [string]$SourcePath, - [string]$LineNumber, - [string]$ColumnNumber, - [switch]$AsOutput, - [switch]$Force) - - $PSBoundParameters.Remove('Category') | Out-Null - - if ($Force -Or ((Test-Path variable:ci) -And $ci)) { - $Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message" - } - $PSBoundParameters.Remove('Message') | Out-Null - $PSBoundParameters.Add('Message', $Message) - Write-PipelineTaskError @PSBoundParameters -} - -# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set -function Write-PipelineTaskError { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Message, - [Parameter(Mandatory = $false)] - [string]$Type = 'error', - [string]$ErrCode, - [string]$SourcePath, - [string]$LineNumber, - [string]$ColumnNumber, - [switch]$AsOutput, - [switch]$Force - ) - - if (!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) { - if ($Type -eq 'error') { - Write-Host $Message -ForegroundColor Red - return - } - elseif ($Type -eq 'warning') { - Write-Host $Message -ForegroundColor Yellow - return - } - } - - if (($Type -ne 'error') -and ($Type -ne 'warning')) { - Write-Host $Message - return - } - $PSBoundParameters.Remove('Force') | Out-Null - if (-not $PSBoundParameters.ContainsKey('Type')) { - $PSBoundParameters.Add('Type', 'error') - } - Write-LogIssue @PSBoundParameters -} - -function Write-PipelineSetVariable { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Name, - [string]$Value, - [switch]$Secret, - [switch]$AsOutput, - [bool]$IsMultiJobVariable = $true) - - if ((Test-Path variable:ci) -And $ci) { - Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{ - 'variable' = $Name - 'isSecret' = $Secret - 'isOutput' = $IsMultiJobVariable - } -AsOutput:$AsOutput - } -} - -function Write-PipelinePrependPath { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Path, - [switch]$AsOutput) - - if ((Test-Path variable:ci) -And $ci) { - Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput - } -} - -function Write-PipelineSetResult { - [CmdletBinding()] - param( - [ValidateSet("Succeeded", "SucceededWithIssues", "Failed", "Cancelled", "Skipped")] - [Parameter(Mandatory = $true)] - [string]$Result, - [string]$Message) - if ((Test-Path variable:ci) -And $ci) { - Write-LoggingCommand -Area 'task' -Event 'complete' -Data $Message -Properties @{ - 'result' = $Result - } - } -} - -<######################################## -# Private functions. -########################################> -function Format-LoggingCommandData { - [CmdletBinding()] - param([string]$Value, [switch]$Reverse) - - if (!$Value) { - return '' - } - - if (!$Reverse) { - foreach ($mapping in $script:loggingCommandEscapeMappings) { - $Value = $Value.Replace($mapping.Token, $mapping.Replacement) - } - } - else { - for ($i = $script:loggingCommandEscapeMappings.Length - 1 ; $i -ge 0 ; $i--) { - $mapping = $script:loggingCommandEscapeMappings[$i] - $Value = $Value.Replace($mapping.Replacement, $mapping.Token) - } - } - - return $Value -} - -function Format-LoggingCommand { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Area, - [Parameter(Mandatory = $true)] - [string]$Event, - [string]$Data, - [hashtable]$Properties) - - # Append the preamble. - [System.Text.StringBuilder]$sb = New-Object -TypeName System.Text.StringBuilder - $null = $sb.Append($script:loggingCommandPrefix).Append($Area).Append('.').Append($Event) - - # Append the properties. - if ($Properties) { - $first = $true - foreach ($key in $Properties.Keys) { - [string]$value = Format-LoggingCommandData $Properties[$key] - if ($value) { - if ($first) { - $null = $sb.Append(' ') - $first = $false - } - else { - $null = $sb.Append(';') - } - - $null = $sb.Append("$key=$value") - } - } - } - - # Append the tail and output the value. - $Data = Format-LoggingCommandData $Data - $sb.Append(']').Append($Data).ToString() -} - -function Write-LoggingCommand { - [CmdletBinding(DefaultParameterSetName = 'Parameters')] - param( - [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')] - [string]$Area, - [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')] - [string]$Event, - [Parameter(ParameterSetName = 'Parameters')] - [string]$Data, - [Parameter(ParameterSetName = 'Parameters')] - [hashtable]$Properties, - [Parameter(Mandatory = $true, ParameterSetName = 'Object')] - $Command, - [switch]$AsOutput) - - if ($PSCmdlet.ParameterSetName -eq 'Object') { - Write-LoggingCommand -Area $Command.Area -Event $Command.Event -Data $Command.Data -Properties $Command.Properties -AsOutput:$AsOutput - return - } - - $command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties - if ($AsOutput) { - $command - } - else { - Write-Host $command - } -} - -function Write-LogIssue { - [CmdletBinding()] - param( - [ValidateSet('warning', 'error')] - [Parameter(Mandatory = $true)] - [string]$Type, - [string]$Message, - [string]$ErrCode, - [string]$SourcePath, - [string]$LineNumber, - [string]$ColumnNumber, - [switch]$AsOutput) - - $command = Format-LoggingCommand -Area 'task' -Event 'logissue' -Data $Message -Properties @{ - 'type' = $Type - 'code' = $ErrCode - 'sourcepath' = $SourcePath - 'linenumber' = $LineNumber - 'columnnumber' = $ColumnNumber - } - if ($AsOutput) { - return $command - } - - if ($Type -eq 'error') { - $foregroundColor = $host.PrivateData.ErrorForegroundColor - $backgroundColor = $host.PrivateData.ErrorBackgroundColor - if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { - $foregroundColor = [System.ConsoleColor]::Red - $backgroundColor = [System.ConsoleColor]::Black - } - } - else { - $foregroundColor = $host.PrivateData.WarningForegroundColor - $backgroundColor = $host.PrivateData.WarningBackgroundColor - if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { - $foregroundColor = [System.ConsoleColor]::Yellow - $backgroundColor = [System.ConsoleColor]::Black - } - } - - Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor -} diff --git a/src/arcade/eng/common/pipeline-logging-functions.sh b/src/arcade/eng/common/pipeline-logging-functions.sh deleted file mode 100644 index 6a0b2255e91..00000000000 --- a/src/arcade/eng/common/pipeline-logging-functions.sh +++ /dev/null @@ -1,206 +0,0 @@ -#!/usr/bin/env bash - -function Write-PipelineTelemetryError { - local telemetry_category='' - local force=false - local function_args=() - local message='' - while [[ $# -gt 0 ]]; do - opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" - case "$opt" in - -category|-c) - telemetry_category=$2 - shift - ;; - -force|-f) - force=true - ;; - -*) - function_args+=("$1 $2") - shift - ;; - *) - message=$* - ;; - esac - shift - done - - if [[ $force != true ]] && [[ "$ci" != true ]]; then - echo "$message" >&2 - return - fi - - if [[ $force == true ]]; then - function_args+=("-force") - fi - message="(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message" - function_args+=("$message") - Write-PipelineTaskError ${function_args[@]} -} - -function Write-PipelineTaskError { - local message_type="error" - local sourcepath='' - local linenumber='' - local columnnumber='' - local error_code='' - local force=false - - while [[ $# -gt 0 ]]; do - opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" - case "$opt" in - -type|-t) - message_type=$2 - shift - ;; - -sourcepath|-s) - sourcepath=$2 - shift - ;; - -linenumber|-ln) - linenumber=$2 - shift - ;; - -columnnumber|-cn) - columnnumber=$2 - shift - ;; - -errcode|-e) - error_code=$2 - shift - ;; - -force|-f) - force=true - ;; - *) - break - ;; - esac - - shift - done - - if [[ $force != true ]] && [[ "$ci" != true ]]; then - echo "$@" >&2 - return - fi - - local message="##vso[task.logissue" - - message="$message type=$message_type" - - if [ -n "$sourcepath" ]; then - message="$message;sourcepath=$sourcepath" - fi - - if [ -n "$linenumber" ]; then - message="$message;linenumber=$linenumber" - fi - - if [ -n "$columnnumber" ]; then - message="$message;columnnumber=$columnnumber" - fi - - if [ -n "$error_code" ]; then - message="$message;code=$error_code" - fi - - message="$message]$*" - echo "$message" -} - -function Write-PipelineSetVariable { - if [[ "$ci" != true ]]; then - return - fi - - local name='' - local value='' - local secret=false - local as_output=false - local is_multi_job_variable=true - - while [[ $# -gt 0 ]]; do - opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" - case "$opt" in - -name|-n) - name=$2 - shift - ;; - -value|-v) - value=$2 - shift - ;; - -secret|-s) - secret=true - ;; - -as_output|-a) - as_output=true - ;; - -is_multi_job_variable|-i) - is_multi_job_variable=$2 - shift - ;; - esac - shift - done - - value=${value/;/%3B} - value=${value/\\r/%0D} - value=${value/\\n/%0A} - value=${value/]/%5D} - - local message="##vso[task.setvariable variable=$name;isSecret=$secret;isOutput=$is_multi_job_variable]$value" - - if [[ "$as_output" == true ]]; then - $message - else - echo "$message" - fi -} - -function Write-PipelinePrependPath { - local prepend_path='' - - while [[ $# -gt 0 ]]; do - opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" - case "$opt" in - -path|-p) - prepend_path=$2 - shift - ;; - esac - shift - done - - export PATH="$prepend_path:$PATH" - - if [[ "$ci" == true ]]; then - echo "##vso[task.prependpath]$prepend_path" - fi -} - -function Write-PipelineSetResult { - local result='' - local message='' - - while [[ $# -gt 0 ]]; do - opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")" - case "$opt" in - -result|-r) - result=$2 - shift - ;; - -message|-m) - message=$2 - shift - ;; - esac - shift - done - - if [[ "$ci" == true ]]; then - echo "##vso[task.complete result=$result;]$message" - fi -} diff --git a/src/arcade/eng/common/post-build/check-channel-consistency.ps1 b/src/arcade/eng/common/post-build/check-channel-consistency.ps1 deleted file mode 100644 index 61208d2d135..00000000000 --- a/src/arcade/eng/common/post-build/check-channel-consistency.ps1 +++ /dev/null @@ -1,48 +0,0 @@ -param( - [Parameter(Mandatory=$true)][string] $PromoteToChannels, # List of channels that the build should be promoted to - [Parameter(Mandatory=$true)][array] $AvailableChannelIds # List of channel IDs available in the YAML implementation -) - -try { - $ErrorActionPreference = 'Stop' - Set-StrictMode -Version 2.0 - - # `tools.ps1` checks $ci to perform some actions. Since the post-build - # scripts don't necessarily execute in the same agent that run the - # build.ps1/sh script this variable isn't automatically set. - $ci = $true - $disableConfigureToolsetImport = $true - . $PSScriptRoot\..\tools.ps1 - - if ($PromoteToChannels -eq "") { - Write-PipelineTaskError -Type 'warning' -Message "This build won't publish assets as it's not configured to any Maestro channel. If that wasn't intended use Darc to configure a default channel using add-default-channel for this branch or to promote it to a channel using add-build-to-channel. See https://github.com/dotnet/arcade/blob/main/Documentation/Darc.md#assigning-an-individual-build-to-a-channel for more info." - ExitWithExitCode 0 - } - - # Check that every channel that Maestro told to promote the build to - # is available in YAML - $PromoteToChannelsIds = $PromoteToChannels -split "\D" | Where-Object { $_ } - - $hasErrors = $false - - foreach ($id in $PromoteToChannelsIds) { - if (($id -ne 0) -and ($id -notin $AvailableChannelIds)) { - Write-PipelineTaskError -Message "Channel $id is not present in the post-build YAML configuration! This is an error scenario. Please contact @dnceng." - $hasErrors = $true - } - } - - # The `Write-PipelineTaskError` doesn't error the script and we might report several errors - # in the previous lines. The check below makes sure that we return an error state from the - # script if we reported any validation error - if ($hasErrors) { - ExitWithExitCode 1 - } - - Write-Host 'done.' -} -catch { - Write-Host $_ - Write-PipelineTelemetryError -Category 'CheckChannelConsistency' -Message "There was an error while trying to check consistency of Maestro default channels for the build and post-build YAML configuration." - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/post-build/nuget-validation.ps1 b/src/arcade/eng/common/post-build/nuget-validation.ps1 deleted file mode 100644 index e5de00c8983..00000000000 --- a/src/arcade/eng/common/post-build/nuget-validation.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -# This script validates NuGet package metadata information using this -# tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage - -param( - [Parameter(Mandatory=$true)][string] $PackagesPath # Path to where the packages to be validated are -) - -# `tools.ps1` checks $ci to perform some actions. Since the post-build -# scripts don't necessarily execute in the same agent that run the -# build.ps1/sh script this variable isn't automatically set. -$ci = $true -$disableConfigureToolsetImport = $true -. $PSScriptRoot\..\tools.ps1 - -try { - & $PSScriptRoot\nuget-verification.ps1 ${PackagesPath}\*.nupkg -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_ - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/post-build/nuget-verification.ps1 b/src/arcade/eng/common/post-build/nuget-verification.ps1 deleted file mode 100644 index a365194a938..00000000000 --- a/src/arcade/eng/common/post-build/nuget-verification.ps1 +++ /dev/null @@ -1,121 +0,0 @@ -<# -.SYNOPSIS - Verifies that Microsoft NuGet packages have proper metadata. -.DESCRIPTION - Downloads a verification tool and runs metadata validation on the provided NuGet packages. This script writes an - error if any of the provided packages fail validation. All arguments provided to this PowerShell script that do not - match PowerShell parameters are passed on to the verification tool downloaded during the execution of this script. -.PARAMETER NuGetExePath - The path to the nuget.exe binary to use. If not provided, nuget.exe will be downloaded into the -DownloadPath - directory. -.PARAMETER PackageSource - The package source to use to download the verification tool. If not provided, nuget.org will be used. -.PARAMETER DownloadPath - The directory path to download the verification tool and nuget.exe to. If not provided, - %TEMP%\NuGet.VerifyNuGetPackage will be used. -.PARAMETER args - Arguments that will be passed to the verification tool. -.EXAMPLE - PS> .\verify.ps1 *.nupkg - Verifies the metadata of all .nupkg files in the currect working directory. -.EXAMPLE - PS> .\verify.ps1 --help - Displays the help text of the downloaded verifiction tool. -.LINK - https://github.com/NuGet/NuGetGallery/blob/master/src/VerifyMicrosoftPackage/README.md -#> - -# This script was copied from https://github.com/NuGet/NuGetGallery/blob/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1 - -[CmdletBinding(PositionalBinding = $false)] -param( - [string]$NuGetExePath, - [string]$PackageSource = "https://api.nuget.org/v3/index.json", - [string]$DownloadPath, - [Parameter(ValueFromRemainingArguments = $true)] - [string[]]$args -) - -# The URL to download nuget.exe. -$nugetExeUrl = "https://dist.nuget.org/win-x86-commandline/v4.9.4/nuget.exe" - -# The package ID of the verification tool. -$packageId = "NuGet.VerifyMicrosoftPackage" - -# The location that nuget.exe and the verification tool will be downloaded to. -if (!$DownloadPath) { - $DownloadPath = (Join-Path $env:TEMP "NuGet.VerifyMicrosoftPackage") -} - -$fence = New-Object -TypeName string -ArgumentList '=', 80 - -# Create the download directory, if it doesn't already exist. -if (!(Test-Path $DownloadPath)) { - New-Item -ItemType Directory $DownloadPath | Out-Null -} -Write-Host "Using download path: $DownloadPath" - -if ($NuGetExePath) { - $nuget = $NuGetExePath -} else { - $downloadedNuGetExe = Join-Path $DownloadPath "nuget.exe" - - # Download nuget.exe, if it doesn't already exist. - if (!(Test-Path $downloadedNuGetExe)) { - Write-Host "Downloading nuget.exe from $nugetExeUrl..." - $ProgressPreference = 'SilentlyContinue' - try { - Invoke-WebRequest $nugetExeUrl -OutFile $downloadedNuGetExe - $ProgressPreference = 'Continue' - } catch { - $ProgressPreference = 'Continue' - Write-Error $_ - Write-Error "nuget.exe failed to download." - exit - } - } - - $nuget = $downloadedNuGetExe -} - -Write-Host "Using nuget.exe path: $nuget" -Write-Host " " - -# Download the latest version of the verification tool. -Write-Host "Downloading the latest version of $packageId from $packageSource..." -Write-Host $fence -& $nuget install $packageId ` - -Prerelease ` - -OutputDirectory $DownloadPath ` - -Source $PackageSource -Write-Host $fence -Write-Host " " - -if ($LASTEXITCODE -ne 0) { - Write-Error "nuget.exe failed to fetch the verify tool." - exit -} - -# Find the most recently downloaded tool -Write-Host "Finding the most recently downloaded verification tool." -$verifyProbePath = Join-Path $DownloadPath "$packageId.*" -$verifyPath = Get-ChildItem -Path $verifyProbePath -Directory ` - | Sort-Object -Property LastWriteTime -Descending ` - | Select-Object -First 1 -$verify = Join-Path $verifyPath "tools\NuGet.VerifyMicrosoftPackage.exe" -Write-Host "Using verification tool: $verify" -Write-Host " " - -# Execute the verification tool. -Write-Host "Executing the verify tool..." -Write-Host $fence -& $verify $args -Write-Host $fence -Write-Host " " - -# Respond to the exit code. -if ($LASTEXITCODE -ne 0) { - Write-Error "The verify tool found some problems." -} else { - Write-Output "The verify tool succeeded." -} diff --git a/src/arcade/eng/common/post-build/redact-logs.ps1 b/src/arcade/eng/common/post-build/redact-logs.ps1 deleted file mode 100644 index b7fc1959150..00000000000 --- a/src/arcade/eng/common/post-build/redact-logs.ps1 +++ /dev/null @@ -1,89 +0,0 @@ -[CmdletBinding(PositionalBinding=$False)] -param( - [Parameter(Mandatory=$true, Position=0)][string] $InputPath, - [Parameter(Mandatory=$true)][string] $BinlogToolVersion, - [Parameter(Mandatory=$false)][string] $DotnetPath, - [Parameter(Mandatory=$false)][string] $PackageFeed = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json', - # File with strings to redact - separated by newlines. - # For comments start the line with '# ' - such lines are ignored - [Parameter(Mandatory=$false)][string] $TokensFilePath, - [Parameter(ValueFromRemainingArguments=$true)][String[]]$TokensToRedact -) - -try { - $ErrorActionPreference = 'Stop' - Set-StrictMode -Version 2.0 - - # `tools.ps1` checks $ci to perform some actions. Since the post-build - # scripts don't necessarily execute in the same agent that run the - # build.ps1/sh script this variable isn't automatically set. - $ci = $true - $disableConfigureToolsetImport = $true - . $PSScriptRoot\..\tools.ps1 - - $packageName = 'binlogtool' - - $dotnet = $DotnetPath - - if (!$dotnet) { - $dotnetRoot = InitializeDotNetCli -install:$true - $dotnet = "$dotnetRoot\dotnet.exe" - } - - $toolList = & "$dotnet" tool list -g - - if ($toolList -like "*$packageName*") { - & "$dotnet" tool uninstall $packageName -g - } - - $toolPath = "$PSScriptRoot\..\..\..\.tools" - $verbosity = 'minimal' - - New-Item -ItemType Directory -Force -Path $toolPath - - Push-Location -Path $toolPath - - try { - Write-Host "Installing Binlog redactor CLI..." - Write-Host "'$dotnet' new tool-manifest" - & "$dotnet" new tool-manifest - Write-Host "'$dotnet' tool install $packageName --local --add-source '$PackageFeed' -v $verbosity --version $BinlogToolVersion" - & "$dotnet" tool install $packageName --local --add-source "$PackageFeed" -v $verbosity --version $BinlogToolVersion - - if (Test-Path $TokensFilePath) { - Write-Host "Adding additional sensitive data for redaction from file: " $TokensFilePath - $TokensToRedact += Get-Content -Path $TokensFilePath | Foreach {$_.Trim()} | Where { $_ -notmatch "^# " } - } - - $optionalParams = [System.Collections.ArrayList]::new() - - Foreach ($p in $TokensToRedact) - { - if($p -match '^\$\(.*\)$') - { - Write-Host ("Ignoring token {0} as it is probably unexpanded AzDO variable" -f $p) - } - elseif($p) - { - $optionalParams.Add("-p:" + $p) | Out-Null - } - } - - & $dotnet binlogtool redact --input:$InputPath --recurse --in-place ` - @optionalParams - - if ($LastExitCode -ne 0) { - Write-PipelineTelemetryError -Category 'Redactor' -Type 'warning' -Message "Problems using Redactor tool (exit code: $LastExitCode). But ignoring them now." - } - } - finally { - Pop-Location - } - - Write-Host 'done.' -} -catch { - Write-Host $_ - Write-PipelineTelemetryError -Category 'Redactor' -Message "There was an error while trying to redact logs. Error: $_" - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/post-build/sourcelink-validation.ps1 b/src/arcade/eng/common/post-build/sourcelink-validation.ps1 deleted file mode 100644 index 1976ef70fb8..00000000000 --- a/src/arcade/eng/common/post-build/sourcelink-validation.ps1 +++ /dev/null @@ -1,327 +0,0 @@ -param( - [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where Symbols.NuGet packages to be checked are stored - [Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation - [Parameter(Mandatory=$false)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade - [Parameter(Mandatory=$false)][string] $GHCommit, # GitHub commit SHA used to build the packages - [Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2.0 - -# `tools.ps1` checks $ci to perform some actions. Since the post-build -# scripts don't necessarily execute in the same agent that run the -# build.ps1/sh script this variable isn't automatically set. -$ci = $true -$disableConfigureToolsetImport = $true -. $PSScriptRoot\..\tools.ps1 - -# Cache/HashMap (File -> Exist flag) used to consult whether a file exist -# in the repository at a specific commit point. This is populated by inserting -# all files present in the repo at a specific commit point. -$global:RepoFiles = @{} - -# Maximum number of jobs to run in parallel -$MaxParallelJobs = 16 - -$MaxRetries = 5 -$RetryWaitTimeInSeconds = 30 - -# Wait time between check for system load -$SecondsBetweenLoadChecks = 10 - -if (!$InputPath -or !(Test-Path $InputPath)){ - Write-Host "No files to validate." - ExitWithExitCode 0 -} - -$ValidatePackage = { - param( - [string] $PackagePath # Full path to a Symbols.NuGet package - ) - - . $using:PSScriptRoot\..\tools.ps1 - - # Ensure input file exist - if (!(Test-Path $PackagePath)) { - Write-Host "Input file does not exist: $PackagePath" - return [pscustomobject]@{ - result = 1 - packagePath = $PackagePath - } - } - - # Extensions for which we'll look for SourceLink information - # For now we'll only care about Portable & Embedded PDBs - $RelevantExtensions = @('.dll', '.exe', '.pdb') - - Write-Host -NoNewLine 'Validating ' ([System.IO.Path]::GetFileName($PackagePath)) '...' - - $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) - $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId - $FailedFiles = 0 - - Add-Type -AssemblyName System.IO.Compression.FileSystem - - [System.IO.Directory]::CreateDirectory($ExtractPath) | Out-Null - - try { - $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) - - $zip.Entries | - Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | - ForEach-Object { - $FileName = $_.FullName - $Extension = [System.IO.Path]::GetExtension($_.Name) - $FakeName = -Join((New-Guid), $Extension) - $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName - - # We ignore resource DLLs - if ($FileName.EndsWith('.resources.dll')) { - return [pscustomobject]@{ - result = 0 - packagePath = $PackagePath - } - } - - [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) - - $ValidateFile = { - param( - [string] $FullPath, # Full path to the module that has to be checked - [string] $RealPath, - [ref] $FailedFiles - ) - - $sourcelinkExe = "$env:USERPROFILE\.dotnet\tools" - $sourcelinkExe = Resolve-Path "$sourcelinkExe\sourcelink.exe" - $SourceLinkInfos = & $sourcelinkExe print-urls $FullPath | Out-String - - if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) { - $NumFailedLinks = 0 - - # We only care about Http addresses - $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches - - if ($Matches.Count -ne 0) { - $Matches.Value | - ForEach-Object { - $Link = $_ - $CommitUrl = "https://raw.githubusercontent.com/${using:GHRepoName}/${using:GHCommit}/" - - $FilePath = $Link.Replace($CommitUrl, "") - $Status = 200 - $Cache = $using:RepoFiles - - $attempts = 0 - - while ($attempts -lt $using:MaxRetries) { - if ( !($Cache.ContainsKey($FilePath)) ) { - try { - $Uri = $Link -as [System.URI] - - if ($Link -match "submodules") { - # Skip submodule links until sourcelink properly handles submodules - $Status = 200 - } - elseif ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) { - # Only GitHub links are valid - $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode - } - else { - # If it's not a github link, we want to break out of the loop and not retry. - $Status = 0 - $attempts = $using:MaxRetries - } - } - catch { - Write-Host $_ - $Status = 0 - } - } - - if ($Status -ne 200) { - $attempts++ - - if ($attempts -lt $using:MaxRetries) - { - $attemptsLeft = $using:MaxRetries - $attempts - Write-Warning "Download failed, $attemptsLeft attempts remaining, will retry in $using:RetryWaitTimeInSeconds seconds" - Start-Sleep -Seconds $using:RetryWaitTimeInSeconds - } - else { - if ($NumFailedLinks -eq 0) { - if ($FailedFiles.Value -eq 0) { - Write-Host - } - - Write-Host "`tFile $RealPath has broken links:" - } - - Write-Host "`t`tFailed to retrieve $Link" - - $NumFailedLinks++ - } - } - else { - break - } - } - } - } - - if ($NumFailedLinks -ne 0) { - $FailedFiles.value++ - $global:LASTEXITCODE = 1 - } - } - } - - &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles) - } - } - catch { - Write-Host $_ - } - finally { - $zip.Dispose() - } - - if ($FailedFiles -eq 0) { - Write-Host 'Passed.' - return [pscustomobject]@{ - result = 0 - packagePath = $PackagePath - } - } - else { - Write-PipelineTelemetryError -Category 'SourceLink' -Message "$PackagePath has broken SourceLink links." - return [pscustomobject]@{ - result = 1 - packagePath = $PackagePath - } - } -} - -function CheckJobResult( - $result, - $packagePath, - [ref]$ValidationFailures, - [switch]$logErrors) { - if ($result -ne '0') { - if ($logErrors) { - Write-PipelineTelemetryError -Category 'SourceLink' -Message "$packagePath has broken SourceLink links." - } - $ValidationFailures.Value++ - } -} - -function ValidateSourceLinkLinks { - if ($GHRepoName -ne '' -and !($GHRepoName -Match '^[^\s\/]+/[^\s\/]+$')) { - if (!($GHRepoName -Match '^[^\s-]+-[^\s]+$')) { - Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHRepoName should be in the format / or -. '$GHRepoName'" - ExitWithExitCode 1 - } - else { - $GHRepoName = $GHRepoName -replace '^([^\s-]+)-([^\s]+)$', '$1/$2'; - } - } - - if ($GHCommit -ne '' -and !($GHCommit -Match '^[0-9a-fA-F]{40}$')) { - Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'" - ExitWithExitCode 1 - } - - if ($GHRepoName -ne '' -and $GHCommit -ne '') { - $RepoTreeURL = -Join('http://api.github.com/repos/', $GHRepoName, '/git/trees/', $GHCommit, '?recursive=1') - $CodeExtensions = @('.cs', '.vb', '.fs', '.fsi', '.fsx', '.fsscript') - - try { - # Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash - $Data = Invoke-WebRequest $RepoTreeURL -UseBasicParsing | ConvertFrom-Json | Select-Object -ExpandProperty tree - - foreach ($file in $Data) { - $Extension = [System.IO.Path]::GetExtension($file.path) - - if ($CodeExtensions.Contains($Extension)) { - $RepoFiles[$file.path] = 1 - } - } - } - catch { - Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching." - } - } - elseif ($GHRepoName -ne '' -or $GHCommit -ne '') { - Write-Host 'For using the http caching mechanism both GHRepoName and GHCommit should be informed.' - } - - if (Test-Path $ExtractPath) { - Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue - } - - $ValidationFailures = 0 - - # Process each NuGet package in parallel - Get-ChildItem "$InputPath\*.symbols.nupkg" | - ForEach-Object { - Write-Host "Starting $($_.FullName)" - Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName | Out-Null - $NumJobs = @(Get-Job -State 'Running').Count - - while ($NumJobs -ge $MaxParallelJobs) { - Write-Host "There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again." - sleep $SecondsBetweenLoadChecks - $NumJobs = @(Get-Job -State 'Running').Count - } - - foreach ($Job in @(Get-Job -State 'Completed')) { - $jobResult = Wait-Job -Id $Job.Id | Receive-Job - CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$ValidationFailures) -LogErrors - Remove-Job -Id $Job.Id - } - } - - foreach ($Job in @(Get-Job)) { - $jobResult = Wait-Job -Id $Job.Id | Receive-Job - CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$ValidationFailures) - Remove-Job -Id $Job.Id - } - if ($ValidationFailures -gt 0) { - Write-PipelineTelemetryError -Category 'SourceLink' -Message "$ValidationFailures package(s) failed validation." - ExitWithExitCode 1 - } -} - -function InstallSourcelinkCli { - $sourcelinkCliPackageName = 'sourcelink' - - $dotnetRoot = InitializeDotNetCli -install:$true - $dotnet = "$dotnetRoot\dotnet.exe" - $toolList = & "$dotnet" tool list --global - - if (($toolList -like "*$sourcelinkCliPackageName*") -and ($toolList -like "*$sourcelinkCliVersion*")) { - Write-Host "SourceLink CLI version $sourcelinkCliVersion is already installed." - } - else { - Write-Host "Installing SourceLink CLI version $sourcelinkCliVersion..." - Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' - & "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity "minimal" --global - } -} - -try { - InstallSourcelinkCli - - foreach ($Job in @(Get-Job)) { - Remove-Job -Id $Job.Id - } - - ValidateSourceLinkLinks -} -catch { - Write-Host $_.Exception - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'SourceLink' -Message $_ - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/post-build/symbols-validation.ps1 b/src/arcade/eng/common/post-build/symbols-validation.ps1 deleted file mode 100644 index 7146e593ffa..00000000000 --- a/src/arcade/eng/common/post-build/symbols-validation.ps1 +++ /dev/null @@ -1,337 +0,0 @@ -param( - [Parameter(Mandatory = $true)][string] $InputPath, # Full path to directory where NuGet packages to be checked are stored - [Parameter(Mandatory = $true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation - [Parameter(Mandatory = $true)][string] $DotnetSymbolVersion, # Version of dotnet symbol to use - [Parameter(Mandatory = $false)][switch] $CheckForWindowsPdbs, # If we should check for the existence of windows pdbs in addition to portable PDBs - [Parameter(Mandatory = $false)][switch] $ContinueOnError, # If we should keep checking symbols after an error - [Parameter(Mandatory = $false)][switch] $Clean, # Clean extracted symbols directory after checking symbols - [Parameter(Mandatory = $false)][string] $SymbolExclusionFile # Exclude the symbols in the file from publishing to symbol server -) - -. $PSScriptRoot\..\tools.ps1 -# Maximum number of jobs to run in parallel -$MaxParallelJobs = 16 - -# Max number of retries -$MaxRetry = 5 - -# Wait time between check for system load -$SecondsBetweenLoadChecks = 10 - -# Set error codes -Set-Variable -Name "ERROR_BADEXTRACT" -Option Constant -Value -1 -Set-Variable -Name "ERROR_FILEDOESNOTEXIST" -Option Constant -Value -2 - -$WindowsPdbVerificationParam = "" -if ($CheckForWindowsPdbs) { - $WindowsPdbVerificationParam = "--windows-pdbs" -} - -$ExclusionSet = New-Object System.Collections.Generic.HashSet[string]; - -if (!$InputPath -or !(Test-Path $InputPath)){ - Write-Host "No symbols to validate." - ExitWithExitCode 0 -} - -#Check if the path exists -if ($SymbolExclusionFile -and (Test-Path $SymbolExclusionFile)){ - [string[]]$Exclusions = Get-Content "$SymbolExclusionFile" - $Exclusions | foreach { if($_ -and $_.Trim()){$ExclusionSet.Add($_)} } -} -else{ - Write-Host "Symbol Exclusion file does not exists. No symbols to exclude." -} - -$CountMissingSymbols = { - param( - [string] $PackagePath, # Path to a NuGet package - [string] $WindowsPdbVerificationParam # If we should check for the existence of windows pdbs in addition to portable PDBs - ) - - Add-Type -AssemblyName System.IO.Compression.FileSystem - - Write-Host "Validating $PackagePath " - - # Ensure input file exist - if (!(Test-Path $PackagePath)) { - Write-PipelineTaskError "Input file does not exist: $PackagePath" - return [pscustomobject]@{ - result = $using:ERROR_FILEDOESNOTEXIST - packagePath = $PackagePath - } - } - - # Extensions for which we'll look for symbols - $RelevantExtensions = @('.dll', '.exe', '.so', '.dylib') - - # How many files are missing symbol information - $MissingSymbols = 0 - - $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) - $PackageGuid = New-Guid - $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageGuid - $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols' - - try { - [System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath) - } - catch { - Write-Host "Something went wrong extracting $PackagePath" - Write-Host $_ - return [pscustomobject]@{ - result = $using:ERROR_BADEXTRACT - packagePath = $PackagePath - } - } - - Get-ChildItem -Recurse $ExtractPath | - Where-Object { $RelevantExtensions -contains $_.Extension } | - ForEach-Object { - $FileName = $_.FullName - if ($FileName -Match '\\ref\\') { - Write-Host "`t Ignoring reference assembly file " $FileName - return - } - - $FirstMatchingSymbolDescriptionOrDefault = { - param( - [string] $FullPath, # Full path to the module that has to be checked - [string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols - [string] $WindowsPdbVerificationParam, # Parameter to pass to potential check for windows-pdbs. - [string] $SymbolsPath - ) - - $FileName = [System.IO.Path]::GetFileName($FullPath) - $Extension = [System.IO.Path]::GetExtension($FullPath) - - # Those below are potential symbol files that the `dotnet symbol` might - # return. Which one will be returned depend on the type of file we are - # checking and which type of file was uploaded. - - # The file itself is returned - $SymbolPath = $SymbolsPath + '\' + $FileName - - # PDB file for the module - $PdbPath = $SymbolPath.Replace($Extension, '.pdb') - - # PDB file for R2R module (created by crossgen) - $NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb') - - # DBG file for a .so library - $SODbg = $SymbolPath.Replace($Extension, '.so.dbg') - - # DWARF file for a .dylib - $DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf') - - $dotnetSymbolExe = "$env:USERPROFILE\.dotnet\tools" - $dotnetSymbolExe = Resolve-Path "$dotnetSymbolExe\dotnet-symbol.exe" - - $totalRetries = 0 - - while ($totalRetries -lt $using:MaxRetry) { - - # Save the output and get diagnostic output - $output = & $dotnetSymbolExe --symbols --modules $WindowsPdbVerificationParam $TargetServerParam $FullPath -o $SymbolsPath --diagnostics | Out-String - - if ((Test-Path $PdbPath) -and (Test-path $SymbolPath)) { - return 'Module and PDB for Module' - } - elseif ((Test-Path $NGenPdb) -and (Test-Path $PdbPath) -and (Test-Path $SymbolPath)) { - return 'Dll, PDB and NGen PDB' - } - elseif ((Test-Path $SODbg) -and (Test-Path $SymbolPath)) { - return 'So and DBG for SO' - } - elseif ((Test-Path $DylibDwarf) -and (Test-Path $SymbolPath)) { - return 'Dylib and Dwarf for Dylib' - } - elseif (Test-Path $SymbolPath) { - return 'Module' - } - else - { - $totalRetries++ - } - } - - return $null - } - - $FileRelativePath = $FileName.Replace("$ExtractPath\", "") - if (($($using:ExclusionSet) -ne $null) -and ($($using:ExclusionSet).Contains($FileRelativePath) -or ($($using:ExclusionSet).Contains($FileRelativePath.Replace("\", "/"))))){ - Write-Host "Skipping $FileName from symbol validation" - } - - else { - $FileGuid = New-Guid - $ExpandedSymbolsPath = Join-Path -Path $SymbolsPath -ChildPath $FileGuid - - $SymbolsOnMSDL = & $FirstMatchingSymbolDescriptionOrDefault ` - -FullPath $FileName ` - -TargetServerParam '--microsoft-symbol-server' ` - -SymbolsPath "$ExpandedSymbolsPath-msdl" ` - -WindowsPdbVerificationParam $WindowsPdbVerificationParam - $SymbolsOnSymWeb = & $FirstMatchingSymbolDescriptionOrDefault ` - -FullPath $FileName ` - -TargetServerParam '--internal-server' ` - -SymbolsPath "$ExpandedSymbolsPath-symweb" ` - -WindowsPdbVerificationParam $WindowsPdbVerificationParam - - Write-Host -NoNewLine "`t Checking file " $FileName "... " - - if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) { - Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)" - } - else { - $MissingSymbols++ - - if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) { - Write-Host 'No symbols found on MSDL or SymWeb!' - } - else { - if ($SymbolsOnMSDL -eq $null) { - Write-Host 'No symbols found on MSDL!' - } - else { - Write-Host 'No symbols found on SymWeb!' - } - } - } - } - } - - if ($using:Clean) { - Remove-Item $ExtractPath -Recurse -Force - } - - Pop-Location - - return [pscustomobject]@{ - result = $MissingSymbols - packagePath = $PackagePath - } -} - -function CheckJobResult( - $result, - $packagePath, - [ref]$DupedSymbols, - [ref]$TotalFailures) { - if ($result -eq $ERROR_BADEXTRACT) { - Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$packagePath has duplicated symbol files" - $DupedSymbols.Value++ - } - elseif ($result -eq $ERROR_FILEDOESNOTEXIST) { - Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$packagePath does not exist" - $TotalFailures.Value++ - } - elseif ($result -gt '0') { - Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $result modules in the package $packagePath" - $TotalFailures.Value++ - } - else { - Write-Host "All symbols verified for package $packagePath" - } -} - -function CheckSymbolsAvailable { - if (Test-Path $ExtractPath) { - Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue - } - - $TotalPackages = 0 - $TotalFailures = 0 - $DupedSymbols = 0 - - Get-ChildItem "$InputPath\*.nupkg" | - ForEach-Object { - $FileName = $_.Name - $FullName = $_.FullName - - # These packages from Arcade-Services include some native libraries that - # our current symbol uploader can't handle. Below is a workaround until - # we get issue: https://github.com/dotnet/arcade/issues/2457 sorted. - if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') { - Write-Host "Ignoring Arcade-services file: $FileName" - Write-Host - return - } - elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') { - Write-Host "Ignoring Arcade-services file: $FileName" - Write-Host - return - } - - $TotalPackages++ - - Start-Job -ScriptBlock $CountMissingSymbols -ArgumentList @($FullName,$WindowsPdbVerificationParam) | Out-Null - - $NumJobs = @(Get-Job -State 'Running').Count - - while ($NumJobs -ge $MaxParallelJobs) { - Write-Host "There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again." - sleep $SecondsBetweenLoadChecks - $NumJobs = @(Get-Job -State 'Running').Count - } - - foreach ($Job in @(Get-Job -State 'Completed')) { - $jobResult = Wait-Job -Id $Job.Id | Receive-Job - CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures) - Remove-Job -Id $Job.Id - } - Write-Host - } - - foreach ($Job in @(Get-Job)) { - $jobResult = Wait-Job -Id $Job.Id | Receive-Job - CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures) - } - - if ($TotalFailures -gt 0 -or $DupedSymbols -gt 0) { - if ($TotalFailures -gt 0) { - Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Symbols missing for $TotalFailures/$TotalPackages packages" - } - - if ($DupedSymbols -gt 0) { - Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$DupedSymbols/$TotalPackages packages had duplicated symbol files and could not be extracted" - } - - ExitWithExitCode 1 - } - else { - Write-Host "All symbols validated!" - } -} - -function InstallDotnetSymbol { - $dotnetSymbolPackageName = 'dotnet-symbol' - - $dotnetRoot = InitializeDotNetCli -install:$true - $dotnet = "$dotnetRoot\dotnet.exe" - $toolList = & "$dotnet" tool list --global - - if (($toolList -like "*$dotnetSymbolPackageName*") -and ($toolList -like "*$dotnetSymbolVersion*")) { - Write-Host "dotnet-symbol version $dotnetSymbolVersion is already installed." - } - else { - Write-Host "Installing dotnet-symbol version $dotnetSymbolVersion..." - Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' - & "$dotnet" tool install $dotnetSymbolPackageName --version $dotnetSymbolVersion --verbosity "minimal" --global - } -} - -try { - InstallDotnetSymbol - - foreach ($Job in @(Get-Job)) { - Remove-Job -Id $Job.Id - } - - CheckSymbolsAvailable -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'CheckSymbols' -Message $_ - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/retain-build.ps1 b/src/arcade/eng/common/retain-build.ps1 deleted file mode 100644 index e7ba975adeb..00000000000 --- a/src/arcade/eng/common/retain-build.ps1 +++ /dev/null @@ -1,45 +0,0 @@ - -Param( -[Parameter(Mandatory=$true)][int] $buildId, -[Parameter(Mandatory=$true)][string] $azdoOrgUri, -[Parameter(Mandatory=$true)][string] $azdoProject, -[Parameter(Mandatory=$true)][string] $token -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2.0 - -function Get-AzDOHeaders( - [string] $token) -{ - $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":${token}")) - $headers = @{"Authorization"="Basic $base64AuthInfo"} - return $headers -} - -function Update-BuildRetention( - [string] $azdoOrgUri, - [string] $azdoProject, - [int] $buildId, - [string] $token) -{ - $headers = Get-AzDOHeaders -token $token - $requestBody = "{ - `"keepForever`": `"true`" - }" - - $requestUri = "${azdoOrgUri}/${azdoProject}/_apis/build/builds/${buildId}?api-version=6.0" - write-Host "Attempting to retain build using the following URI: ${requestUri} ..." - - try { - Invoke-RestMethod -Uri $requestUri -Method Patch -Body $requestBody -Header $headers -contentType "application/json" - Write-Host "Updated retention settings for build ${buildId}." - } - catch { - Write-Error "Failed to update retention settings for build: $_.Exception.Response.StatusDescription" - exit 1 - } -} - -Update-BuildRetention -azdoOrgUri $azdoOrgUri -azdoProject $azdoProject -buildId $buildId -token $token -exit 0 diff --git a/src/arcade/eng/common/sdl/NuGet.config b/src/arcade/eng/common/sdl/NuGet.config deleted file mode 100644 index 3849bdb3cf5..00000000000 --- a/src/arcade/eng/common/sdl/NuGet.config +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/arcade/eng/common/sdl/configure-sdl-tool.ps1 b/src/arcade/eng/common/sdl/configure-sdl-tool.ps1 deleted file mode 100644 index 27f5a4115fc..00000000000 --- a/src/arcade/eng/common/sdl/configure-sdl-tool.ps1 +++ /dev/null @@ -1,130 +0,0 @@ -Param( - [string] $GuardianCliLocation, - [string] $WorkingDirectory, - [string] $TargetDirectory, - [string] $GdnFolder, - # The list of Guardian tools to configure. For each object in the array: - # - If the item is a [hashtable], it must contain these entries: - # - Name = The tool name as Guardian knows it. - # - Scenario = (Optional) Scenario-specific name for this configuration entry. It must be unique - # among all tool entries with the same Name. - # - Args = (Optional) Array of Guardian tool configuration args, like '@("Target > C:\temp")' - # - If the item is a [string] $v, it is treated as '@{ Name="$v" }' - [object[]] $ToolsList, - [string] $GuardianLoggerLevel='Standard', - # Optional: Additional params to add to any tool using CredScan. - [string[]] $CrScanAdditionalRunConfigParams, - # Optional: Additional params to add to any tool using PoliCheck. - [string[]] $PoliCheckAdditionalRunConfigParams, - # Optional: Additional params to add to any tool using CodeQL/Semmle. - [string[]] $CodeQLAdditionalRunConfigParams, - # Optional: Additional params to add to any tool using Binskim. - [string[]] $BinskimAdditionalRunConfigParams -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2.0 -$disableConfigureToolsetImport = $true -$global:LASTEXITCODE = 0 - -try { - # `tools.ps1` checks $ci to perform some actions. Since the SDL - # scripts don't necessarily execute in the same agent that run the - # build.ps1/sh script this variable isn't automatically set. - $ci = $true - . $PSScriptRoot\..\tools.ps1 - - # Normalize tools list: all in [hashtable] form with defined values for each key. - $ToolsList = $ToolsList | - ForEach-Object { - if ($_ -is [string]) { - $_ = @{ Name = $_ } - } - - if (-not ($_['Scenario'])) { $_.Scenario = "" } - if (-not ($_['Args'])) { $_.Args = @() } - $_ - } - - Write-Host "List of tools to configure:" - $ToolsList | ForEach-Object { $_ | Out-String | Write-Host } - - # We store config files in the r directory of .gdn - $gdnConfigPath = Join-Path $GdnFolder 'r' - $ValidPath = Test-Path $GuardianCliLocation - - if ($ValidPath -eq $False) - { - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location." - ExitWithExitCode 1 - } - - foreach ($tool in $ToolsList) { - # Put together the name and scenario to make a unique key. - $toolConfigName = $tool.Name - if ($tool.Scenario) { - $toolConfigName += "_" + $tool.Scenario - } - - Write-Host "=== Configuring $toolConfigName..." - - $gdnConfigFile = Join-Path $gdnConfigPath "$toolConfigName-configure.gdnconfig" - - # For some tools, add default and automatic args. - switch -Exact ($tool.Name) { - 'credscan' { - if ($targetDirectory) { - $tool.Args += "`"TargetDirectory < $TargetDirectory`"" - } - $tool.Args += "`"OutputType < pre`"" - $tool.Args += $CrScanAdditionalRunConfigParams - } - 'policheck' { - if ($targetDirectory) { - $tool.Args += "`"Target < $TargetDirectory`"" - } - $tool.Args += $PoliCheckAdditionalRunConfigParams - } - {$_ -in 'semmle', 'codeql'} { - if ($targetDirectory) { - $tool.Args += "`"SourceCodeDirectory < $TargetDirectory`"" - } - $tool.Args += $CodeQLAdditionalRunConfigParams - } - 'binskim' { - if ($targetDirectory) { - # Binskim crashes due to specific PDBs. GitHub issue: https://github.com/microsoft/binskim/issues/924. - # We are excluding all `_.pdb` files from the scan. - $tool.Args += "`"Target < $TargetDirectory\**;-:file|$TargetDirectory\**\_.pdb`"" - } - $tool.Args += $BinskimAdditionalRunConfigParams - } - } - - # Create variable pointing to the args array directly so we can use splat syntax later. - $toolArgs = $tool.Args - - # Configure the tool. If args array is provided or the current tool has some default arguments - # defined, add "--args" and splat each element on the end. Arg format is "{Arg id} < {Value}", - # one per parameter. Doc page for "guardian configure": - # https://dev.azure.com/securitytools/SecurityIntegration/_wiki/wikis/Guardian/1395/configure - Exec-BlockVerbosely { - & $GuardianCliLocation configure ` - --working-directory $WorkingDirectory ` - --tool $tool.Name ` - --output-path $gdnConfigFile ` - --logger-level $GuardianLoggerLevel ` - --noninteractive ` - --force ` - $(if ($toolArgs) { "--args" }) @toolArgs - Exit-IfNZEC "Sdl" - } - - Write-Host "Created '$toolConfigName' configuration file: $gdnConfigFile" - } -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/sdl/execute-all-sdl-tools.ps1 b/src/arcade/eng/common/sdl/execute-all-sdl-tools.ps1 deleted file mode 100644 index 4715d75e974..00000000000 --- a/src/arcade/eng/common/sdl/execute-all-sdl-tools.ps1 +++ /dev/null @@ -1,167 +0,0 @@ -Param( - [string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified) - [string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified) - [string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified - [string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade) - [string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master - [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located - [string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located - [string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault - - # Optional: list of SDL tools to run on source code. See 'configure-sdl-tool.ps1' for tools list - # format. - [object[]] $SourceToolsList, - # Optional: list of SDL tools to run on built artifacts. See 'configure-sdl-tool.ps1' for tools - # list format. - [object[]] $ArtifactToolsList, - # Optional: list of SDL tools to run without automatically specifying a target directory. See - # 'configure-sdl-tool.ps1' for tools list format. - [object[]] $CustomToolsList, - - [bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs. - [string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs. - [string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs. - [string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber) - [bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed - [bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs. - [string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs. - [string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs. - [string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs. - [string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs. - [string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs. - [string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. - [string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. - [string] $GuardianLoggerLevel='Standard', # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error - [string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1") - [string[]] $PoliCheckAdditionalRunConfigParams, # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1") - [string[]] $CodeQLAdditionalRunConfigParams, # Optional: Additional Params to custom build a Semmle/CodeQL run config in the format @("xyz < abc","sdf < 1") - [string[]] $BinskimAdditionalRunConfigParams, # Optional: Additional Params to custom build a Binskim run config in the format @("xyz < abc","sdf < 1") - [bool] $BreakOnFailure=$False # Optional: Fail the build if there were errors during the run -) - -try { - $ErrorActionPreference = 'Stop' - Set-StrictMode -Version 2.0 - $disableConfigureToolsetImport = $true - $global:LASTEXITCODE = 0 - - # `tools.ps1` checks $ci to perform some actions. Since the SDL - # scripts don't necessarily execute in the same agent that run the - # build.ps1/sh script this variable isn't automatically set. - $ci = $true - . $PSScriptRoot\..\tools.ps1 - - #Replace repo names to the format of org/repo - if (!($Repository.contains('/'))) { - $RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2'; - } - else{ - $RepoName = $Repository; - } - - if ($GuardianPackageName) { - $guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path 'tools' 'guardian.cmd')) - } else { - $guardianCliLocation = $GuardianCliLocation - } - - $workingDirectory = (Split-Path $SourceDirectory -Parent) - $ValidPath = Test-Path $guardianCliLocation - - if ($ValidPath -eq $False) - { - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Invalid Guardian CLI Location.' - ExitWithExitCode 1 - } - - Exec-BlockVerbosely { - & $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel - } - $gdnFolder = Join-Path $workingDirectory '.gdn' - - if ($TsaOnboard) { - if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) { - Exec-BlockVerbosely { - & $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel - } - if ($LASTEXITCODE -ne 0) { - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE." - ExitWithExitCode $LASTEXITCODE - } - } else { - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not onboard to TSA -- not all required values ($TsaCodebaseName, $TsaNotificationEmail, $TsaCodebaseAdmin, $TsaBugAreaPath) were specified.' - ExitWithExitCode 1 - } - } - - # Configure a list of tools with a default target directory. Populates the ".gdn/r" directory. - function Configure-ToolsList([object[]] $tools, [string] $targetDirectory) { - if ($tools -and $tools.Count -gt 0) { - Exec-BlockVerbosely { - & $(Join-Path $PSScriptRoot 'configure-sdl-tool.ps1') ` - -GuardianCliLocation $guardianCliLocation ` - -WorkingDirectory $workingDirectory ` - -TargetDirectory $targetDirectory ` - -GdnFolder $gdnFolder ` - -ToolsList $tools ` - -AzureDevOpsAccessToken $AzureDevOpsAccessToken ` - -GuardianLoggerLevel $GuardianLoggerLevel ` - -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams ` - -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams ` - -CodeQLAdditionalRunConfigParams $CodeQLAdditionalRunConfigParams ` - -BinskimAdditionalRunConfigParams $BinskimAdditionalRunConfigParams - if ($BreakOnFailure) { - Exit-IfNZEC "Sdl" - } - } - } - } - - # Configure Artifact and Source tools with default Target directories. - Configure-ToolsList $ArtifactToolsList $ArtifactsDirectory - Configure-ToolsList $SourceToolsList $SourceDirectory - # Configure custom tools with no default Target directory. - Configure-ToolsList $CustomToolsList $null - - # At this point, all tools are configured in the ".gdn" directory. Run them all in a single call. - # (If we used "run" multiple times, each run would overwrite data from earlier runs.) - Exec-BlockVerbosely { - & $(Join-Path $PSScriptRoot 'run-sdl.ps1') ` - -GuardianCliLocation $guardianCliLocation ` - -WorkingDirectory $SourceDirectory ` - -UpdateBaseline $UpdateBaseline ` - -GdnFolder $gdnFolder - } - - if ($TsaPublish) { - if ($TsaBranchName -and $BuildNumber) { - if (-not $TsaRepositoryName) { - $TsaRepositoryName = "$($Repository)-$($BranchName)" - } - Exec-BlockVerbosely { - & $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel - } - if ($LASTEXITCODE -ne 0) { - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE." - ExitWithExitCode $LASTEXITCODE - } - } else { - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not publish to TSA -- not all required values ($TsaBranchName, $BuildNumber) were specified.' - ExitWithExitCode 1 - } - } - - if ($BreakOnFailure) { - Write-Host "Failing the build in case of breaking results..." - Exec-BlockVerbosely { - & $guardianCliLocation break --working-directory $workingDirectory --logger-level $GuardianLoggerLevel - } - } else { - Write-Host "Letting the build pass even if there were breaking results..." - } -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ - exit 1 -} diff --git a/src/arcade/eng/common/sdl/extract-artifact-archives.ps1 b/src/arcade/eng/common/sdl/extract-artifact-archives.ps1 deleted file mode 100644 index 68da4fbf257..00000000000 --- a/src/arcade/eng/common/sdl/extract-artifact-archives.ps1 +++ /dev/null @@ -1,63 +0,0 @@ -# This script looks for each archive file in a directory and extracts it into the target directory. -# For example, the file "$InputPath/bin.tar.gz" extracts to "$ExtractPath/bin.tar.gz.extracted/**". -# Uses the "tar" utility added to Windows 10 / Windows 2019 that supports tar.gz and zip. -param( - # Full path to directory where archives are stored. - [Parameter(Mandatory=$true)][string] $InputPath, - # Full path to directory to extract archives into. May be the same as $InputPath. - [Parameter(Mandatory=$true)][string] $ExtractPath -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2.0 - -$disableConfigureToolsetImport = $true - -try { - # `tools.ps1` checks $ci to perform some actions. Since the SDL - # scripts don't necessarily execute in the same agent that run the - # build.ps1/sh script this variable isn't automatically set. - $ci = $true - . $PSScriptRoot\..\tools.ps1 - - Measure-Command { - $jobs = @() - - # Find archive files for non-Windows and Windows builds. - $archiveFiles = @( - Get-ChildItem (Join-Path $InputPath "*.tar.gz") - Get-ChildItem (Join-Path $InputPath "*.zip") - ) - - foreach ($targzFile in $archiveFiles) { - $jobs += Start-Job -ScriptBlock { - $file = $using:targzFile - $fileName = [System.IO.Path]::GetFileName($file) - $extractDir = Join-Path $using:ExtractPath "$fileName.extracted" - - New-Item $extractDir -ItemType Directory -Force | Out-Null - - Write-Host "Extracting '$file' to '$extractDir'..." - - # Pipe errors to stdout to prevent PowerShell detecting them and quitting the job early. - # This type of quit skips the catch, so we wouldn't be able to tell which file triggered the - # error. Save output so it can be stored in the exception string along with context. - $output = tar -xf $file -C $extractDir 2>&1 - # Handle NZEC manually rather than using Exit-IfNZEC: we are in a background job, so we - # don't have access to the outer scope. - if ($LASTEXITCODE -ne 0) { - throw "Error extracting '$file': non-zero exit code ($LASTEXITCODE). Output: '$output'" - } - - Write-Host "Extracted to $extractDir" - } - } - - Receive-Job $jobs -Wait - } -} -catch { - Write-Host $_ - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/sdl/extract-artifact-packages.ps1 b/src/arcade/eng/common/sdl/extract-artifact-packages.ps1 deleted file mode 100644 index f031ed5b25e..00000000000 --- a/src/arcade/eng/common/sdl/extract-artifact-packages.ps1 +++ /dev/null @@ -1,82 +0,0 @@ -param( - [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where artifact packages are stored - [Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2.0 - -$disableConfigureToolsetImport = $true - -function ExtractArtifacts { - if (!(Test-Path $InputPath)) { - Write-Host "Input Path does not exist: $InputPath" - ExitWithExitCode 0 - } - $Jobs = @() - Get-ChildItem "$InputPath\*.nupkg" | - ForEach-Object { - $Jobs += Start-Job -ScriptBlock $ExtractPackage -ArgumentList $_.FullName - } - - foreach ($Job in $Jobs) { - Wait-Job -Id $Job.Id | Receive-Job - } -} - -try { - # `tools.ps1` checks $ci to perform some actions. Since the SDL - # scripts don't necessarily execute in the same agent that run the - # build.ps1/sh script this variable isn't automatically set. - $ci = $true - . $PSScriptRoot\..\tools.ps1 - - $ExtractPackage = { - param( - [string] $PackagePath # Full path to a NuGet package - ) - - if (!(Test-Path $PackagePath)) { - Write-PipelineTelemetryError -Category 'Build' -Message "Input file does not exist: $PackagePath" - ExitWithExitCode 1 - } - - $RelevantExtensions = @('.dll', '.exe', '.pdb') - Write-Host -NoNewLine 'Extracting ' ([System.IO.Path]::GetFileName($PackagePath)) '...' - - $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) - $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId - - Add-Type -AssemblyName System.IO.Compression.FileSystem - - [System.IO.Directory]::CreateDirectory($ExtractPath); - - try { - $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) - - $zip.Entries | - Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | - ForEach-Object { - $TargetPath = Join-Path -Path $ExtractPath -ChildPath (Split-Path -Path $_.FullName) - [System.IO.Directory]::CreateDirectory($TargetPath); - - $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.FullName - [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile) - } - } - catch { - Write-Host $_ - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ - ExitWithExitCode 1 - } - finally { - $zip.Dispose() - } - } - Measure-Command { ExtractArtifacts } -} -catch { - Write-Host $_ - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/sdl/init-sdl.ps1 b/src/arcade/eng/common/sdl/init-sdl.ps1 deleted file mode 100644 index 3ac1d92b370..00000000000 --- a/src/arcade/eng/common/sdl/init-sdl.ps1 +++ /dev/null @@ -1,55 +0,0 @@ -Param( - [string] $GuardianCliLocation, - [string] $Repository, - [string] $BranchName='master', - [string] $WorkingDirectory, - [string] $AzureDevOpsAccessToken, - [string] $GuardianLoggerLevel='Standard' -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2.0 -$disableConfigureToolsetImport = $true -$global:LASTEXITCODE = 0 - -# `tools.ps1` checks $ci to perform some actions. Since the SDL -# scripts don't necessarily execute in the same agent that run the -# build.ps1/sh script this variable isn't automatically set. -$ci = $true -. $PSScriptRoot\..\tools.ps1 - -# Don't display the console progress UI - it's a huge perf hit -$ProgressPreference = 'SilentlyContinue' - -# Construct basic auth from AzDO access token; construct URI to the repository's gdn folder stored in that repository; construct location of zip file -$encodedPat = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$AzureDevOpsAccessToken")) -$escapedRepository = [Uri]::EscapeDataString("/$Repository/$BranchName/.gdn") -$uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cfg/Items?path=$escapedRepository&versionDescriptor[versionOptions]=0&`$format=zip&api-version=5.0" -$zipFile = "$WorkingDirectory/gdn.zip" - -Add-Type -AssemblyName System.IO.Compression.FileSystem -$gdnFolder = (Join-Path $WorkingDirectory '.gdn') - -try { - # if the folder does not exist, we'll do a guardian init and push it to the remote repository - Write-Host 'Initializing Guardian...' - Write-Host "$GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel" - & $GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel - if ($LASTEXITCODE -ne 0) { - Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian init failed with exit code $LASTEXITCODE." - ExitWithExitCode $LASTEXITCODE - } - # We create the mainbaseline so it can be edited later - Write-Host "$GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline" - & $GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline - if ($LASTEXITCODE -ne 0) { - Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian baseline failed with exit code $LASTEXITCODE." - ExitWithExitCode $LASTEXITCODE - } - ExitWithExitCode 0 -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/sdl/run-sdl.ps1 b/src/arcade/eng/common/sdl/run-sdl.ps1 deleted file mode 100644 index 2eac8c78f10..00000000000 --- a/src/arcade/eng/common/sdl/run-sdl.ps1 +++ /dev/null @@ -1,49 +0,0 @@ -Param( - [string] $GuardianCliLocation, - [string] $WorkingDirectory, - [string] $GdnFolder, - [string] $UpdateBaseline, - [string] $GuardianLoggerLevel='Standard' -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2.0 -$disableConfigureToolsetImport = $true -$global:LASTEXITCODE = 0 - -try { - # `tools.ps1` checks $ci to perform some actions. Since the SDL - # scripts don't necessarily execute in the same agent that run the - # build.ps1/sh script this variable isn't automatically set. - $ci = $true - . $PSScriptRoot\..\tools.ps1 - - # We store config files in the r directory of .gdn - $gdnConfigPath = Join-Path $GdnFolder 'r' - $ValidPath = Test-Path $GuardianCliLocation - - if ($ValidPath -eq $False) - { - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location." - ExitWithExitCode 1 - } - - $gdnConfigFiles = Get-ChildItem $gdnConfigPath -Recurse -Include '*.gdnconfig' - Write-Host "Discovered Guardian config files:" - $gdnConfigFiles | Out-String | Write-Host - - Exec-BlockVerbosely { - & $GuardianCliLocation run ` - --working-directory $WorkingDirectory ` - --baseline mainbaseline ` - --update-baseline $UpdateBaseline ` - --logger-level $GuardianLoggerLevel ` - --config @gdnConfigFiles - Exit-IfNZEC "Sdl" - } -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/sdl/sdl.ps1 b/src/arcade/eng/common/sdl/sdl.ps1 deleted file mode 100644 index 648c5068d7d..00000000000 --- a/src/arcade/eng/common/sdl/sdl.ps1 +++ /dev/null @@ -1,38 +0,0 @@ - -function Install-Gdn { - param( - [Parameter(Mandatory=$true)] - [string]$Path, - - # If omitted, install the latest version of Guardian, otherwise install that specific version. - [string]$Version - ) - - $ErrorActionPreference = 'Stop' - Set-StrictMode -Version 2.0 - $disableConfigureToolsetImport = $true - $global:LASTEXITCODE = 0 - - # `tools.ps1` checks $ci to perform some actions. Since the SDL - # scripts don't necessarily execute in the same agent that run the - # build.ps1/sh script this variable isn't automatically set. - $ci = $true - . $PSScriptRoot\..\tools.ps1 - - $argumentList = @("install", "Microsoft.Guardian.Cli", "-Source https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json", "-OutputDirectory $Path", "-NonInteractive", "-NoCache") - - if ($Version) { - $argumentList += "-Version $Version" - } - - Start-Process nuget -Verbose -ArgumentList $argumentList -NoNewWindow -Wait - - $gdnCliPath = Get-ChildItem -Filter guardian.cmd -Recurse -Path $Path - - if (!$gdnCliPath) - { - Write-PipelineTelemetryError -Category 'Sdl' -Message 'Failure installing Guardian' - } - - return $gdnCliPath.FullName -} \ No newline at end of file diff --git a/src/arcade/eng/common/sdl/trim-assets-version.ps1 b/src/arcade/eng/common/sdl/trim-assets-version.ps1 deleted file mode 100644 index 0daa2a9e946..00000000000 --- a/src/arcade/eng/common/sdl/trim-assets-version.ps1 +++ /dev/null @@ -1,75 +0,0 @@ -<# -.SYNOPSIS -Install and run the 'Microsoft.DotNet.VersionTools.Cli' tool with the 'trim-artifacts-version' command to trim the version from the NuGet assets file name. - -.PARAMETER InputPath -Full path to directory where artifact packages are stored - -.PARAMETER Recursive -Search for NuGet packages recursively - -#> - -Param( - [string] $InputPath, - [bool] $Recursive = $true -) - -$CliToolName = "Microsoft.DotNet.VersionTools.Cli" - -function Install-VersionTools-Cli { - param( - [Parameter(Mandatory=$true)][string]$Version - ) - - Write-Host "Installing the package '$CliToolName' with a version of '$version' ..." - $feed = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" - - $argumentList = @("tool", "install", "--local", "$CliToolName", "--add-source $feed", "--no-cache", "--version $Version", "--create-manifest-if-needed") - Start-Process "$dotnet" -Verbose -ArgumentList $argumentList -NoNewWindow -Wait -} - -# ------------------------------------------------------------------- - -if (!(Test-Path $InputPath)) { - Write-Host "Input Path '$InputPath' does not exist" - ExitWithExitCode 1 -} - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2.0 - -$disableConfigureToolsetImport = $true -$global:LASTEXITCODE = 0 - -# `tools.ps1` checks $ci to perform some actions. Since the SDL -# scripts don't necessarily execute in the same agent that run the -# build.ps1/sh script this variable isn't automatically set. -$ci = $true -. $PSScriptRoot\..\tools.ps1 - -try { - $dotnetRoot = InitializeDotNetCli -install:$true - $dotnet = "$dotnetRoot\dotnet.exe" - - $toolsetVersion = Read-ArcadeSdkVersion - Install-VersionTools-Cli -Version $toolsetVersion - - $cliToolFound = (& "$dotnet" tool list --local | Where-Object {$_.Split(' ')[0] -eq $CliToolName}) - if ($null -eq $cliToolFound) { - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "The '$CliToolName' tool is not installed." - ExitWithExitCode 1 - } - - Exec-BlockVerbosely { - & "$dotnet" $CliToolName trim-assets-version ` - --assets-path $InputPath ` - --recursive $Recursive - Exit-IfNZEC "Sdl" - } -} -catch { - Write-Host $_ - Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ - ExitWithExitCode 1 -} diff --git a/src/arcade/eng/common/template-guidance.md b/src/arcade/eng/common/template-guidance.md deleted file mode 100644 index 98bbc1ded0b..00000000000 --- a/src/arcade/eng/common/template-guidance.md +++ /dev/null @@ -1,133 +0,0 @@ -# Overview - -Arcade provides templates for public (`/templates`) and 1ES pipeline templates (`/templates-official`) scenarios. Pipelines which are required to be managed by 1ES pipeline templates should reference `/templates-offical`, all other pipelines may reference `/templates`. - -## How to use - -Basic guidance is: - -- 1ES Pipeline Template or 1ES Microbuild template runs should reference `eng/common/templates-official`. Any internal production-graded pipeline should use these templates. - -- All other runs should reference `eng/common/templates`. - -See [azure-pipelines.yml](../../azure-pipelines.yml) (templates-official example) or [azure-pipelines-pr.yml](../../azure-pipelines-pr.yml) (templates example) for examples. - -#### The `templateIs1ESManaged` parameter - -The `templateIs1ESManaged` is available on most templates and affects which of the variants is used for nested templates. See [Development Notes](#development-notes) below for more information on the `templateIs1ESManaged1 parameter. - -- For templates under `job/`, `jobs/`, `steps`, or `post-build/`, this parameter must be explicitly set. - -## Multiple outputs - -1ES pipeline templates impose a policy where every publish artifact execution results in additional security scans being injected into your pipeline. When using `templates-official/jobs/jobs.yml`, Arcade reduces the number of additional security injections by gathering all publishing outputs into the [Build.ArtifactStagingDirectory](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services), and utilizing the [outputParentDirectory](https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs#multiple-outputs) feature of 1ES pipeline templates. When implementing your pipeline, if you ensure publish artifacts are located in the `$(Build.ArtifactStagingDirectory)`, and utilize the 1ES provided template context, then you can reduce the number of security scans for your pipeline. - -Example: -``` yaml -# azure-pipelines.yml -extends: - template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate - parameters: - stages: - - stage: build - jobs: - - template: /eng/common/templates-official/jobs/jobs.yml@self - parameters: - # 1ES makes use of outputs to reduce security task injection overhead - templateContext: - outputs: - - output: pipelineArtifact - displayName: 'Publish logs from source' - continueOnError: true - condition: always() - targetPath: $(Build.ArtifactStagingDirectory)/artifacts/log - artifactName: Logs - jobs: - - job: Windows - steps: - - script: echo "friendly neighborhood" > artifacts/marvel/spiderman.txt - # copy build outputs to artifact staging directory for publishing - - task: CopyFiles@2 - displayName: Gather build output - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/marvel' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/marvel' -``` - -Note: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`). - -## Development notes - -**Folder / file structure** - -``` text -eng\common\ - [templates || templates-official]\ - job\ - job.yml (shim + artifact publishing logic) - onelocbuild.yml (shim) - publish-build-assets.yml (shim) - source-build.yml (shim) - source-index-stage1.yml (shim) - jobs\ - codeql-build.yml (shim) - jobs.yml (shim) - source-build.yml (shim) - post-build\ - post-build.yml (shim) - common-variabls.yml (shim) - setup-maestro-vars.yml (shim) - steps\ - publish-build-artifacts.yml (logic) - publish-pipeline-artifacts.yml (logic) - component-governance.yml (shim) - generate-sbom.yml (shim) - publish-logs.yml (shim) - retain-build.yml (shim) - send-to-helix.yml (shim) - source-build.yml (shim) - variables\ - pool-providers.yml (logic + redirect) # templates/variables/pool-providers.yml will redirect to templates-official/variables/pool-providers.yml if you are running in the internal project - sdl-variables.yml (logic) - core-templates\ - job\ - job.yml (logic) - onelocbuild.yml (logic) - publish-build-assets.yml (logic) - source-build.yml (logic) - source-index-stage1.yml (logic) - jobs\ - codeql-build.yml (logic) - jobs.yml (logic) - source-build.yml (logic) - post-build\ - common-variabls.yml (logic) - post-build.yml (logic) - setup-maestro-vars.yml (logic) - steps\ - component-governance.yml (logic) - generate-sbom.yml (logic) - publish-build-artifacts.yml (redirect) - publish-logs.yml (logic) - publish-pipeline-artifacts.yml (redirect) - retain-build.yml (logic) - send-to-helix.yml (logic) - source-build.yml (logic) - variables\ - pool-providers.yml (redirect) -``` - -In the table above, a file is designated as "shim", "logic", or "redirect". - -- shim - represents a yaml file which is an intermediate step between pipeline logic and .Net Core Engineering's templates (`core-templates`) and defines the `is1ESPipeline` parameter value. - -- logic - represents actual base template logic. - -- redirect- represents a file in `core-templates` which redirects to the "logic" file in either `templates` or `templates-official`. - -Logic for Arcade's templates live **primarily** in the `core-templates` folder. The exceptions to the location of the logic files are around artifact publishing, which is handled differently between 1es pipeline templates and standard templates. `templates` and `templates-official` provide shim entry points which redirect to `core-templates` while also defining the `is1ESPipeline` parameter. If a shim is referenced in `templates`, then `is1ESPipeline` is set to `false`. If a shim is referenced in `templates-official`, then `is1ESPipeline` is set to `true`. - -Within `templates` and `templates-official`, the templates at the "stages", and "jobs" / "job" level have been replaced with shims. Templates at the "steps" and "variables" level are typically too granular to be replaced with shims and instead persist logic which is directly applicable to either scenario. - -Within `core-templates`, there are a handful of places where logic is dependent on which shim entry point was used. In those places, we redirect back to the respective logic file in `templates` or `templates-official`. diff --git a/src/arcade/eng/common/templates-official/job/onelocbuild.yml b/src/arcade/eng/common/templates-official/job/onelocbuild.yml deleted file mode 100644 index 0f0c514b912..00000000000 --- a/src/arcade/eng/common/templates-official/job/onelocbuild.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/job/onelocbuild.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/job/publish-build-assets.yml b/src/arcade/eng/common/templates-official/job/publish-build-assets.yml deleted file mode 100644 index d667a70e8de..00000000000 --- a/src/arcade/eng/common/templates-official/job/publish-build-assets.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/job/publish-build-assets.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/job/source-build.yml b/src/arcade/eng/common/templates-official/job/source-build.yml deleted file mode 100644 index 1a480034b67..00000000000 --- a/src/arcade/eng/common/templates-official/job/source-build.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/job/source-build.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/job/source-index-stage1.yml b/src/arcade/eng/common/templates-official/job/source-index-stage1.yml deleted file mode 100644 index 6d5ead316f9..00000000000 --- a/src/arcade/eng/common/templates-official/job/source-index-stage1.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/job/source-index-stage1.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/jobs/codeql-build.yml b/src/arcade/eng/common/templates-official/jobs/codeql-build.yml deleted file mode 100644 index a726322ecfe..00000000000 --- a/src/arcade/eng/common/templates-official/jobs/codeql-build.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/jobs/codeql-build.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/jobs/jobs.yml b/src/arcade/eng/common/templates-official/jobs/jobs.yml deleted file mode 100644 index 007deddaea0..00000000000 --- a/src/arcade/eng/common/templates-official/jobs/jobs.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/jobs/jobs.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/jobs/source-build.yml b/src/arcade/eng/common/templates-official/jobs/source-build.yml deleted file mode 100644 index 483e7b611f3..00000000000 --- a/src/arcade/eng/common/templates-official/jobs/source-build.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/jobs/source-build.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/post-build/common-variables.yml b/src/arcade/eng/common/templates-official/post-build/common-variables.yml deleted file mode 100644 index c32fc49233f..00000000000 --- a/src/arcade/eng/common/templates-official/post-build/common-variables.yml +++ /dev/null @@ -1,8 +0,0 @@ -variables: -- template: /eng/common/core-templates/post-build/common-variables.yml - parameters: - # Specifies whether to use 1ES - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/post-build/post-build.yml b/src/arcade/eng/common/templates-official/post-build/post-build.yml deleted file mode 100644 index 2364c0fd4a5..00000000000 --- a/src/arcade/eng/common/templates-official/post-build/post-build.yml +++ /dev/null @@ -1,8 +0,0 @@ -stages: -- template: /eng/common/core-templates/post-build/post-build.yml - parameters: - # Specifies whether to use 1ES - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/post-build/setup-maestro-vars.yml b/src/arcade/eng/common/templates-official/post-build/setup-maestro-vars.yml deleted file mode 100644 index 024397d8786..00000000000 --- a/src/arcade/eng/common/templates-official/post-build/setup-maestro-vars.yml +++ /dev/null @@ -1,8 +0,0 @@ -steps: -- template: /eng/common/core-templates/post-build/setup-maestro-vars.yml - parameters: - # Specifies whether to use 1ES - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/steps/component-governance.yml b/src/arcade/eng/common/templates-official/steps/component-governance.yml deleted file mode 100644 index 30bb3985ca2..00000000000 --- a/src/arcade/eng/common/templates-official/steps/component-governance.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/component-governance.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/enable-internal-runtimes.yml b/src/arcade/eng/common/templates-official/steps/enable-internal-runtimes.yml deleted file mode 100644 index f9dd238c6cd..00000000000 --- a/src/arcade/eng/common/templates-official/steps/enable-internal-runtimes.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' -# variable with the base64-encoded SAS token, by default -steps: -- template: /eng/common/core-templates/steps/enable-internal-runtimes.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/enable-internal-sources.yml b/src/arcade/eng/common/templates-official/steps/enable-internal-sources.yml deleted file mode 100644 index e6d57182284..00000000000 --- a/src/arcade/eng/common/templates-official/steps/enable-internal-sources.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/enable-internal-sources.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/steps/generate-sbom.yml b/src/arcade/eng/common/templates-official/steps/generate-sbom.yml deleted file mode 100644 index 9a89a4706d9..00000000000 --- a/src/arcade/eng/common/templates-official/steps/generate-sbom.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/generate-sbom.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/get-delegation-sas.yml b/src/arcade/eng/common/templates-official/steps/get-delegation-sas.yml deleted file mode 100644 index c5a9c1f8275..00000000000 --- a/src/arcade/eng/common/templates-official/steps/get-delegation-sas.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/get-delegation-sas.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/get-federated-access-token.yml b/src/arcade/eng/common/templates-official/steps/get-federated-access-token.yml deleted file mode 100644 index c8dcf6b8139..00000000000 --- a/src/arcade/eng/common/templates-official/steps/get-federated-access-token.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/get-federated-access-token.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/steps/publish-logs.yml b/src/arcade/eng/common/templates-official/steps/publish-logs.yml deleted file mode 100644 index 579fd531e94..00000000000 --- a/src/arcade/eng/common/templates-official/steps/publish-logs.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/publish-logs.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/publish-pipeline-artifacts.yml b/src/arcade/eng/common/templates-official/steps/publish-pipeline-artifacts.yml deleted file mode 100644 index 172f9f0fdc9..00000000000 --- a/src/arcade/eng/common/templates-official/steps/publish-pipeline-artifacts.yml +++ /dev/null @@ -1,28 +0,0 @@ -parameters: -- name: is1ESPipeline - type: boolean - default: true - -- name: args - type: object - default: {} - -steps: -- ${{ if ne(parameters.is1ESPipeline, true) }}: - - 'eng/common/templates-official cannot be referenced from a non-1ES managed template': error -- task: 1ES.PublishPipelineArtifact@1 - displayName: ${{ coalesce(parameters.args.displayName, 'Publish to Build Artifact') }} - ${{ if parameters.args.condition }}: - condition: ${{ parameters.args.condition }} - ${{ else }}: - condition: succeeded() - ${{ if parameters.args.continueOnError }}: - continueOnError: ${{ parameters.args.continueOnError }} - inputs: - targetPath: ${{ parameters.args.targetPath }} - ${{ if parameters.args.artifactName }}: - artifactName: ${{ parameters.args.artifactName }} - ${{ if parameters.args.properties }}: - properties: ${{ parameters.args.properties }} - ${{ if parameters.args.sbomEnabled }}: - sbomEnabled: ${{ parameters.args.sbomEnabled }} diff --git a/src/arcade/eng/common/templates-official/steps/retain-build.yml b/src/arcade/eng/common/templates-official/steps/retain-build.yml deleted file mode 100644 index 5594551508a..00000000000 --- a/src/arcade/eng/common/templates-official/steps/retain-build.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/retain-build.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/send-to-helix.yml b/src/arcade/eng/common/templates-official/steps/send-to-helix.yml deleted file mode 100644 index 6500f21bf84..00000000000 --- a/src/arcade/eng/common/templates-official/steps/send-to-helix.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/send-to-helix.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/steps/source-build.yml b/src/arcade/eng/common/templates-official/steps/source-build.yml deleted file mode 100644 index 8f92c49e7b0..00000000000 --- a/src/arcade/eng/common/templates-official/steps/source-build.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/source-build.yml - parameters: - is1ESPipeline: true - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates-official/variables/pool-providers.yml b/src/arcade/eng/common/templates-official/variables/pool-providers.yml deleted file mode 100644 index 1f308b24efc..00000000000 --- a/src/arcade/eng/common/templates-official/variables/pool-providers.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, -# otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. - -# Motivation: -# Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS -# (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing -# (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS. -# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services -# team needs to move resources around and create new and potentially differently-named pools. Using this template -# file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. - -# How to use: -# This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). -# If we find alternate naming conventions in broad usage it can be added to the condition below. -# -# First, import the template in an arcade-ified repo to pick up the variables, e.g.: -# -# variables: -# - template: /eng/common/templates-official/variables/pool-providers.yml -# -# ... then anywhere specifying the pool provider use the runtime variables, -# $(DncEngInternalBuildPool) -# -# pool: -# name: $(DncEngInternalBuildPool) -# image: 1es-windows-2022 - -variables: - # Coalesce the target and source branches so we know when a PR targets a release branch - # If these variables are somehow missing, fall back to main (tends to have more capacity) - - # Any new -Svc alternative pools should have variables added here to allow for splitting work - - - name: DncEngInternalBuildPool - value: $[ - replace( - replace( - eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), - True, - 'NetCore1ESPool-Svc-Internal' - ), - False, - 'NetCore1ESPool-Internal' - ) - ] \ No newline at end of file diff --git a/src/arcade/eng/common/templates-official/variables/sdl-variables.yml b/src/arcade/eng/common/templates-official/variables/sdl-variables.yml deleted file mode 100644 index dbdd66d4a4b..00000000000 --- a/src/arcade/eng/common/templates-official/variables/sdl-variables.yml +++ /dev/null @@ -1,7 +0,0 @@ -variables: -# The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in -# sync with the packages.config file. -- name: DefaultGuardianVersion - value: 0.109.0 -- name: GuardianPackagesConfigFile - value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config \ No newline at end of file diff --git a/src/arcade/eng/common/templates/job/onelocbuild.yml b/src/arcade/eng/common/templates/job/onelocbuild.yml deleted file mode 100644 index ff829dc4c70..00000000000 --- a/src/arcade/eng/common/templates/job/onelocbuild.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/job/onelocbuild.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/job/publish-build-assets.yml b/src/arcade/eng/common/templates/job/publish-build-assets.yml deleted file mode 100644 index ab2edec2adb..00000000000 --- a/src/arcade/eng/common/templates/job/publish-build-assets.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/job/publish-build-assets.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/job/source-build.yml b/src/arcade/eng/common/templates/job/source-build.yml deleted file mode 100644 index e44d47b1d76..00000000000 --- a/src/arcade/eng/common/templates/job/source-build.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/job/source-build.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/job/source-index-stage1.yml b/src/arcade/eng/common/templates/job/source-index-stage1.yml deleted file mode 100644 index 89f3291593c..00000000000 --- a/src/arcade/eng/common/templates/job/source-index-stage1.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/job/source-index-stage1.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/jobs/codeql-build.yml b/src/arcade/eng/common/templates/jobs/codeql-build.yml deleted file mode 100644 index 517f24d6a52..00000000000 --- a/src/arcade/eng/common/templates/jobs/codeql-build.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/jobs/codeql-build.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/jobs/jobs.yml b/src/arcade/eng/common/templates/jobs/jobs.yml deleted file mode 100644 index 388e9037b3e..00000000000 --- a/src/arcade/eng/common/templates/jobs/jobs.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/jobs/jobs.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/jobs/source-build.yml b/src/arcade/eng/common/templates/jobs/source-build.yml deleted file mode 100644 index 818d4c326db..00000000000 --- a/src/arcade/eng/common/templates/jobs/source-build.yml +++ /dev/null @@ -1,7 +0,0 @@ -jobs: -- template: /eng/common/core-templates/jobs/source-build.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/post-build/common-variables.yml b/src/arcade/eng/common/templates/post-build/common-variables.yml deleted file mode 100644 index 7fa10587559..00000000000 --- a/src/arcade/eng/common/templates/post-build/common-variables.yml +++ /dev/null @@ -1,8 +0,0 @@ -variables: -- template: /eng/common/core-templates/post-build/common-variables.yml - parameters: - # Specifies whether to use 1ES - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/post-build/post-build.yml b/src/arcade/eng/common/templates/post-build/post-build.yml deleted file mode 100644 index 53ede714bdd..00000000000 --- a/src/arcade/eng/common/templates/post-build/post-build.yml +++ /dev/null @@ -1,8 +0,0 @@ -stages: -- template: /eng/common/core-templates/post-build/post-build.yml - parameters: - # Specifies whether to use 1ES - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/post-build/setup-maestro-vars.yml b/src/arcade/eng/common/templates/post-build/setup-maestro-vars.yml deleted file mode 100644 index a79fab5b441..00000000000 --- a/src/arcade/eng/common/templates/post-build/setup-maestro-vars.yml +++ /dev/null @@ -1,8 +0,0 @@ -steps: -- template: /eng/common/core-templates/post-build/setup-maestro-vars.yml - parameters: - # Specifies whether to use 1ES - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/steps/component-governance.yml b/src/arcade/eng/common/templates/steps/component-governance.yml deleted file mode 100644 index c12a5f8d21d..00000000000 --- a/src/arcade/eng/common/templates/steps/component-governance.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/component-governance.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/enable-internal-runtimes.yml b/src/arcade/eng/common/templates/steps/enable-internal-runtimes.yml deleted file mode 100644 index b21a8038cc1..00000000000 --- a/src/arcade/eng/common/templates/steps/enable-internal-runtimes.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64' -# variable with the base64-encoded SAS token, by default - -steps: -- template: /eng/common/core-templates/steps/enable-internal-runtimes.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/enable-internal-sources.yml b/src/arcade/eng/common/templates/steps/enable-internal-sources.yml deleted file mode 100644 index 5f87e9abb8a..00000000000 --- a/src/arcade/eng/common/templates/steps/enable-internal-sources.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/enable-internal-sources.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/steps/generate-sbom.yml b/src/arcade/eng/common/templates/steps/generate-sbom.yml deleted file mode 100644 index 26dc00a2e0f..00000000000 --- a/src/arcade/eng/common/templates/steps/generate-sbom.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/generate-sbom.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/get-delegation-sas.yml b/src/arcade/eng/common/templates/steps/get-delegation-sas.yml deleted file mode 100644 index 83760c9798e..00000000000 --- a/src/arcade/eng/common/templates/steps/get-delegation-sas.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/get-delegation-sas.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/get-federated-access-token.yml b/src/arcade/eng/common/templates/steps/get-federated-access-token.yml deleted file mode 100644 index 31e151d9d9e..00000000000 --- a/src/arcade/eng/common/templates/steps/get-federated-access-token.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/get-federated-access-token.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/steps/publish-logs.yml b/src/arcade/eng/common/templates/steps/publish-logs.yml deleted file mode 100644 index 4ea86bd8823..00000000000 --- a/src/arcade/eng/common/templates/steps/publish-logs.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/publish-logs.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/publish-pipeline-artifacts.yml b/src/arcade/eng/common/templates/steps/publish-pipeline-artifacts.yml deleted file mode 100644 index 5dd698b212f..00000000000 --- a/src/arcade/eng/common/templates/steps/publish-pipeline-artifacts.yml +++ /dev/null @@ -1,34 +0,0 @@ -parameters: -- name: is1ESPipeline - type: boolean - default: false - -- name: args - type: object - default: {} - -steps: -- ${{ if eq(parameters.is1ESPipeline, true) }}: - - 'eng/common/templates cannot be referenced from a 1ES managed template': error -- task: PublishPipelineArtifact@1 - displayName: ${{ coalesce(parameters.args.displayName, 'Publish to Build Artifact') }} - ${{ if parameters.args.condition }}: - condition: ${{ parameters.args.condition }} - ${{ else }}: - condition: succeeded() - ${{ if parameters.args.continueOnError }}: - continueOnError: ${{ parameters.args.continueOnError }} - inputs: - targetPath: ${{ parameters.args.targetPath }} - ${{ if parameters.args.artifactName }}: - artifactName: ${{ parameters.args.artifactName }} - ${{ if parameters.args.publishLocation }}: - publishLocation: ${{ parameters.args.publishLocation }} - ${{ if parameters.args.fileSharePath }}: - fileSharePath: ${{ parameters.args.fileSharePath }} - ${{ if parameters.args.Parallel }}: - parallel: ${{ parameters.args.Parallel }} - ${{ if parameters.args.parallelCount }}: - parallelCount: ${{ parameters.args.parallelCount }} - ${{ if parameters.args.properties }}: - properties: ${{ parameters.args.properties }} \ No newline at end of file diff --git a/src/arcade/eng/common/templates/steps/retain-build.yml b/src/arcade/eng/common/templates/steps/retain-build.yml deleted file mode 100644 index 8e841ace3d2..00000000000 --- a/src/arcade/eng/common/templates/steps/retain-build.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/retain-build.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/send-to-helix.yml b/src/arcade/eng/common/templates/steps/send-to-helix.yml deleted file mode 100644 index 39f99fc2762..00000000000 --- a/src/arcade/eng/common/templates/steps/send-to-helix.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/send-to-helix.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/steps/source-build.yml b/src/arcade/eng/common/templates/steps/source-build.yml deleted file mode 100644 index 23c1d6f4e9f..00000000000 --- a/src/arcade/eng/common/templates/steps/source-build.yml +++ /dev/null @@ -1,7 +0,0 @@ -steps: -- template: /eng/common/core-templates/steps/source-build.yml - parameters: - is1ESPipeline: false - - ${{ each parameter in parameters }}: - ${{ parameter.key }}: ${{ parameter.value }} diff --git a/src/arcade/eng/common/templates/variables/pool-providers.yml b/src/arcade/eng/common/templates/variables/pool-providers.yml deleted file mode 100644 index e0b19c14a07..00000000000 --- a/src/arcade/eng/common/templates/variables/pool-providers.yml +++ /dev/null @@ -1,59 +0,0 @@ -# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, -# otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. - -# Motivation: -# Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS -# (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing -# (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS. -# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services -# team needs to move resources around and create new and potentially differently-named pools. Using this template -# file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. - -# How to use: -# This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). -# If we find alternate naming conventions in broad usage it can be added to the condition below. -# -# First, import the template in an arcade-ified repo to pick up the variables, e.g.: -# -# variables: -# - template: /eng/common/templates/variables/pool-providers.yml -# -# ... then anywhere specifying the pool provider use the runtime variables, -# $(DncEngInternalBuildPool) and $ (DncEngPublicBuildPool), e.g.: -# -# pool: -# name: $(DncEngInternalBuildPool) -# demands: ImageOverride -equals windows.vs2019.amd64 -variables: - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - template: /eng/common/templates-official/variables/pool-providers.yml - - ${{ else }}: - # Coalesce the target and source branches so we know when a PR targets a release branch - # If these variables are somehow missing, fall back to main (tends to have more capacity) - - # Any new -Svc alternative pools should have variables added here to allow for splitting work - - name: DncEngPublicBuildPool - value: $[ - replace( - replace( - eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), - True, - 'NetCore-Svc-Public' - ), - False, - 'NetCore-Public' - ) - ] - - - name: DncEngInternalBuildPool - value: $[ - replace( - replace( - eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), - True, - 'NetCore1ESPool-Svc-Internal' - ), - False, - 'NetCore1ESPool-Internal' - ) - ] From 5db953fd520a4af9dafd0ad0ed4e1f1254d5f65a Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Fri, 16 May 2025 09:05:44 +0200 Subject: [PATCH 22/38] Update automerge config (#18552) --- .config/service-branch-merge.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/service-branch-merge.json b/.config/service-branch-merge.json index 9eaf6479d45..ec35ec5bcb5 100644 --- a/.config/service-branch-merge.json +++ b/.config/service-branch-merge.json @@ -1,12 +1,16 @@ { "merge-flow-configurations": { // regular branch flow + "release/dev17.12": { + "MergeToBranch": "release/dev17.13", + "ExtraSwitches": "-QuietComments" + }, "release/dev17.13": { - "MergeToBranch": "main", + "MergeToBranch": "release/dev17.14", "ExtraSwitches": "-QuietComments" }, "release/dev17.14": { - "MergeToBranch": "release/dev18.0", + "MergeToBranch": "main", "ExtraSwitches": "-QuietComments" }, "main": { From 8b7bf60d712eb673586231f1e94fe254c3cb0b44 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Fri, 16 May 2025 12:29:35 +0100 Subject: [PATCH 23/38] Allow `let!` and `use!` binding with type annotation without parentheses. (#18508) --- .../.FSharp.Compiler.Service/10.0.100.md | 3 + docs/release-notes/.Language/preview.md | 1 + .../CheckComputationExpressions.fs | 4 + src/Compiler/FSComp.txt | 1 + src/Compiler/Facilities/LanguageFeatures.fs | 3 + src/Compiler/Facilities/LanguageFeatures.fsi | 1 + src/Compiler/pars.fsy | 33 +++++ src/Compiler/xlf/FSComp.txt.cs.xlf | 5 + src/Compiler/xlf/FSComp.txt.de.xlf | 5 + src/Compiler/xlf/FSComp.txt.es.xlf | 5 + src/Compiler/xlf/FSComp.txt.fr.xlf | 5 + src/Compiler/xlf/FSComp.txt.it.xlf | 5 + src/Compiler/xlf/FSComp.txt.ja.xlf | 5 + src/Compiler/xlf/FSComp.txt.ko.xlf | 5 + src/Compiler/xlf/FSComp.txt.pl.xlf | 5 + src/Compiler/xlf/FSComp.txt.pt-BR.xlf | 5 + src/Compiler/xlf/FSComp.txt.ru.xlf | 5 + src/Compiler/xlf/FSComp.txt.tr.xlf | 5 + src/Compiler/xlf/FSComp.txt.zh-Hans.xlf | 5 + src/Compiler/xlf/FSComp.txt.zh-Hant.xlf | 5 + .../UseBindings/UseBang05.fs | 58 ++++++++ .../UseBindings/UseBangBindings.fs | 22 +++ .../UseBindings/UseBinding01.fs | 7 + .../UseBindings/UseBinding02.fs | 26 ++++ .../UseBindings/UseBindingDiscard03.fs | 26 ++++ .../UseBindings/UseBindings.fs | 23 +++- .../SyntaxTree/SynType/Typed LetBang 01.fs | 6 + .../SynType/Typed LetBang 01.fs.bsl | 36 +++++ .../SyntaxTree/SynType/Typed LetBang 02.fs | 6 + .../SynType/Typed LetBang 02.fs.bsl | 38 ++++++ .../SyntaxTree/SynType/Typed LetBang 03.fs | 7 + .../SynType/Typed LetBang 03.fs.bsl | 125 ++++++++++++++++++ .../SyntaxTree/SynType/Typed LetBang 04.fs | 7 + .../SynType/Typed LetBang 04.fs.bsl | 51 +++++++ .../SyntaxTree/SynType/Typed LetBang 05.fs | 3 + .../SynType/Typed LetBang 05.fs.bsl | 47 +++++++ .../SyntaxTree/SynType/Typed LetBang 06.fs | 3 + .../SynType/Typed LetBang 06.fs.bsl | 47 +++++++ .../SyntaxTree/SynType/Typed UseBang 01.fs | 6 + .../SynType/Typed UseBang 01.fs.bsl | 36 +++++ .../SyntaxTree/SynType/Typed UseBang 02.fs | 6 + .../SynType/Typed UseBang 02.fs.bsl | 38 ++++++ .../SyntaxTree/SynType/Typed UseBang 03.fs | 4 + .../SynType/Typed UseBang 03.fs.bsl | 47 +++++++ .../SyntaxTree/SynType/Typed UseBang 04.fs | 4 + .../SynType/Typed UseBang 04.fs.bsl | 47 +++++++ 46 files changed, 836 insertions(+), 1 deletion(-) create mode 100644 docs/release-notes/.FSharp.Compiler.Service/10.0.100.md create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang05.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBinding01.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBinding02.fs create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindingDiscard03.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs.bsl create mode 100644 tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs create mode 100644 tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs.bsl diff --git a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md new file mode 100644 index 00000000000..52228f33b09 --- /dev/null +++ b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md @@ -0,0 +1,3 @@ +### Fixed + +* Allow `let!` and `use!` type annotations without requiring parentheses ([PR #18508](https://github.com/dotnet/fsharp/pull/18508)) diff --git a/docs/release-notes/.Language/preview.md b/docs/release-notes/.Language/preview.md index 4a420016a14..40775e8dfa6 100644 --- a/docs/release-notes/.Language/preview.md +++ b/docs/release-notes/.Language/preview.md @@ -7,6 +7,7 @@ * Allow `_` in `use!` bindings values (lift FS1228 restriction) ([PR #18487](https://github.com/dotnet/fsharp/pull/18487)) * Warn when `unit` is passed to an `obj`-typed argument ([PR #18330](https://github.com/dotnet/fsharp/pull/18330)) * Scoped Nowarn: added the #warnon compiler directive ([Language suggestion #278](https://github.com/fsharp/fslang-suggestions/issues/278), [RFC FS-1146 PR](https://github.com/fsharp/fslang-design/pull/782), [PR #18049](https://github.com/dotnet/fsharp/pull/18049)) +* Allow `let!` and `use!` type annotations without requiring parentheses. ([PR #18508](https://github.com/dotnet/fsharp/pull/18508)) ### Fixed diff --git a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs index f861665a5fc..0d2404c5b1a 100644 --- a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs @@ -1793,6 +1793,9 @@ let rec TryTranslateComputationExpression let supportsUseBangBindingValueDiscard = ceenv.cenv.g.langVersion.SupportsFeature LanguageFeature.UseBangBindingValueDiscard + let supportsTypedLetOrUseBang = + ceenv.cenv.g.langVersion.SupportsFeature LanguageFeature.AllowTypedLetOrUseBang + // use! x = ... // use! (x) = ... // use! (__) = ... @@ -1802,6 +1805,7 @@ let rec TryTranslateComputationExpression match pat with | SynPat.Named(ident = SynIdent(id, _); isThisVal = false) -> id, pat | SynPat.LongIdent(longDotId = SynLongIdent(id = [ id ])) -> id, pat + | SynPat.Typed(pat = pat) when supportsTypedLetOrUseBang -> extractIdentifierFromPattern pat | SynPat.Wild(m) when supportsUseBangBindingValueDiscard -> // To properly call the Using(disposable) CE member, we need to convert the wildcard to a SynPat.Named let tmpIdent = mkSynId m "_" diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index 010088e958e..1d7e9d6499a 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -1800,6 +1800,7 @@ featureSupportValueOptionsAsOptionalParameters,"Support ValueOption as valid typ featureSupportWarnWhenUnitPassedToObjArg,"Warn when unit is passed to a member accepting `obj` argument, e.g. `Method(o:obj)` will warn if called via `Method()`." featureUseBangBindingValueDiscard,"Allows use! _ = ... in computation expressions" featureScopedNowarn,"Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules" +featureAllowLetOrUseBangTypeAnnotationWithoutParens,"Allow let! and use! type annotations without requiring parentheses" 3874,lexWarnDirectiveMustBeFirst,"#nowarn/#warnon directives must appear as the first non-whitespace characters on a line" 3875,lexWarnDirectiveMustHaveArgs,"Warn directives must have warning number(s) as argument(s)" 3876,lexWarnDirectivesMustMatch,"There is another %s for this warning already in line %d." diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index 763452592a4..fd0f646531b 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -101,6 +101,7 @@ type LanguageFeature = | WarnWhenUnitPassedToObjArg | UseBangBindingValueDiscard | ScopedNowarn + | AllowTypedLetOrUseBang /// LanguageVersion management type LanguageVersion(versionText) = @@ -233,6 +234,7 @@ type LanguageVersion(versionText) = LanguageFeature.WarnWhenUnitPassedToObjArg, previewVersion LanguageFeature.UseBangBindingValueDiscard, previewVersion LanguageFeature.ScopedNowarn, previewVersion + LanguageFeature.AllowTypedLetOrUseBang, previewVersion ] static let defaultLanguageVersion = LanguageVersion("default") @@ -397,6 +399,7 @@ type LanguageVersion(versionText) = | LanguageFeature.WarnWhenUnitPassedToObjArg -> FSComp.SR.featureSupportWarnWhenUnitPassedToObjArg () | LanguageFeature.UseBangBindingValueDiscard -> FSComp.SR.featureUseBangBindingValueDiscard () | LanguageFeature.ScopedNowarn -> FSComp.SR.featureScopedNowarn () + | LanguageFeature.AllowTypedLetOrUseBang -> FSComp.SR.featureAllowLetOrUseBangTypeAnnotationWithoutParens () /// Get a version string associated with the given feature. static member GetFeatureVersionString feature = diff --git a/src/Compiler/Facilities/LanguageFeatures.fsi b/src/Compiler/Facilities/LanguageFeatures.fsi index a452205765e..95bd956e0b7 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fsi +++ b/src/Compiler/Facilities/LanguageFeatures.fsi @@ -92,6 +92,7 @@ type LanguageFeature = | WarnWhenUnitPassedToObjArg | UseBangBindingValueDiscard | ScopedNowarn + | AllowTypedLetOrUseBang /// LanguageVersion management type LanguageVersion = diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 7326c4a6a12..61f8e2fef86 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -4466,6 +4466,39 @@ declExpr: let trivia: SynExprLetOrUseBangTrivia = { LetOrUseBangKeyword = rhs parseState 1 ; EqualsRange = Some mEquals } SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, $2, $4, $7, $8, m, trivia) } + | BINDER headBindingPattern opt_topReturnTypeWithTypeConstraints EQUALS typedSequentialExprBlock IN opt_OBLOCKSEP moreBinders typedSequentialExprBlock %prec expr_let + { // Handle type annotations on patterns in let!/use! bindings + // Examples: let! x: int = async { return 1 } + // use! _: IDisposable = async { return new MemoryStream() } + let spBind = DebugPointAtBinding.Yes(rhs2 parseState 1 7) + let pat = + match $3 with + | None -> $2 + | Some (_, SynReturnInfo((ty, _), _)) -> + SynPat.Typed($2, ty, unionRanges $2.Range ty.Range) + parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang pat.Range + let mEquals = rhs parseState 4 + let m = unionRanges (rhs parseState 1) $9.Range + let trivia: SynExprLetOrUseBangTrivia = { LetOrUseBangKeyword = rhs parseState 1 ; EqualsRange = Some mEquals } + SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, pat, $5, $8, $9, m, trivia) } + + | OBINDER headBindingPattern opt_topReturnTypeWithTypeConstraints EQUALS typedSequentialExprBlock hardwhiteDefnBindingsTerminator opt_OBLOCKSEP moreBinders typedSequentialExprBlock %prec expr_let + { // Handle type annotations on patterns in let!/use! bindings (offside-sensitive version) + // This rule maintains consistent handling of binding constructs across different syntactic contexts + let report, mIn, _ = $6 + report (if $1 = "use" then "use!" else "let!") (rhs parseState 1) // report unterminated error + let spBind = DebugPointAtBinding.Yes(unionRanges (rhs parseState 1) $5.Range) + let pat = + match $3 with + | None -> $2 + | Some (_, SynReturnInfo((ty, _), _)) -> + SynPat.Typed($2, ty, unionRanges $2.Range ty.Range) + parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang pat.Range + let mEquals = rhs parseState 4 + let m = unionRanges (rhs parseState 1) $9.Range + let trivia: SynExprLetOrUseBangTrivia = { LetOrUseBangKeyword = rhs parseState 1 ; EqualsRange = Some mEquals } + SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, pat, $5, $8, $9, m, trivia) } + | OBINDER headBindingPattern EQUALS typedSequentialExprBlock hardwhiteDefnBindingsTerminator opt_OBLOCKSEP error %prec expr_let { // error recovery that allows intellisense when writing incomplete computation expressions let spBind = DebugPointAtBinding.Yes(unionRanges (rhs parseState 1) $4.Range) diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index de5b2815fdc..caa825a8245 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 53bf24ff3e9..2d193f09a0e 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index 483e820ed5c..1e0f79d0124 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index f003166db2d..71a14ff33f0 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index e4c08f83cb2..12f56c30e93 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index 7d56499a955..d84ecad7170 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index 887f0f199f1..39c3a728b37 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index 589e0f8535e..e5f2bda5529 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index 5af5b7fcd34..c69f534b10e 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index e8747be3f5c..ca41d4affcc 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index a2d6e89305c..17a75ffa27c 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index fce23f29c9a..155480c6314 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index d2563922fc3..3c96310c8a7 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -287,6 +287,11 @@ Allow access modifiers to auto properties getters and setters + + Allow let! and use! type annotations without requiring parentheses + Allow let! and use! type annotations without requiring parentheses + + Allow object expressions without overrides Allow object expressions without overrides diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang05.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang05.fs new file mode 100644 index 00000000000..7bd2b4cd827 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBang05.fs @@ -0,0 +1,58 @@ +open System + +open System + +type Disposable(id: int) = + static let mutable disposedIds = Set.empty + static let mutable constructedIds = Set.empty + + do constructedIds <- constructedIds.Add(id) + + member _.Id = id + + static member GetDisposed() = disposedIds + static member GetConstructed() = constructedIds + static member Reset() = + disposedIds <- Set.empty + constructedIds <- Set.empty + + interface IDisposable with + member this.Dispose() = disposedIds <- disposedIds.Add(this.Id) + +type DisposableBuilder() = + member _.Using(resource: #IDisposable, f) = + async { + use res = resource + return! f res + } + + member _.Bind(disposable: Disposable, f) = async.Bind(async.Return(disposable), f) + member _.Return(x) = async.Return x + member _.ReturnFrom(x) = x + member _.Bind(task, f) = async.Bind(task, f) + +let counterDisposable = DisposableBuilder() + +let testBindingPatterns() = + Disposable.Reset() + + counterDisposable { + use! res:IDisposable = new Disposable(1) + use! __:IDisposable = new Disposable(2) + use! (res1: IDisposable) = new Disposable(3) + use! _: IDisposable = new Disposable(4) + use! (_: IDisposable) = new Disposable(5) + return () + } |> Async.RunSynchronously + + let constructed = Disposable.GetConstructed() + let disposed = Disposable.GetDisposed() + let undisposed = constructed - disposed + + if not undisposed.IsEmpty then + printfn $"Undisposed instances: %A{undisposed}" + failwithf "Not all disposables were properly disposed" + else + printfn $"Success! All %d{constructed.Count} disposables were properly disposed" + +testBindingPatterns() \ No newline at end of file diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBangBindings.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBangBindings.fs index ba0f31bd885..37c1447e89e 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBangBindings.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBangBindings.fs @@ -50,6 +50,19 @@ module UseBangBindingsVersion9 = |> withDiagnostics [ (Error 1228, Line 47, Col 14, Line 47, Col 15, "'use!' bindings must be of the form 'use! = '") ] + + [] + let ``UseBangBindings - UseBang05_fs - Current LangVersion`` compilation = + compilation + |> asFsx + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 43, Col 14, Line 43, Col 28, "Feature 'Allow let! and use! type annotations without requiring parentheses' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 41, Col 14, Line 41, Col 28, "Feature 'Allow let! and use! type annotations without requiring parentheses' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 40, Col 14, Line 40, Col 29, "Feature 'Allow let! and use! type annotations without requiring parentheses' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] module UseBangBindingsPreview = [] @@ -83,4 +96,13 @@ module UseBangBindingsPreview = |> withLangVersionPreview |> compileAndRun |> shouldSucceed + + [] + let ``UseBangBindings - UseBang05_fs - Preview LangVersion`` compilation = + compilation + |> asExe + |> withLangVersionPreview + |> compileAndRun + |> shouldSucceed + diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBinding01.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBinding01.fs new file mode 100644 index 00000000000..4fbe7575b3a --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBinding01.fs @@ -0,0 +1,7 @@ +// #DeclarationElements #LetBindings +// +open System + +let answer = + use x:IDisposable = new System.IO.MemoryStream() + 42 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBinding02.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBinding02.fs new file mode 100644 index 00000000000..be6cf7b8399 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBinding02.fs @@ -0,0 +1,26 @@ +open System + +type private Disposable() = + [] static val mutable private disposedTimes: int + [] static val mutable private constructedTimes: int + + do Disposable.constructedTimes <- Disposable.constructedTimes + 1 + + static member DisposeCallCount() = Disposable.disposedTimes + static member ConstructorCallCount() = Disposable.constructedTimes + + interface System.IDisposable with + member _.Dispose() = + Disposable.disposedTimes <- Disposable.disposedTimes + 1 + +let _scope = + use x: IDisposable = new Disposable() + () + +let disposeCalls = Disposable.DisposeCallCount() +if disposeCalls <> 1 then + failwith "was not disposed or disposed too many times" + +let ctorCalls = Disposable.ConstructorCallCount() +if ctorCalls <> 1 then + failwithf "unexpected constructor call count: %i" ctorCalls diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindingDiscard03.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindingDiscard03.fs new file mode 100644 index 00000000000..840870377fe --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindingDiscard03.fs @@ -0,0 +1,26 @@ +open System + +type private Disposable() = + [] static val mutable private disposedTimes: int + [] static val mutable private constructedTimes: int + + do Disposable.constructedTimes <- Disposable.constructedTimes + 1 + + static member DisposeCallCount() = Disposable.disposedTimes + static member ConstructorCallCount() = Disposable.constructedTimes + + interface System.IDisposable with + member _.Dispose() = + Disposable.disposedTimes <- Disposable.disposedTimes + 1 + +let _scope = + use _:IDisposable = new Disposable() + () + +let disposeCalls = Disposable.DisposeCallCount() +if disposeCalls <> 1 then + failwith "was not disposed or disposed too many times" + +let ctorCalls = Disposable.ConstructorCallCount() +if ctorCalls <> 1 then + failwithf "unexpected constructor call count: %i" ctorCalls diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs index 74137286a8a..b1e08869312 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/UseBindings/UseBindings.fs @@ -33,4 +33,25 @@ module UseBindings = |> asExe |> withLangVersion60 |> compileAndRun - |> shouldSucceed \ No newline at end of file + |> shouldSucceed + + [] + let ``UseBindings - UseBindingDiscard03_fs - Current LangVersion`` compilation = + compilation + |> asExe + |> compileAndRun + |> shouldSucceed + + [] + let ``UseBindings - UseBinding01_fs - Current LangVersion`` compilation = + compilation + |> asFsx + |> compile + |> shouldSucceed + + [] + let ``UseBindings - UseBinding02_fs - Current LangVersion`` compilation = + compilation + |> asFsx + |> compile + |> shouldSucceed diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs b/tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs new file mode 100644 index 00000000000..f191f7aee2b --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs @@ -0,0 +1,6 @@ +module Module + +async { + let! res: int = async { return 1 } + return res +} diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs.bsl new file mode 100644 index 00000000000..1aa552d5f05 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs.bsl @@ -0,0 +1,36 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Typed LetBang 01.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + LetOrUseBang + (Yes (4,4--4,38), false, true, + Typed + (Named (SynIdent (res, None), false, None, (4,9--4,12)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,9--4,17)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (4,35--4,36)), + (4,28--4,36), + { YieldOrReturnKeyword = (4,28--4,34) }), + (4,26--4,38)), (4,20--4,38)), [], + YieldOrReturn + ((false, true), Ident res, (5,4--5,14), + { YieldOrReturnKeyword = (5,4--5,10) }), (4,4--5,14), + { LetOrUseBangKeyword = (4,4--4,8) + EqualsRange = Some (4,18--4,19) }), (3,6--6,1)), + (3,0--6,1)), (3,0--6,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs b/tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs new file mode 100644 index 00000000000..4d58841b1d6 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs @@ -0,0 +1,6 @@ +module Module + +async { + let! (res: int) = async { return 1 } + return res +} diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs.bsl new file mode 100644 index 00000000000..6046708ca7f --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs.bsl @@ -0,0 +1,38 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Typed LetBang 02.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + LetOrUseBang + (Yes (4,4--4,40), false, true, + Paren + (Typed + (Named + (SynIdent (res, None), false, None, (4,10--4,13)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,10--4,18)), (4,9--4,19)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (4,37--4,38)), + (4,30--4,38), + { YieldOrReturnKeyword = (4,30--4,36) }), + (4,28--4,40)), (4,22--4,40)), [], + YieldOrReturn + ((false, true), Ident res, (5,4--5,14), + { YieldOrReturnKeyword = (5,4--5,10) }), (4,4--5,14), + { LetOrUseBangKeyword = (4,4--4,8) + EqualsRange = Some (4,20--4,21) }), (3,6--6,1)), + (3,0--6,1)), (3,0--6,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs b/tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs new file mode 100644 index 00000000000..5c5e72047cc --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs @@ -0,0 +1,7 @@ +module Module + +async { + let (a: int, b: int) = 1, 3 + let! (c: int, d: int) = async { return 1, 3 } + return a + b + c + d +} diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs.bsl new file mode 100644 index 00000000000..c065ea59e32 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs.bsl @@ -0,0 +1,125 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Typed LetBang 03.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + LetOrUse + (false, false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Tuple + (false, + [Typed + (Named + (SynIdent (a, None), false, None, + (4,9--4,10)), + LongIdent + (SynLongIdent ([int], [], [None])), + (4,9--4,15)); + Typed + (Named + (SynIdent (b, None), false, None, + (4,17--4,18)), + LongIdent + (SynLongIdent ([int], [], [None])), + (4,17--4,23))], [(4,15--4,16)], (4,9--4,23)), + (4,8--4,24)), None, + Tuple + (false, + [Const (Int32 1, (4,27--4,28)); + Const (Int32 3, (4,30--4,31))], [(4,28--4,29)], + (4,27--4,31)), (4,8--4,24), Yes (4,4--4,31), + { LeadingKeyword = Let (4,4--4,7) + InlineKeyword = None + EqualsRange = Some (4,25--4,26) })], + LetOrUseBang + (Yes (5,4--5,49), false, true, + Paren + (Tuple + (false, + [Typed + (Named + (SynIdent (c, None), false, None, + (5,10--5,11)), + LongIdent (SynLongIdent ([int], [], [None])), + (5,10--5,16)); + Typed + (Named + (SynIdent (d, None), false, None, + (5,18--5,19)), + LongIdent (SynLongIdent ([int], [], [None])), + (5,18--5,24))], [(5,16--5,17)], (5,10--5,24)), + (5,9--5,25)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), + Tuple + (false, + [Const (Int32 1, (5,43--5,44)); + Const (Int32 3, (5,46--5,47))], + [(5,44--5,45)], (5,43--5,47)), + (5,36--5,47), + { YieldOrReturnKeyword = (5,36--5,42) }), + (5,34--5,49)), (5,28--5,49)), [], + YieldOrReturn + ((false, true), + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (6,21--6,22)), + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), + None, (6,17--6,18)), + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some + (OriginalNotation "+")]), + None, (6,13--6,14)), Ident a, + (6,11--6,14)), Ident b, + (6,11--6,16)), (6,11--6,18)), + Ident c, (6,11--6,20)), (6,11--6,22)), + Ident d, (6,11--6,24)), (6,4--6,24), + { YieldOrReturnKeyword = (6,4--6,10) }), + (5,4--6,24), { LetOrUseBangKeyword = (5,4--5,8) + EqualsRange = Some (5,26--5,27) }), + (4,4--6,24), { LetOrUseKeyword = (4,4--4,7) + InKeyword = None }), (3,6--7,1)), + (3,0--7,1)), (3,0--7,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--7,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs b/tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs new file mode 100644 index 00000000000..2a1e0319849 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs @@ -0,0 +1,7 @@ +module Module + +async { + let a: int, b: int = 1, 3 + let! c: int, d: int = async { return 1, 3 } + return a + b + c + d +} \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs.bsl new file mode 100644 index 00000000000..fc39d00e0a5 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs.bsl @@ -0,0 +1,51 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Typed LetBang 04.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + Tuple + (false, + [LetOrUse + (false, false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Named + (SynIdent (a, None), false, None, (4,8--4,9)), + Some + (SynBindingReturnInfo + (LongIdent + (SynLongIdent ([int], [], [None])), + (4,11--4,14), [], + { ColonRange = Some (4,9--4,10) })), + Typed + (ArbitraryAfterError + ("localBinding2", (4,14--4,14)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,14--4,14)), (4,8--4,9), Yes (4,4--4,14), + { LeadingKeyword = Let (4,4--4,7) + InlineKeyword = None + EqualsRange = None })], + ArbitraryAfterError ("declExpr3", (5,15--5,16)), + (4,4--5,16), { LetOrUseKeyword = (4,4--4,7) + InKeyword = None }); Ident d], + [(5,15--5,16)], (4,4--5,18)), (3,6--5,47)), (3,0--5,47)), + (3,0--5,47))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--5,47), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(4,14)-(4,15) parse error Unexpected symbol ',' in binding. Expected '=' or other token. +(5,15)-(5,16) parse error Unexpected symbol ',' in expression. Expected '=' or other token. +(6,4)-(6,10) parse error Incomplete structured construct at or before this point in implementation file diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs b/tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs new file mode 100644 index 00000000000..be48e42bb81 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs @@ -0,0 +1,3 @@ +module Module +let! x:int = async { return 1 } +let! (y:int) = async { return 2 } \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs.bsl new file mode 100644 index 00000000000..08008766b4d --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs.bsl @@ -0,0 +1,47 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Typed LetBang 05.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (LetOrUseBang + (Yes (2,0--2,31), false, true, + Typed + (Named (SynIdent (x, None), false, None, (2,5--2,6)), + LongIdent (SynLongIdent ([int], [], [None])), (2,5--2,10)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (2,28--2,29)), + (2,21--2,29), { YieldOrReturnKeyword = (2,21--2,27) }), + (2,19--2,31)), (2,13--2,31)), [], + LetOrUseBang + (Yes (3,0--3,33), false, true, + Paren + (Typed + (Named (SynIdent (y, None), false, None, (3,6--3,7)), + LongIdent (SynLongIdent ([int], [], [None])), + (3,6--3,11)), (3,5--3,12)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 2, (3,30--3,31)), + (3,23--3,31), + { YieldOrReturnKeyword = (3,23--3,29) }), + (3,21--3,33)), (3,15--3,33)), [], + ImplicitZero (3,33--3,33), (3,0--3,33), + { LetOrUseBangKeyword = (3,0--3,4) + EqualsRange = Some (3,13--3,14) }), (2,0--3,33), + { LetOrUseBangKeyword = (2,0--2,4) + EqualsRange = Some (2,11--2,12) }), (2,0--3,33))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,33), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(3,0)-(3,33) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs b/tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs new file mode 100644 index 00000000000..4dfb5dcf98a --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs @@ -0,0 +1,3 @@ +module Module +let! _:int = async { return 1 } +let! (_:int) = async { return 2 } \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs.bsl new file mode 100644 index 00000000000..591ef048599 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs.bsl @@ -0,0 +1,47 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Typed LetBang 06.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (LetOrUseBang + (Yes (2,0--2,31), false, true, + Typed + (Wild (2,5--2,6), + LongIdent (SynLongIdent ([int], [], [None])), (2,5--2,10)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (2,28--2,29)), + (2,21--2,29), { YieldOrReturnKeyword = (2,21--2,27) }), + (2,19--2,31)), (2,13--2,31)), [], + LetOrUseBang + (Yes (3,0--3,33), false, true, + Paren + (Typed + (Wild (3,6--3,7), + LongIdent (SynLongIdent ([int], [], [None])), + (3,6--3,11)), (3,5--3,12)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 2, (3,30--3,31)), + (3,23--3,31), + { YieldOrReturnKeyword = (3,23--3,29) }), + (3,21--3,33)), (3,15--3,33)), [], + ImplicitZero (3,33--3,33), (3,0--3,33), + { LetOrUseBangKeyword = (3,0--3,4) + EqualsRange = Some (3,13--3,14) }), (2,0--3,33), + { LetOrUseBangKeyword = (2,0--2,4) + EqualsRange = Some (2,11--2,12) }), (2,0--3,33))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,33), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(3,0)-(3,33) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs b/tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs new file mode 100644 index 00000000000..840c1678319 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs @@ -0,0 +1,6 @@ +module Module + +async { + use! res: int = async { return 1 } + return res +} diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs.bsl new file mode 100644 index 00000000000..a49e9a4abf3 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs.bsl @@ -0,0 +1,36 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Typed UseBang 01.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + LetOrUseBang + (Yes (4,4--4,38), true, true, + Typed + (Named (SynIdent (res, None), false, None, (4,9--4,12)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,9--4,17)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (4,35--4,36)), + (4,28--4,36), + { YieldOrReturnKeyword = (4,28--4,34) }), + (4,26--4,38)), (4,20--4,38)), [], + YieldOrReturn + ((false, true), Ident res, (5,4--5,14), + { YieldOrReturnKeyword = (5,4--5,10) }), (4,4--5,14), + { LetOrUseBangKeyword = (4,4--4,8) + EqualsRange = Some (4,18--4,19) }), (3,6--6,1)), + (3,0--6,1)), (3,0--6,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs b/tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs new file mode 100644 index 00000000000..cf1f75dc46c --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs @@ -0,0 +1,6 @@ +module Module + +async { + use! (res: int) = async { return 1 } + return res +} diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs.bsl new file mode 100644 index 00000000000..d402cdf754d --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs.bsl @@ -0,0 +1,38 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Typed UseBang 02.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + LetOrUseBang + (Yes (4,4--4,40), true, true, + Paren + (Typed + (Named + (SynIdent (res, None), false, None, (4,10--4,13)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,10--4,18)), (4,9--4,19)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (4,37--4,38)), + (4,30--4,38), + { YieldOrReturnKeyword = (4,30--4,36) }), + (4,28--4,40)), (4,22--4,40)), [], + YieldOrReturn + ((false, true), Ident res, (5,4--5,14), + { YieldOrReturnKeyword = (5,4--5,10) }), (4,4--5,14), + { LetOrUseBangKeyword = (4,4--4,8) + EqualsRange = Some (4,20--4,21) }), (3,6--6,1)), + (3,0--6,1)), (3,0--6,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs b/tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs new file mode 100644 index 00000000000..c0f2a3eb394 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs @@ -0,0 +1,4 @@ +module Module + +use! x:int = async { return 1 } +use! (y:int) = async { return 2 } \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs.bsl new file mode 100644 index 00000000000..a3eda56c6e0 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs.bsl @@ -0,0 +1,47 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Typed UseBang 03.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (LetOrUseBang + (Yes (3,0--3,31), true, true, + Typed + (Named (SynIdent (x, None), false, None, (3,5--3,6)), + LongIdent (SynLongIdent ([int], [], [None])), (3,5--3,10)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (3,28--3,29)), + (3,21--3,29), { YieldOrReturnKeyword = (3,21--3,27) }), + (3,19--3,31)), (3,13--3,31)), [], + LetOrUseBang + (Yes (4,0--4,33), true, true, + Paren + (Typed + (Named (SynIdent (y, None), false, None, (4,6--4,7)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,6--4,11)), (4,5--4,12)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 2, (4,30--4,31)), + (4,23--4,31), + { YieldOrReturnKeyword = (4,23--4,29) }), + (4,21--4,33)), (4,15--4,33)), [], + ImplicitZero (4,33--4,33), (4,0--4,33), + { LetOrUseBangKeyword = (4,0--4,4) + EqualsRange = Some (4,13--4,14) }), (3,0--4,33), + { LetOrUseBangKeyword = (3,0--3,4) + EqualsRange = Some (3,11--3,12) }), (3,0--4,33))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--4,33), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(4,0)-(4,33) parse error Incomplete structured construct at or before this point in expression diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs b/tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs new file mode 100644 index 00000000000..9ef3a6a3665 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs @@ -0,0 +1,4 @@ +module Module + +use! _:int = async { return 1 } +use! (_:int) = async { return 2 } \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs.bsl new file mode 100644 index 00000000000..3bf8a0ce44c --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs.bsl @@ -0,0 +1,47 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Typed UseBang 04.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (LetOrUseBang + (Yes (3,0--3,31), true, true, + Typed + (Wild (3,5--3,6), + LongIdent (SynLongIdent ([int], [], [None])), (3,5--3,10)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (3,28--3,29)), + (3,21--3,29), { YieldOrReturnKeyword = (3,21--3,27) }), + (3,19--3,31)), (3,13--3,31)), [], + LetOrUseBang + (Yes (4,0--4,33), true, true, + Paren + (Typed + (Wild (4,6--4,7), + LongIdent (SynLongIdent ([int], [], [None])), + (4,6--4,11)), (4,5--4,12)), + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 2, (4,30--4,31)), + (4,23--4,31), + { YieldOrReturnKeyword = (4,23--4,29) }), + (4,21--4,33)), (4,15--4,33)), [], + ImplicitZero (4,33--4,33), (4,0--4,33), + { LetOrUseBangKeyword = (4,0--4,4) + EqualsRange = Some (4,13--4,14) }), (3,0--4,33), + { LetOrUseBangKeyword = (3,0--3,4) + EqualsRange = Some (3,11--3,12) }), (3,0--4,33))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--4,33), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(4,0)-(4,33) parse error Incomplete structured construct at or before this point in expression From a82b23db31c3450141d142b6cf366d99fe23ae6c Mon Sep 17 00:00:00 2001 From: Alex Berezhnykh Date: Mon, 19 May 2025 12:21:52 +0300 Subject: [PATCH 24/38] Shorthand lambda: fix completion for chained calls (#18560) --- .../.FSharp.Compiler.Service/10.0.100.md | 1 + src/Compiler/Service/ServiceParsedInputOps.fs | 7 + src/Compiler/SyntaxTree/SyntaxTreeOps.fs | 2 + .../Language/DotLambdaTests.fs | 11 ++ .../CompletionTests.fs | 129 ++++++++++++++++-- ....Compiler.Service_Debug_netstandard2.0.bsl | 2 +- ...ompiler.Service_Release_netstandard2.0.bsl | 2 +- 7 files changed, 143 insertions(+), 11 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md index 52228f33b09..4273af66f62 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md @@ -1,3 +1,4 @@ ### Fixed * Allow `let!` and `use!` type annotations without requiring parentheses ([PR #18508](https://github.com/dotnet/fsharp/pull/18508)) +* Shorthand lambda: fix completion for chained calls and analysis for unfinished expression ([PR #18560](https://github.com/dotnet/fsharp/pull/18560)) diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index f5b15936902..b8ffe0d030f 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -320,6 +320,13 @@ module ParsedInput = let _, r = CheckLongIdent longIdent Some r + | SynExpr.DotLambda(SynExpr.LongIdent _, range, _) -> Some range + | SynExpr.DotLambda(synExpr, range, _) -> + let result = traverseSynExpr synExpr + + result + |> Option.map (fun r -> if posEq r.Start synExpr.Range.Start then range else r) + | SynExpr.DotGet(synExpr, _dotm, lid, _) -> let (SynLongIdent(longIdent, _, _)) = lid diff --git a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs index 6633dab2408..616191c9b5a 100644 --- a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs +++ b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs @@ -103,6 +103,8 @@ let rec pushUnaryArg expr arg = SynExpr.TypeApp(innerExpr, mLess, tyargs, mCommas, mGreater, mTypars, m) | SynExpr.ArbitraryAfterError(_, m) when m.Start = m.End -> SynExpr.DiscardAfterMissingQualificationAfterDot(SynExpr.Ident arg, m.StartRange, unionRanges arg.idRange m) + | SynExpr.DiscardAfterMissingQualificationAfterDot(synExpr, dotRange, m) -> + SynExpr.DiscardAfterMissingQualificationAfterDot(pushUnaryArg synExpr arg, dotRange, unionRanges arg.idRange m) | _ -> errorR (Error(FSComp.SR.tcDotLambdaAtNotSupportedExpression (), expr.Range)) expr diff --git a/tests/FSharp.Compiler.ComponentTests/Language/DotLambdaTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/DotLambdaTests.fs index ab135a31be0..c8a34da06df 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/DotLambdaTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/DotLambdaTests.fs @@ -105,6 +105,17 @@ let myFunction (x:MyRecord) = x |> _.DoStuff 1 2 3""" Error 72, Line 4, Col 36, Line 4, Col 45, "Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved." ] +[] +let ``Underscore Dot Lambda - Missing qualification after dot`` () = + Fsx """ +"" |> _.Length. """ + |> withLangVersion80 + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 599, Line 2, Col 15, Line 2, Col 16, "Missing qualification after '.'" + ] + [] let ``Underscore Dot Length on string`` () = Fsx """ diff --git a/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs b/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs index 2d70f5c58f6..cfe43453d74 100644 --- a/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/CompletionTests.fs @@ -78,29 +78,140 @@ let record = { Field = 1 } assertHasItemWithNames ["Field"; "record"] info [] -let ``Underscore dot lambda - completion`` () = +let ``Underscore dot lambda - completion 01`` () = let info = getCompletionInfo """ -let myFancyFunc (x:string) = - x - |> _.Len{caret}""" +"" |> _.Len{caret}""" + + assertHasItemWithNames ["Length"] info + +[] +let ``Underscore dot lambda - completion 02`` () = + let info = getCompletionInfo """ +System.DateTime.Now |> _.TimeOfDay.Mill{caret}""" + + assertHasItemWithNames ["Milliseconds"] info + +[] +let ``Underscore dot lambda - completion 03`` () = + let info = getCompletionInfo """ +"" |> _.ToString().Len{caret}""" + + assertHasItemWithNames ["Length"] info + +[] +let ``Underscore dot lambda - completion 04`` () = + let info = getCompletionInfo """ +"" |> _.Len{caret}gth.ToString()""" + + assertHasItemWithNames ["Length"] info + +[] +let ``Underscore dot lambda - completion 05`` () = + let info = getCompletionInfo """ +"" |> _.Length.ToString().Chars("".Len{caret})""" + assertHasItemWithNames ["Length"] info [] -let ``Underscore dot lambda - method completion`` () = +let ``Underscore dot lambda - completion 06`` () = + let info = getCompletionInfo """ +"" |> _.Chars(System.DateTime.UtcNow.Tic{caret}).ToString()""" + + assertHasItemWithNames ["Ticks"] info + +[] +let ``Underscore dot lambda - completion 07`` () = + let info = getCompletionInfo """ +"" |> _.Length.ToString().Len{caret}""" + + assertHasItemWithNames ["Length"] info + +[] +let ``Underscore dot lambda - completion 08`` () = + let info = getCompletionInfo """ +System.DateTime.Now |> _.TimeOfDay + .Mill{caret}""" + + assertHasItemWithNames ["Milliseconds"] info + +[] +let ``Underscore dot lambda - completion 09`` () = + let info = getCompletionInfo """ +"" |> _.Length.ToSt{caret}.Length""" + + assertHasItemWithNames ["ToString"] info + +[] +let ``Underscore dot lambda - completion 10`` () = + let info = getCompletionInfo """ +"" |> _.Chars(0).ToStr{caret}.Length""" + + assertHasItemWithNames ["ToString"] info + +[] +let ``Underscore dot lambda - completion 11`` () = + let info = getCompletionInfo """ +open System.Linq + +[[""]] |> _.Select(_.Head.ToL{caret})""" + + assertHasItemWithNames ["ToLower"] info + +[] +let ``Underscore dot lambda - completion 12`` () = + let info = getCompletionInfo """ +open System.Linq + +[[[""]]] |> _.Head.Select(_.Head.ToL{caret})""" + + assertHasItemWithNames ["ToLower"] info + +[] +let ``Underscore dot lambda - completion 13`` () = let info = getCompletionInfo """ -let myFancyFunc (x:string) = - x +let myFancyFunc (x:string) = + x |> _.ToL{caret}""" assertHasItemWithNames ["ToLower"] info [] -let ``Underscore dot lambda - No prefix`` () = +let ``Underscore dot lambda - completion 14`` () = + let info = getCompletionInfo """ +let myFancyFunc (x:System.DateTime) = + x + |> _.TimeOfDay.Mill{caret} + |> id""" + assertHasItemWithNames ["Milliseconds"] info + +[] +let ``Underscore dot lambda - completion 15`` () = + let info = getCompletionInfo """ +let _a = 5 +"" |> _{caret}.Length.ToString() """ + assertHasItemWithNames ["_a"] info + +[] +let ``Underscore dot lambda - No prefix 01`` () = let info = getCompletionInfo """ let s = "" -[s] |> List.map _.{caret} +[s] |> List.map _.{caret} """ assertHasItemWithNames ["Length"] info +[] +let ``Underscore dot lambda - No prefix 02`` () = + let info = getCompletionInfo """ +System.DateTime.Now |> _.TimeOfDay.{caret}""" + + assertHasItemWithNames ["Milliseconds"] info + +[] +let ``Underscore dot lambda - No prefix 03`` () = + let info = getCompletionInfo """ +"" |> _.Length.ToString().{caret}""" + + assertHasItemWithNames ["Length"] info + [] let ``Type decl - Record - Field type 01`` () = let info = getCompletionInfo """ diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index e81c636f402..4f5daf0954d 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -34,7 +34,7 @@ [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1424-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000605][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1431-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000605][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index b53d7c7ecc6..e1bc01e19b7 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -33,7 +33,7 @@ [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000BB][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1424-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000620][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1431-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000620][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. From 2e40a2308b24b2f747cda82baed9dea5ec08efee Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 12:43:18 +0200 Subject: [PATCH 25/38] Update dependencies from https://github.com/dotnet/arcade build 20250516.2 (#18566) --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e49b408685d..90822292cd0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -31,9 +31,9 @@ - + https://github.com/dotnet/arcade - 93823d49ca01742464ad1c0b49ea940e693b1be3 + c62eeb5b5432f9eaa034fbd641ccd9fd0d928fb3 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/global.json b/global.json index d599c421142..d9d798e19ce 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25263.5", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25266.2", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From 102c517d95535b187f35a6adb8eb90ff51a711b7 Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Mon, 19 May 2025 13:55:05 +0200 Subject: [PATCH 26/38] Fix find all references for F# exceptions (#18565) --- .../.FSharp.Compiler.Service/10.0.100.md | 1 + src/Compiler/Symbols/Symbols.fs | 3 ++- .../FSharpChecker/FindReferences.fs | 27 +++++++++++++++++++ ....Compiler.Service_Debug_netstandard2.0.bsl | 2 +- ...ompiler.Service_Release_netstandard2.0.bsl | 2 +- 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md index 4273af66f62..093ff46d163 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md @@ -1,4 +1,5 @@ ### Fixed * Allow `let!` and `use!` type annotations without requiring parentheses ([PR #18508](https://github.com/dotnet/fsharp/pull/18508)) +* Fix find all references for F# exceptions ([PR #18565](https://github.com/dotnet/fsharp/pull/18565)) * Shorthand lambda: fix completion for chained calls and analysis for unfinished expression ([PR #18560](https://github.com/dotnet/fsharp/pull/18560)) diff --git a/src/Compiler/Symbols/Symbols.fs b/src/Compiler/Symbols/Symbols.fs index 48acdf03dae..5e20f00b48b 100644 --- a/src/Compiler/Symbols/Symbols.fs +++ b/src/Compiler/Symbols/Symbols.fs @@ -360,7 +360,8 @@ type FSharpEntity(cenv: SymbolEnv, entity: EntityRef, tyargs: TType list) = inherit FSharpSymbol(cenv, (fun () -> checkEntityIsResolved entity - if entity.IsModuleOrNamespace then Item.ModuleOrNamespaces [entity] + if entity.IsModuleOrNamespace then Item.ModuleOrNamespaces [entity] + elif entity.IsFSharpException then Item.ExnCase entity else Item.UnqualifiedType [entity]), (fun _this thisCcu2 ad -> checkForCrossProjectAccessibility cenv.g.ilg (thisCcu2, ad) (cenv.thisCcu, getApproxFSharpAccessibilityOfEntity entity)) diff --git a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/FindReferences.fs b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/FindReferences.fs index 727fac9b052..fd98658e884 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharpChecker/FindReferences.fs +++ b/tests/FSharp.Compiler.ComponentTests/FSharpChecker/FindReferences.fs @@ -265,6 +265,33 @@ val myFunc2: param: int -> int ]) } +module Exceptions = + let project() = SyntheticProject.Create( + { sourceFile "First" [] with ExtraSource = "exception MyException of string" }, + { sourceFile "Second" [] with ExtraSource = """ +open ModuleFirst +let foo x = raise (MyException "foo")""" }) + + [] + let ``We find exception from definition`` () = + project().Workflow { + placeCursor "First" 6 21 "exception MyException of string" ["MyException"] + findAllReferences (expectToFind [ + "FileFirst.fs", 6, 10, 21 + "FileSecond.fs", 8, 19, 30 + ]) + } + + [] + let ``We find exception from usage`` () = + project().Workflow { + placeCursor "Second" 8 30 "raise (MyException \"foo\")" ["MyException"] + findAllReferences (expectToFind [ + "FileFirst.fs", 6, 10, 21 + "FileSecond.fs", 8, 19, 30 + ]) + } + module Attributes = let project() = SyntheticProject.Create( diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 4f5daf0954d..077663dca21 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -40,7 +40,7 @@ [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2495-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2496-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000011][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index e1bc01e19b7..fd0973324e5 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -39,7 +39,7 @@ [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2495-3::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000030][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2496-3::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000030][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000010][found Char] Unexpected type on the stack. From 2188ac94533d3b1c97146668051946f6d7529738 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Mon, 19 May 2025 14:11:15 +0200 Subject: [PATCH 27/38] GH workflow - use ubuntu latest for cleaning up old runs (#18573) --- .github/workflows/add_to_project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add_to_project.yml b/.github/workflows/add_to_project.yml index 68e5cc454f2..67df3f58a1f 100644 --- a/.github/workflows/add_to_project.yml +++ b/.github/workflows/add_to_project.yml @@ -16,7 +16,7 @@ permissions: jobs: cleanup_old_runs: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: github.event_name != 'pull_request_target' permissions: actions: write From ff1ca8a2f78ff1375998421ee423e2b36b9343e6 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Mon, 19 May 2025 14:46:26 +0200 Subject: [PATCH 28/38] Versions props - main (#18550) --- eng/Versions.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 624e01fe94c..0b43b972a69 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -37,7 +37,7 @@ $(FSMajorVersion).$(FSMinorVersion).$(FSBuildVersion) - 9.0.201 + 9.0.300 $(FSCorePackageVersionValue)-$(PreReleaseVersionLabel).* @@ -52,8 +52,8 @@ - 17 - 14 + 18 + 0 $(VSMajorVersion).0 $(VSMajorVersion).$(VSMinorVersion).0 $(VSAssemblyVersionPrefix).0 From 0c942613dd6ac5169551e898af92743124805784 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Tue, 20 May 2025 10:49:43 +0200 Subject: [PATCH 29/38] Use .NET10p3 SDK (#18471) --- .devcontainer/devcontainer.json | 10 +++---- NuGet.config | 2 ++ global.json | 4 +-- src/Compiler/Facilities/CompilerLocation.fs | 1 + .../FSharp.Build.UnitTests.fsproj | 7 +++-- .../FSharp.Test.Utilities.fsproj | 30 +++++++++++-------- ....Compiler.Service_Debug_netstandard2.0.bsl | 2 +- ...ompiler.Service_Release_netstandard2.0.bsl | 2 +- tests/fsharp/FSharpSuite.Tests.fsproj | 7 +++-- 9 files changed, 40 insertions(+), 25 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 47927f1f370..db23964cc66 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,12 +1,12 @@ // For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: { "name": "F#", - "image": "mcr.microsoft.com/dotnet/sdk:9.0.202", + "image": "mcr.microsoft.com/dotnet/sdk:10.0.100-preview.3", "features": { - "ghcr.io/devcontainers/features/common-utils:2.5.2": {}, - "ghcr.io/devcontainers/features/git:1.3.2": {}, - "ghcr.io/devcontainers/features/github-cli:1.0.13": {}, - "ghcr.io/devcontainers/features/dotnet:2.2.0": {} + "ghcr.io/devcontainers/features/common-utils:2.5.3": {}, + "ghcr.io/devcontainers/features/git:1.3.3": {}, + "ghcr.io/devcontainers/features/github-cli:1.0.14": {}, + "ghcr.io/devcontainers/features/dotnet:2.2.1": {} }, "hostRequirements": { "cpus": 2, diff --git a/NuGet.config b/NuGet.config index bb182ae7ad1..4e7dd1d4e5e 100644 --- a/NuGet.config +++ b/NuGet.config @@ -20,6 +20,8 @@ + + diff --git a/global.json b/global.json index d9d798e19ce..6b8604364e3 100644 --- a/global.json +++ b/global.json @@ -1,10 +1,10 @@ { "sdk": { - "version": "9.0.202", + "version": "10.0.100-preview.3.25201.16", "allowPrerelease": true }, "tools": { - "dotnet": "9.0.202", + "dotnet": "10.0.100-preview.3.25201.16", "vs": { "version": "17.8", "components": [ diff --git a/src/Compiler/Facilities/CompilerLocation.fs b/src/Compiler/Facilities/CompilerLocation.fs index abd436647ae..03251f2109a 100644 --- a/src/Compiler/Facilities/CompilerLocation.fs +++ b/src/Compiler/Facilities/CompilerLocation.fs @@ -123,6 +123,7 @@ module internal FSharpEnvironment = |] elif typeof.Assembly.GetName().Name = "System.Private.CoreLib" then [| + "net10.0" "net9.0" "net8.0" "net7.0" diff --git a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj index 853737b3ca8..07585566210 100644 --- a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj +++ b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj @@ -21,7 +21,7 @@ PreserveNewest - + @@ -30,8 +30,11 @@ - + + + + diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj index 7788cbe6520..e25102e9102 100644 --- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj +++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj @@ -75,26 +75,32 @@ - - - - - - - - - - - + + + + + + + + + + + + + $(NoWarn);NU1510 + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 077663dca21..5475f43bdc1 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -81,7 +81,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL+parseNamed@5311::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>, int32, int32)][offset 0x00000087][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost@316::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000028][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost@317::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000028][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+Pipe #6 input at line 68@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x0000034D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@558::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index fd0973324e5..7a78ab1999a 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -108,7 +108,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseNamed@5310(uint8[], [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>, int32, int32)][offset 0x0000007E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x00000016][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment::probePathForDotnetHost@315([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000002A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment::probePathForDotnetHost@316([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000002A][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+SimulatedMSBuildResolver@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x000002F5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000B6][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@558::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. diff --git a/tests/fsharp/FSharpSuite.Tests.fsproj b/tests/fsharp/FSharpSuite.Tests.fsproj index dfc4840d0c8..b4540de0b33 100644 --- a/tests/fsharp/FSharpSuite.Tests.fsproj +++ b/tests/fsharp/FSharpSuite.Tests.fsproj @@ -123,10 +123,13 @@ - - + + + + + From 195e7232ff5d6e45ce3b17bf425d60ac30863d0d Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 May 2025 14:19:19 +0200 Subject: [PATCH 30/38] Add GitHub action to update ILVerify baselines via PR comments (#18578) --- .github/workflows/commands.yml | 62 ++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/.github/workflows/commands.yml b/.github/workflows/commands.yml index 72fa71e6e9c..01203a6c562 100644 --- a/.github/workflows/commands.yml +++ b/.github/workflows/commands.yml @@ -14,7 +14,7 @@ permissions: jobs: cleanup_old_runs: if: github.event.schedule == '0 13 * * *' - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: actions: write env: @@ -33,7 +33,7 @@ jobs: run_command: if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run') - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Extract command to run uses: actions/github-script@v3 @@ -76,13 +76,61 @@ jobs: if: steps.command-extractor.outputs.result == 'fantomas' id: fantomas run: dotnet fantomas . -r - - name: Process fantomas command + - name: Process xlf command if: steps.command-extractor.outputs.result == 'xlf' id: xlf run: dotnet build src/Compiler /t:UpdateXlf + - name: Post ilverify start comment + if: steps.command-extractor.outputs.result == 'ilverify' + uses: actions/github-script@v3 + with: + script: | + const body = `Started to run ilverify baseline update`; + await github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: body + }); + + - name: Process ilverify command (Update ILVerify baselines) + if: steps.command-extractor.outputs.result == 'ilverify' + id: ilverify + env: + TEST_UPDATE_BSL: 1 + run: | + # Run the ilverify script with TEST_UPDATE_BSL=1 + pwsh tests/ILVerify/ilverify.ps1 + + # Calculate the changes per file + echo "Checking for changes in baseline files..." + FILES_CHANGED=0 + CHANGES_OUTPUT="" + + for file in tests/ILVerify/*.bsl; do + if git diff --quiet "$file"; then + continue + else + FILES_CHANGED=$((FILES_CHANGED + 1)) + LINES_CHANGED=$(git diff --numstat "$file" | awk '{print $1 + $2}') + CHANGES_OUTPUT="${CHANGES_OUTPUT}${file}: ${LINES_CHANGED} lines changed\n" + fi + done + + if [ "$FILES_CHANGED" -eq 0 ]; then + echo "result=The ilverify command ran and did not modify any baseline." >> $GITHUB_OUTPUT + else + echo -e "result=The ilverify command ran and triggered the following number of changes per file:\n${CHANGES_OUTPUT}" >> $GITHUB_OUTPUT + fi - name: Commit and push changes - if: steps.fantomas.outcome == 'success' || steps.xlf.outcome == 'success' + if: steps.fantomas.outcome == 'success' || steps.xlf.outcome == 'success' || steps.ilverify.outcome == 'success' run: | + # Only commit if there are actual changes + if git diff --quiet; then + echo "No changes to commit, skipping." + exit 0 + fi + git config --local user.name "github-actions[bot]" git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git commit -a -m 'Automated command ran: ${{ steps.command-extractor.outputs.result }} @@ -90,7 +138,7 @@ jobs: Co-authored-by: ${{ github.event.comment.user.login }} <${{ github.event.comment.user.id }}+${{ github.event.comment.user.login }}@users.noreply.github.com>' git push - name: Post command comment - if: steps.fantomas.outcome == 'success' || steps.xlf.outcome == 'success' + if: steps.fantomas.outcome == 'success' || steps.xlf.outcome == 'success' || steps.ilverify.outcome == 'success' uses: actions/github-script@v3 with: script: | @@ -98,8 +146,10 @@ jobs: var output = "" if ("${{steps.command-extractor.outputs.result}}" == 'fantomas') { output = "${{steps.fantomas.outputs.result}}" - } else if("${{steps.command-extractor.outputs.result}}" == 'xlf') { + } else if ("${{steps.command-extractor.outputs.result}}" == 'xlf') { output = "${{steps.xlf.outputs.result}}" + } else if ("${{steps.command-extractor.outputs.result}}" == 'ilverify') { + output = "${{steps.ilverify.outputs.result}}" } const body = `Ran ${{ steps.command-extractor.outputs.result }}: https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${process.env.GITHUB_RUN_ID}\n${output}`; await github.issues.createComment({ From 087ffa2d42579baec3b6adcd9b8f568c7dd14ccb Mon Sep 17 00:00:00 2001 From: Vladimir Shchur Date: Tue, 20 May 2025 05:36:34 -0700 Subject: [PATCH 31/38] Added support for empty case in random collections (#18568) --- docs/release-notes/.FSharp.Core/10.0.100.md | 9 ++ src/FSharp.Core/array.fs | 130 +++++++++------- src/FSharp.Core/array.fsi | 12 +- src/FSharp.Core/list.fs | 146 ++++++++++-------- src/FSharp.Core/list.fsi | 11 +- src/FSharp.Core/seq.fs | 140 +++++++++-------- src/FSharp.Core/seq.fsi | 12 +- .../ArrayModule.fs | 34 +++- .../ListModule.fs | 36 ++++- .../Microsoft.FSharp.Collections/SeqModule.fs | 34 +++- ...erify_FSharp.Core_Debug_netstandard2.0.bsl | 4 +- ...erify_FSharp.Core_Debug_netstandard2.1.bsl | 4 +- ...ify_FSharp.Core_Release_netstandard2.0.bsl | 4 +- ...ify_FSharp.Core_Release_netstandard2.1.bsl | 4 +- 14 files changed, 361 insertions(+), 219 deletions(-) create mode 100644 docs/release-notes/.FSharp.Core/10.0.100.md diff --git a/docs/release-notes/.FSharp.Core/10.0.100.md b/docs/release-notes/.FSharp.Core/10.0.100.md new file mode 100644 index 00000000000..1dc471ef118 --- /dev/null +++ b/docs/release-notes/.FSharp.Core/10.0.100.md @@ -0,0 +1,9 @@ +### Fixed + +### Added + +### Changed + +* Random functions support for zero element chosen/sampled ([PR #18568](https://github.com/dotnet/fsharp/pull/18568)) + +### Breaking Changes \ No newline at end of file diff --git a/src/FSharp.Core/array.fs b/src/FSharp.Core/array.fs index ca88e22465d..358836ddf1b 100644 --- a/src/FSharp.Core/array.fs +++ b/src/FSharp.Core/array.fs @@ -2020,15 +2020,18 @@ module Array = let inputLength = source.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputArrayEmptyString - - let result = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked count + if count = 0 then + [||] + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString + else + let result = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked count - for i = 0 to count - 1 do - let j = random.Next(0, inputLength) - result[i] <- source[j] + for i = 0 to count - 1 do + let j = random.Next(0, inputLength) + result[i] <- source[j] - result + result [] let randomChoicesBy (randomizer: unit -> float) (count: int) (source: 'T array) : 'T array = @@ -2040,15 +2043,18 @@ module Array = let inputLength = source.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputArrayEmptyString - - let result = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked count + if count = 0 then + [||] + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString + else + let result = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked count - for i = 0 to count - 1 do - let j = Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength - result[i] <- source[j] + for i = 0 to count - 1 do + let j = Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength + result[i] <- source[j] - result + result [] let randomChoices (count: int) (source: 'T array) : 'T array = @@ -2065,35 +2071,38 @@ module Array = let inputLength = source.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputArrayEmptyString - - if count > inputLength then - invalidArg "count" (SR.GetString(SR.notEnoughElements)) + if count = 0 then + [||] + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString + else + if count > inputLength then + invalidArg "count" (SR.GetString(SR.notEnoughElements)) - let result = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked count + let result = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked count - let setSize = - Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count + let setSize = + Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count - if inputLength <= setSize then - let pool = copy source + if inputLength <= setSize then + let pool = copy source - for i = 0 to count - 1 do - let j = random.Next(0, inputLength - i) - result[i] <- pool[j] - pool[j] <- pool[inputLength - i - 1] - else - let selected = HashSet() + for i = 0 to count - 1 do + let j = random.Next(0, inputLength - i) + result[i] <- pool[j] + pool[j] <- pool[inputLength - i - 1] + else + let selected = HashSet() - for i = 0 to count - 1 do - let mutable j = random.Next(0, inputLength) + for i = 0 to count - 1 do + let mutable j = random.Next(0, inputLength) - while not (selected.Add j) do - j <- random.Next(0, inputLength) + while not (selected.Add j) do + j <- random.Next(0, inputLength) - result[i] <- source[j] + result[i] <- source[j] - result + result [] let randomSampleBy (randomizer: unit -> float) (count: int) (source: 'T array) : 'T array = @@ -2105,39 +2114,42 @@ module Array = let inputLength = source.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputArrayEmptyString - - if count > inputLength then - invalidArg "count" (SR.GetString(SR.notEnoughElements)) + if count = 0 then + [||] + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString + else + if count > inputLength then + invalidArg "count" (SR.GetString(SR.notEnoughElements)) - let result = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked count + let result = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked count - // algorithm taken from https://github.com/python/cpython/blob/69b3e8ea569faabccd74036e3d0e5ec7c0c62a20/Lib/random.py#L363-L456 - let setSize = - Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count + // algorithm taken from https://github.com/python/cpython/blob/69b3e8ea569faabccd74036e3d0e5ec7c0c62a20/Lib/random.py#L363-L456 + let setSize = + Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count - if inputLength <= setSize then - let pool = copy source + if inputLength <= setSize then + let pool = copy source - for i = 0 to count - 1 do - let j = - Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 (inputLength - i) + for i = 0 to count - 1 do + let j = + Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 (inputLength - i) - result[i] <- pool[j] - pool[j] <- pool[inputLength - i - 1] - else - let selected = HashSet() + result[i] <- pool[j] + pool[j] <- pool[inputLength - i - 1] + else + let selected = HashSet() - for i = 0 to count - 1 do - let mutable j = - Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength + for i = 0 to count - 1 do + let mutable j = + Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength - while not (selected.Add j) do - j <- Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength + while not (selected.Add j) do + j <- Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength - result[i] <- source[j] + result[i] <- source[j] - result + result [] let randomSample (count: int) (source: 'T array) : 'T array = diff --git a/src/FSharp.Core/array.fsi b/src/FSharp.Core/array.fsi index 151081c300c..ba6274e11c6 100644 --- a/src/FSharp.Core/array.fsi +++ b/src/FSharp.Core/array.fsi @@ -3282,7 +3282,7 @@ module Array = /// An array of randomly selected elements from the input array. /// /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// Thrown when count is more than 0 and the input array is empty. /// Thrown when count is less than 0. /// /// @@ -3306,7 +3306,7 @@ module Array = /// /// Thrown when the input array is null. /// Thrown when the random argument is null. - /// Thrown when the input array is empty. + /// Thrown when count is more than 0 and the input array is empty. /// Thrown when count is less than 0. /// /// @@ -3329,7 +3329,7 @@ module Array = /// An array of randomly selected elements from the input array. /// /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// Thrown when count is more than 0 and the input array is empty. /// Thrown when count is less than 0. /// Thrown when the randomizer function returns a value outside the range [0, 1). /// @@ -3352,7 +3352,7 @@ module Array = /// An array of randomly selected elements from the input array. /// /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// Thrown when count is more than 0 and the input array is empty. /// Thrown when count is less than 0. /// Thrown when count is greater than the length of the input array. /// @@ -3377,7 +3377,7 @@ module Array = /// /// Thrown when the input array is null. /// Thrown when the random argument is null. - /// Thrown when the input array is empty. + /// Thrown when count is more than 0 and the input array is empty.. /// Thrown when count is less than 0. /// Thrown when count is greater than the length of the input array. /// @@ -3401,7 +3401,7 @@ module Array = /// An array of randomly selected elements from the input array. /// /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// Thrown when count is more than 0 and the input array is empty. /// Thrown when count is less than 0. /// Thrown when count is greater than the length of the input array. /// Thrown when the randomizer function returns a value outside the range [0, 1). diff --git a/src/FSharp.Core/list.fs b/src/FSharp.Core/list.fs index d502107a6da..7fc02845d3a 100644 --- a/src/FSharp.Core/list.fs +++ b/src/FSharp.Core/list.fs @@ -1043,13 +1043,16 @@ module List = let inputLength = source.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString - - [ - for _ = 0 to count - 1 do - let j = random.Next(0, inputLength) - source[j] - ] + if count = 0 then + [] + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString + else + [ + for _ = 0 to count - 1 do + let j = random.Next(0, inputLength) + source[j] + ] [] let randomChoicesBy (randomizer: unit -> float) (count: int) (source: 'T list) : 'T list = @@ -1059,13 +1062,16 @@ module List = let inputLength = source.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString - - [ - for _ = 0 to count - 1 do - let j = Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength - source[j] - ] + if count = 0 then + [] + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString + else + [ + for _ = 0 to count - 1 do + let j = Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength + source[j] + ] [] let randomChoices (count: int) (source: 'T list) : 'T list = @@ -1081,37 +1087,40 @@ module List = let inputLength = source.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString - - if count > inputLength then - invalidArg "count" (SR.GetString(SR.notEnoughElements)) - - // algorithm taken from https://github.com/python/cpython/blob/69b3e8ea569faabccd74036e3d0e5ec7c0c62a20/Lib/random.py#L363-L456 - let setSize = - Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count - - if inputLength <= setSize then - let pool = source |> toArray - - [ - for i = 0 to count - 1 do - let j = random.Next(0, inputLength - i) - let item = pool[j] - pool[j] <- pool[inputLength - i - 1] - item - ] + if count = 0 then + [] + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString else - let selected = HashSet() + if count > inputLength then + invalidArg "count" (SR.GetString(SR.notEnoughElements)) + + // algorithm taken from https://github.com/python/cpython/blob/69b3e8ea569faabccd74036e3d0e5ec7c0c62a20/Lib/random.py#L363-L456 + let setSize = + Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count + + if inputLength <= setSize then + let pool = source |> toArray + + [ + for i = 0 to count - 1 do + let j = random.Next(0, inputLength - i) + let item = pool[j] + pool[j] <- pool[inputLength - i - 1] + item + ] + else + let selected = HashSet() - [ - for _ = 0 to count - 1 do - let mutable j = random.Next(0, inputLength) + [ + for _ = 0 to count - 1 do + let mutable j = random.Next(0, inputLength) - while not (selected.Add j) do - j <- random.Next(0, inputLength) + while not (selected.Add j) do + j <- random.Next(0, inputLength) - source[j] - ] + source[j] + ] [] let randomSampleBy (randomizer: unit -> float) (count: int) (source: 'T list) : 'T list = @@ -1121,39 +1130,42 @@ module List = let inputLength = source.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString - - if count > inputLength then - invalidArg "count" (SR.GetString(SR.notEnoughElements)) + if count = 0 then + [] + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString + else + if count > inputLength then + invalidArg "count" (SR.GetString(SR.notEnoughElements)) - let setSize = - Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count + let setSize = + Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count - if inputLength <= setSize then - let pool = source |> toArray + if inputLength <= setSize then + let pool = source |> toArray - [ - for i = 0 to count - 1 do - let j = - Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 (inputLength - i) + [ + for i = 0 to count - 1 do + let j = + Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 (inputLength - i) - let item = pool[j] - pool[j] <- pool[inputLength - i - 1] - item - ] - else - let selected = HashSet() + let item = pool[j] + pool[j] <- pool[inputLength - i - 1] + item + ] + else + let selected = HashSet() - [ - for _ = 0 to count - 1 do - let mutable j = - Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength + [ + for _ = 0 to count - 1 do + let mutable j = + Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength - while not (selected.Add j) do - j <- Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength + while not (selected.Add j) do + j <- Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength - source[j] - ] + source[j] + ] [] let randomSample (count: int) (source: 'T list) : 'T list = diff --git a/src/FSharp.Core/list.fsi b/src/FSharp.Core/list.fsi index e14fe7eb447..0c69ccc60c7 100644 --- a/src/FSharp.Core/list.fsi +++ b/src/FSharp.Core/list.fsi @@ -2820,7 +2820,7 @@ module List = /// /// A list of randomly selected elements from the input list. /// - /// Thrown when the input list is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// /// @@ -2843,7 +2843,7 @@ module List = /// A list of randomly selected elements from the input list. /// /// Thrown when the random argument is null. - /// Thrown when the input list is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// /// @@ -2866,6 +2866,7 @@ module List = /// A list of randomly selected elements from the input list. /// /// Thrown when the input list is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// Thrown when the randomizer function returns a value outside the range [0, 1). /// @@ -2887,7 +2888,7 @@ module List = /// /// A list of randomly selected elements from the input list. /// - /// Thrown when the input list is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// Thrown when count is greater than the length of the input list. /// @@ -2911,7 +2912,7 @@ module List = /// A list of randomly selected elements from the input list. /// /// Thrown when the random argument is null. - /// Thrown when the input list is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// Thrown when count is greater than the length of the input list. /// @@ -2934,7 +2935,7 @@ module List = /// /// A list of randomly selected elements from the input list. /// - /// Thrown when the input list is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// Thrown when count is greater than the length of the input list. /// Thrown when the randomizer function returns a value outside the range [0, 1). diff --git a/src/FSharp.Core/seq.fs b/src/FSharp.Core/seq.fs index 20fcdefb159..ce1bfe6d4ab 100644 --- a/src/FSharp.Core/seq.fs +++ b/src/FSharp.Core/seq.fs @@ -2002,13 +2002,16 @@ module Seq = let inputLength = tempArray.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString - - seq { - for _ = 0 to count - 1 do - let j = random.Next(0, inputLength) - tempArray[j] - } + if count = 0 then + empty + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString + else + seq { + for _ = 0 to count - 1 do + let j = random.Next(0, inputLength) + tempArray[j] + } [] let randomChoicesBy (randomizer: unit -> float) (count: int) (source: seq<'T>) : seq<'T> = @@ -2021,13 +2024,16 @@ module Seq = let inputLength = tempArray.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString - - seq { - for _ = 0 to count - 1 do - let j = Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength - tempArray[j] - } + if count = 0 then + empty + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString + else + seq { + for _ = 0 to count - 1 do + let j = Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength + tempArray[j] + } [] let randomChoices (count: int) (source: seq<'T>) : seq<'T> = @@ -2045,35 +2051,38 @@ module Seq = let inputLength = tempArray.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString - - if count > inputLength then - invalidArg "count" (SR.GetString(SR.notEnoughElements)) - - // algorithm taken from https://github.com/python/cpython/blob/69b3e8ea569faabccd74036e3d0e5ec7c0c62a20/Lib/random.py#L363-L456 - let setSize = - Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count - - if inputLength <= setSize then - seq { - for i = 0 to count - 1 do - let j = random.Next(0, inputLength - i) - let item = tempArray[j] - tempArray[j] <- tempArray[inputLength - i - 1] - item - } + if count = 0 then + empty + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString else - let selected = HashSet() + if count > inputLength then + invalidArg "count" (SR.GetString(SR.notEnoughElements)) + + // algorithm taken from https://github.com/python/cpython/blob/69b3e8ea569faabccd74036e3d0e5ec7c0c62a20/Lib/random.py#L363-L456 + let setSize = + Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count + + if inputLength <= setSize then + seq { + for i = 0 to count - 1 do + let j = random.Next(0, inputLength - i) + let item = tempArray[j] + tempArray[j] <- tempArray[inputLength - i - 1] + item + } + else + let selected = HashSet() - seq { - for _ = 0 to count - 1 do - let mutable j = random.Next(0, inputLength) + seq { + for _ = 0 to count - 1 do + let mutable j = random.Next(0, inputLength) - while not (selected.Add j) do - j <- random.Next(0, inputLength) + while not (selected.Add j) do + j <- random.Next(0, inputLength) - tempArray[j] - } + tempArray[j] + } [] let randomSampleBy (randomizer: unit -> float) (count: int) (source: seq<'T>) : seq<'T> = @@ -2086,37 +2095,40 @@ module Seq = let inputLength = tempArray.Length if inputLength = 0 then - invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString - - if count > inputLength then - invalidArg "count" (SR.GetString(SR.notEnoughElements)) + if count = 0 then + empty + else + invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString + else + if count > inputLength then + invalidArg "count" (SR.GetString(SR.notEnoughElements)) - let setSize = - Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count + let setSize = + Microsoft.FSharp.Primitives.Basics.Random.getMaxSetSizeForSampling count - if inputLength <= setSize then - seq { - for i = 0 to count - 1 do - let j = - Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 (inputLength - i) + if inputLength <= setSize then + seq { + for i = 0 to count - 1 do + let j = + Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 (inputLength - i) - let item = tempArray[j] - tempArray[j] <- tempArray[inputLength - i - 1] - item - } - else - let selected = HashSet() + let item = tempArray[j] + tempArray[j] <- tempArray[inputLength - i - 1] + item + } + else + let selected = HashSet() - seq { - for _ = 0 to count - 1 do - let mutable j = - Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength + seq { + for _ = 0 to count - 1 do + let mutable j = + Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength - while not (selected.Add j) do - j <- Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength + while not (selected.Add j) do + j <- Microsoft.FSharp.Primitives.Basics.Random.next randomizer 0 inputLength - tempArray[j] - } + tempArray[j] + } [] let randomSample (count: int) (source: seq<'T>) : seq<'T> = diff --git a/src/FSharp.Core/seq.fsi b/src/FSharp.Core/seq.fsi index 790a486e850..19c83624bef 100644 --- a/src/FSharp.Core/seq.fsi +++ b/src/FSharp.Core/seq.fsi @@ -3077,7 +3077,7 @@ module Seq = /// A sequence of randomly selected elements from the input sequence. /// /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// /// @@ -3103,7 +3103,7 @@ module Seq = /// /// Thrown when the input sequence is null. /// Thrown when the random argument is null. - /// Thrown when the input sequence is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// /// @@ -3128,7 +3128,7 @@ module Seq = /// A sequence of randomly selected elements from the input sequence. /// /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// Thrown when the randomizer function returns a number outside the range [0.0..1.0). /// @@ -3153,7 +3153,7 @@ module Seq = /// A sequence of randomly selected elements from the input sequence. /// /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// Thrown when count is greater than the length of the input sequence. /// @@ -3180,7 +3180,7 @@ module Seq = /// /// Thrown when the input sequence is null. /// Thrown when the random argument is null. - /// Thrown when the input sequence is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// Thrown when count is greater than the length of the input sequence. /// @@ -3206,7 +3206,7 @@ module Seq = /// A sequence of randomly selected elements from the input sequence. /// /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when count is more than 0 and the input list is empty. /// Thrown when count is less than 0. /// Thrown when count is greater than the length of the input sequence. /// Thrown when the randomizer function returns a number outside the range [0.0..1.0). diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs index 662a729e28f..16bc5d4fbdf 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs @@ -2226,6 +2226,14 @@ type ArrayModule() = CheckThrowsArgumentException (fun () -> Array.randomChoices choicesLength emptyArr |> ignore) CheckThrowsArgumentException (fun () -> Array.randomChoices negativeChoicesLength arr |> ignore) + [] + member _.RandomChoicesEmpty() = + let emptyArr = [||] + + let choice = emptyArr |> Array.randomChoices 0 + + Assert.AreEqual([||], choice) + [] member _.RandomChoicesWith() = let arr = [| 1..50 |] @@ -2291,6 +2299,14 @@ type ArrayModule() = CheckThrowsArgumentException (fun () -> Array.randomChoicesBy randomizer choicesLength emptyArr |> ignore) CheckThrowsArgumentException (fun () -> Array.randomChoicesBy randomizer negativeChoicesLength arr |> ignore) + [] + member _.RandomChoicesByEmpty() = + let emptyArr = [||] + + let choice = emptyArr |> Array.randomChoicesBy (fun () -> 1.0) 0 + + Assert.AreEqual([||], choice) + [] member _.RandomSample() = let arr = [| 1..50 |] @@ -2319,6 +2335,14 @@ type ArrayModule() = CheckThrowsArgumentException (fun () -> Array.randomSample negativeSampleLength arr |> ignore) CheckThrowsArgumentException (fun () -> Array.randomSample tooBigSampleLength arr |> ignore) + [] + member _.RandomSampleEmpty() = + let emptyArr = [||] + + let choice = emptyArr |> Array.randomSample 0 + + Assert.AreEqual([||], choice) + [] member _.RandomSampleWith() = let arr = [| 1..50 |] @@ -2394,4 +2418,12 @@ type ArrayModule() = CheckThrowsArgumentOutOfRangeException (fun () -> Array.randomSampleBy wrongRandomizer sampleLength arr |> ignore)) CheckThrowsArgumentException (fun () -> Array.randomSampleBy randomizer sampleLength emptyArr |> ignore) CheckThrowsArgumentException (fun () -> Array.randomSampleBy randomizer negativeSampleLength arr |> ignore) - CheckThrowsArgumentException (fun () -> Array.randomSampleBy randomizer tooBigSampleLength arr |> ignore) \ No newline at end of file + CheckThrowsArgumentException (fun () -> Array.randomSampleBy randomizer tooBigSampleLength arr |> ignore) + + [] + member _.RandomSampleByEmpty() = + let emptyArr = [||] + + let choice = emptyArr |> Array.randomSampleBy (fun () -> 1.0) 0 + + Assert.AreEqual([||], choice) \ No newline at end of file diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs index 8b0fcf507e5..64f58ebea5a 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs @@ -1240,6 +1240,14 @@ type ListModule() = CheckThrowsArgumentException (fun () -> List.randomChoices choicesLength emptyList |> ignore) CheckThrowsArgumentException (fun () -> List.randomChoices negativeChoicesLength list |> ignore) + [] + member _.RandomChoicesEmpty() = + let list = [] + + let choice = list |> List.randomChoices 0 + + Assert.AreEqual([], choice) + [] member _.RandomChoicesWith() = let list = [ 1..50 ] @@ -1296,6 +1304,14 @@ type ListModule() = CheckThrowsArgumentException (fun () -> List.randomChoicesBy randomizer choicesLength emptyList |> ignore) CheckThrowsArgumentException (fun () -> List.randomChoicesBy randomizer negativeChoicesLength list |> ignore) + [] + member _.RandomChoicesByEmpty() = + let list = [] + + let choice = list |> List.randomSampleBy (fun () -> 1.0) 0 + + Assert.AreEqual([], choice) + [] member _.RandomSample() = let arr = [ 1..50 ] @@ -1321,7 +1337,15 @@ type ListModule() = CheckThrowsArgumentException (fun () -> List.randomSample sampleLength emptyList |> ignore) CheckThrowsArgumentException (fun () -> List.randomSample negativeSampleLength list |> ignore) CheckThrowsArgumentException (fun () -> List.randomSample tooBigSampleLength list |> ignore) - + + [] + member _.RandomSampleEmpty() = + let list = [] + + let choice = list |> List.randomSample 0 + + Assert.AreEqual([], choice) + [] member _.RandomSampleWith() = let list = [ 1..50 ] @@ -1388,4 +1412,12 @@ type ListModule() = CheckThrowsArgumentOutOfRangeException (fun () -> List.randomSampleBy wrongRandomizer sampleLength list |> ignore) CheckThrowsArgumentException (fun () -> List.randomSampleBy randomizer sampleLength emptyArr |> ignore) CheckThrowsArgumentException (fun () -> List.randomSampleBy randomizer negativeSampleLength list |> ignore) - CheckThrowsArgumentException (fun () -> List.randomSampleBy randomizer tooBigSampleLength list |> ignore) \ No newline at end of file + CheckThrowsArgumentException (fun () -> List.randomSampleBy randomizer tooBigSampleLength list |> ignore) + + [] + member _.RandomSampleByEmpty() = + let list = [] + + let choice = list |> List.randomSampleBy (fun () -> 1.0) 0 + + Assert.AreEqual([], choice) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule.fs index f2f88933506..5d37b1ecdf2 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule.fs @@ -1332,6 +1332,14 @@ type SeqModule() = CheckThrowsArgumentException (fun () -> Seq.randomChoices choicesLength emptySeq |> ignore) CheckThrowsArgumentException (fun () -> Seq.randomChoices negativeChoicesLength intSeq |> ignore) + [] + member _.RandomChoicesEmpty() = + let seq = Seq.empty + + let choice = seq |> Seq.randomChoices 0 + + Assert.AreEqual(0, choice |> Seq.length) + [] member _.RandomChoicesWith() = let seq = seq { 1..50 } @@ -1392,6 +1400,14 @@ type SeqModule() = CheckThrowsArgumentException (fun () -> Seq.randomChoicesBy randomizer choicesLength emptySeq |> ignore) CheckThrowsArgumentException (fun () -> Seq.randomChoicesBy randomizer negativeChoicesLength intSeq |> ignore) + [] + member _.RandomChoicesByEmpty() = + let seq = Seq.empty + + let choice = seq |> Seq.randomChoicesBy (fun () -> 1.0) 0 + + Assert.AreEqual(0, choice |> Seq.length) + [] member _.RandomSample() = let intSeq = seq { 1..50 } @@ -1421,6 +1437,14 @@ type SeqModule() = CheckThrowsArgumentException (fun () -> Seq.randomSample negativeSampleLength intSeq |> ignore) CheckThrowsArgumentException (fun () -> Seq.randomSample tooBigSampleLength intSeq |> ignore) + [] + member _.RandomSampleEmpty() = + let seq = Seq.empty + + let choice = seq |> Seq.randomSample 0 + + Assert.AreEqual(0, choice |> Seq.length) + [] member _.RandomSampleWith() = let intSeq = seq { 1..50 } @@ -1491,4 +1515,12 @@ type SeqModule() = CheckThrowsArgumentOutOfRangeException (fun () -> Seq.randomSampleBy wrongRandomizer sampleLength intSeq |> Seq.toList |> ignore) CheckThrowsArgumentException (fun () -> Seq.randomSampleBy randomizer sampleLength emptySeq |> ignore) CheckThrowsArgumentException (fun () -> Seq.randomSampleBy randomizer negativeSampleLength intSeq |> ignore) - CheckThrowsArgumentException (fun () -> Seq.randomSampleBy randomizer tooBigSampleLength intSeq |> ignore) \ No newline at end of file + CheckThrowsArgumentException (fun () -> Seq.randomSampleBy randomizer tooBigSampleLength intSeq |> ignore) + + [] + member _.RandomSampleByEmpty() = + let seq = Seq.empty + + let choice = seq |> Seq.randomSampleBy (fun () -> 1.0) 0 + + Assert.AreEqual(0, choice |> Seq.length) \ No newline at end of file diff --git a/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.0.bsl index 7f00cdfe046..689981e77fd 100644 --- a/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.0.bsl @@ -21,8 +21,8 @@ [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Choose([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !!0[])][offset 0x000000A0][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Filter([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000029][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Partition([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000038][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Pipe #2 input at line 2238@2242-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000030][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Pipe #2 input at line 2568@2572-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000022][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Pipe #2 input at line 2250@2254-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000030][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Pipe #2 input at line 2580@2584-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000022][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::Map([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, string)][offset 0x00000020][found Short] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::Map([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, string)][offset 0x00000031][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::MapIndexed([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, string)][offset 0x00000029][found Short] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.1.bsl b/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.1.bsl index 7f00cdfe046..689981e77fd 100644 --- a/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.1.bsl +++ b/tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.1.bsl @@ -21,8 +21,8 @@ [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Choose([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !!0[])][offset 0x000000A0][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Filter([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000029][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Partition([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000038][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Pipe #2 input at line 2238@2242-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000030][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Pipe #2 input at line 2568@2572-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000022][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Pipe #2 input at line 2250@2254-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000030][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Pipe #2 input at line 2580@2584-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000022][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::Map([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, string)][offset 0x00000020][found Short] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::Map([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, string)][offset 0x00000031][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::MapIndexed([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, string)][offset 0x00000029][found Short] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.0.bsl index 05a10ae7797..afd4bad98c5 100644 --- a/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.0.bsl @@ -21,8 +21,8 @@ [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Choose([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !!0[])][offset 0x00000081][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Filter([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000029][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Partition([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000038][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Choose@2242-2::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000030][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+countAndCollectTrueItems@2572-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000022][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Choose@2254-2::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000030][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+countAndCollectTrueItems@2584-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000022][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::Map([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, string)][offset 0x0000001E][found Short] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::Map([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, string)][offset 0x0000002D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::MapIndexed([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, string)][offset 0x00000029][found Short] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.1.bsl b/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.1.bsl index 05a10ae7797..afd4bad98c5 100644 --- a/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.1.bsl +++ b/tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.1.bsl @@ -21,8 +21,8 @@ [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Choose([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, !!0[])][offset 0x00000081][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Filter([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000029][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel::Partition([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, !!0[])][offset 0x00000038][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Choose@2242-2::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000030][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+countAndCollectTrueItems@2572-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000022][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+Choose@2254-2::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000030][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Microsoft.FSharp.Collections.ArrayModule+Parallel+countAndCollectTrueItems@2584-1::Invoke(int32, [System.Threading.Tasks.Parallel]System.Threading.Tasks.ParallelLoopState, int32)][offset 0x00000022][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::Map([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, string)][offset 0x0000001E][found Short] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::Map([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, string)][offset 0x0000002D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Microsoft.FSharp.Core.StringModule::MapIndexed([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, string)][offset 0x00000029][found Short] Unexpected type on the stack. From 7aa39f38d80882ead337ae0d30107bc28f26fdaa Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Thu, 22 May 2025 09:29:15 +0200 Subject: [PATCH 32/38] Multi agent parallel testing in CI (#18523) --- azure-pipelines-PR.yml | 148 ++++++++++++++------ eng/Build.ps1 | 102 ++++++-------- eng/build.sh | 18 ++- tests/FSharp.Test.Utilities/XunitHelpers.fs | 19 +++ 4 files changed, 182 insertions(+), 105 deletions(-) diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index bf59708bdb1..cc88c091482 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -14,7 +14,7 @@ trigger: - docs/* - .vscode/* - .devcontainer/* - - tests/scripts/ + - tests/scripts/* - attributions.md - CODE_OF_CONDUCT.md - DEVGUIDE.md @@ -306,11 +306,13 @@ stages: name: $(DncEngPublicBuildPool) demands: ImageOverride -equals $(WindowsMachineQueueName) timeoutInMinutes: 120 + strategy: + parallel: 4 steps: - checkout: self clean: true - - script: eng\CIBuild.cmd -compressallmetadata -buildnorealsig -testDesktop -configuration Release + - script: eng\CIBuild.cmd -compressallmetadata -buildnorealsig -testDesktop -configuration Release -testBatch $(System.JobPositionInPhase) env: DOTNET_DbgEnableMiniDump: 1 DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing. @@ -318,9 +320,18 @@ stages: NativeToolsOnMachine: true displayName: Build + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'XUnit' + testRunTitle: WindowsNoRealsig_testDesktop batch $(System.JobPositionInPhase) + mergeTestResults: true + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/Release' + continueOnError: true - task: PublishBuildArtifacts@1 displayName: Publish Build BinLog - condition: always() + condition: eq(variables['System.JobPositionInPhase'], 1) continueOnError: true inputs: PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog' @@ -333,7 +344,7 @@ stages: continueOnError: true inputs: PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release' - ArtifactName: 'Windows Release WindowsNoRealsig_testDesktop process dumps' + ArtifactName: 'Windows Release WindowsNoRealsig_testDesktop process dumps $(System.JobPositionInPhase)' ArtifactType: Container parallel: true @@ -429,55 +440,36 @@ stages: demands: ImageOverride -equals $(WindowsMachineQueueName) timeoutInMinutes: 120 strategy: - maxParallel: 5 matrix: - desktop_release: - _configuration: Release - _testKind: testDesktop coreclr_release: _configuration: Release _testKind: testCoreclr + transparentCompiler: # Empty display name part. fsharpqa_release: _configuration: Release _testKind: testFSharpQA + transparentCompiler: vs_release: _configuration: Release _testKind: testVs + setupVsHive: true + transparentCompiler: transparent_compiler_release: _configuration: Release _testKind: testCoreclr - - ${{ if eq(variables['Build.Reason'], 'Flaky, disabled, was PullRequest') }}: - inttests_release: - _configuration: Release - _testKind: testIntegration + TEST_TRANSPARENT_COMPILER: 1 # Pipeline variable will map to env var. + transparentCompiler: TransparentCompiler + # inttests_release: + # _configuration: Release + # _testKind: testIntegration + # setupVsHive: true steps: - checkout: self clean: true - powershell: eng\SetupVSHive.ps1 displayName: Setup VS Hive - condition: or(eq(variables['_testKind'], 'testVs'), eq(variables['_testKind'], 'testIntegration')) - - # yes, this is miserable, but - https://github.com/dotnet/arcade/issues/13239 - - script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind) - env: - DOTNET_DbgEnableMiniDump: 1 - DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing. - DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp - NativeToolsOnMachine: true - displayName: Build / Test - condition: and( ne(variables['_testKind'], 'testIntegration'), ne(variables['System.JobName'], 'transparent_compiler_release') ) - - - script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind) - env: - DOTNET_DbgEnableMiniDump: 1 - DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing. - DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp - TEST_TRANSPARENT_COMPILER: 1 - NativeToolsOnMachine: true - displayName: Build / Test Transparent Compiler - condition: and( eq(variables['System.JobName'], 'transparent_compiler_release'), ne(variables['_testKind'], 'testIntegration') ) + condition: eq(variables.setupVsHive, 'true') - script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind) env: @@ -485,15 +477,13 @@ stages: DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing. DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp NativeToolsOnMachine: true - displayName: Build / Integration Test - continueOnError: true - condition: eq(variables['_testKind'], 'testIntegration') + displayName: Build and Test $(_testKind) $(transparentCompiler) - task: PublishTestResults@2 displayName: Publish Test Results inputs: testResultsFormat: 'XUnit' - testRunTitle: WindowsCompressedMetadata $(_testKind) + testRunTitle: WindowsCompressedMetadata $(_testKind) $(transparentCompiler) mergeTestResults: true testResultsFiles: '*.xml' searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)' @@ -505,7 +495,7 @@ stages: continueOnError: true inputs: PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/$(_configuration)\Build.VisualFSharp.sln.binlog' - ArtifactName: 'Windows $(_configuration) $(_testKind) test binlogs' + ArtifactName: Windows $(_configuration) $(_testKind) $(transparentCompiler) test binlogs ArtifactType: Container parallel: true - task: PublishBuildArtifacts@1 @@ -521,7 +511,7 @@ stages: displayName: Publish Test Logs inputs: PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)' - ArtifactName: 'Windows $(_configuration) $(_testKind) test logs' + ArtifactName: Windows $(_configuration) $(_testKind) $(transparentCompilerSuffix) test logs publishLocation: Container continueOnError: true condition: always() @@ -537,6 +527,84 @@ stages: continueOnError: true condition: failed() + # Windows With Compressed Metadata Desktop + - job: WindowsCompressedMetadata_Desktop + variables: + - name: XUNIT_LOGS + value: $(Build.SourcesDirectory)\artifacts\TestResults\Release + - name: __VSNeverShowWhatsNew + value: 1 + pool: + # The PR build definition sets this variable: + # WindowsMachineQueueName=Windows.vs2022.amd64.open + # and there is an alternate build definition that sets this to a queue that is always scouting the + # next preview of Visual Studio. + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals $(WindowsMachineQueueName) + timeoutInMinutes: 120 + strategy: + parallel: 4 + + steps: + - checkout: self + clean: true + + - script: eng\CIBuild.cmd -compressallmetadata -configuration Release -testDesktop -testBatch $(System.JobPositionInPhase) + env: + DOTNET_DbgEnableMiniDump: 1 + DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing. + DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp + NativeToolsOnMachine: true + displayName: Build / Test + + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'XUnit' + testRunTitle: WindowsCompressedMetadata testDesktop batch $(System.JobPositionInPhase) + mergeTestResults: true + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/Release' + continueOnError: true + + - task: PublishBuildArtifacts@1 + displayName: Publish BinLog + condition: eq(variables['System.JobPositionInPhase'], 1) + continueOnError: true + inputs: + PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog' + ArtifactName: 'Windows testDesktop binlogs' + ArtifactType: Container + parallel: true + - task: PublishBuildArtifacts@1 + displayName: Publish Dumps + condition: failed() + continueOnError: true + inputs: + PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release' + ArtifactName: 'Windows testDesktop process dumps $(System.JobPositionInPhase)' + ArtifactType: Container + parallel: true + - task: PublishBuildArtifacts@1 + displayName: Publish Test Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\Release' + ArtifactName: 'Windows testDesktop test logs batch $(System.JobPositionInPhase)' + publishLocation: Container + continueOnError: true + condition: always() + - script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj + displayName: Dump NuGet cache contents + condition: failed() + - task: PublishBuildArtifacts@1 + displayName: Publish NuGet cache contents + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\NugetPackageRootContents' + ArtifactName: 'NuGetPackageContents Windows testDesktop $(System.JobPositionInPhase)' + publishLocation: Container + continueOnError: true + condition: failed() + # Mock official build - job: MockOfficial pool: diff --git a/eng/Build.ps1 b/eng/Build.ps1 index 146372ecde6..fe2fe5731bd 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -73,6 +73,7 @@ param ( [switch]$compressAllMetadata, [switch]$buildnorealsig = $true, [switch]$verifypackageshipstatus = $false, + [string]$testBatch = "", [parameter(ValueFromRemainingArguments = $true)][string[]]$properties) Set-StrictMode -version 2.0 @@ -356,16 +357,24 @@ function VerifyAssemblyVersionsAndSymbols() { } } -function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [string]$testadapterpath, [boolean] $asBackgroundJob = $false, [string] $settings = "") { +function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [string] $settings = "") { + $dotnetPath = InitializeDotNetCli $dotnetExe = Join-Path $dotnetPath "dotnet.exe" $projectName = [System.IO.Path]::GetFileNameWithoutExtension($testProject) + + $testBatchSuffix = "" + if ($testBatch) { + $testBatchSuffix = "_batch$testBatch" + } + # {assembly} and {framework} will expand respectively. See https://github.com/spekt/testlogger/wiki/Logger-Configuration#logfilepath # This is useful to deconflict log filenames when there are many test assemblies, e.g. when testing a whole solution. - $testLogPath = "$ArtifactsDir\TestResults\$configuration\{assembly}_{framework}.xml" - $testBinLogPath = "$LogDir\${projectName}_$targetFramework.binlog" - $args = "test $testProject -c $configuration -f $targetFramework -v n --test-adapter-path $testadapterpath --logger ""xunit;LogFilePath=$testLogPath"" /bl:$testBinLogPath" - $args += " --blame --blame-hang-timeout 5minutes --results-directory $ArtifactsDir\TestResults\$configuration -p:vstestusemsbuildoutput=true" + $testLogPath = "$ArtifactsDir\TestResults\$configuration\{assembly}_{framework}$testBatchSuffix.xml" + + $testBinLogPath = "$LogDir\${projectName}_$targetFramework$testBatch.binlog" + $args = "test $testProject -c $configuration -f $targetFramework --logger ""xunit;LogFilePath=$testLogPath"" /bl:$testBinLogPath" + $args += " --blame-hang-timeout 5minutes --results-directory $ArtifactsDir\TestResults\$configuration" if (-not $noVisualStudio -or $norestore) { $args += " --no-restore" @@ -376,22 +385,12 @@ function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [str } $args += " $settings" - - if ($asBackgroundJob) { - Write-Host - Write-Host("Starting on the background: $args") - Write-Host("------------------------------------") - Start-Job -ScriptBlock { - $argArray = $using:args -Split " " - & $using:dotnetExe $argArray - if ($LASTEXITCODE -ne 0) { - throw "Command failed to execute with exit code $($LASTEXITCODE): $using:dotnetExe $using:args" - } - } - } else { - Write-Host("$args") - Exec-Console $dotnetExe $args + if ($testBatch) { + $args += " --filter batch=$testBatch" } + + Write-Host("$args") + Exec-Console $dotnetExe $args } function Prepare-TempDir() { @@ -595,34 +594,12 @@ try { $script:BuildCategory = "Test" $script:BuildMessage = "Failure running tests" - function Receive($job) { - while($job.HasMoreData) { - Receive-Job $job | Write-Host - Start-Sleep -Seconds 1 - } - Receive-Job $job -Wait -ErrorAction Stop - } - if ($testCoreClr) { - $cpuLimit = if ($ci) { "-m:1 -- xUnit.MaxParallelThreads=1" } else { "" } - TestUsingMSBuild -testProject "$RepoRoot\FSharp.sln" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -settings $cpuLimit + TestUsingMSBuild -testProject "$RepoRoot\FSharp.sln" -targetFramework $script:coreclrTargetFramework } - if ($testDesktop -and $ci) { - $bgJob = TestUsingMSBuild -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\" -asBackgroundJob $true - - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Test.Utilities\FSharp.Test.Utilities.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Test.Utilities\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Build.UnitTests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\" - - Receive -job $bgJob - } - - if ($testDesktop -and -not $ci ) { - TestUsingMSBuild -testProject "$RepoRoot\FSharp.sln" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" + if ($testDesktop) { + TestUsingMSBuild -testProject "$RepoRoot\FSharp.sln" -targetFramework $script:desktopTargetFramework } if ($testFSharpQA) { @@ -653,50 +630,49 @@ try { } if ($testFSharpCore) { - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\" + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $script:coreclrTargetFramework + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework } if ($testCompiler) { - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\" + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:coreclrTargetFramework + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:desktopTargetFramework + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:coreclrTargetFramework + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:desktopTargetFramework } if ($testCompilerComponentTests) { - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:coreclrTargetFramework + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:desktopTargetFramework } if ($testCompilerService) { - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Service.Tests\" + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:coreclrTargetFramework + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj" -targetFramework $script:desktopTargetFramework } if ($testCambridge) { - TestUsingMSBuild -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\" + TestUsingMSBuild -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $script:coreclrTargetFramework + TestUsingMSBuild -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $script:desktopTargetFramework } if ($testScripting) { - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $script:coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\" - TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\" + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $script:coreclrTargetFramework + TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework } if ($testEditor -and -not $noVisualStudio) { - TestUsingMSBuild -testProject "$RepoRoot\vsintegration\tests\FSharp.Editor.Tests\FSharp.Editor.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Editor.Tests\FSharp.Editor.Tests.fsproj" + TestUsingMSBuild -testProject "$RepoRoot\vsintegration\tests\FSharp.Editor.Tests\FSharp.Editor.Tests.fsproj" -targetFramework $script:desktopTargetFramework } if ($testVs -and -not $noVisualStudio) { - TestUsingMSBuild -testProject "$RepoRoot\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\VisualFSharp.UnitTests\" + TestUsingMSBuild -testProject "$RepoRoot\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -targetFramework $script:desktopTargetFramework } - if ($testIntegration) { - TestUsingMSBuild -testProject "$RepoRoot\vsintegration\tests\FSharp.Editor.IntegrationTests\FSharp.Editor.IntegrationTests.csproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Editor.IntegrationTests\" + TestUsingMSBuild -testProject "$RepoRoot\vsintegration\tests\FSharp.Editor.IntegrationTests\FSharp.Editor.IntegrationTests.csproj" -targetFramework $script:desktopTargetFramework } if ($testAOT) { diff --git a/eng/build.sh b/eng/build.sh index 3c9404c8161..07c3889f33d 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -76,6 +76,7 @@ prepare_machine=false source_build=false product_build=false buildnorealsig=true +testbatch="" properties="" docker=false @@ -104,6 +105,11 @@ while [[ $# > 0 ]]; do args="$args $1" shift ;; + --testbatch) + testbatch=$2 + args="$args $1" + shift + ;; --verbosity|-v) verbosity=$2 args="$args $1" @@ -224,8 +230,16 @@ function Test() { projectname=$(basename -- "$testproject") projectname="${projectname%.*}" - testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework.xml" - args="test \"$testproject\" --no-restore --no-build -c $configuration -f $targetframework --test-adapter-path . --logger \"xunit;LogFilePath=$testlogpath\" --blame-hang-timeout 5minutes --results-directory $artifacts_dir/TestResults/$configuration -p:vstestusemsbuildoutput=false" + testbatchsuffix="" + if [[ "$testbatch" != "" ]]; then + testbatchsuffix="_batch$testbatch" + fi + testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework$testbatchsuffix.xml" + args="test \"$testproject\" --no-build -c $configuration -f $targetframework --logger \"xunit;LogFilePath=$testlogpath\" --blame-hang-timeout 5minutes --results-directory $artifacts_dir/TestResults/$configuration" + + if [[ "$testbatch" != "" ]]; then + args="$args --filter batch=$testbatch" + fi "$DOTNET_INSTALL_DIR/dotnet" $args || exit $? } diff --git a/tests/FSharp.Test.Utilities/XunitHelpers.fs b/tests/FSharp.Test.Utilities/XunitHelpers.fs index 50deb42ea68..6f57efef4a4 100644 --- a/tests/FSharp.Test.Utilities/XunitHelpers.fs +++ b/tests/FSharp.Test.Utilities/XunitHelpers.fs @@ -91,6 +91,23 @@ module TestCaseCustomizations = else testCase.TestMethod + let sha = Security.Cryptography.SHA256.Create() + + // We add extra trait to each test, of the form "batch=n" where n is between 1 and 4. + // It can be used to filter on in multi-agent testing in CI + // with dotnet test filter switch, for example "--filter batch=1" + // That way each agent can run test for a batch of tests. + let NumberOfBatchesInMultiAgentTesting = 4u + + let addBatchTrait (testCase: ITestCase) = + // Get a batch number stable between multiple test runs. + // UniqueID is ideal here, it does not change across many compilations of the same code + // and it will split theories with member data into many batches. + let data = Text.Encoding.UTF8.GetBytes testCase.UniqueID + let hashCode = BitConverter.ToUInt32(sha.ComputeHash(data), 0) + let batch = hashCode % NumberOfBatchesInMultiAgentTesting + 1u + testCase.Traits.Add("batch", ResizeArray [ string batch ]) + type CustomTestCase = inherit XunitTestCase // xUinit demands this constructor for deserialization. @@ -110,6 +127,7 @@ type CustomTestCase = override testCase.Initialize () = base.Initialize() testCase.TestMethod <- TestCaseCustomizations.rewriteTestMethod testCase + TestCaseCustomizations.addBatchTrait testCase type CustomTheoryTestCase = inherit XunitTheoryTestCase @@ -128,6 +146,7 @@ type CustomTheoryTestCase = override testCase.Initialize () = base.Initialize() testCase.TestMethod <- TestCaseCustomizations.rewriteTestMethod testCase + TestCaseCustomizations.addBatchTrait testCase #endif From c63e1ee480494a78aa93a3719569ee68dee8df84 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 09:40:14 +0200 Subject: [PATCH 33/38] Update dependencies from https://github.com/dotnet/arcade build 20250521.1 (#18588) Microsoft.DotNet.Arcade.Sdk From Version 9.0.0-beta.25266.2 -> To Version 9.0.0-beta.25271.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 90822292cd0..d5fd07440cb 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -31,9 +31,9 @@ - + https://github.com/dotnet/arcade - c62eeb5b5432f9eaa034fbd641ccd9fd0d928fb3 + 086a1771875b63404b4a710d27250fe384dc2810 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/global.json b/global.json index 6b8604364e3..a85e3a5fec3 100644 --- a/global.json +++ b/global.json @@ -17,7 +17,7 @@ "perl": "5.38.2.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25266.2", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25271.1", "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2" } } From d67ac13595ff17b0bd7d7fd8fd2c96ee51c417b4 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Thu, 22 May 2025 09:02:06 +0100 Subject: [PATCH 34/38] Allow `return|return!` `yield|yield!` and type annotations without parentheses (#18533) --- .../.FSharp.Compiler.Service/10.0.100.md | 2 +- .../.FSharp.Compiler.Service/9.0.300.md | 1 + src/Compiler/pars.fsy | 36 ++++- .../Language/ComputationExpressionTests.fs | 138 +++++++++++++++++- .../SequenceExpressionTests.fs | 90 ++++++++++++ .../data/SyntaxTree/Expression/Return 01.fs | 7 + .../SyntaxTree/Expression/Return 01.fs.bsl | 37 +++++ .../data/SyntaxTree/Expression/Return 02.fs | 7 + .../SyntaxTree/Expression/Return 02.fs.bsl | 40 +++++ .../data/SyntaxTree/Expression/Return 03.fs | 7 + .../SyntaxTree/Expression/Return 03.fs.bsl | 37 +++++ .../data/SyntaxTree/Expression/Return 04.fs | 7 + .../SyntaxTree/Expression/Return 04.fs.bsl | 40 +++++ .../data/SyntaxTree/Expression/Return 05.fs | 7 + .../SyntaxTree/Expression/Return 05.fs.bsl | 33 +++++ .../data/SyntaxTree/Expression/Return 06.fs | 7 + .../SyntaxTree/Expression/Return 06.fs.bsl | 35 +++++ .../data/SyntaxTree/Expression/Return 07.fs | 6 + .../SyntaxTree/Expression/Return 07.fs.bsl | 37 +++++ .../SyntaxTree/Expression/ReturnBang 01.fs | 7 + .../Expression/ReturnBang 01.fs.bsl | 37 +++++ .../SyntaxTree/Expression/ReturnBang 02.fs | 7 + .../Expression/ReturnBang 02.fs.bsl | 40 +++++ .../SyntaxTree/Expression/ReturnBang 03.fs | 7 + .../Expression/ReturnBang 03.fs.bsl | 38 +++++ .../data/SyntaxTree/Expression/Yield 01.fs | 4 + .../SyntaxTree/Expression/Yield 01.fs.bsl | 25 ++++ .../data/SyntaxTree/Expression/Yield 02.fs | 6 + .../SyntaxTree/Expression/Yield 02.fs.bsl | 32 ++++ .../data/SyntaxTree/Expression/Yield 03.fs | 6 + .../SyntaxTree/Expression/Yield 03.fs.bsl | 35 +++++ .../data/SyntaxTree/Expression/Yield 04.fs | 4 + .../SyntaxTree/Expression/Yield 04.fs.bsl | 27 ++++ .../data/SyntaxTree/Expression/Yield 05.fs | 6 + .../SyntaxTree/Expression/Yield 05.fs.bsl | 31 ++++ .../data/SyntaxTree/Expression/Yield 06.fs | 6 + .../SyntaxTree/Expression/Yield 06.fs.bsl | 31 ++++ .../SyntaxTree/Expression/YieldBang 01.fs | 5 + .../SyntaxTree/Expression/YieldBang 01.fs.bsl | 25 ++++ .../SyntaxTree/Expression/YieldBang 02.fs | 4 + .../SyntaxTree/Expression/YieldBang 02.fs.bsl | 27 ++++ .../SyntaxTree/Expression/YieldBang 03.fs | 6 + .../SyntaxTree/Expression/YieldBang 03.fs.bsl | 32 ++++ .../SyntaxTree/Expression/YieldBang 04.fs | 7 + .../SyntaxTree/Expression/YieldBang 04.fs.bsl | 35 +++++ .../SyntaxTree/Expression/YieldBang 05.fs | 6 + .../SyntaxTree/Expression/YieldBang 05.fs.bsl | 31 ++++ .../SyntaxTree/Expression/YieldBang 06.fs | 4 + .../SyntaxTree/Expression/YieldBang 06.fs.bsl | 24 +++ 49 files changed, 1122 insertions(+), 7 deletions(-) create mode 100644 tests/service/data/SyntaxTree/Expression/Return 01.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Return 01.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Return 02.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Return 02.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Return 03.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Return 03.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Return 04.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Return 04.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Return 05.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Return 05.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Return 06.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Return 06.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Return 07.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Return 07.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/ReturnBang 01.fs create mode 100644 tests/service/data/SyntaxTree/Expression/ReturnBang 01.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/ReturnBang 02.fs create mode 100644 tests/service/data/SyntaxTree/Expression/ReturnBang 02.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/ReturnBang 03.fs create mode 100644 tests/service/data/SyntaxTree/Expression/ReturnBang 03.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 01.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 01.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 02.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 02.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 03.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 03.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 04.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 04.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 05.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 05.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 06.fs create mode 100644 tests/service/data/SyntaxTree/Expression/Yield 06.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 01.fs create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 01.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 02.fs create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 02.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 03.fs create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 03.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 04.fs create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 04.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 05.fs create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 05.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 06.fs create mode 100644 tests/service/data/SyntaxTree/Expression/YieldBang 06.fs.bsl diff --git a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md index 093ff46d163..841e49c4c31 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md @@ -1,5 +1,5 @@ ### Fixed - +* Fixed: Allow `return`, `return!`, `yield`, `yield!` type annotations without parentheses ([PR #18533](https://github.com/dotnet/fsharp/pull/18533)) * Allow `let!` and `use!` type annotations without requiring parentheses ([PR #18508](https://github.com/dotnet/fsharp/pull/18508)) * Fix find all references for F# exceptions ([PR #18565](https://github.com/dotnet/fsharp/pull/18565)) * Shorthand lambda: fix completion for chained calls and analysis for unfinished expression ([PR #18560](https://github.com/dotnet/fsharp/pull/18560)) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index a3bda7c0c9c..6999094ccb3 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -31,6 +31,7 @@ * Fix code completion considers types from own namespace non-imported ([PR #18518](https://github.com/dotnet/fsharp/issues/18518)) * Code completion: fix getting qualifier expression in do statements in type decls ([PR #18524](https://github.com/dotnet/fsharp/pull/18524)) * Fixed: [#18441](https://github.com/dotnet/fsharp/issues/18441) FSI multi-emit unstable. ([PR #18465](https://github.com/dotnet/fsharp/pull/18465)) +* Fixed: Allow `return`, `return!`, `yield`, `yield!` type annotations without parentheses ([PR #18533](https://github.com/dotnet/fsharp/pull/18533)) ### Added * Added missing type constraints in FCS. ([PR #18241](https://github.com/dotnet/fsharp/pull/18241)) diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 61f8e2fef86..bbfca699064 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -4426,13 +4426,22 @@ declExpr: let mForLoopAll = rhs2 parseState 1 2 exprFromParseError (SynExpr.ForEach(spFor, spIn, SeqExprOnly false, true, $2, arbExpr ("forLoopCollection", mFor), arbExpr ("forLoopBody3", mForLoopBodyArb), mForLoopAll)) } - | YIELD declExpr + | YIELD declExpr COLON typ { let trivia: SynExprYieldOrReturnTrivia = { YieldOrReturnKeyword = rhs parseState 1 } - SynExpr.YieldOrReturn(($1, not $1), $2, (unionRanges (rhs parseState 1) $2.Range), trivia) } + let typedExpr = SynExpr.Typed($2, $4, unionRanges $2.Range $4.Range) + parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang typedExpr.Range + SynExpr.YieldOrReturn(($1, not $1), typedExpr, (unionRanges (rhs parseState 1) $4.Range), trivia) } - | YIELD_BANG declExpr - { let trivia: SynExprYieldOrReturnFromTrivia = { YieldOrReturnFromKeyword = rhs parseState 1 } - SynExpr.YieldOrReturnFrom(($1, not $1), $2, (unionRanges (rhs parseState 1) $2.Range), trivia) } + | YIELD declExpr opt_topReturnTypeWithTypeConstraints + { let trivia: SynExprYieldOrReturnTrivia = { YieldOrReturnKeyword = rhs parseState 1 } + let expr = + match $3 with + | None -> $2 + | Some(_, SynReturnInfo((ty, _), m)) -> + let m = unionRanges $2.Range m + parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang m + SynExpr.Typed($2, ty, m) + SynExpr.YieldOrReturn(($1, not $1), expr, (unionRanges (rhs parseState 1) expr.Range), trivia) } | YIELD recover { let mYieldAll = rhs parseState 1 @@ -4444,6 +4453,23 @@ declExpr: let trivia: SynExprYieldOrReturnFromTrivia = { YieldOrReturnFromKeyword = rhs parseState 1 } SynExpr.YieldOrReturnFrom(($1, not $1), arbExpr ("yield!", mYieldAll), mYieldAll, trivia) } + | YIELD_BANG declExpr COLON typ + { let trivia: SynExprYieldOrReturnFromTrivia = { YieldOrReturnFromKeyword = rhs parseState 1 } + let typedExpr = SynExpr.Typed($2, $4, unionRanges $2.Range $4.Range) + parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang typedExpr.Range + SynExpr.YieldOrReturnFrom(($1, not $1), typedExpr, (unionRanges (rhs parseState 1) $2.Range), trivia) } + + | YIELD_BANG declExpr opt_topReturnTypeWithTypeConstraints + { let trivia: SynExprYieldOrReturnFromTrivia = { YieldOrReturnFromKeyword = rhs parseState 1 } + let expr = + match $3 with + | None -> $2 + | Some(_, SynReturnInfo((ty, _), m)) -> + let m = unionRanges $2.Range m + parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang m + SynExpr.Typed($2, ty, m) + SynExpr.YieldOrReturnFrom(($1, not $1), expr, (unionRanges (rhs parseState 1) $2.Range), trivia) } + | BINDER headBindingPattern EQUALS typedSequentialExprBlock IN opt_OBLOCKSEP moreBinders typedSequentialExprBlock %prec expr_let { (* This rule handles the 'use!' and 'let!' binding expressions in computation expressions *) (* The BINDER token represents keywords like 'use!' or 'let!' *) diff --git a/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs index 6b0a260a42f..da918ffc00a 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. namespace Language @@ -23,6 +23,142 @@ let x = lb {1; 2;} |> shouldSucceed |> ignore + [] + let ``Version 9.0: Allow CE return and type annotations don't play well together needing parentheses``() = + FSharp """ +module ComputationExpressionTests +open System + +type MyType() = + interface IDisposable with + member this.Dispose () = () + +let f () = + async { + return new MyType() : IDisposable + } + +let f1 () = + async { + return new MyType() :> IDisposable + } + +let f2 () : Async = + async { + return new MyType() + } + +let f3 () = + async { + return (new MyType() : IDisposable) + } + """ + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 11, Col 16, Line 11, Col 42, "Feature 'Allow let! and use! type annotations without requiring parentheses' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] + + [] + let ``Version 9.0: Allow CE return! and type annotations don't to play well together needing parentheses``() = + FSharp """ +module ComputationExpressionTests + +type ResultBuilder() = + member _.Return(x) = Ok x + member _.ReturnFrom(x) = x + member _.Bind(m, f) = + match m with + | Ok a -> f a + | Error e -> Error e + +let result = ResultBuilder() + +let f() = + result { + return! Ok 1 : Result + } + +let f1() = + result { + return! (Ok 1 : Result) + } + """ + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 16, Col 17, Line 16, Col 43, "Feature 'Allow let! and use! type annotations without requiring parentheses' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] + + [] + let ``Preview: Allow CE return and type annotations to play well together without needing parentheses``() = + FSharp """ +module ComputationExpressionTests +open System + +type MyType() = + interface IDisposable with + member this.Dispose () = () + +let f () = + async { + return new MyType() : IDisposable + } + +let f1 () = + async { + return new MyType() :> IDisposable + } + +let f2 () : Async = + async { + return new MyType() + } + +let f3 () = + async { + return (new MyType() : IDisposable) + } + """ + |> withLangVersionPreview + |> asExe + |> ignoreWarnings + |> compileAndRun + |> shouldSucceed + + [] + let ``Preview: Allow CE return! and type annotations to play well together without needing parentheses``() = + FSharp """ +module ComputationExpressionTests + +type ResultBuilder() = + member _.Return(x) = Ok x + member _.ReturnFrom(x) = x + member _.Bind(m, f) = + match m with + | Ok a -> f a + | Error e -> Error e + +let result = ResultBuilder() + +let f() = + result { + return! Ok 1 : Result + } + +let f1() = + result { + return! (Ok 1 : Result) + } + """ + |> withLangVersionPreview + |> asExe + |> ignoreWarnings + |> compileAndRun + |> shouldSucceed + [] let ``A CE explicitly using Zero fails without a defined Zero``() = FSharp """ diff --git a/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs index d64262e856b..8490b41a750 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs @@ -644,4 +644,94 @@ let c = [ { 1;10 } ] |> withOptions [ "--nowarn:0020" ] |> withLangVersionPreview |> typecheck + |> shouldSucceed + + [] + let ``Version 9.0: Allow SE yield and type annotations don't play well together needing parentheses``() = + FSharp """ +module SequenceExpressionTests +open System + +let f() = + seq { + yield 1 : int + } + +let f1() = + seq { + yield (1 : int) + } + """ + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 7, Col 15, Line 7, Col 22, "Feature 'Allow let! and use! type annotations without requiring parentheses' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] + + [] + let ``Preview: Allow SE yield and type annotations to play well together without needing parentheses``() = + FSharp """ +module SequenceExpressionTests +open System + +let f() = + seq { + yield 1 : int + } + +let f1() = + seq { + yield (1 : int) + } + """ + |> withLangVersionPreview + |> asExe + |> ignoreWarnings + |> compileAndRun + |> shouldSucceed + + [] + let ``Version 9.0: Allow SE yield! and type annotations don't play well together needing parentheses``() = + FSharp """ +module SequenceExpressionTests +open System + +let f() = + seq { + yield! [1;2] : int list + } + +let f1() = + seq { + yield! ([1;2] : int list) + } + """ + |> withLangVersion90 + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 7, Col 16, Line 7, Col 32, "Feature 'Allow let! and use! type annotations without requiring parentheses' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] + + [] + let ``Preview: Allow SE yield! and type annotations to play well together without needing parentheses``() = + FSharp """ +module SequenceExpressionTests +open System + +let f() = + seq { + yield! [1;2] : int list + } + +let f1() = + seq { + yield! ([1;2] : int list) + } + """ + |> withLangVersionPreview + |> asExe + |> ignoreWarnings + |> compileAndRun |> shouldSucceed \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/Expression/Return 01.fs b/tests/service/data/SyntaxTree/Expression/Return 01.fs new file mode 100644 index 00000000000..51695776a55 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 01.fs @@ -0,0 +1,7 @@ +module Module + +let _ = + async { + return new MyType() : IDisposable + } + diff --git a/tests/service/data/SyntaxTree/Expression/Return 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Return 01.fs.bsl new file mode 100644 index 00000000000..86c81fa6d87 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 01.fs.bsl @@ -0,0 +1,37 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Return 01.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Wild (3,4--3,5), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), + Typed + (New + (false, + LongIdent (SynLongIdent ([MyType], [], [None])), + Const (Unit, (5,25--5,27)), (5,15--5,27)), + LongIdent + (SynLongIdent ([IDisposable], [], [None])), + (5,15--5,41)), (5,8--5,41), + { YieldOrReturnKeyword = (5,8--5,14) }), (4,10--6,5)), + (4,4--6,5)), (3,4--3,5), NoneAtLet, + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,6--3,7) })], (3,0--6,5))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Return 02.fs b/tests/service/data/SyntaxTree/Expression/Return 02.fs new file mode 100644 index 00000000000..2bfa5ecf136 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 02.fs @@ -0,0 +1,7 @@ +module Module + +let _ = + async { + return (new MyType() : IDisposable) + } + diff --git a/tests/service/data/SyntaxTree/Expression/Return 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Return 02.fs.bsl new file mode 100644 index 00000000000..678e228062b --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 02.fs.bsl @@ -0,0 +1,40 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Return 02.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Wild (3,4--3,5), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), + Paren + (Typed + (New + (false, + LongIdent + (SynLongIdent ([MyType], [], [None])), + Const (Unit, (5,26--5,28)), (5,16--5,28)), + LongIdent + (SynLongIdent ([IDisposable], [], [None])), + (5,16--5,42)), (5,15--5,16), Some (5,42--5,43), + (5,15--5,43)), (5,8--5,43), + { YieldOrReturnKeyword = (5,8--5,14) }), (4,10--6,5)), + (4,4--6,5)), (3,4--3,5), NoneAtLet, + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,6--3,7) })], (3,0--6,5))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Return 03.fs b/tests/service/data/SyntaxTree/Expression/Return 03.fs new file mode 100644 index 00000000000..ddf6e531468 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 03.fs @@ -0,0 +1,7 @@ +module Module + +let _ = + async { + return new MyType() :> IDisposable + } + diff --git a/tests/service/data/SyntaxTree/Expression/Return 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Return 03.fs.bsl new file mode 100644 index 00000000000..467a5f86141 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 03.fs.bsl @@ -0,0 +1,37 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Return 03.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Wild (3,4--3,5), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), + Upcast + (New + (false, + LongIdent (SynLongIdent ([MyType], [], [None])), + Const (Unit, (5,25--5,27)), (5,15--5,27)), + LongIdent + (SynLongIdent ([IDisposable], [], [None])), + (5,15--5,42)), (5,8--5,42), + { YieldOrReturnKeyword = (5,8--5,14) }), (4,10--6,5)), + (4,4--6,5)), (3,4--3,5), NoneAtLet, + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,6--3,7) })], (3,0--6,5))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Return 04.fs b/tests/service/data/SyntaxTree/Expression/Return 04.fs new file mode 100644 index 00000000000..933a72820cc --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 04.fs @@ -0,0 +1,7 @@ +module Module + +let _ = + async { + return (new MyType() :> IDisposable) + } + diff --git a/tests/service/data/SyntaxTree/Expression/Return 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Return 04.fs.bsl new file mode 100644 index 00000000000..bc6451d72ab --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 04.fs.bsl @@ -0,0 +1,40 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Return 04.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Wild (3,4--3,5), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), + Paren + (Upcast + (New + (false, + LongIdent + (SynLongIdent ([MyType], [], [None])), + Const (Unit, (5,26--5,28)), (5,16--5,28)), + LongIdent + (SynLongIdent ([IDisposable], [], [None])), + (5,16--5,43)), (5,15--5,16), Some (5,43--5,44), + (5,15--5,44)), (5,8--5,44), + { YieldOrReturnKeyword = (5,8--5,14) }), (4,10--6,5)), + (4,4--6,5)), (3,4--3,5), NoneAtLet, + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,6--3,7) })], (3,0--6,5))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Return 05.fs b/tests/service/data/SyntaxTree/Expression/Return 05.fs new file mode 100644 index 00000000000..bd1ef865815 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 05.fs @@ -0,0 +1,7 @@ +module Module + +let _ = + async { + return new MyType() + } + diff --git a/tests/service/data/SyntaxTree/Expression/Return 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Return 05.fs.bsl new file mode 100644 index 00000000000..beaaf365ecc --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 05.fs.bsl @@ -0,0 +1,33 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Return 05.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Wild (3,4--3,5), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), + New + (false, + LongIdent (SynLongIdent ([MyType], [], [None])), + Const (Unit, (5,25--5,27)), (5,15--5,27)), + (5,8--5,27), { YieldOrReturnKeyword = (5,8--5,14) }), + (4,10--6,5)), (4,4--6,5)), (3,4--3,5), NoneAtLet, + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,6--3,7) })], (3,0--6,5))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Return 06.fs b/tests/service/data/SyntaxTree/Expression/Return 06.fs new file mode 100644 index 00000000000..95941f09646 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 06.fs @@ -0,0 +1,7 @@ +module Module + +let _ = + async { + return (new MyType()) + } + diff --git a/tests/service/data/SyntaxTree/Expression/Return 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Return 06.fs.bsl new file mode 100644 index 00000000000..04d0ad024e7 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 06.fs.bsl @@ -0,0 +1,35 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Return 06.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Wild (3,4--3,5), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), + Paren + (New + (false, + LongIdent (SynLongIdent ([MyType], [], [None])), + Const (Unit, (5,26--5,28)), (5,16--5,28)), + (5,15--5,16), Some (5,28--5,29), (5,15--5,29)), + (5,8--5,29), { YieldOrReturnKeyword = (5,8--5,14) }), + (4,10--6,5)), (4,4--6,5)), (3,4--3,5), NoneAtLet, + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,6--3,7) })], (3,0--6,5))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Return 07.fs b/tests/service/data/SyntaxTree/Expression/Return 07.fs new file mode 100644 index 00000000000..19e68b27e5c --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 07.fs @@ -0,0 +1,6 @@ +module Module + +let _ = + async { + return new MyType() : + } diff --git a/tests/service/data/SyntaxTree/Expression/Return 07.fs.bsl b/tests/service/data/SyntaxTree/Expression/Return 07.fs.bsl new file mode 100644 index 00000000000..0bf151be5bb --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Return 07.fs.bsl @@ -0,0 +1,37 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Return 07.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Wild (3,4--3,5), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), + Typed + (New + (false, + LongIdent (SynLongIdent ([MyType], [], [None])), + Const (Unit, (5,25--5,27)), (5,15--5,27)), + FromParseError (5,29--5,29), (5,15--5,29)), + (5,8--5,29), { YieldOrReturnKeyword = (5,8--5,14) }), + (4,10--6,5)), (4,4--6,5)), (3,4--3,5), NoneAtLet, + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,6--3,7) })], (3,0--6,5))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(6,4)-(6,5) parse error Unexpected symbol '}' in expression diff --git a/tests/service/data/SyntaxTree/Expression/ReturnBang 01.fs b/tests/service/data/SyntaxTree/Expression/ReturnBang 01.fs new file mode 100644 index 00000000000..009a45b4c08 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/ReturnBang 01.fs @@ -0,0 +1,7 @@ +module Module + +let _ = + async { + return! new MyType() : IDisposable + } + diff --git a/tests/service/data/SyntaxTree/Expression/ReturnBang 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/ReturnBang 01.fs.bsl new file mode 100644 index 00000000000..4890e673c4c --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/ReturnBang 01.fs.bsl @@ -0,0 +1,37 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/ReturnBang 01.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Wild (3,4--3,5), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturnFrom + ((false, true), + Typed + (New + (false, + LongIdent (SynLongIdent ([MyType], [], [None])), + Const (Unit, (5,26--5,28)), (5,16--5,28)), + LongIdent + (SynLongIdent ([IDisposable], [], [None])), + (5,16--5,42)), (5,8--5,28), + { YieldOrReturnFromKeyword = (5,8--5,15) }), + (4,10--6,5)), (4,4--6,5)), (3,4--3,5), NoneAtLet, + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,6--3,7) })], (3,0--6,5))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/ReturnBang 02.fs b/tests/service/data/SyntaxTree/Expression/ReturnBang 02.fs new file mode 100644 index 00000000000..91fd750a01b --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/ReturnBang 02.fs @@ -0,0 +1,7 @@ +module Module + +let _ = + async { + return! (new MyType() : IDisposable) + } + diff --git a/tests/service/data/SyntaxTree/Expression/ReturnBang 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/ReturnBang 02.fs.bsl new file mode 100644 index 00000000000..4ff6f08be18 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/ReturnBang 02.fs.bsl @@ -0,0 +1,40 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/ReturnBang 02.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Wild (3,4--3,5), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturnFrom + ((false, true), + Paren + (Typed + (New + (false, + LongIdent + (SynLongIdent ([MyType], [], [None])), + Const (Unit, (5,27--5,29)), (5,17--5,29)), + LongIdent + (SynLongIdent ([IDisposable], [], [None])), + (5,17--5,43)), (5,16--5,17), Some (5,43--5,44), + (5,16--5,44)), (5,8--5,44), + { YieldOrReturnFromKeyword = (5,8--5,15) }), + (4,10--6,5)), (4,4--6,5)), (3,4--3,5), NoneAtLet, + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,6--3,7) })], (3,0--6,5))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/ReturnBang 03.fs b/tests/service/data/SyntaxTree/Expression/ReturnBang 03.fs new file mode 100644 index 00000000000..dcb7b9c149a --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/ReturnBang 03.fs @@ -0,0 +1,7 @@ +module Module + +let _ = + async { + return! new MyType() : + } + diff --git a/tests/service/data/SyntaxTree/Expression/ReturnBang 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/ReturnBang 03.fs.bsl new file mode 100644 index 00000000000..e23e8ccde38 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/ReturnBang 03.fs.bsl @@ -0,0 +1,38 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/ReturnBang 03.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + Wild (3,4--3,5), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturnFrom + ((false, true), + Typed + (New + (false, + LongIdent (SynLongIdent ([MyType], [], [None])), + Const (Unit, (5,26--5,28)), (5,16--5,28)), + FromParseError (5,30--5,30), (5,16--5,30)), + (5,8--5,28), + { YieldOrReturnFromKeyword = (5,8--5,15) }), + (4,10--6,5)), (4,4--6,5)), (3,4--3,5), NoneAtLet, + { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,6--3,7) })], (3,0--6,5))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--6,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(6,4)-(6,5) parse error Unexpected symbol '}' in expression diff --git a/tests/service/data/SyntaxTree/Expression/Yield 01.fs b/tests/service/data/SyntaxTree/Expression/Yield 01.fs new file mode 100644 index 00000000000..8f3656d8fcb --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 01.fs @@ -0,0 +1,4 @@ +module Module + +yield [ 1 .. 10 ]: int list + diff --git a/tests/service/data/SyntaxTree/Expression/Yield 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Yield 01.fs.bsl new file mode 100644 index 00000000000..f6aabb5d447 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 01.fs.bsl @@ -0,0 +1,25 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Yield 01.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (YieldOrReturn + ((true, false), + Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (3,8--3,9))), (3,10--3,12), + Some (Const (Int32 10, (3,13--3,15))), (3,8--3,9), + (3,13--3,15), (3,8--3,15)), (3,6--3,17)), + App + (LongIdent (SynLongIdent ([list], [], [None])), None, + [LongIdent (SynLongIdent ([int], [], [None]))], [], None, + true, (3,19--3,27)), (3,6--3,27)), (3,0--3,27), + { YieldOrReturnKeyword = (3,0--3,5) }), (3,0--3,27))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,27), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Yield 02.fs b/tests/service/data/SyntaxTree/Expression/Yield 02.fs new file mode 100644 index 00000000000..0573f7af70a --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 02.fs @@ -0,0 +1,6 @@ +module Module + +seq { + yield [ 1 .. 10 ]: int list +} + diff --git a/tests/service/data/SyntaxTree/Expression/Yield 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Yield 02.fs.bsl new file mode 100644 index 00000000000..0948c6de6b3 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 02.fs.bsl @@ -0,0 +1,32 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Yield 02.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident seq, + ComputationExpr + (false, + YieldOrReturn + ((true, false), + Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (4,12--4,13))), + (4,14--4,16), + Some (Const (Int32 10, (4,17--4,19))), + (4,12--4,13), (4,17--4,19), (4,12--4,19)), + (4,10--4,21)), + App + (LongIdent (SynLongIdent ([list], [], [None])), None, + [LongIdent (SynLongIdent ([int], [], [None]))], [], + None, true, (4,23--4,31)), (4,10--4,31)), + (4,4--4,31), { YieldOrReturnKeyword = (4,4--4,9) }), + (3,4--5,1)), (3,0--5,1)), (3,0--5,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Yield 03.fs b/tests/service/data/SyntaxTree/Expression/Yield 03.fs new file mode 100644 index 00000000000..d5c1f13e24f --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 03.fs @@ -0,0 +1,6 @@ +module Module + +seq { + yield ([ 1 .. 10 ]: int list) +} + diff --git a/tests/service/data/SyntaxTree/Expression/Yield 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Yield 03.fs.bsl new file mode 100644 index 00000000000..a064eecfdc1 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 03.fs.bsl @@ -0,0 +1,35 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Yield 03.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident seq, + ComputationExpr + (false, + YieldOrReturn + ((true, false), + Paren + (Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (4,13--4,14))), + (4,15--4,17), + Some (Const (Int32 10, (4,18--4,20))), + (4,13--4,14), (4,18--4,20), (4,13--4,20)), + (4,11--4,22)), + App + (LongIdent (SynLongIdent ([list], [], [None])), + None, + [LongIdent (SynLongIdent ([int], [], [None]))], + [], None, true, (4,24--4,32)), (4,11--4,32)), + (4,10--4,11), Some (4,32--4,33), (4,10--4,33)), + (4,4--4,33), { YieldOrReturnKeyword = (4,4--4,9) }), + (3,4--5,1)), (3,0--5,1)), (3,0--5,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Yield 04.fs b/tests/service/data/SyntaxTree/Expression/Yield 04.fs new file mode 100644 index 00000000000..e31740cb322 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 04.fs @@ -0,0 +1,4 @@ +module Module + +yield ([ 1 .. 10 ]: int list) + diff --git a/tests/service/data/SyntaxTree/Expression/Yield 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Yield 04.fs.bsl new file mode 100644 index 00000000000..d3e1a1510ed --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 04.fs.bsl @@ -0,0 +1,27 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Yield 04.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (YieldOrReturn + ((true, false), + Paren + (Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (3,9--3,10))), (3,11--3,13), + Some (Const (Int32 10, (3,14--3,16))), (3,9--3,10), + (3,14--3,16), (3,9--3,16)), (3,7--3,18)), + App + (LongIdent (SynLongIdent ([list], [], [None])), None, + [LongIdent (SynLongIdent ([int], [], [None]))], [], + None, true, (3,20--3,28)), (3,7--3,28)), (3,6--3,7), + Some (3,28--3,29), (3,6--3,29)), (3,0--3,29), + { YieldOrReturnKeyword = (3,0--3,5) }), (3,0--3,29))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,29), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Yield 05.fs b/tests/service/data/SyntaxTree/Expression/Yield 05.fs new file mode 100644 index 00000000000..573d3b81cdc --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 05.fs @@ -0,0 +1,6 @@ +module Module + +seq { + yield [ 1 .. 10 ] : +} + diff --git a/tests/service/data/SyntaxTree/Expression/Yield 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Yield 05.fs.bsl new file mode 100644 index 00000000000..1deada75f94 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 05.fs.bsl @@ -0,0 +1,31 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Yield 05.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident seq, + ComputationExpr + (false, + YieldOrReturn + ((true, false), + Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (4,12--4,13))), + (4,14--4,16), + Some (Const (Int32 10, (4,17--4,19))), + (4,12--4,13), (4,17--4,19), (4,12--4,19)), + (4,10--4,21)), FromParseError (4,23--4,23), + (4,10--4,23)), (4,4--4,23), + { YieldOrReturnKeyword = (4,4--4,9) }), (3,4--5,1)), + (3,0--5,1)), (3,0--5,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(5,0)-(5,1) parse error Unexpected symbol '}' in expression diff --git a/tests/service/data/SyntaxTree/Expression/Yield 06.fs b/tests/service/data/SyntaxTree/Expression/Yield 06.fs new file mode 100644 index 00000000000..bb699f40621 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 06.fs @@ -0,0 +1,6 @@ +module Module + +seq { + yield [ 1 .. 10 ] : +} + diff --git a/tests/service/data/SyntaxTree/Expression/Yield 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Yield 06.fs.bsl new file mode 100644 index 00000000000..ced49e682d6 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/Yield 06.fs.bsl @@ -0,0 +1,31 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/Yield 06.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident seq, + ComputationExpr + (false, + YieldOrReturn + ((true, false), + Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (4,12--4,13))), + (4,14--4,16), + Some (Const (Int32 10, (4,17--4,19))), + (4,12--4,13), (4,17--4,19), (4,12--4,19)), + (4,10--4,21)), FromParseError (4,23--4,23), + (4,10--4,23)), (4,4--4,23), + { YieldOrReturnKeyword = (4,4--4,9) }), (3,4--5,1)), + (3,0--5,1)), (3,0--5,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(5,0)-(5,1) parse error Unexpected symbol '}' in expression diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 01.fs b/tests/service/data/SyntaxTree/Expression/YieldBang 01.fs new file mode 100644 index 00000000000..dbfd3f4beef --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 01.fs @@ -0,0 +1,5 @@ +module Module + +yield! [ 1 .. 10 ]: int list + + diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/YieldBang 01.fs.bsl new file mode 100644 index 00000000000..3d1e71f4894 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 01.fs.bsl @@ -0,0 +1,25 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/YieldBang 01.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (YieldOrReturnFrom + ((true, false), + Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (3,9--3,10))), (3,11--3,13), + Some (Const (Int32 10, (3,14--3,16))), (3,9--3,10), + (3,14--3,16), (3,9--3,16)), (3,7--3,18)), + App + (LongIdent (SynLongIdent ([list], [], [None])), None, + [LongIdent (SynLongIdent ([int], [], [None]))], [], None, + true, (3,20--3,28)), (3,7--3,28)), (3,0--3,18), + { YieldOrReturnFromKeyword = (3,0--3,6) }), (3,0--3,18))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,18), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 02.fs b/tests/service/data/SyntaxTree/Expression/YieldBang 02.fs new file mode 100644 index 00000000000..ed1bd0fea97 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 02.fs @@ -0,0 +1,4 @@ +module Module + +yield! ([ 1 .. 10 ]: int list) + diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/YieldBang 02.fs.bsl new file mode 100644 index 00000000000..08d1db3d26e --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 02.fs.bsl @@ -0,0 +1,27 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/YieldBang 02.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (YieldOrReturnFrom + ((true, false), + Paren + (Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (3,10--3,11))), (3,12--3,14), + Some (Const (Int32 10, (3,15--3,17))), (3,10--3,11), + (3,15--3,17), (3,10--3,17)), (3,8--3,19)), + App + (LongIdent (SynLongIdent ([list], [], [None])), None, + [LongIdent (SynLongIdent ([int], [], [None]))], [], + None, true, (3,21--3,29)), (3,8--3,29)), (3,7--3,8), + Some (3,29--3,30), (3,7--3,30)), (3,0--3,30), + { YieldOrReturnFromKeyword = (3,0--3,6) }), (3,0--3,30))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,30), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 03.fs b/tests/service/data/SyntaxTree/Expression/YieldBang 03.fs new file mode 100644 index 00000000000..c80ceb053c5 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 03.fs @@ -0,0 +1,6 @@ +module Module + +seq { + yield! [ 1 .. 10 ]: int list +} + diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/YieldBang 03.fs.bsl new file mode 100644 index 00000000000..09804abe660 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 03.fs.bsl @@ -0,0 +1,32 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/YieldBang 03.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident seq, + ComputationExpr + (false, + YieldOrReturnFrom + ((true, false), + Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (4,13--4,14))), + (4,15--4,17), + Some (Const (Int32 10, (4,18--4,20))), + (4,13--4,14), (4,18--4,20), (4,13--4,20)), + (4,11--4,22)), + App + (LongIdent (SynLongIdent ([list], [], [None])), None, + [LongIdent (SynLongIdent ([int], [], [None]))], [], + None, true, (4,24--4,32)), (4,11--4,32)), + (4,4--4,22), { YieldOrReturnFromKeyword = (4,4--4,10) }), + (3,4--5,1)), (3,0--5,1)), (3,0--5,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 04.fs b/tests/service/data/SyntaxTree/Expression/YieldBang 04.fs new file mode 100644 index 00000000000..e80aee60891 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 04.fs @@ -0,0 +1,7 @@ +module Module + +seq { + yield! ([ 1 .. 10 ]: int list) +} + + diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/YieldBang 04.fs.bsl new file mode 100644 index 00000000000..a5fde092fb8 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 04.fs.bsl @@ -0,0 +1,35 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/YieldBang 04.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident seq, + ComputationExpr + (false, + YieldOrReturnFrom + ((true, false), + Paren + (Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (4,14--4,15))), + (4,16--4,18), + Some (Const (Int32 10, (4,19--4,21))), + (4,14--4,15), (4,19--4,21), (4,14--4,21)), + (4,12--4,23)), + App + (LongIdent (SynLongIdent ([list], [], [None])), + None, + [LongIdent (SynLongIdent ([int], [], [None]))], + [], None, true, (4,25--4,33)), (4,12--4,33)), + (4,11--4,12), Some (4,33--4,34), (4,11--4,34)), + (4,4--4,34), { YieldOrReturnFromKeyword = (4,4--4,10) }), + (3,4--5,1)), (3,0--5,1)), (3,0--5,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 05.fs b/tests/service/data/SyntaxTree/Expression/YieldBang 05.fs new file mode 100644 index 00000000000..5870293c0d1 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 05.fs @@ -0,0 +1,6 @@ +module Module + +seq { + yield! [ 1 .. 10 ] : +} + diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/YieldBang 05.fs.bsl new file mode 100644 index 00000000000..595f455632d --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 05.fs.bsl @@ -0,0 +1,31 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/YieldBang 05.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident seq, + ComputationExpr + (false, + YieldOrReturnFrom + ((true, false), + Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (4,13--4,14))), + (4,15--4,17), + Some (Const (Int32 10, (4,18--4,20))), + (4,13--4,14), (4,18--4,20), (4,13--4,20)), + (4,11--4,22)), FromParseError (4,24--4,24), + (4,11--4,24)), (4,4--4,22), + { YieldOrReturnFromKeyword = (4,4--4,10) }), (3,4--5,1)), + (3,0--5,1)), (3,0--5,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--5,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(5,0)-(5,1) parse error Unexpected symbol '}' in expression diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 06.fs b/tests/service/data/SyntaxTree/Expression/YieldBang 06.fs new file mode 100644 index 00000000000..037f709a6e0 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 06.fs @@ -0,0 +1,4 @@ +module Module + +yield! [ 1 .. 10 ] : + diff --git a/tests/service/data/SyntaxTree/Expression/YieldBang 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/YieldBang 06.fs.bsl new file mode 100644 index 00000000000..de83602e2d5 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/YieldBang 06.fs.bsl @@ -0,0 +1,24 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/YieldBang 06.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (YieldOrReturnFrom + ((true, false), + Typed + (ArrayOrListComputed + (false, + IndexRange + (Some (Const (Int32 1, (3,9--3,10))), (3,11--3,13), + Some (Const (Int32 10, (3,14--3,16))), (3,9--3,10), + (3,14--3,16), (3,9--3,16)), (3,7--3,18)), + FromParseError (3,20--3,20), (3,7--3,20)), (3,0--3,18), + { YieldOrReturnFromKeyword = (3,0--3,6) }), (3,0--3,18))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--3,18), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(5,0)-(5,0) parse error Incomplete structured construct at or before this point in expression From 8e3bb47e6c4d987753c9f977cf06797a1f5cd4cf Mon Sep 17 00:00:00 2001 From: Tuomas Hietanen Date: Thu, 22 May 2025 09:05:12 +0100 Subject: [PATCH 35/38] Minor perf opt: (#18541) - isNull is inline also in FSharp.Core - Lazy load of ILAssemblyRefs - Avoid looping 120 libraries through on most cases --- tests/service/data/TestTP/ProvidedTypes.fs | 57 +++++++++++++--------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/tests/service/data/TestTP/ProvidedTypes.fs b/tests/service/data/TestTP/ProvidedTypes.fs index 1df9d3139d1..218c9738f1a 100644 --- a/tests/service/data/TestTP/ProvidedTypes.fs +++ b/tests/service/data/TestTP/ProvidedTypes.fs @@ -24,9 +24,9 @@ open Microsoft.FSharp.Core.CompilerServices [] module Utils = let K x = (fun () -> x) - let isNull x = match x with null -> true | _ -> false - let isNil x = match x with [] -> true | _ -> false - let isEmpty x = match x with [| |] -> true | _ -> false + let inline isNull x = match x with null -> true | _ -> false + let inline isNil x = match x with [] -> true | _ -> false + let inline isEmpty x = match x with [| |] -> true | _ -> false module Option = let toObj x = match x with None -> null | Some x -> x @@ -6253,11 +6253,11 @@ module internal AssemblyReader = let ilModule = seekReadModule (ilMetadataVersion) 1 - let ilAssemblyRefs = [ for i in 1 .. getNumRows ILTableNames.AssemblyRef do yield seekReadAssemblyRef i ] + let ilAssemblyRefs = lazy [ for i in 1 .. getNumRows ILTableNames.AssemblyRef do yield seekReadAssemblyRef i ] member __.ILGlobals = ilg member __.ILModuleDef = ilModule - member __.ILAssemblyRefs = ilAssemblyRefs + member __.ILAssemblyRefs = ilAssemblyRefs.Force() let sigptr_get_byte (bytes: byte[]) sigptr = int bytes[sigptr], sigptr + 1 @@ -8988,31 +8988,42 @@ namespace ProviderImplementation.ProvidedTypes let asms = (if toTgt then getTargetAssemblies() else getSourceAssemblies()) let fullName = fixName t.FullName - // TODO: this linear search through all available source/target assemblies feels as if it must be too slow in some cases. - // However, we store type translations in various tables (typeTableFwd and typeTableBwd) so perhaps it is not a problem - let rec loop i = - if i < 0 then - let msg = - if toTgt then sprintf "The design-time type '%O' utilized by a type provider was not found in the target reference assembly set '%A'. You may be referencing a profile which contains fewer types than those needed by the type provider you are using." t (getTargetAssemblies() |> Seq.toList) - elif getSourceAssemblies() |> Seq.isEmpty then sprintf "A failure occurred while determining compilation references" - else sprintf "The target type '%O' utilized by a type provider was not found in the design-time assembly set '%A'. Please report this problem to the project site for the type provider." t (getSourceAssemblies() |> Seq.toList) - failwith msg - else - match tryGetTypeFromAssembly toTgt t.Assembly.FullName fullName asms[i] with - | Some (newT, canSave) -> - if canSave then table[t] <- newT - newT - | None -> loop (i - 1) - loop (asms.Count - 1) + let bestGuess = + asms |> Seq.tryFind(fun a -> a.FullName = t.Assembly.FullName) + |> Option.bind(fun a -> tryGetTypeFromAssembly toTgt t.Assembly.FullName fullName a) + + match bestGuess with + | Some (newT, canSave) -> + if canSave then table.[t] <- newT + newT + | None -> + + // TODO: this linear search through all available source/target assemblies feels as if it must be too slow in some cases. + // However, we store type translations in various tables (typeTableFwd and typeTableBwd) so perhaps it is not a problem + let rec loop i = + if i < 0 then + let msg = + if toTgt then sprintf "The design-time type '%O' utilized by a type provider was not found in the target reference assembly set '%A'. You may be referencing a profile which contains fewer types than those needed by the type provider you are using." t (getTargetAssemblies() |> Seq.toList) + elif getSourceAssemblies() |> Seq.isEmpty then sprintf "A failure occurred while determining compilation references" + else sprintf "The target type '%O' utilized by a type provider was not found in the design-time assembly set '%A'. Please report this problem to the project site for the type provider." t (getSourceAssemblies() |> Seq.toList) + failwith msg + else + match tryGetTypeFromAssembly toTgt t.Assembly.FullName fullName asms[i] with + | Some (newT, canSave) -> + if canSave then table[t] <- newT + newT + | None -> loop (i - 1) + loop (asms.Count - 1) and convType toTgt (t:Type) = let table = (if toTgt then typeTableFwd else typeTableBwd) match table.TryGetValue(t) with | true, newT -> newT | false, _ -> - if t :? ProvidedTypeSymbol && (t :?> ProvidedTypeSymbol).IsFSharpTypeAbbreviation then t + let isSymbol = t :? ProvidedTypeSymbol + if isSymbol && (t :?> ProvidedTypeSymbol).IsFSharpTypeAbbreviation then t // Types annotated with units-of-measure - elif t :? ProvidedTypeSymbol && (t :?> ProvidedTypeSymbol).IsFSharpUnitAnnotated then + elif isSymbol && (t :?> ProvidedTypeSymbol).IsFSharpUnitAnnotated then let genericType = t.GetGenericTypeDefinition() let newT = convTypeRef toTgt genericType let typeArguments = t.GetGenericArguments() |> Array.map (convType toTgt) |> Array.toList From ce2d4563ab391ccd480c6173ee1408e09af3ddc2 Mon Sep 17 00:00:00 2001 From: dawe Date: Thu, 22 May 2025 10:13:36 +0200 Subject: [PATCH 36/38] add contrib.rocks to README.md (#18564) --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 0def09e17fe..e5fde71496f 100644 --- a/README.md +++ b/README.md @@ -132,3 +132,13 @@ If you're curious about F# itself, check out these links: * [Get started with F#](https://learn.microsoft.com/dotnet/fsharp/get-started/) * [F# Software Foundation](https://fsharp.org) * [F# Testimonials](https://fsharp.org/testimonials) + +## Contributors ✨ + +F# exists because of these wonderful people: + + + + + +Made with [contrib.rocks](https://contrib.rocks). From fb50b56bd085002cb31099b0a8e57775883802a1 Mon Sep 17 00:00:00 2001 From: Brian Rourke Boll Date: Thu, 22 May 2025 04:47:44 -0400 Subject: [PATCH 37/38] Use struct tuple instead of reference tuple for pair ordering (#18513) --- src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs | 4 ++-- src/Compiler/Utilities/lib.fs | 3 +-- src/Compiler/Utilities/lib.fsi | 2 +- src/Compiler/Utilities/range.fs | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs index 0e2ced16da4..0b1f58713ba 100644 --- a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs +++ b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs @@ -330,8 +330,8 @@ type ReqdItem = let reqdItemOrder = let rep = function - | ReqdSubEnv v -> true, v - | ReqdVal v -> false, v + | ReqdSubEnv v -> struct (true, v) + | ReqdVal v -> struct (false, v) Order.orderOn rep (Pair.order (Bool.order, valOrder)) diff --git a/src/Compiler/Utilities/lib.fs b/src/Compiler/Utilities/lib.fs index 609245f636e..8acde600ec4 100755 --- a/src/Compiler/Utilities/lib.fs +++ b/src/Compiler/Utilities/lib.fs @@ -59,12 +59,11 @@ module Int64 = module Pair = let order (compare1: IComparer<'T1>, compare2: IComparer<'T2>) = - { new IComparer<'T1 * 'T2> with + { new IComparer with member _.Compare((a1, a2), (aa1, aa2)) = let res1 = compare1.Compare (a1, aa1) if res1 <> 0 then res1 else compare2.Compare (a2, aa2) } - type NameSet = Zset module NameSet = diff --git a/src/Compiler/Utilities/lib.fsi b/src/Compiler/Utilities/lib.fsi index 1dfd610d55a..5d82031642f 100644 --- a/src/Compiler/Utilities/lib.fsi +++ b/src/Compiler/Utilities/lib.fsi @@ -52,7 +52,7 @@ module Int64 = val order: IComparer module Pair = - val order: compare1: IComparer<'T1> * compare2: IComparer<'T2> -> IComparer<'T1 * 'T2> + val order: compare1: IComparer<'T1> * compare2: IComparer<'T2> -> IComparer type NameSet = Zset diff --git a/src/Compiler/Utilities/range.fs b/src/Compiler/Utilities/range.fs index 5e13752df0b..0857d7c4d7c 100755 --- a/src/Compiler/Utilities/range.fs +++ b/src/Compiler/Utilities/range.fs @@ -449,7 +449,7 @@ module Range = let posOrder = let pairOrder = Pair.order (Int32.order, Int32.order) - let lineAndColumn = fun (p: pos) -> p.Line, p.Column + let lineAndColumn = fun (p: pos) -> struct (p.Line, p.Column) { new IComparer with member _.Compare(x, xx) = @@ -458,7 +458,7 @@ module Range = let rangeOrder = let tripleOrder = Pair.order (String.order, Pair.order (posOrder, posOrder)) - let fileLineColumn = fun (r: range) -> r.FileName, (r.Start, r.End) + let fileLineColumn = fun (r: range) -> struct (r.FileName, struct (r.Start, r.End)) { new IComparer with member _.Compare(x, xx) = From 10c07b3fafb8b277b6a17ad6e3a5dd65a4647b60 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Thu, 22 May 2025 10:35:17 +0100 Subject: [PATCH 38/38] Fix parsing errors using anonymous records and units of measures (#18543) --- .../.FSharp.Compiler.Service/10.0.100.md | 2 + .../.FSharp.Compiler.Service/9.0.300.md | 1 + docs/release-notes/.Language/preview.md | 1 + src/Compiler/Driver/CompilerDiagnostics.fs | 1 + src/Compiler/FSComp.txt | 1 + src/Compiler/FSStrings.resx | 3 + src/Compiler/Facilities/LanguageFeatures.fs | 3 + src/Compiler/Facilities/LanguageFeatures.fsi | 1 + src/Compiler/Service/ServiceLexing.fs | 3 + src/Compiler/Service/ServiceLexing.fsi | 1 + src/Compiler/SyntaxTree/LexFilter.fs | 7 +- src/Compiler/lex.fsl | 2 + src/Compiler/pars.fsy | 2 +- src/Compiler/xlf/FSComp.txt.cs.xlf | 5 + src/Compiler/xlf/FSComp.txt.de.xlf | 5 + src/Compiler/xlf/FSComp.txt.es.xlf | 5 + src/Compiler/xlf/FSComp.txt.fr.xlf | 5 + src/Compiler/xlf/FSComp.txt.it.xlf | 5 + src/Compiler/xlf/FSComp.txt.ja.xlf | 5 + src/Compiler/xlf/FSComp.txt.ko.xlf | 5 + src/Compiler/xlf/FSComp.txt.pl.xlf | 5 + src/Compiler/xlf/FSComp.txt.pt-BR.xlf | 5 + src/Compiler/xlf/FSComp.txt.ru.xlf | 5 + src/Compiler/xlf/FSComp.txt.tr.xlf | 5 + src/Compiler/xlf/FSComp.txt.zh-Hans.xlf | 5 + src/Compiler/xlf/FSComp.txt.zh-Hant.xlf | 5 + src/Compiler/xlf/FSStrings.cs.xlf | 5 + src/Compiler/xlf/FSStrings.de.xlf | 5 + src/Compiler/xlf/FSStrings.es.xlf | 5 + src/Compiler/xlf/FSStrings.fr.xlf | 5 + src/Compiler/xlf/FSStrings.it.xlf | 5 + src/Compiler/xlf/FSStrings.ja.xlf | 5 + src/Compiler/xlf/FSStrings.ko.xlf | 5 + src/Compiler/xlf/FSStrings.pl.xlf | 5 + src/Compiler/xlf/FSStrings.pt-BR.xlf | 5 + src/Compiler/xlf/FSStrings.ru.xlf | 5 + src/Compiler/xlf/FSStrings.tr.xlf | 5 + src/Compiler/xlf/FSStrings.zh-Hans.xlf | 5 + src/Compiler/xlf/FSStrings.zh-Hant.xlf | 5 + .../Types/RecordTypes/AnonymousRecords.fs | 132 ++++++++++++++++++ ...ervice.SurfaceArea.netstandard20.debug.bsl | 5 + ...vice.SurfaceArea.netstandard20.release.bsl | 5 + ...y_FSharp.Compiler.Service_Debug_net9.0.bsl | 10 +- ....Compiler.Service_Debug_netstandard2.0.bsl | 10 +- ...FSharp.Compiler.Service_Release_net9.0.bsl | 10 +- ...ompiler.Service_Release_netstandard2.0.bsl | 10 +- .../Expression/AnonymousRecords-07.fs | 10 ++ .../Expression/AnonymousRecords-07.fs.bsl | 55 ++++++++ .../Expression/AnonymousRecords-08.fs | 9 ++ .../Expression/AnonymousRecords-08.fs.bsl | 83 +++++++++++ .../Expression/AnonymousRecords-09.fs | 10 ++ .../Expression/AnonymousRecords-09.fs.bsl | 47 +++++++ .../Expression/AnonymousRecords-10.fs | 10 ++ .../Expression/AnonymousRecords-10.fs.bsl | 55 ++++++++ .../Expression/AnonymousRecords-11.fs | 10 ++ .../Expression/AnonymousRecords-11.fs.bsl | 127 +++++++++++++++++ .../Expression/AnonymousRecords-12.fs | 10 ++ .../Expression/AnonymousRecords-12.fs.bsl | 47 +++++++ .../Expression/AnonymousRecords-13.fs | 6 + .../Expression/AnonymousRecords-13.fs.bsl | 45 ++++++ 60 files changed, 842 insertions(+), 22 deletions(-) create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs create mode 100644 tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl diff --git a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md index 841e49c4c31..067a9d56800 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md @@ -1,4 +1,6 @@ ### Fixed + +* Fix parsing errors using anonymous records and units of measures ([PR #18543](https://github.com/dotnet/fsharp/pull/18543)) * Fixed: Allow `return`, `return!`, `yield`, `yield!` type annotations without parentheses ([PR #18533](https://github.com/dotnet/fsharp/pull/18533)) * Allow `let!` and `use!` type annotations without requiring parentheses ([PR #18508](https://github.com/dotnet/fsharp/pull/18508)) * Fix find all references for F# exceptions ([PR #18565](https://github.com/dotnet/fsharp/pull/18565)) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index 6999094ccb3..a5341551395 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -30,6 +30,7 @@ * Make `[]` combination work([PR #18444](https://github.com/dotnet/fsharp/pull/18444/)) * Fix code completion considers types from own namespace non-imported ([PR #18518](https://github.com/dotnet/fsharp/issues/18518)) * Code completion: fix getting qualifier expression in do statements in type decls ([PR #18524](https://github.com/dotnet/fsharp/pull/18524)) +* Fix parsing errors using anonymous records and units of measures ([PR #18543](https://github.com/dotnet/fsharp/pull/18543)) * Fixed: [#18441](https://github.com/dotnet/fsharp/issues/18441) FSI multi-emit unstable. ([PR #18465](https://github.com/dotnet/fsharp/pull/18465)) * Fixed: Allow `return`, `return!`, `yield`, `yield!` type annotations without parentheses ([PR #18533](https://github.com/dotnet/fsharp/pull/18533)) diff --git a/docs/release-notes/.Language/preview.md b/docs/release-notes/.Language/preview.md index 40775e8dfa6..687402597c5 100644 --- a/docs/release-notes/.Language/preview.md +++ b/docs/release-notes/.Language/preview.md @@ -6,6 +6,7 @@ * Support ValueOption + Struct attribute as optional parameter for methods ([Language suggestion #1136](https://github.com/fsharp/fslang-suggestions/issues/1136), [PR #18098](https://github.com/dotnet/fsharp/pull/18098)) * Allow `_` in `use!` bindings values (lift FS1228 restriction) ([PR #18487](https://github.com/dotnet/fsharp/pull/18487)) * Warn when `unit` is passed to an `obj`-typed argument ([PR #18330](https://github.com/dotnet/fsharp/pull/18330)) +* Fix parsing errors using anonymous records and units of measures ([PR #18543](https://github.com/dotnet/fsharp/pull/18543)) * Scoped Nowarn: added the #warnon compiler directive ([Language suggestion #278](https://github.com/fsharp/fslang-suggestions/issues/278), [RFC FS-1146 PR](https://github.com/fsharp/fslang-design/pull/782), [PR #18049](https://github.com/dotnet/fsharp/pull/18049)) * Allow `let!` and `use!` type annotations without requiring parentheses. ([PR #18508](https://github.com/dotnet/fsharp/pull/18508)) diff --git a/src/Compiler/Driver/CompilerDiagnostics.fs b/src/Compiler/Driver/CompilerDiagnostics.fs index 2bdb5fe6923..5f96b1f58c8 100644 --- a/src/Compiler/Driver/CompilerDiagnostics.fs +++ b/src/Compiler/Driver/CompilerDiagnostics.fs @@ -1141,6 +1141,7 @@ type Exception with | Parser.TOKEN_COLON_EQUALS -> SR.GetString("Parser.TOKEN.COLON.EQUALS") | Parser.TOKEN_LARROW -> SR.GetString("Parser.TOKEN.LARROW") | Parser.TOKEN_EQUALS -> SR.GetString("Parser.TOKEN.EQUALS") + | Parser.TOKEN_GREATER_BAR_RBRACE -> SR.GetString("Parser.TOKEN.GREATER.BAR.RBRACE") | Parser.TOKEN_GREATER_BAR_RBRACK -> SR.GetString("Parser.TOKEN.GREATER.BAR.RBRACK") | Parser.TOKEN_MINUS -> SR.GetString("Parser.TOKEN.MINUS") | Parser.TOKEN_ADJACENT_PREFIX_OP -> SR.GetString("Parser.TOKEN.ADJACENT.PREFIX.OP") diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index 1d7e9d6499a..969b40ae4ff 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -1799,6 +1799,7 @@ featureDeprecatePlacesWhereSeqCanBeOmitted,"Deprecate places where 'seq' can be featureSupportValueOptionsAsOptionalParameters,"Support ValueOption as valid type for optional member parameters" featureSupportWarnWhenUnitPassedToObjArg,"Warn when unit is passed to a member accepting `obj` argument, e.g. `Method(o:obj)` will warn if called via `Method()`." featureUseBangBindingValueDiscard,"Allows use! _ = ... in computation expressions" +featureBetterAnonymousRecordParsing,"Support for better anonymous record parsing" featureScopedNowarn,"Support for scoped enabling / disabling of warnings by #warn and #nowarn directives, also inside modules" featureAllowLetOrUseBangTypeAnnotationWithoutParens,"Allow let! and use! type annotations without requiring parentheses" 3874,lexWarnDirectiveMustBeFirst,"#nowarn/#warnon directives must appear as the first non-whitespace characters on a line" diff --git a/src/Compiler/FSStrings.resx b/src/Compiler/FSStrings.resx index abb2bb57f55..8453259ea1b 100644 --- a/src/Compiler/FSStrings.resx +++ b/src/Compiler/FSStrings.resx @@ -357,6 +357,9 @@ symbol '=' + + symbol '>|}' + symbol '>|]' diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index fd0f646531b..246ec741d67 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -100,6 +100,7 @@ type LanguageFeature = | SupportValueOptionsAsOptionalParameters | WarnWhenUnitPassedToObjArg | UseBangBindingValueDiscard + | BetterAnonymousRecordParsing | ScopedNowarn | AllowTypedLetOrUseBang @@ -233,6 +234,7 @@ type LanguageVersion(versionText) = LanguageFeature.SupportValueOptionsAsOptionalParameters, previewVersion LanguageFeature.WarnWhenUnitPassedToObjArg, previewVersion LanguageFeature.UseBangBindingValueDiscard, previewVersion + LanguageFeature.BetterAnonymousRecordParsing, previewVersion LanguageFeature.ScopedNowarn, previewVersion LanguageFeature.AllowTypedLetOrUseBang, previewVersion ] @@ -398,6 +400,7 @@ type LanguageVersion(versionText) = | LanguageFeature.SupportValueOptionsAsOptionalParameters -> FSComp.SR.featureSupportValueOptionsAsOptionalParameters () | LanguageFeature.WarnWhenUnitPassedToObjArg -> FSComp.SR.featureSupportWarnWhenUnitPassedToObjArg () | LanguageFeature.UseBangBindingValueDiscard -> FSComp.SR.featureUseBangBindingValueDiscard () + | LanguageFeature.BetterAnonymousRecordParsing -> FSComp.SR.featureBetterAnonymousRecordParsing () | LanguageFeature.ScopedNowarn -> FSComp.SR.featureScopedNowarn () | LanguageFeature.AllowTypedLetOrUseBang -> FSComp.SR.featureAllowLetOrUseBangTypeAnnotationWithoutParens () diff --git a/src/Compiler/Facilities/LanguageFeatures.fsi b/src/Compiler/Facilities/LanguageFeatures.fsi index 95bd956e0b7..c9e70ce1567 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fsi +++ b/src/Compiler/Facilities/LanguageFeatures.fsi @@ -91,6 +91,7 @@ type LanguageFeature = | SupportValueOptionsAsOptionalParameters | WarnWhenUnitPassedToObjArg | UseBangBindingValueDiscard + | BetterAnonymousRecordParsing | ScopedNowarn | AllowTypedLetOrUseBang diff --git a/src/Compiler/Service/ServiceLexing.fs b/src/Compiler/Service/ServiceLexing.fs index bc07224d70b..fb2af965f76 100644 --- a/src/Compiler/Service/ServiceLexing.fs +++ b/src/Compiler/Service/ServiceLexing.fs @@ -283,6 +283,7 @@ module internal TokenClassifications = | LBRACE_BAR -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.MatchBraces) | GREATER_RBRACK + | GREATER_BAR_RBRACE | GREATER_BAR_RBRACK -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.None) | RQUOTE _ @@ -1387,6 +1388,7 @@ type FSharpTokenKind = | Comma | RightArrow | GreaterBarRightBracket + | GreaterBarRightBrace | LeftParenthesisStarRightParenthesis | Open | Or @@ -1598,6 +1600,7 @@ type FSharpToken = | STAR -> FSharpTokenKind.Star | COMMA -> FSharpTokenKind.Comma | RARROW -> FSharpTokenKind.RightArrow + | GREATER_BAR_RBRACE -> FSharpTokenKind.GreaterBarRightBrace | GREATER_BAR_RBRACK -> FSharpTokenKind.GreaterBarRightBracket | LPAREN_STAR_RPAREN -> FSharpTokenKind.LeftParenthesisStarRightParenthesis | OPEN -> FSharpTokenKind.Open diff --git a/src/Compiler/Service/ServiceLexing.fsi b/src/Compiler/Service/ServiceLexing.fsi index 261c7c6764e..1efcf59269d 100755 --- a/src/Compiler/Service/ServiceLexing.fsi +++ b/src/Compiler/Service/ServiceLexing.fsi @@ -457,6 +457,7 @@ type public FSharpTokenKind = | Comma | RightArrow | GreaterBarRightBracket + | GreaterBarRightBrace | LeftParenthesisStarRightParenthesis | Open | Or diff --git a/src/Compiler/SyntaxTree/LexFilter.fs b/src/Compiler/SyntaxTree/LexFilter.fs index 20af46524b0..a97fb94d5e4 100644 --- a/src/Compiler/SyntaxTree/LexFilter.fs +++ b/src/Compiler/SyntaxTree/LexFilter.fs @@ -1093,7 +1093,7 @@ type LexFilterImpl ( scanAhead nParen else false - | GREATER _ | GREATER_RBRACK | GREATER_BAR_RBRACK -> + | GREATER _ | GREATER_RBRACK | GREATER_BAR_RBRACK | GREATER_BAR_RBRACE -> let nParen = nParen - 1 let hasAfterOp = (match lookaheadToken with GREATER _ -> false | _ -> true) if nParen > 0 then @@ -1201,6 +1201,11 @@ type LexFilterImpl ( delayToken (pool.UseShiftedLocation(tokenTup, INFIX_AT_HAT_OP "@", 1, 0)) delayToken (pool.UseShiftedLocation(tokenTup, LESS res, 0, -1)) pool.Return tokenTup + | GREATER_BAR_RBRACE -> + lexbuf.CheckLanguageFeatureAndRecover LanguageFeature.BetterAnonymousRecordParsing lexbuf.LexemeRange + delayToken (pool.UseShiftedLocation(tokenTup, BAR_RBRACE, 1, 0)) + delayToken (pool.UseShiftedLocation(tokenTup, GREATER res, 0, -2)) + pool.Return tokenTup | GREATER_BAR_RBRACK -> delayToken (pool.UseShiftedLocation(tokenTup, BAR_RBRACK, 1, 0)) delayToken (pool.UseShiftedLocation(tokenTup, GREATER res, 0, -2)) diff --git a/src/Compiler/lex.fsl b/src/Compiler/lex.fsl index 2d52ec029f7..9abb9408c9e 100644 --- a/src/Compiler/lex.fsl +++ b/src/Compiler/lex.fsl @@ -905,6 +905,8 @@ rule token (args: LexArgs) (skip: bool) = parse | ">" { GREATER false } + | ">|}" { GREATER_BAR_RBRACE } + | "[<" { LBRACK_LESS } | "]" { RBRACK } diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index bbfca699064..285a8a0c47e 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -84,7 +84,7 @@ let parse_error_rich = Some(fun (ctxt: ParseErrorContext<_>) -> %token EXCEPTION FALSE FOR FUN FUNCTION IF IN JOIN_IN FINALLY DO_BANG %token LAZY OLAZY MATCH MATCH_BANG MUTABLE NEW OF %token OPEN OR REC THEN TO TRUE TRY TYPE VAL INLINE INTERFACE INSTANCE CONST -%token WHEN WHILE WHILE_BANG WITH HASH AMP AMP_AMP QUOTE LPAREN RPAREN RPAREN_COMING_SOON RPAREN_IS_HERE STAR COMMA RARROW GREATER_BAR_RBRACK LPAREN_STAR_RPAREN +%token WHEN WHILE WHILE_BANG WITH HASH AMP AMP_AMP QUOTE LPAREN RPAREN RPAREN_COMING_SOON RPAREN_IS_HERE STAR COMMA RARROW GREATER_BAR_RBRACK GREATER_BAR_RBRACE LPAREN_STAR_RPAREN %token QMARK QMARK_QMARK DOT COLON COLON_COLON COLON_GREATER COLON_QMARK_GREATER COLON_QMARK COLON_EQUALS SEMICOLON %token SEMICOLON_SEMICOLON LARROW EQUALS LBRACK LBRACK_BAR LBRACE_BAR LBRACK_LESS %token BAR_RBRACK BAR_RBRACE UNDERSCORE diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index caa825a8245..15516bde9f4 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -312,6 +312,11 @@ atributy napravo od klíčového slova Module + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations automatické generování vlastnosti Message pro deklarace exception diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 2d193f09a0e..98203615481 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -312,6 +312,11 @@ Attribute rechts vom "Module"-Schlüsselwort + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations Automatische Generierung der Eigenschaft „Message“ für „exception“-Deklarationen diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index 1e0f79d0124..f9a01cc8009 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -312,6 +312,11 @@ atributos a la derecha de la palabra clave “módulo” + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations generación automática de la propiedad 'Message' para declaraciones 'exception' diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index 71a14ff33f0..904ce2c3c69 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -312,6 +312,11 @@ attributs à droite du mot clé 'module' + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations génération automatique de la propriété « Message » pour les déclarations « exception » diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index 12f56c30e93..ea9f636b455 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -312,6 +312,11 @@ attributi a destra della parola chiave 'module' + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations generazione automatica della proprietà 'Messaggio' per le dichiarazioni 'eccezione' diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index d84ecad7170..073d2bc0127 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -312,6 +312,11 @@ 'module' キーワードの右側の属性 + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations `exception` 宣言の `Message` プロパティの自動生成 diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index 39c3a728b37..ac3e6c95d94 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -312,6 +312,11 @@ 'module' 키워드 오른쪽에 있는 특성 + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations 'exception' 선언에 대한 'Message' 속성 자동 생성 diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index e5f2bda5529..450bc59ad22 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -312,6 +312,11 @@ atrybuty po prawej stronie słowa kluczowego "module" + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations Automatyczne generowanie właściwości „Wiadomość“ dla deklaracji „Wyjątek“ diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index c69f534b10e..8eb539fa237 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -312,6 +312,11 @@ atributos à direita da palavra-chave 'módulo' + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations geração automática da propriedade 'Message' para declarações de 'exception' diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index ca41d4affcc..27d646c8a9c 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -312,6 +312,11 @@ атрибуты справа от ключевого слова "module" + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations автоматическое создание свойства “Message” для объявлений “exception” diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index 17a75ffa27c..ee7db390d59 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -312,6 +312,11 @@ 'modül' anahtar sözcüğünün sağındaki öznitelikler + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations 'exception' bildirimleri için 'Message' özelliğinin otomatik olarak oluşturulması diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index 155480c6314..0ca3574bbb9 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -312,6 +312,11 @@ "module" 关键字右侧的属性 + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations 自动生成“异常”声明的“消息”属性 diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index 3c96310c8a7..42aa912d17c 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -312,6 +312,11 @@ 'module' 關鍵字右邊的屬性 + + Support for better anonymous record parsing + Support for better anonymous record parsing + + automatic generation of 'Message' property for 'exception' declarations 自動產生 'exception' 宣告的 'Message' 屬性 diff --git a/src/Compiler/xlf/FSStrings.cs.xlf b/src/Compiler/xlf/FSStrings.cs.xlf index 698e7180ad6..cfa0c8bddb7 100644 --- a/src/Compiler/xlf/FSStrings.cs.xlf +++ b/src/Compiler/xlf/FSStrings.cs.xlf @@ -82,6 +82,11 @@ symbol ..^ + + symbol '>|}' + symbol '>|}' + + interpolated string interpolovaný řetězec diff --git a/src/Compiler/xlf/FSStrings.de.xlf b/src/Compiler/xlf/FSStrings.de.xlf index ebfb525eb2a..e81e671661a 100644 --- a/src/Compiler/xlf/FSStrings.de.xlf +++ b/src/Compiler/xlf/FSStrings.de.xlf @@ -82,6 +82,11 @@ Symbol "..^" + + symbol '>|}' + symbol '>|}' + + interpolated string Interpolierte Zeichenfolge diff --git a/src/Compiler/xlf/FSStrings.es.xlf b/src/Compiler/xlf/FSStrings.es.xlf index 46816a23aba..9e78f3ddd08 100644 --- a/src/Compiler/xlf/FSStrings.es.xlf +++ b/src/Compiler/xlf/FSStrings.es.xlf @@ -82,6 +82,11 @@ símbolo "..^" + + symbol '>|}' + symbol '>|}' + + interpolated string cadena interpolada diff --git a/src/Compiler/xlf/FSStrings.fr.xlf b/src/Compiler/xlf/FSStrings.fr.xlf index 7e8f9df4ee3..ccedd3ac360 100644 --- a/src/Compiler/xlf/FSStrings.fr.xlf +++ b/src/Compiler/xlf/FSStrings.fr.xlf @@ -82,6 +82,11 @@ symbole '..^' + + symbol '>|}' + symbol '>|}' + + interpolated string chaîne interpolée diff --git a/src/Compiler/xlf/FSStrings.it.xlf b/src/Compiler/xlf/FSStrings.it.xlf index 004e8d04e13..e5545d56799 100644 --- a/src/Compiler/xlf/FSStrings.it.xlf +++ b/src/Compiler/xlf/FSStrings.it.xlf @@ -82,6 +82,11 @@ simbolo '..^' + + symbol '>|}' + symbol '>|}' + + interpolated string stringa interpolata diff --git a/src/Compiler/xlf/FSStrings.ja.xlf b/src/Compiler/xlf/FSStrings.ja.xlf index b7e4a21e670..631370c20e9 100644 --- a/src/Compiler/xlf/FSStrings.ja.xlf +++ b/src/Compiler/xlf/FSStrings.ja.xlf @@ -82,6 +82,11 @@ シンボル '..^' + + symbol '>|}' + symbol '>|}' + + interpolated string 補間された文字列 diff --git a/src/Compiler/xlf/FSStrings.ko.xlf b/src/Compiler/xlf/FSStrings.ko.xlf index edee12a29a2..084e56072c4 100644 --- a/src/Compiler/xlf/FSStrings.ko.xlf +++ b/src/Compiler/xlf/FSStrings.ko.xlf @@ -82,6 +82,11 @@ 기호 '..^' + + symbol '>|}' + symbol '>|}' + + interpolated string 보간 문자열 diff --git a/src/Compiler/xlf/FSStrings.pl.xlf b/src/Compiler/xlf/FSStrings.pl.xlf index b50fb8fc188..f6e7003e75d 100644 --- a/src/Compiler/xlf/FSStrings.pl.xlf +++ b/src/Compiler/xlf/FSStrings.pl.xlf @@ -82,6 +82,11 @@ symbol „..^” + + symbol '>|}' + symbol '>|}' + + interpolated string ciąg interpolowany diff --git a/src/Compiler/xlf/FSStrings.pt-BR.xlf b/src/Compiler/xlf/FSStrings.pt-BR.xlf index f94ce79cd97..72178364b24 100644 --- a/src/Compiler/xlf/FSStrings.pt-BR.xlf +++ b/src/Compiler/xlf/FSStrings.pt-BR.xlf @@ -82,6 +82,11 @@ símbolo '..^' + + symbol '>|}' + symbol '>|}' + + interpolated string cadeia de caracteres interpolada diff --git a/src/Compiler/xlf/FSStrings.ru.xlf b/src/Compiler/xlf/FSStrings.ru.xlf index 6df88d26d49..6f2c47d0d10 100644 --- a/src/Compiler/xlf/FSStrings.ru.xlf +++ b/src/Compiler/xlf/FSStrings.ru.xlf @@ -82,6 +82,11 @@ символ "..^" + + symbol '>|}' + symbol '>|}' + + interpolated string интерполированная строка diff --git a/src/Compiler/xlf/FSStrings.tr.xlf b/src/Compiler/xlf/FSStrings.tr.xlf index 59fc6b69625..0c41ee99672 100644 --- a/src/Compiler/xlf/FSStrings.tr.xlf +++ b/src/Compiler/xlf/FSStrings.tr.xlf @@ -82,6 +82,11 @@ '..^' sembolü + + symbol '>|}' + symbol '>|}' + + interpolated string düz metin arasına kod eklenmiş dize diff --git a/src/Compiler/xlf/FSStrings.zh-Hans.xlf b/src/Compiler/xlf/FSStrings.zh-Hans.xlf index f97800458f1..dc22dbeb28b 100644 --- a/src/Compiler/xlf/FSStrings.zh-Hans.xlf +++ b/src/Compiler/xlf/FSStrings.zh-Hans.xlf @@ -82,6 +82,11 @@ 符号 "..^" + + symbol '>|}' + symbol '>|}' + + interpolated string 内插字符串 diff --git a/src/Compiler/xlf/FSStrings.zh-Hant.xlf b/src/Compiler/xlf/FSStrings.zh-Hant.xlf index 2f0181b62d6..bcb553c7de1 100644 --- a/src/Compiler/xlf/FSStrings.zh-Hant.xlf +++ b/src/Compiler/xlf/FSStrings.zh-Hant.xlf @@ -82,6 +82,11 @@ 符號 '..^' + + symbol '>|}' + symbol '>|}' + + interpolated string 插補字串 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs index 354539ed7c1..ef0b307853a 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs @@ -19,6 +19,138 @@ module AnonRecd = |> shouldFail |> withErrorCode 3522 |> withMessage "The field 'A' appears multiple times in this record expression." + + [] + let ``Anonymous Record with unit of measures`` () = + FSharp """ +namespace FSharpTest + +[] +type m + +module AnonRecd = + let a = {|a=1|} + let b = {|a=1; b=2|} + let c = {|a=1 |} + let d = {| a=1; b=2; c=3 |} +""" + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 8, Col 20, Line 8, Col 23, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 9, Col 28, Line 9, Col 31, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] + + [] + let ``Preview : Anonymous Record with unit of measures`` () = + FSharp """ +namespace FSharpTest + +[] +type m + +module AnonRecd = + let a = {|a=1|} + let b = {|a=1; b=2|} + let c = {|a=1 |} + let d = {| a=1; b=2; c=3 |} +""" + |> withLangVersionPreview + |> compile + |> shouldSucceed + + [] + let ``Anonymous Record with typeof`` () = + FSharp """ +namespace FSharpTest +module AnonRecd = + let a = {|a=typeof|} + let b = {|a=typeof |} + let c = {| a=typeof|} + let d = {| a=typeof |} +""" + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 4, Col 27, Line 4, Col 30, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 6, Col 28, Line 6, Col 31, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] + + [] + let ``Preview: Anonymous Record with typeof`` () = + FSharp """ +namespace FSharpTest +module AnonRecd = + let a = {|a=typeof|} + let b = {|a=typeof |} + let c = {| a=typeof|} + let d = {| a=typeof |} +""" + |> withLangVersionPreview + |> compile + |> shouldSucceed + + [] + let ``Anonymous Record with typedefof`` () = + FSharp """ +namespace FSharpTest +module AnonRecd = + let a = {|a=typedefof<_ option>|} + let b = {|a=typedefof<_ option> |} + let c = {| a=typedefof<_ option>|} + let d = {| a=typedefof<_ option> |} +""" + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 4, Col 35, Line 4, Col 38, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 6, Col 36, Line 6, Col 39, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] + + [] + let ``Preview: Anonymous Record with typedefof`` () = + FSharp """ +namespace FSharpTest +module AnonRecd = + let a = {|a=typedefof<_ option>|} + let b = {|a=typedefof<_ option> |} + let c = {| a=typedefof<_ option>|} + let d = {| a=typedefof<_ option> |} +""" + |> withLangVersionPreview + |> compile + |> shouldSucceed + + [] + let ``Anonymous Record with nameof`` () = + FSharp """ +namespace FSharpTest +module AnonRecd = + let a<'T> = {|a=nameof<'T>|} + let b<'T> = {|a=nameof<'T> |} + let c<'T> = {| a=nameof<'T>|} + let d<'T> = {| a=nameof<'T> |} +""" + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 4, Col 30, Line 4, Col 33, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 6, Col 31, Line 6, Col 34, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] + + [] + let ``Preview: Anonymous Record with nameof`` () = + FSharp """ +namespace FSharpTest +module AnonRecd = + let a<'T> = {|a=nameof<'T>|} + let b<'T> = {|a=nameof<'T> |} + let c<'T> = {| a=nameof<'T>|} + let d<'T> = {| a=nameof<'T> |} +""" + |> withLangVersionPreview + |> compile + |> shouldSucceed [] let ``Anonymous Record missing single field`` () = diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index bb0389f5021..e2349c44c11 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -11288,6 +11288,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Function FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 FunkyOperatorName FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Global FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Greater +FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 GreaterBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 GreaterBarRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 GreaterRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Hash @@ -11484,6 +11485,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsFunction FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsFunkyOperatorName FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsGlobal FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsGreater +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsGreaterBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsGreaterBarRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsGreaterRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsHash @@ -11676,6 +11678,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsFunction() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsFunkyOperatorName() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsGlobal() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsGreater() +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsGreaterBarRightBrace() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsGreaterBarRightBracket() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsGreaterRightBracket() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsHash() @@ -11868,6 +11871,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind FunkyOperatorName FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Global FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Greater +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind GreaterBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind GreaterBarRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind GreaterRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Hash @@ -12060,6 +12064,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_FunkyOperatorName() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Global() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Greater() +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_GreaterBarRightBrace() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_GreaterBarRightBracket() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_GreaterRightBracket() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Hash() diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index bb0389f5021..e2349c44c11 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -11288,6 +11288,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Function FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 FunkyOperatorName FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Global FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Greater +FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 GreaterBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 GreaterBarRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 GreaterRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Hash @@ -11484,6 +11485,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsFunction FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsFunkyOperatorName FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsGlobal FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsGreater +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsGreaterBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsGreaterBarRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsGreaterRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsHash @@ -11676,6 +11678,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsFunction() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsFunkyOperatorName() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsGlobal() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsGreater() +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsGreaterBarRightBrace() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsGreaterBarRightBracket() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsGreaterRightBracket() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsHash() @@ -11868,6 +11871,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind FunkyOperatorName FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Global FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Greater +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind GreaterBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind GreaterBarRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind GreaterRightBracket FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Hash @@ -12060,6 +12064,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_FunkyOperatorName() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Global() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Greater() +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_GreaterBarRightBrace() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_GreaterBarRightBracket() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_GreaterRightBracket() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Hash() diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl index 897dd2ac22a..625bad81a15 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl @@ -24,11 +24,11 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3494-805::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 5475f43bdc1..2e1d5680e1d 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -35,11 +35,11 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1431-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000605][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$Symbols+fullName@2496-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000011][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl index 9821dc3dc1a..7a20b934eef 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl @@ -23,11 +23,11 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3494-849::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index 7a78ab1999a..b8f7bba8f5f 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -34,11 +34,11 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000BB][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1431-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000620][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@922-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$Symbols+fullName@2496-3::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000030][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs new file mode 100644 index 00000000000..69965ae8be3 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs @@ -0,0 +1,10 @@ +module Module + +{|a=1 |} + +{|a=1|} + +{| a=1|} + +{| a=1 |} + diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs.bsl new file mode 100644 index 00000000000..a8ff99d1b82 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs.bsl @@ -0,0 +1,55 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/AnonymousRecords-07.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (3,3--3,4), + Const + (Measure + (Int32 1, (3,4--3,5), + Seq ([Named ([m], (3,6--3,7))], (3,6--3,7)), + { LessRange = (3,5--3,6) + GreaterRange = (3,7--3,8) }), (3,4--3,8)))], + (3,0--3,11), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,11)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (5,3--5,4), + Const + (Measure + (Int32 1, (5,4--5,5), + Seq ([Named ([m], (5,6--5,7))], (5,6--5,7)), + { LessRange = (5,5--5,6) + GreaterRange = (5,7--5,8) }), (5,4--5,8)))], + (5,0--5,10), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,10)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (7,4--7,5), + Const + (Measure + (Int32 1, (7,5--7,6), + Seq ([Named ([m], (7,7--7,8))], (7,7--7,8)), + { LessRange = (7,6--7,7) + GreaterRange = (7,8--7,9) }), (7,5--7,9)))], + (7,0--7,11), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,11)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (9,4--9,5), + Const + (Measure + (Int32 1, (9,5--9,6), + Seq ([Named ([m], (9,7--9,8))], (9,7--9,8)), + { LessRange = (9,6--9,7) + GreaterRange = (9,8--9,9) }), (9,5--9,9)))], + (9,0--9,12), { OpeningBraceRange = (9,0--9,2) }), (9,0--9,12))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--9,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs new file mode 100644 index 00000000000..10830a528a3 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs @@ -0,0 +1,9 @@ +module Module + +{|a=1; b=2 |} + +{|a=1; b=2|} + +{| a=1; b=2|} + +{| a=1; b=2 |} diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs.bsl new file mode 100644 index 00000000000..ed640191c59 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs.bsl @@ -0,0 +1,83 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/AnonymousRecords-08.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (3,3--3,4), + Const + (Measure + (Int32 1, (3,4--3,5), + Seq ([Named ([m], (3,6--3,7))], (3,6--3,7)), + { LessRange = (3,5--3,6) + GreaterRange = (3,7--3,8) }), (3,4--3,8))); + (SynLongIdent ([b], [], [None]), Some (3,11--3,12), + Const + (Measure + (Int32 2, (3,12--3,13), + Seq ([Named ([m], (3,14--3,15))], (3,14--3,15)), + { LessRange = (3,13--3,14) + GreaterRange = (3,15--3,16) }), (3,12--3,16)))], + (3,0--3,19), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,19)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (5,3--5,4), + Const + (Measure + (Int32 1, (5,4--5,5), + Seq ([Named ([m], (5,6--5,7))], (5,6--5,7)), + { LessRange = (5,5--5,6) + GreaterRange = (5,7--5,8) }), (5,4--5,8))); + (SynLongIdent ([b], [], [None]), Some (5,11--5,12), + Const + (Measure + (Int32 2, (5,12--5,13), + Seq ([Named ([m], (5,14--5,15))], (5,14--5,15)), + { LessRange = (5,13--5,14) + GreaterRange = (5,15--5,16) }), (5,12--5,16)))], + (5,0--5,18), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,18)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (7,4--7,5), + Const + (Measure + (Int32 1, (7,5--7,6), + Seq ([Named ([m], (7,7--7,8))], (7,7--7,8)), + { LessRange = (7,6--7,7) + GreaterRange = (7,8--7,9) }), (7,5--7,9))); + (SynLongIdent ([b], [], [None]), Some (7,12--7,13), + Const + (Measure + (Int32 2, (7,13--7,14), + Seq ([Named ([m], (7,15--7,16))], (7,15--7,16)), + { LessRange = (7,14--7,15) + GreaterRange = (7,16--7,17) }), (7,13--7,17)))], + (7,0--7,19), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,19)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (9,4--9,5), + Const + (Measure + (Int32 1, (9,5--9,6), + Seq ([Named ([m], (9,7--9,8))], (9,7--9,8)), + { LessRange = (9,6--9,7) + GreaterRange = (9,8--9,9) }), (9,5--9,9))); + (SynLongIdent ([b], [], [None]), Some (9,12--9,13), + Const + (Measure + (Int32 2, (9,13--9,14), + Seq ([Named ([m], (9,15--9,16))], (9,15--9,16)), + { LessRange = (9,14--9,15) + GreaterRange = (9,16--9,17) }), (9,13--9,17)))], + (9,0--9,20), { OpeningBraceRange = (9,0--9,2) }), (9,0--9,20))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--9,20), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs new file mode 100644 index 00000000000..00d316e9d42 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs @@ -0,0 +1,10 @@ +module Module + +{|a=typeof|} + +{|a=typeof |} + +{| a=typeof|} + +{| a=typeof |} + diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs.bsl new file mode 100644 index 00000000000..ec7c2e4e312 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs.bsl @@ -0,0 +1,47 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/AnonymousRecords-09.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (3,3--3,4), + TypeApp + (Ident typeof, (3,10--3,11), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (3,14--3,15), (3,10--3,15), (3,4--3,15)))], + (3,0--3,17), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,17)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (5,3--5,4), + TypeApp + (Ident typeof, (5,10--5,11), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (5,14--5,15), (5,10--5,15), (5,4--5,15)))], + (5,0--5,18), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,18)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (7,4--7,5), + TypeApp + (Ident typeof, (7,11--7,12), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (7,15--7,16), (7,11--7,16), (7,5--7,16)))], + (7,0--7,18), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,18)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (9,4--9,5), + TypeApp + (Ident typeof, (9,11--9,12), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (9,15--9,16), (9,11--9,16), (9,5--9,16)))], + (9,0--9,19), { OpeningBraceRange = (9,0--9,2) }), (9,0--9,19))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--9,19), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs new file mode 100644 index 00000000000..f4054ccd7f4 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs @@ -0,0 +1,10 @@ +module Module + +{|a=typedefof<_ option>|} + +{|a=typedefof<_ option> |} + +{| a=typedefof<_ option>|} + +{| a=typedefof<_ option> |} + diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs.bsl new file mode 100644 index 00000000000..a30127b522f --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs.bsl @@ -0,0 +1,55 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/AnonymousRecords-10.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (3,3--3,4), + TypeApp + (Ident typedefof, (3,13--3,14), + [App + (LongIdent (SynLongIdent ([option], [], [None])), None, + [Anon (3,14--3,15)], [], None, true, (3,14--3,22))], + [], Some (3,22--3,23), (3,13--3,23), (3,4--3,23)))], + (3,0--3,25), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,25)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (5,3--5,4), + TypeApp + (Ident typedefof, (5,13--5,14), + [App + (LongIdent (SynLongIdent ([option], [], [None])), None, + [Anon (5,14--5,15)], [], None, true, (5,14--5,22))], + [], Some (5,22--5,23), (5,13--5,23), (5,4--5,23)))], + (5,0--5,26), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,26)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (7,4--7,5), + TypeApp + (Ident typedefof, (7,14--7,15), + [App + (LongIdent (SynLongIdent ([option], [], [None])), None, + [Anon (7,15--7,16)], [], None, true, (7,15--7,23))], + [], Some (7,23--7,24), (7,14--7,24), (7,5--7,24)))], + (7,0--7,26), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,26)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (9,4--9,5), + TypeApp + (Ident typedefof, (9,14--9,15), + [App + (LongIdent (SynLongIdent ([option], [], [None])), None, + [Anon (9,15--9,16)], [], None, true, (9,15--9,23))], + [], Some (9,23--9,24), (9,14--9,24), (9,5--9,24)))], + (9,0--9,27), { OpeningBraceRange = (9,0--9,2) }), (9,0--9,27))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--9,27), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs new file mode 100644 index 00000000000..f7f786136ba --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs @@ -0,0 +1,10 @@ +module Module + +let f<'T> = {|a=nameof<'T>|} + +let f<'T> = {|a=nameof<'T> |} + +let f<'T> = {| a=nameof<'T>|} + +let f<'T> = {| a=nameof<'T> |} + diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl new file mode 100644 index 00000000000..180ed425c9e --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl @@ -0,0 +1,127 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/AnonymousRecords-11.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + LongIdent + (SynLongIdent ([f], [], [None]), None, + Some + (SynValTyparDecls + (Some + (PostfixList + ([SynTyparDecl + ([], SynTypar (T, None, false), [], + { AmpersandRanges = [] })], [], (3,5--3,9))), + false)), Pats [], None, (3,4--3,9)), None, + AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (3,15--3,16), + TypeApp + (Ident nameof, (3,22--3,23), + [Var (SynTypar (T, None, false), (3,23--3,25))], [], + Some (3,25--3,26), (3,22--3,26), (3,16--3,26)))], + (3,12--3,28), { OpeningBraceRange = (3,12--3,14) }), + (3,4--3,9), NoneAtLet, { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,10--3,11) })], + (3,0--3,28)); + Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((5,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + LongIdent + (SynLongIdent ([f], [], [None]), None, + Some + (SynValTyparDecls + (Some + (PostfixList + ([SynTyparDecl + ([], SynTypar (T, None, false), [], + { AmpersandRanges = [] })], [], (5,5--5,9))), + false)), Pats [], None, (5,4--5,9)), None, + AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (5,15--5,16), + TypeApp + (Ident nameof, (5,22--5,23), + [Var (SynTypar (T, None, false), (5,23--5,25))], [], + Some (5,25--5,26), (5,22--5,26), (5,16--5,26)))], + (5,12--5,29), { OpeningBraceRange = (5,12--5,14) }), + (5,4--5,9), NoneAtLet, { LeadingKeyword = Let (5,0--5,3) + InlineKeyword = None + EqualsRange = Some (5,10--5,11) })], + (5,0--5,29)); + Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((7,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + LongIdent + (SynLongIdent ([f], [], [None]), None, + Some + (SynValTyparDecls + (Some + (PostfixList + ([SynTyparDecl + ([], SynTypar (T, None, false), [], + { AmpersandRanges = [] })], [], (7,5--7,9))), + false)), Pats [], None, (7,4--7,9)), None, + AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (7,16--7,17), + TypeApp + (Ident nameof, (7,23--7,24), + [Var (SynTypar (T, None, false), (7,24--7,26))], [], + Some (7,26--7,27), (7,23--7,27), (7,17--7,27)))], + (7,12--7,29), { OpeningBraceRange = (7,12--7,14) }), + (7,4--7,9), NoneAtLet, { LeadingKeyword = Let (7,0--7,3) + InlineKeyword = None + EqualsRange = Some (7,10--7,11) })], + (7,0--7,29)); + Let + (false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((9,0), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), None), + LongIdent + (SynLongIdent ([f], [], [None]), None, + Some + (SynValTyparDecls + (Some + (PostfixList + ([SynTyparDecl + ([], SynTypar (T, None, false), [], + { AmpersandRanges = [] })], [], (9,5--9,9))), + false)), Pats [], None, (9,4--9,9)), None, + AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (9,16--9,17), + TypeApp + (Ident nameof, (9,23--9,24), + [Var (SynTypar (T, None, false), (9,24--9,26))], [], + Some (9,26--9,27), (9,23--9,27), (9,17--9,27)))], + (9,12--9,30), { OpeningBraceRange = (9,12--9,14) }), + (9,4--9,9), NoneAtLet, { LeadingKeyword = Let (9,0--9,3) + InlineKeyword = None + EqualsRange = Some (9,10--9,11) })], + (9,0--9,30))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--9,30), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs new file mode 100644 index 00000000000..4ef04e9a312 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs @@ -0,0 +1,10 @@ +module Module + +{|a=id|} + +{|a=id |} + +{| a=id|} + +{| a=id |} + diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs.bsl new file mode 100644 index 00000000000..1de6c8767d2 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs.bsl @@ -0,0 +1,47 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/AnonymousRecords-12.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (3,3--3,4), + TypeApp + (Ident id, (3,6--3,7), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (3,10--3,11), (3,6--3,11), (3,4--3,11)))], + (3,0--3,13), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,13)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (5,3--5,4), + TypeApp + (Ident id, (5,6--5,7), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (5,10--5,11), (5,6--5,11), (5,4--5,11)))], + (5,0--5,14), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,14)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (7,4--7,5), + TypeApp + (Ident id, (7,7--7,8), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (7,11--7,12), (7,7--7,12), (7,5--7,12)))], + (7,0--7,14), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,14)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (9,4--9,5), + TypeApp + (Ident id, (9,7--9,8), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (9,11--9,12), (9,7--9,12), (9,5--9,12)))], + (9,0--9,15), { OpeningBraceRange = (9,0--9,2) }), (9,0--9,15))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--9,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs new file mode 100644 index 00000000000..18ef9d998ab --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs @@ -0,0 +1,6 @@ +module Module + +{|a = <@ 3 @> |} + +{|a = <@ 3 @>|} + diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl new file mode 100644 index 00000000000..93fd93c0088 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl @@ -0,0 +1,45 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/AnonymousRecords-13.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (3,4--3,5), + Quote + (Ident op_Quotation, false, Const (Int32 3, (3,9--3,10)), + false, (3,6--3,13)))], (3,0--3,16), + { OpeningBraceRange = (3,0--3,2) }), (3,0--3,16)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([a], [], [None]), Some (5,4--5,5), + FromParseError + (Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_AtGreaterBar], [], + [Some (OriginalNotation "@>|")]), None, + (5,11--5,14)), Const (Int32 3, (5,9--5,10)), + (5,9--5,14)), + ArbitraryAfterError ("declExprInfix", (5,14--5,14)), + (5,9--5,14)), false, (5,6--5,15)), (5,6--5,15)))], + (5,0--5,15), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,15))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--5,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(5,11)-(5,14) parse error Unexpected token '@>|' or incomplete expression +(5,14)-(5,15) parse error Unexpected symbol '}' in quotation literal. Expected end of quotation or other token. +(5,6)-(5,8) parse error Unmatched '<@ @>' +(5,0)-(5,2) parse error Unmatched '{|'