Skip to content

Commit ff61e02

Browse files
authored
Merge branch 'main' into merges/release/dev17.10-to-main
2 parents dd74905 + fae65c5 commit ff61e02

File tree

14 files changed

+649
-237
lines changed

14 files changed

+649
-237
lines changed

.devcontainer/devcontainer.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
22
{
33
"name": "F#",
4-
"image": "mcr.microsoft.com/dotnet/sdk:8.0",
4+
"image": "mcr.microsoft.com/dotnet/sdk:9.0.100-preview.2",
55
"features": {
6-
"ghcr.io/devcontainers/features/common-utils:2": {},
7-
"ghcr.io/devcontainers/features/git:1": {},
8-
"ghcr.io/devcontainers/features/github-cli:1": {
9-
"version": "2"
10-
},
11-
"ghcr.io/devcontainers/features/dotnet:2": {}
6+
"ghcr.io/devcontainers/features/common-utils:2.4.2": {},
7+
"ghcr.io/devcontainers/features/git:1.2.0": {},
8+
"ghcr.io/devcontainers/features/github-cli:1.0.11": {},
9+
"ghcr.io/devcontainers/features/dotnet:2.0.5": {}
1210
},
1311
"hostRequirements": {
1412
"cpus": 2,

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<Project>
22

33
<PropertyGroup>
4+
<PackageProjectUrl>https://github.com/dotnet/fsharp</PackageProjectUrl>
5+
<RepositoryUrl>https://github.com/dotnet/fsharp</RepositoryUrl>
46
<LangVersion Condition="'$(FSharpLangVersion)' != ''">$(FSharpLangVersion)</LangVersion>
57
<RepoRoot Condition="'$(RepoRoot)' == ''">$(MSBuildThisFileDirectory)</RepoRoot>
68
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>

azure-pipelines.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ variables:
2929
# 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
3030
# Should **never** be 'main' in dotnet/fsharp/refs/heads/main, since it will start inserting to VS twice.
3131
- name: FSharpReleaseBranchName
32-
value: release/dev17.10
32+
value: release/dev17.11
3333
# VS Insertion branch name (NOT the same as F# branch)
34-
# Should be previous release branch in 'main' and 'main' in release branch
34+
# Should be previous release branch or 'main' in 'main' and 'main' in release branch
3535
# (since for all *new* release branches we insert into VS main and for all *previous* releases we insert into corresponding VS release),
36-
# i.e. 'rel/d17.9' in dotnet/fsharp/refs/heads/main and 'main' in F# dotnet/fsharp/refs/heads/release/dev17.10
36+
# i.e. 'rel/d17.9' *or* 'main' in dotnet/fsharp/refs/heads/main and 'main' in F# dotnet/fsharp/refs/heads/release/dev17.10 (latest release branch)
3737
- name: VSInsertionTargetBranchName
3838
value: rel/d17.10
3939
- name: _TeamName
@@ -85,7 +85,7 @@ extends:
8585
# Signed build #
8686
#-------------------------------------------------------------------------------------------------------------------#
8787
# Localization: we only run it for specific release branches
88-
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.10') }}:
88+
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.11') }}:
8989
- template: /eng/common/templates-official/job/onelocbuild.yml@self
9090
parameters:
9191
MirrorRepo: fsharp

docs/release-notes/.FSharp.Compiler.Service/8.0.300.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Code generated files with > 64K methods and generated symbols crash when loaded. Use infered sequence points for debugging. ([Issue #16399](https://github.com/dotnet/fsharp/issues/16399), [#PR 16514](https://github.com/dotnet/fsharp/pull/16514))
99
* `nameof Module` expressions and patterns are processed to link files in `--test:GraphBasedChecking`. ([PR #16550](https://github.com/dotnet/fsharp/pull/16550), [PR #16743](https://github.com/dotnet/fsharp/pull/16743))
1010
* Graph Based Checking doesn't throw on invalid parsed input so it can be used for IDE scenarios ([PR #16575](https://github.com/dotnet/fsharp/pull/16575), [PR #16588](https://github.com/dotnet/fsharp/pull/16588), [PR #16643](https://github.com/dotnet/fsharp/pull/16643))
11-
* Various parenthesization API fixes. ([PR #16578](https://github.com/dotnet/fsharp/pull/16578), [PR #16666](https://github.com/dotnet/fsharp/pull/16666), [PR #16901](https://github.com/dotnet/fsharp/pull/16901), [PR #16973](https://github.com/dotnet/fsharp/pull/16973))
11+
* Various parenthesization API fixes. ([PR #16578](https://github.com/dotnet/fsharp/pull/16578), [PR #16666](https://github.com/dotnet/fsharp/pull/16666), [PR #16901](https://github.com/dotnet/fsharp/pull/16901), [PR #16973](https://github.com/dotnet/fsharp/pull/16973), [PR #17012](https://github.com/dotnet/fsharp/pull/17012))
1212
* Keep parens for problematic exprs (`if`, `match`, etc.) in `$"{(…):N0}"`, `$"{(…),-3}"`, etc. ([PR #16578](https://github.com/dotnet/fsharp/pull/16578))
1313
* Fix crash in DOTNET_SYSTEM_GLOBALIZATION_INVARIANT mode [#PR 16471](https://github.com/dotnet/fsharp/pull/16471))
1414
* Fix16572 - Fixed the preview feature enabling Is properties for union case did not work correctly with let .rec and .fsi files ([PR #16657](https://github.com/dotnet/fsharp/pull/16657))

docs/release-notes/.VisualStudio/17.10.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### Fixed
22

33
* Show signature help mid-pipeline in more scenarios. ([PR #16462](https://github.com/dotnet/fsharp/pull/16462))
4-
* Various unneeded parentheses code fix improvements. ([PR #16578](https://github.com/dotnet/fsharp/pull/16578), [PR #16666](https://github.com/dotnet/fsharp/pull/16666), [PR #16789](https://github.com/dotnet/fsharp/pull/16789), [PR #16901](https://github.com/dotnet/fsharp/pull/16901))
4+
* Various unneeded parentheses code fix improvements. ([PR #16578](https://github.com/dotnet/fsharp/pull/16578), [PR #16666](https://github.com/dotnet/fsharp/pull/16666), [PR #16789](https://github.com/dotnet/fsharp/pull/16789), [PR #16901](https://github.com/dotnet/fsharp/pull/16901), [PR #17012](https://github.com/dotnet/fsharp/pull/17012))
55

66
### Changed
77

eng/SourceBuildPrebuiltBaseline.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
These will go away when repo updates targeting to net8.0
1010
Tracked with https://github.com/dotnet/fsharp/issues/14765
1111
-->
12-
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/7.0.11" />
13-
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Host.linux-x64/7.0.11" />
14-
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/7.0.11" />
12+
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/8.0.1" />
13+
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Host.linux-x64/8.0.1" />
14+
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/8.0.1" />
1515
<UsagePattern IdentityGlob="System.Configuration.ConfigurationManager/7.0.0" />
1616
<UsagePattern IdentityGlob="System.Diagnostics.EventLog/7.0.0" />
1717
<UsagePattern IdentityGlob="System.Security.Cryptography.ProtectedData/7.0.0" />

eng/Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- F# Version components -->
1515
<FSMajorVersion>8</FSMajorVersion>
1616
<FSMinorVersion>0</FSMinorVersion>
17-
<FSBuildVersion>300</FSBuildVersion>
17+
<FSBuildVersion>400</FSBuildVersion>
1818
<FSRevisionVersion>0</FSRevisionVersion>
1919
<!-- -->
2020
<!-- F# Language version -->
@@ -39,7 +39,7 @@
3939
<FSharpCompilerServiceReleaseNotesVersion>$(FCSMajorVersion)$(FCSMinorVersion)$(FCSBuildVersion)</FSharpCompilerServiceReleaseNotesVersion>
4040
<!-- -->
4141
<!-- The current published nuget package -->
42-
<FSharpCoreShippedPackageVersionValue>8.0.100</FSharpCoreShippedPackageVersionValue>
42+
<FSharpCoreShippedPackageVersionValue>8.0.200</FSharpCoreShippedPackageVersionValue>
4343
<!-- -->
4444
<!-- The pattern for specifying the preview package -->
4545
<FSharpCorePreviewPackageVersionValue>$(FSCorePackageVersionValue)-$(PreReleaseVersionLabel).*</FSharpCorePreviewPackageVersionValue>
@@ -56,7 +56,7 @@
5656
<PropertyGroup>
5757
<!-- These have to be in sync with latest release branch -->
5858
<VSMajorVersion>17</VSMajorVersion>
59-
<VSMinorVersion>10</VSMinorVersion>
59+
<VSMinorVersion>11</VSMinorVersion>
6060
<VSGeneralVersion>$(VSMajorVersion).0</VSGeneralVersion>
6161
<VSAssemblyVersionPrefix>$(VSMajorVersion).$(VSMinorVersion).0</VSAssemblyVersionPrefix>
6262
<VSAssemblyVersion>$(VSAssemblyVersionPrefix).0</VSAssemblyVersion>

global.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"sdk": {
3-
"version": "8.0.101",
3+
"version": "9.0.100-preview.2.24157.14",
44
"allowPrerelease": true
55
},
66
"tools": {
7-
"dotnet": "8.0.101",
7+
"dotnet": "9.0.100-preview.2.24157.14",
88
"vs": {
99
"version": "17.8",
1010
"components": [
1111
"Microsoft.VisualStudio.Component.FSharp"
1212
]
1313
},
14-
"xcopy-msbuild": "17.8.1-2"
14+
"xcopy-msbuild": "17.8.5"
1515
},
1616
"native-tools": {
1717
"perl": "5.38.0.1"

src/Compiler/Checking/CheckComputationExpressions.fs

Lines changed: 81 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -2596,83 +2596,93 @@ let TcComputationExpression (cenv: cenv) env (overallTy: OverallTy) tpenv (mWhol
25962596
trans CompExprTranslationPass.Initial CustomOperationsMode.Denied emptyVarSpace comp id
25972597

25982598
and trans firstTry q varSpace comp translatedCtxt =
2599-
match tryTrans firstTry q varSpace comp translatedCtxt with
2600-
| Some e -> e
2601-
| None ->
2602-
// This only occurs in final position in a sequence
2603-
match comp with
2604-
// "do! expr;" in final position is treated as { let! () = expr in return () } when Return is provided (and no Zero with Default attribute is available) or as { let! () = expr in zero } otherwise
2605-
| SynExpr.DoBang(rhsExpr, m) ->
2606-
let mUnit = rhsExpr.Range
2607-
let rhsExpr = mkSourceExpr rhsExpr
2599+
cenv.stackGuard.Guard
2600+
<| fun () ->
2601+
match tryTrans firstTry q varSpace comp translatedCtxt with
2602+
| Some e -> e
2603+
| None ->
2604+
// This only occurs in final position in a sequence
2605+
match comp with
2606+
// "do! expr;" in final position is treated as { let! () = expr in return () } when Return is provided (and no Zero with Default attribute is available) or as { let! () = expr in zero } otherwise
2607+
| SynExpr.DoBang(rhsExpr, m) ->
2608+
let mUnit = rhsExpr.Range
2609+
let rhsExpr = mkSourceExpr rhsExpr
26082610

2609-
if isQuery then
2610-
error (Error(FSComp.SR.tcBindMayNotBeUsedInQueries (), m))
2611+
if isQuery then
2612+
error (Error(FSComp.SR.tcBindMayNotBeUsedInQueries (), m))
26112613

2612-
let bodyExpr =
2613-
if
2614-
isNil (
2615-
TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "Return" builderTy
2614+
let bodyExpr =
2615+
if
2616+
isNil (
2617+
TryFindIntrinsicOrExtensionMethInfo
2618+
ResultCollectionSettings.AtMostOneResult
2619+
cenv
2620+
env
2621+
m
2622+
ad
2623+
"Return"
2624+
builderTy
2625+
)
2626+
then
2627+
SynExpr.ImplicitZero m
2628+
else
2629+
match
2630+
TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "Zero" builderTy
2631+
with
2632+
| minfo :: _ when MethInfoHasAttribute cenv.g m cenv.g.attrib_DefaultValueAttribute minfo ->
2633+
SynExpr.ImplicitZero m
2634+
| _ -> SynExpr.YieldOrReturn((false, true), SynExpr.Const(SynConst.Unit, m), m)
2635+
2636+
let letBangBind =
2637+
SynExpr.LetOrUseBang(
2638+
DebugPointAtBinding.NoneAtDo,
2639+
false,
2640+
false,
2641+
SynPat.Const(SynConst.Unit, mUnit),
2642+
rhsExpr,
2643+
[],
2644+
bodyExpr,
2645+
m,
2646+
SynExprLetOrUseBangTrivia.Zero
26162647
)
2617-
then
2618-
SynExpr.ImplicitZero m
2619-
else
2620-
match
2621-
TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "Zero" builderTy
2622-
with
2623-
| minfo :: _ when MethInfoHasAttribute cenv.g m cenv.g.attrib_DefaultValueAttribute minfo -> SynExpr.ImplicitZero m
2624-
| _ -> SynExpr.YieldOrReturn((false, true), SynExpr.Const(SynConst.Unit, m), m)
26252648

2626-
let letBangBind =
2627-
SynExpr.LetOrUseBang(
2628-
DebugPointAtBinding.NoneAtDo,
2629-
false,
2630-
false,
2631-
SynPat.Const(SynConst.Unit, mUnit),
2632-
rhsExpr,
2633-
[],
2634-
bodyExpr,
2635-
m,
2636-
SynExprLetOrUseBangTrivia.Zero
2637-
)
2638-
2639-
trans CompExprTranslationPass.Initial q varSpace letBangBind translatedCtxt
2649+
trans CompExprTranslationPass.Initial q varSpace letBangBind translatedCtxt
26402650

2641-
// "expr;" in final position is treated as { expr; zero }
2642-
// Suppress the sequence point on the "zero"
2643-
| _ ->
2644-
// Check for 'where x > y' and other mis-applications of infix operators. If detected, give a good error message, and just ignore comp
2645-
if isQuery && checkForBinaryApp comp then
2646-
trans CompExprTranslationPass.Initial q varSpace (SynExpr.ImplicitZero comp.Range) translatedCtxt
2647-
else
2648-
if isQuery && not comp.IsArbExprAndThusAlreadyReportedError then
2649-
match comp with
2650-
| SynExpr.JoinIn _ -> () // an error will be reported later when we process innerComp1 as a sequential
2651-
| _ -> errorR (Error(FSComp.SR.tcUnrecognizedQueryOperator (), comp.RangeOfFirstPortion))
2652-
2653-
trans CompExprTranslationPass.Initial q varSpace (SynExpr.ImplicitZero comp.Range) (fun holeFill ->
2654-
let fillExpr =
2655-
if enableImplicitYield then
2656-
let implicitYieldExpr = mkSynCall "Yield" comp.Range [ comp ]
2657-
2658-
SynExpr.SequentialOrImplicitYield(
2659-
DebugPointAtSequential.SuppressExpr,
2660-
comp,
2661-
holeFill,
2662-
implicitYieldExpr,
2663-
comp.Range
2664-
)
2665-
else
2666-
SynExpr.Sequential(
2667-
DebugPointAtSequential.SuppressExpr,
2668-
true,
2669-
comp,
2670-
holeFill,
2671-
comp.Range,
2672-
SynExprSequentialTrivia.Zero
2673-
)
2651+
// "expr;" in final position is treated as { expr; zero }
2652+
// Suppress the sequence point on the "zero"
2653+
| _ ->
2654+
// Check for 'where x > y' and other mis-applications of infix operators. If detected, give a good error message, and just ignore comp
2655+
if isQuery && checkForBinaryApp comp then
2656+
trans CompExprTranslationPass.Initial q varSpace (SynExpr.ImplicitZero comp.Range) translatedCtxt
2657+
else
2658+
if isQuery && not comp.IsArbExprAndThusAlreadyReportedError then
2659+
match comp with
2660+
| SynExpr.JoinIn _ -> () // an error will be reported later when we process innerComp1 as a sequential
2661+
| _ -> errorR (Error(FSComp.SR.tcUnrecognizedQueryOperator (), comp.RangeOfFirstPortion))
2662+
2663+
trans CompExprTranslationPass.Initial q varSpace (SynExpr.ImplicitZero comp.Range) (fun holeFill ->
2664+
let fillExpr =
2665+
if enableImplicitYield then
2666+
let implicitYieldExpr = mkSynCall "Yield" comp.Range [ comp ]
2667+
2668+
SynExpr.SequentialOrImplicitYield(
2669+
DebugPointAtSequential.SuppressExpr,
2670+
comp,
2671+
holeFill,
2672+
implicitYieldExpr,
2673+
comp.Range
2674+
)
2675+
else
2676+
SynExpr.Sequential(
2677+
DebugPointAtSequential.SuppressExpr,
2678+
true,
2679+
comp,
2680+
holeFill,
2681+
comp.Range,
2682+
SynExprSequentialTrivia.Zero
2683+
)
26742684

2675-
translatedCtxt fillExpr)
2685+
translatedCtxt fillExpr)
26762686

26772687
and transBind q varSpace bindRange addBindDebugPoint bindName bindArgs (consumePat: SynPat) (innerComp: SynExpr) translatedCtxt =
26782688

0 commit comments

Comments
 (0)