diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3a01f6419b..edb8db5e83 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -56,8 +56,6 @@ variables: value: .NETCore - name: VisualStudioDropName value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber) - - name: DotNetSdkVersion - value: '6.0.100-preview.6.21355.2' - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: - name: RunningAsPullRequest value: true @@ -387,7 +385,8 @@ stages: # displayName: install SDK # inputs: # packageType: sdk - # version: $(DotNetSdkVersion) + # useGlobalJson: true + # includePreviewVersions: true # workingDirectory: $(Build.SourcesDirectory) # installationPath: $(Agent.ToolsDirectory)/dotnet # - script: dotnet build .\FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" @@ -411,9 +410,8 @@ stages: displayName: install SDK inputs: packageType: sdk - # We cannot use .NET version from global.json, since it tries to install all SDK version from all global.json files in the tree, and we use some fake versions for testing. - useGlobalJson: false - version: $(DotNetSdkVersion) + useGlobalJson: true + includePreviewVersions: true workingDirectory: $(Build.SourcesDirectory) installationPath: $(Agent.ToolsDirectory)/dotnet - script: dotnet build ./FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" @@ -437,10 +435,8 @@ stages: displayName: install SDK inputs: packageType: sdk - # We cannot use .NET version from global.json, since it tries to install all SDK version from all global.json files in the tree, and we use some fake versions for testing. - useGlobalJson: false - version: $(DotNetSdkVersion) - performMultiLevelLookup: false + useGlobalJson: true + includePreviewVersions: true workingDirectory: $(Build.SourcesDirectory) installationPath: $(Agent.ToolsDirectory)/dotnet - script: dotnet build ./FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" diff --git a/src/fsharp/service/FSharpParseFileResults.fs b/src/fsharp/service/FSharpParseFileResults.fs index cae926e248..61a29d7af7 100644 --- a/src/fsharp/service/FSharpParseFileResults.fs +++ b/src/fsharp/service/FSharpParseFileResults.fs @@ -235,8 +235,8 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, | None -> None | Some clause -> match clause with - | SynMatchClause.SynMatchClause (_, whenExpr, resultExpr, _, _) -> - match whenExpr with + | SynMatchClause.SynMatchClause (_, whenExprOpt, resultExpr, _, _) -> + match whenExprOpt with | None -> getIdentRangeForFuncExprInApp traverseSynExpr resultExpr pos | Some whenExpr -> @@ -454,15 +454,18 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, yield! walkExpr (isFunction || (match spInfo with DebugPointAtBinding.Yes _ -> false | _-> true)) synExpr ] and walkExprs es = List.collect (walkExpr false) es + and walkBinds es = List.collect walkBind es + and walkMatchClauses cl = - [ for SynMatchClause(_, whenExpr, e, _, _) in cl do - match whenExpr with - | Some e -> yield! walkExpr false e + [ for SynMatchClause(_, whenExprOpt, tgtExpr, _, _) in cl do + match whenExprOpt with + | Some whenExpr -> yield! walkExpr false whenExpr | _ -> () - yield! walkExpr true e ] + yield! walkExpr true tgtExpr ] - and walkExprOpt (spAlways: bool) eOpt = [ match eOpt with Some e -> yield! walkExpr spAlways e | _ -> () ] + and walkExprOpt (spAlways: bool) eOpt = + [ match eOpt with Some e -> yield! walkExpr spAlways e | _ -> () ] and IsBreakableExpression e = match e with @@ -475,13 +478,13 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, // Determine the breakpoint locations for an expression. spAlways indicates we always // emit a breakpoint location for the expression unless it is a syntactic control flow construct - and walkExpr (spAlways: bool) e = - let m = e.Range + and walkExpr (spAlways: bool) expr = + let m = expr.Range if not (isMatchRange m) then [] else - [ if spAlways && IsBreakableExpression e then + [ if spAlways && IsBreakableExpression expr then yield! checkRange m - match e with + match expr with | SynExpr.ArbitraryAfterError _ | SynExpr.LongIdent _ | SynExpr.LibraryOnlyILAssembly _ @@ -588,24 +591,24 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, yield! walkExprOpt false whenExpr yield! walkExpr true e - | SynExpr.Lambda (_, _, _, e, _, _) -> - yield! walkExpr true e + | SynExpr.Lambda (_, _, _, bodyExpr, _, _) -> + yield! walkExpr true bodyExpr - | SynExpr.Match (spBind, e, cl, _) -> + | SynExpr.Match (spBind, inpExpr, cl, _) -> yield! walkBindSeqPt spBind - yield! walkExpr false e - for SynMatchClause(_, whenExpr, e, _, _) in cl do + yield! walkExpr false inpExpr + for SynMatchClause(_, whenExpr, tgtExpr, _, _) in cl do yield! walkExprOpt false whenExpr - yield! walkExpr true e + yield! walkExpr true tgtExpr - | SynExpr.LetOrUse (_, _, bs, e, _) -> - yield! walkBinds bs - yield! walkExpr true e + | SynExpr.LetOrUse (_, _, binds, bodyExpr, _) -> + yield! walkBinds binds + yield! walkExpr true bodyExpr - | SynExpr.TryWith (e, _, cl, _, _, spTry, spWith) -> + | SynExpr.TryWith (tryExpr, _, cl, _, _, spTry, spWith) -> yield! walkTrySeqPt spTry yield! walkWithSeqPt spWith - yield! walkExpr true e + yield! walkExpr true tryExpr yield! walkMatchClauses cl | SynExpr.TryFinally (e1, e2, _, spTry, spFinally) -> diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf index 866e730c6b..26afffe937 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -7839,4 +7839,4 @@ - + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf index 60f874d88d..12a7a9edee 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -7839,4 +7839,4 @@ - + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf index 50ecc05d95..dff4e4b91e 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -7839,4 +7839,4 @@ - + \ No newline at end of file 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 3b89936fed..f08d6de964 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj @@ -72,7 +72,7 @@ ParserTests.fs - + Program.fs @@ -80,6 +80,7 @@ + diff --git a/tests/walkthroughs/sdk-script-manual-tests/README.md.txt b/tests/walkthroughs/sdk-script-manual-tests/README.md.txt index 7d0428ddc0..643fece6fe 100644 --- a/tests/walkthroughs/sdk-script-manual-tests/README.md.txt +++ b/tests/walkthroughs/sdk-script-manual-tests/README.md.txt @@ -1,4 +1,5 @@ - +### NOTE +Before running tests, `.global.json` files should be renamed to `global.json`, this is needed to not confuse UseDotNet task of Azure Pipelies when installing SDK. #### no warnings diff --git a/tests/walkthroughs/sdk-script-manual-tests/with-sdk-3.1.0/global.json b/tests/walkthroughs/sdk-script-manual-tests/with-sdk-3.1.0/.global.json similarity index 100% rename from tests/walkthroughs/sdk-script-manual-tests/with-sdk-3.1.0/global.json rename to tests/walkthroughs/sdk-script-manual-tests/with-sdk-3.1.0/.global.json diff --git a/tests/walkthroughs/sdk-script-manual-tests/with-sdk-5.0.101/global.json b/tests/walkthroughs/sdk-script-manual-tests/with-sdk-5.0.101/.global.json similarity index 100% rename from tests/walkthroughs/sdk-script-manual-tests/with-sdk-5.0.101/global.json rename to tests/walkthroughs/sdk-script-manual-tests/with-sdk-5.0.101/.global.json diff --git a/tests/walkthroughs/sdk-script-manual-tests/with-sdk-666.666.666/global.json b/tests/walkthroughs/sdk-script-manual-tests/with-sdk-666.666.666/.global.json similarity index 100% rename from tests/walkthroughs/sdk-script-manual-tests/with-sdk-666.666.666/global.json rename to tests/walkthroughs/sdk-script-manual-tests/with-sdk-666.666.666/.global.json diff --git a/tests/walkthroughs/sdk-script-manual-tests/with-sdk-666.666.667/global.json b/tests/walkthroughs/sdk-script-manual-tests/with-sdk-666.666.667/.global.json similarity index 100% rename from tests/walkthroughs/sdk-script-manual-tests/with-sdk-666.666.667/global.json rename to tests/walkthroughs/sdk-script-manual-tests/with-sdk-666.666.667/.global.json