Skip to content

Commit 0b664a9

Browse files
authored
Merge branch 'main' into fix-16343
2 parents 08eb286 + 4fcf1a7 commit 0b664a9

File tree

422 files changed

+31567
-7891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

422 files changed

+31567
-7891
lines changed

.fantomasignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ src/Compiler/Checking/SignatureConformance.fs
4040
src/Compiler/Checking/TypeHierarchy.fs
4141
src/Compiler/Checking/TypeRelations.fs
4242

43+
# nullness-related problems
44+
src/Compiler/DependencyManager/DependencyProvider.fs
45+
4346
# Incorrectly formatted: https://github.com/dotnet/fsharp/pull/14645/commits/49443a67ea8a17670c8a7c80c8bdf91f82231e91 or https://github.com/fsprojects/fantomas/issues/2733
4447
# This CompilerImports.fs behavior is not fixed yet, following up in https://github.com/fsprojects/fantomas/issues/2733
4548
src/Compiler/Driver/CompilerImports.fs

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,9 @@ tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstanda
129129
/tests/AheadOfTime/Trimming/output.txt
130130
*.svclog
131131
micro.exe
132-
positive.exe
132+
positive.exe
133+
/tests/FSharp.Compiler.ComponentTests/FSharpChecker/StandardError.txt
134+
/tests/FSharp.Compiler.ComponentTests/FSharpChecker/StandardOutput.txt
135+
136+
# ilverify baseline result files
137+
*.bsl.actual

DEVGUIDE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,33 @@ Linux/macOS:
204204
export TEST_UPDATE_BSL=1
205205
```
206206

207+
## Retain Test run built artifacts
208+
209+
When investigating tests issues it is sometimes useful to examine the artifacts built when running tests. Those built using the newer test framework are usually,
210+
built in the %TEMP%\FSharp.Test.Utilities subdirectory.
211+
212+
To tell the test framework to not cleanup these files use the: FSHARP_RETAIN_TESTBUILDS environment variable
213+
214+
Windows:
215+
216+
CMD:
217+
218+
```shell
219+
set FSHARP_RETAIN_TESTBUILDS=1
220+
```
221+
222+
PowerShell:
223+
224+
```shell
225+
$env:FSHARP_RETAIN_TESTBUILDS=1
226+
```
227+
228+
Linux/macOS:
229+
230+
```shell
231+
export FSHARP_RETAIN_TESTBUILDS=1
232+
```
233+
207234
Next, run a build script build (debug or release, desktop or coreclr, depending which baselines you need to update), and test as described [above](#Testing-from-the-command-line). For example:
208235

209236
`./Build.cmd -c Release -testCoreClr` to update Release CoreCLR baselines.

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ 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.13
32+
value: release/dev17.14
3333
# VS Insertion branch name (NOT the same as F# branch)
3434
# 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),
@@ -88,7 +88,7 @@ extends:
8888
# Signed build #
8989
#-------------------------------------------------------------------------------------------------------------------#
9090
# Localization: we only run it for specific release branches
91-
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.13') }}:
91+
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.14') }}:
9292
- template: /eng/common/templates-official/job/onelocbuild.yml@self
9393
parameters:
9494
MirrorRepo: fsharp

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### Fixed
22

3+
* Fix Realsig+ generates nested closures with incorrect Generic ([Issue #17797](https://github.com/dotnet/fsharp/issues/17797), [PR #17877](https://github.com/dotnet/fsharp/pull/17877))
34
* Fix missing TailCall warning in Sequential in use scope ([PR #17927](https://github.com/dotnet/fsharp/pull/17927))
45
* Fix false negatives for passing null to "obj" arguments. Only "obj | null" can now subsume any type ([PR #17757](https://github.com/dotnet/fsharp/pull/17757))
56
* Fix internal error when calling 'AddSingleton' and other overloads only differing in generic arity ([PR #17804](https://github.com/dotnet/fsharp/pull/17804))
@@ -22,6 +23,8 @@
2223
* Allow `_` in `use! _` pattern (lift FS1228 restriction) ([PR #18189](https://github.com/dotnet/fsharp/pull/18189))
2324
* Symbols: try to use ValReprInfoForDisplay in Mfv.CurriedParameterGroups ([PR #18124](https://github.com/dotnet/fsharp/pull/18124))
2425
* Shim/file system: fix leaks of the shim [PR #18144](https://github.com/dotnet/fsharp/pull/18144)
26+
* fsi: fix auto-loading of script file inside NuGet package ([PR #18177](https://github.com/dotnet/fsharp/pull/18177))
27+
* Fix for `Obsolete` attribute warning/error not taken into account when used with a unit of measure [PR #18182](https://github.com/dotnet/fsharp/pull/18182)
2528

2629
### Added
2730

@@ -53,8 +56,8 @@
5356
* Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag ([PR #17871](https://github.com/dotnet/fsharp/pull/17871))
5457
* CheckAndThrow can be invoked only from within Cancellable context ([PR #18037](https://github.com/dotnet/fsharp/pull/18037))
5558
* Make ILTypeDef base type calculation lazy. ([PR #18005](https://github.com/dotnet/fsharp/pull/18005))
56-
* "#if" directive around nullness removed from src/Compiler/TypedTree/TypedTreePickle.fs and refactored. ([PR #18203](https://github.com/dotnet/fsharp/pull/18203))
59+
* Removed redundant hash directives around nullness syntax ([Issue #18601](https://github.com/dotnet/fsharp/issues/18061), [PR #18203](https://github.com/dotnet/fsharp/pull/18203), [PR #18207](https://github.com/dotnet/fsharp/pull/18207))
5760

5861
### Breaking Changes
5962

60-
* Aliasing `StructAttribute` will now produce a warning (part of [Language suggestion #1136](https://github.com/fsharp/fslang-suggestions/issues/1136), [PR #18098](https://github.com/dotnet/fsharp/pull/18098))
63+
* Aliasing `StructAttribute` will now produce a warning (part of [Language suggestion #1136](https://github.com/fsharp/fslang-suggestions/issues/1136), [PR #18098](https://github.com/dotnet/fsharp/pull/18098))
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### Fixed
2+
3+
* Fix Realsig+ generates nested closures with incorrect Generic ([Issue #17797](https://github.com/dotnet/fsharp/issues/17797), [PR #17877](https://github.com/dotnet/fsharp/pull/17877))
4+
* Set `Cancellable.token` from async computation ([Issue #18235](https://github.com/dotnet/fsharp/issues/18235), [PR #18238](https://github.com/dotnet/fsharp/pull/18238))
5+
6+
### Added
7+
8+
9+
### Changed
10+
11+
12+
### Breaking Changes
13+

eng/Version.Details.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
33
<ProductDependencies>
4-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="9.0.0-alpha.1.24619.1">
4+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="9.0.0-alpha.1.25066.1">
55
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
6-
<Sha>e2b1d16fd66540b3a5813ec0ac1fd166688c3e0a</Sha>
6+
<Sha>93a3395781d30f69201367371c28cfc5005c0264</Sha>
77
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
88
</Dependency>
99
<!-- Intermediate is necessary for source build. -->
@@ -42,14 +42,14 @@
4242
</Dependency>
4343
</ProductDependencies>
4444
<ToolsetDependencies>
45-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24623.3">
45+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.25065.2">
4646
<Uri>https://github.com/dotnet/arcade</Uri>
47-
<Sha>e0e05154656254a735ebf19ffa5a37a8b915039b</Sha>
47+
<Sha>c4bbc67763bf0c5a868862df874079380e647d61</Sha>
4848
</Dependency>
4949
<!-- Intermediate is necessary for source build. -->
50-
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24623.3">
50+
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.25065.2">
5151
<Uri>https://github.com/dotnet/arcade</Uri>
52-
<Sha>e0e05154656254a735ebf19ffa5a37a8b915039b</Sha>
52+
<Sha>c4bbc67763bf0c5a868862df874079380e647d61</Sha>
5353
<SourceBuild RepoName="arcade" ManagedOnly="true" />
5454
</Dependency>
5555
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.24462.2">

eng/Versions.props

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- F# Version components -->
1515
<FSMajorVersion>9</FSMajorVersion>
1616
<FSMinorVersion>0</FSMinorVersion>
17-
<FSBuildVersion>200</FSBuildVersion>
17+
<FSBuildVersion>300</FSBuildVersion>
1818
<FSRevisionVersion>0</FSRevisionVersion>
1919
<!-- -->
2020
<!-- F# Language version -->
@@ -53,7 +53,7 @@
5353
<PropertyGroup>
5454
<!-- These have to be in sync with latest release branch -->
5555
<VSMajorVersion>17</VSMajorVersion>
56-
<VSMinorVersion>13</VSMinorVersion>
56+
<VSMinorVersion>14</VSMinorVersion>
5757
<VSGeneralVersion>$(VSMajorVersion).0</VSGeneralVersion>
5858
<VSAssemblyVersionPrefix>$(VSMajorVersion).$(VSMinorVersion).0</VSAssemblyVersionPrefix>
5959
<VSAssemblyVersion>$(VSAssemblyVersionPrefix).0</VSAssemblyVersion>
@@ -193,7 +193,6 @@
193193
<XUnitVersion>2.9.0</XUnitVersion>
194194
<XUnitRunnerVersion>2.8.2</XUnitRunnerVersion>
195195
<XunitXmlTestLoggerVersion>3.1.17</XunitXmlTestLoggerVersion>
196-
<FluentAssertionsVersion>5.10.3</FluentAssertionsVersion>
197196
<HumanizerCoreVersion>2.2.0</HumanizerCoreVersion>
198197
<!-- -->
199198
<!-- MIBC profile packages -->

eng/common/template-guidance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ extends:
5757
5858
Note: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`).
5959

60-
# Development notes
60+
## Development notes
6161

6262
**Folder / file structure**
6363

global.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"sdk": {
3-
"version": "9.0.100",
3+
"version": "9.0.102",
44
"allowPrerelease": true
55
},
66
"tools": {
7-
"dotnet": "9.0.100",
7+
"dotnet": "9.0.102",
88
"vs": {
99
"version": "17.8",
1010
"components": [
@@ -17,7 +17,7 @@
1717
"perl": "5.38.2.2"
1818
},
1919
"msbuild-sdks": {
20-
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24623.3",
20+
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25065.2",
2121
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2"
2222
}
2323
}

src/Compiler/Checking/AttributeChecking.fs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,27 @@ let CheckEntityAttributes g (tcref: TyconRef) m =
417417
CheckFSharpAttributes g tcref.Attribs m
418418

419419
let CheckILEventAttributes g (tcref: TyconRef) cattrs m =
420-
CheckILAttributes g (isByrefLikeTyconRef g m tcref) cattrs m
420+
CheckILAttributes g (isByrefLikeTyconRef g m tcref) cattrs m
421+
422+
let CheckUnitOfMeasureAttributes g (measure: Measure) =
423+
let checkAttribs tm m =
424+
let attribs =
425+
ListMeasureConOccsWithNonZeroExponents g true tm
426+
|> List.map fst
427+
|> List.map(_.Attribs)
428+
|> List.concat
429+
430+
CheckFSharpAttributes g attribs m |> CommitOperationResult
431+
432+
match measure with
433+
| Measure.Const(range = m) -> checkAttribs measure m
434+
| Measure.Inv ms -> checkAttribs measure ms.Range
435+
| Measure.One(m) -> checkAttribs measure m
436+
| Measure.RationalPower(measure = ms1) -> checkAttribs measure ms1.Range
437+
| Measure.Prod(measure1= ms1; measure2= ms2) ->
438+
checkAttribs ms1 ms1.Range
439+
checkAttribs ms2 ms2.Range
440+
| Measure.Var(typar) -> checkAttribs measure typar.Range
421441

422442
/// Check the attributes associated with a method, returning warnings and errors as data.
423443
let CheckMethInfoAttributes g m tyargsOpt (minfo: MethInfo) =

src/Compiler/Checking/AttributeChecking.fsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ val CheckEntityAttributes: g: TcGlobals -> tcref: TyconRef -> m: range -> Operat
8989

9090
val CheckUnionCaseAttributes: g: TcGlobals -> x: UnionCaseRef -> m: range -> OperationResult<unit>
9191

92+
val CheckUnitOfMeasureAttributes: g: TcGlobals -> measure: Measure -> unit
93+
9294
val CheckRecdFieldAttributes: g: TcGlobals -> x: RecdFieldRef -> m: range -> OperationResult<unit>
9395

9496
val CheckValAttributes: g: TcGlobals -> x: ValRef -> m: range -> OperationResult<unit>

src/Compiler/Checking/CheckDeclarations.fs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3241,6 +3241,13 @@ module EstablishTypeDefinitionCores =
32413241
warning(Error(FSComp.SR.chkAttributeAliased(attrib.TypeRef.FullName), tycon.Id.idRange))
32423242
| _ -> ()
32433243

3244+
// Check for attributes in unit-of-measure declarations
3245+
// [<Measure>] type x = 1<s>
3246+
// ^
3247+
match stripTyEqns g ty with
3248+
| TType_measure tm -> CheckUnitOfMeasureAttributes g tm
3249+
| _ -> ()
3250+
32443251
checkAttributeAliased ty tycon g.attrib_AutoOpenAttribute
32453252
checkAttributeAliased ty tycon g.attrib_StructAttribute
32463253

@@ -3807,11 +3814,11 @@ module EstablishTypeDefinitionCores =
38073814

38083815
and accInMeasure measureTy acc =
38093816
match stripUnitEqns measureTy with
3810-
| Measure.Const tcref when ListSet.contains (===) tcref.Deref tycons ->
3817+
| Measure.Const(tyconRef= tcref) when ListSet.contains (===) tcref.Deref tycons ->
38113818
(tycon, tcref.Deref) :: acc
3812-
| Measure.Const tcref when tcref.IsTypeAbbrev ->
3819+
| Measure.Const(tyconRef= tcref) when tcref.IsTypeAbbrev ->
38133820
accInMeasure (reduceTyconRefAbbrevMeasureable tcref) acc
3814-
| Measure.Prod (ms1, ms2) -> accInMeasure ms1 (accInMeasure ms2 acc)
3821+
| Measure.Prod(measure1= ms1; measure2= ms2) -> accInMeasure ms1 (accInMeasure ms2 acc)
38153822
| Measure.Inv invTy -> accInMeasure invTy acc
38163823
| _ -> acc
38173824

src/Compiler/Checking/CheckPatterns.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ and TcPatLongIdentLiteral warnOnUpper (cenv: cenv) env vFlags patEnv ty (mLongId
803803
match vref.LiteralValue with
804804
| None -> error (Error(FSComp.SR.tcNonLiteralCannotBeUsedInPattern(), m))
805805
| Some lit ->
806-
let _, _, _, vexpty, _, _ = TcVal true cenv env tpenv vref None None mLongId
806+
let _, _, _, vexpty, _, _ = TcVal cenv env tpenv vref None None mLongId
807807
CheckValAccessible mLongId env.AccessRights vref
808808
CheckFSharpAttributes g vref.Attribs mLongId |> CommitOperationResult
809809
CheckNoArgsForLiteral args m

0 commit comments

Comments
 (0)