Skip to content

Commit 82a3f54

Browse files
authored
revert attributes feature (#18355)
* revert attributes * release notes
1 parent 3d780e0 commit 82a3f54

7 files changed

Lines changed: 79 additions & 19 deletions

File tree

buildtools/checkpackages/FSharp.Core_notshipped.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="$(MSBuildProjectDirectory)\..\..\eng\Versions.props" />
44

55
<PropertyGroup>
6-
<TargetFramework>ne87.0</TargetFramework>
6+
<TargetFramework>net9.0</TargetFramework>
77
</PropertyGroup>
88

99
<PropertyGroup>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@
5555

5656
### Breaking Changes
5757

58-
* 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))
58+
* Aliasing `StructAttribute` will now produce a warning (part of [Language suggestion #18298](https://github.com/fsharp/fslang-suggestions/issues/18298), [PR #18355](https://github.com/dotnet/fsharp/pull/18355))
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
### Fixed
2+
3+
* Fix missing TailCall warning in Sequential in use scope ([PR #17927](https://github.com/dotnet/fsharp/pull/17927))
4+
* 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))
5+
* Fix internal error when calling 'AddSingleton' and other overloads only differing in generic arity ([PR #17804](https://github.com/dotnet/fsharp/pull/17804))
6+
* Fix extension methods support for non-reference system assemblies ([PR #17799](https://github.com/dotnet/fsharp/pull/17799))
7+
* Ensure `frameworkTcImportsCache` mutations are threadsafe. ([PR #17795](https://github.com/dotnet/fsharp/pull/17795))
8+
* Disallow abstract member with access modifiers in sig file. ([PR #17802](https://github.com/dotnet/fsharp/pull/17802))
9+
* Fix concurrency issue in `ILPreTypeDefImpl` ([PR #17812](https://github.com/dotnet/fsharp/pull/17812))
10+
* Fix nullness inference for member val and other OO scenarios ([PR #17845](https://github.com/dotnet/fsharp/pull/17845))
11+
* Fix internal error when analyzing incomplete inherit member ([PR #17905](https://github.com/dotnet/fsharp/pull/17905))
12+
* Add warning when downcasting from nullable type to non-nullable ([PR #17965](https://github.com/dotnet/fsharp/pull/17965))
13+
* Fix missing nullness warning in case of method resolution multiple candidates ([PR #17917](https://github.com/dotnet/fsharp/pull/17918))
14+
* Fix failure to use bound values in `when` clauses of `try-with` in `seq` expressions ([PR #17990](https://github.com/dotnet/fsharp/pull/17990))
15+
* Fix locals allocating for the special `copyOfStruct` defensive copy ([PR #18025](https://github.com/dotnet/fsharp/pull/18025))
16+
* Fix lowering of computed array expressions when the expression consists of a simple mapping from a `uint64` or `unativeint` array. [PR #18081](https://github.com/dotnet/fsharp/pull/18081)
17+
* Add missing nullable-metadata for C# consumers of records,exceptions and DU subtypes generated from F# code. [PR #18079](https://github.com/dotnet/fsharp/pull/18079)
18+
* Reduce excess memory usage in TransparentCompiler. [PR #17543](https://github.com/dotnet/fsharp/pull/17543)
19+
* Fix a race condition in file book keeping in the compiler service ([#18008](https://github.com/dotnet/fsharp/pull/18008))
20+
* Fix trimming '%' characters when lowering interpolated string to a concat call [PR #18123](https://github.com/dotnet/fsharp/pull/18123)
21+
* Completion: fix qualified completion in sequence expressions [PR #18111](https://github.com/dotnet/fsharp/pull/18111)
22+
* Symbols: try to use ValReprInfoForDisplay in Mfv.CurriedParameterGroups ([PR #18124](https://github.com/dotnet/fsharp/pull/18124))
23+
* Shim/file system: fix leaks of the shim [PR #18144](https://github.com/dotnet/fsharp/pull/18144)
24+
25+
### Added
26+
27+
* Let `dotnet fsi --help` print a link to the documentation website. ([PR #18006](https://github.com/dotnet/fsharp/pull/18006))
28+
* 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))
29+
* Support literal attribute on decimals ([PR #17769](https://github.com/dotnet/fsharp/pull/17769))
30+
* Added type conversions cache, only enabled for compiler runs, guarded by language version preview ([PR #17668](https://github.com/dotnet/fsharp/pull/17668))
31+
* Added project property ParallelCompilation which turns on graph based type checking, parallel ILXGen and parallel optimization. By default on for users of langversion=preview ([PR #17948](https://github.com/dotnet/fsharp/pull/17948))
32+
* Adding warning when consuming generic method returning T|null for types not supporting nullness (structs,anons,tuples) ([PR #18057](https://github.com/dotnet/fsharp/pull/18057))
33+
* Sink: report SynPat.ArrayOrList type ([PR #18127](https://github.com/dotnet/fsharp/pull/18127))
34+
* Show the default value of compiler options ([PR #18054](https://github.com/dotnet/fsharp/pull/18054))
35+
* 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))
36+
* Cancellable: add safer APIs to check the token ([PR #18175](https://github.com/dotnet/fsharp/pull/18175))
37+
38+
### Changed
39+
40+
* Make ILTypeDef interface impls calculation lazy. ([PR #17392](https://github.com/dotnet/fsharp/pull/17392))
41+
* Remove non-functional useSyntaxTreeCache option. ([PR #17768](https://github.com/dotnet/fsharp/pull/17768))
42+
* Better ranges for CE `let!` and `use!` error reporting. ([PR #17712](https://github.com/dotnet/fsharp/pull/17712))
43+
* Better ranges for CE `do!` error reporting. ([PR #17779](https://github.com/dotnet/fsharp/pull/17779))
44+
* Better ranges for CE `return, yield, return! and yield!` error reporting. ([PR #17792](https://github.com/dotnet/fsharp/pull/17792))
45+
* Better ranges for CE `match!`. ([PR #17789](https://github.com/dotnet/fsharp/pull/17789))
46+
* Better ranges for CE `use` error reporting. ([PR #17811](https://github.com/dotnet/fsharp/pull/17811))
47+
* Better ranges for `inherit` error reporting. ([PR #17879](https://github.com/dotnet/fsharp/pull/17879))
48+
* Better ranges for `inherit` `struct` error reporting. ([PR #17886](https://github.com/dotnet/fsharp/pull/17886))
49+
* Warn on uppercase identifiers in patterns. ([PR #15816](https://github.com/dotnet/fsharp/pull/15816))
50+
* Better ranges for `inherit` objects error reporting. ([PR #17893](https://github.com/dotnet/fsharp/pull/17893))
51+
* 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))
52+
* 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))
53+
* CheckAndThrow can be invoked only from within Cancellable context ([PR #18037](https://github.com/dotnet/fsharp/pull/18037))
54+
* Make ILTypeDef base type calculation lazy. ([PR #18005](https://github.com/dotnet/fsharp/pull/18005))
55+
* Revert EnforceAttributeTargets Feature. ([PR #18005](https://github.com/dotnet/fsharp/pull/18005))
56+
57+
### Breaking Changes
58+
59+
* Aliasing `StructAttribute` will now produce a warning (part of [Language suggestion #18298](https://github.com/fsharp/fslang-suggestions/issues/18298), [PR #18355](https://github.com/dotnet/fsharp/pull/18355))

docs/release-notes/.Language/9.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* Enforce AttributeTargets on implicit constructors. ([PR #16845](https://github.com/dotnet/fsharp/pull/16845/))
2222
* Enforce AttributeTargets on structs and classes ([PR #16790](https://github.com/dotnet/fsharp/pull/16790))
2323
* Ensure consistent interaction between ``#line` and `#nowarn` directives ([PR #17649](https://github.com/dotnet/fsharp/pull/17649))
24+
* Revert EnforceAttributeTargets Feature. ([PR #18005](https://github.com/dotnet/fsharp/pull/18005))
2425

2526

2627
### Changed

eng/Versions.props

Lines changed: 2 additions & 2 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>201</FSBuildVersion>
17+
<FSBuildVersion>202</FSBuildVersion>
1818
<FSRevisionVersion>0</FSRevisionVersion>
1919
<!-- -->
2020
<!-- F# Language version -->
@@ -37,7 +37,7 @@
3737
<FSharpLibrariesChangelogVersion>$(FSMajorVersion).$(FSMinorVersion).$(FSBuildVersion)</FSharpLibrariesChangelogVersion>
3838
<!-- -->
3939
<!-- The current published nuget package -->
40-
<FSharpCoreShippedPackageVersionValue>9.0.100</FSharpCoreShippedPackageVersionValue>
40+
<FSharpCoreShippedPackageVersionValue>9.0.201</FSharpCoreShippedPackageVersionValue>
4141
<!-- -->
4242
<!-- The pattern for specifying the preview package -->
4343
<FSharpCorePreviewPackageVersionValue>$(FSCorePackageVersionValue)-$(PreReleaseVersionLabel).*</FSharpCorePreviewPackageVersionValue>

src/Compiler/Facilities/LanguageFeatures.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ type LanguageVersion(versionText) =
216216
LanguageFeature.LowerSimpleMappingsInComprehensionsToFastLoops, languageVersion90
217217
LanguageFeature.ParsedHashDirectiveArgumentNonQuotes, languageVersion90
218218
LanguageFeature.EmptyBodiedComputationExpressions, languageVersion90
219-
LanguageFeature.EnforceAttributeTargets, languageVersion90
220219

221220
// F# preview
221+
LanguageFeature.EnforceAttributeTargets, previewVersion // Not enabled due to a number of external library dependencies on unenforced attributes
222222
LanguageFeature.UseTypeSubsumptionCache, previewVersion
223223
LanguageFeature.UnmanagedConstraintCsharpInterop, previewVersion // not enabled because: https://github.com/dotnet/fsharp/issues/17509
224224
LanguageFeature.FromEndSlicing, previewVersion // Unfinished features --- needs work

tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ module CustomAttributes_AttributeUsage =
9898
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargets01.fs"|])>]
9999
let ``E_AttributeTargets01_fs`` compilation =
100100
compilation
101-
|> withLangVersion90
101+
|> withLangVersionPreview
102102
|> verifyCompile
103103
|> shouldFail
104104
|> withDiagnostics [
@@ -134,7 +134,7 @@ module CustomAttributes_AttributeUsage =
134134
let ``E_AttributeTargetIsField01_fs`` compilation =
135135
compilation
136136
|> withOptions ["--nowarn:25"]
137-
|> withLangVersion90
137+
|> withLangVersionPreview
138138
|> verifyCompile
139139
|> shouldFail
140140
|> withDiagnostics [
@@ -187,7 +187,7 @@ module CustomAttributes_AttributeUsage =
187187
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsMethod02.fs"|])>]
188188
let ``E_AttributeTargetIsMethod02_fs`` compilation =
189189
compilation
190-
|> withLangVersion90
190+
|> withLangVersionPreview
191191
|> withOptions ["--nowarn:25"]
192192
|> verifyCompile
193193
|> shouldFail
@@ -218,7 +218,7 @@ module CustomAttributes_AttributeUsage =
218218
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsMethod03.fs"|])>]
219219
let ``E_AttributeTargetIsMethod03_fs`` compilation =
220220
compilation
221-
|> withLangVersion90
221+
|> withLangVersionPreview
222222
|> withOptions ["--nowarn:25"]
223223
|> verifyCompile
224224
|> shouldFail
@@ -336,7 +336,7 @@ module CustomAttributes_AttributeUsage =
336336
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsStruct.fs"|])>]
337337
let ``E_AttributeTargetIsStruct_fs`` compilation =
338338
compilation
339-
|> withLangVersion90
339+
|> withLangVersionPreview
340340
|> verifyCompile
341341
|> shouldFail
342342
|> withDiagnostics [
@@ -366,7 +366,7 @@ module CustomAttributes_AttributeUsage =
366366
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsClass.fs"|])>]
367367
let ``E_AttributeTargetIsClass_fs`` compilation =
368368
compilation
369-
|> withLangVersion90
369+
|> withLangVersionPreview
370370
|> verifyCompile
371371
|> shouldFail
372372
|> withDiagnostics [
@@ -387,7 +387,7 @@ module CustomAttributes_AttributeUsage =
387387
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsClass01.fs"|])>]
388388
let ``E_AttributeTargetIsClass01_fs`` compilation =
389389
compilation
390-
|> withLangVersion90
390+
|> withLangVersionPreview
391391
|> verifyCompile
392392
|> shouldFail
393393
|> withDiagnostics [
@@ -485,7 +485,7 @@ module CustomAttributes_AttributeUsage =
485485
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsField03.fs"|])>]
486486
let ``E_AttributeTargetIsField03_fs`` compilation =
487487
compilation
488-
|> withLangVersion90
488+
|> withLangVersionPreview
489489
|> verifyCompile
490490
|> shouldFail
491491
|> withDiagnostics [
@@ -505,7 +505,7 @@ module CustomAttributes_AttributeUsage =
505505
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsProperty01.fs"|])>]
506506
let ``E_AttributeTargetIsProperty01_fs`` compilation =
507507
compilation
508-
|> withLangVersion90
508+
|> withLangVersionPreview
509509
|> verifyCompile
510510
|> shouldFail
511511
|> withDiagnostics [
@@ -525,7 +525,7 @@ module CustomAttributes_AttributeUsage =
525525
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsCtor01.fs"|])>]
526526
let ``E_AttributeTargetIsCtor01_fs`` compilation =
527527
compilation
528-
|> withLangVersion90
528+
|> withLangVersionPreview
529529
|> verifyCompile
530530
|> shouldFail
531531
|> withDiagnostics [
@@ -562,7 +562,7 @@ module CustomAttributes_AttributeUsage =
562562
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsEnum01.fs"|])>]
563563
let ``E_AttributeTargetIsEnum01_fs`` compilation =
564564
compilation
565-
|> withLangVersion90
565+
|> withLangVersionPreview
566566
|> verifyCompile
567567
|> shouldFail
568568
|> withDiagnostics [
@@ -599,7 +599,7 @@ module CustomAttributes_AttributeUsage =
599599
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsDelegate01.fs"|])>]
600600
let ``E_AttributeTargetsIsDelegate01_fs`` compilation =
601601
compilation
602-
|> withLangVersion90
602+
|> withLangVersionPreview
603603
|> verifyCompile
604604
|> shouldFail
605605
|> withDiagnostics [
@@ -648,7 +648,7 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) =
648648
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsInterface.fs"|])>]
649649
let ``E_AttributeTargetIsInterface_fs`` compilation =
650650
compilation
651-
|> withLangVersion90
651+
|> withLangVersionPreview
652652
|> verifyCompile
653653
|> shouldFail
654654
|> withDiagnostics [
@@ -670,7 +670,7 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) =
670670
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"E_AttributeTargetIsClass02.fs"|])>]
671671
let ``E_AttributeTargetIsClass02_fs`` compilation =
672672
compilation
673-
|> withLangVersion90
673+
|> withLangVersionPreview
674674
|> verifyCompile
675675
|> shouldFail
676676
|> withDiagnostics [

0 commit comments

Comments
 (0)