FSharp.Compiler.Service
43.9.300 - 2025-05-13
Fixed
- Fix missing TailCall warning in TOp.IntegerForLoop (PR #18399)
- Fix classification of
nameofinnameof<'T>,match … with nameof ident -> …. (Issue #10026, PR #18300) - Fix Realsig+ generates nested closures with incorrect Generic (Issue #17797, PR #17877)
- Fix optimizer internal error for records with static fields (Issue #18165, PR #18280)
- Fix nullness warning with flexible types (Issue #18056, PR #18266)
- Allow first branches of match and if expressions to return nullable results (Issue #18015, PR #18322)
- Fix internal error when missing measure attribute in an unsolved measure typar. (Issue #7491, PR #18234==
- Set
Cancellable.tokenfrom async computation (Issue #18235, PR #18238) - Fix missing nullness warning when static upcast dropped nullness (Issue #18232, PR #18261)
- Cancellable: only cancel on OCE with own token (PR #18277)
- Cancellable: set token in more places (PR #18283)
- Cancellable: fix leaking cancellation token (PR #18295)
- Fix NRE when accessing nullable fields of types within their equals/hash/compare methods (PR #18296)
- Fix nullness warning for overrides of generic code with nullable type instance (Issue #17988, PR #18337)
- Unsafe downcast from
objto genericTno longer requiresnot nullconstraint onT(Issue #18275, PR #18343) - Fix "type inference problem too complicated" for SRTP with T:null and T:struct dummy constraint(Issue #18288, PR #18345)
- Fix for missing parse diagnostics in TransparentCompiler.ParseAndCheckProject (PR #18366)
- Miscellanous parentheses analyzer fixes. (PR #18350, PR #18534)
- Fix duplicate parse error reporting for GetBackgroundCheckResultsForFileInProject (Issue #18379 PR #18380)
- Fix MethodDefNotFound when compiling code invoking delegate with option parameter (Issue #5171, PR #18385)
- Fix #r nuget ..." downloads unneeded packages (Issue #18231, PR #18393)
- Fix checking bug in unpickling PR #18430
- Reenable β-reduction and subsequent reoptimization of immediately-invoked F#-defined generic delegates. (PR #18401)
- Fixed #18433, a rare case of an internal error in xml comment processing. (PR #18436)
- Fix confusing type inference error in task expression (Issue #13789, PR #18450)
- Fix missing
nullhighlighting in tooltips (PR #18457) - Fix range of SynPat.Named doesn't include accessibility (PR #18526)
- Allow
_inuse!bindings values (lift FS1228 restriction) (PR #18487) - Make
[<CallerMemberName; Struct>]combination work(PR #18444) - Fix code completion considers types from own namespace non-imported (PR #18518)
- Code completion: fix getting qualifier expression in do statements in type decls (PR #18524)
- Fix parsing errors using anonymous records and units of measures (PR #18543)
- Fixed: #18441 FSI multi-emit unstable. (PR #18465)
- Fixed: Allow
return,return!,yield,yield!type annotations without parentheses (PR #18533)
Added
- Added missing type constraints in FCS. (PR #18241)
- The 'use' keyword can be used on IDisposable|null without nullness warnings (PR #18262)
- Add support for C#
Experimentalattribute. (PR #18253) - Nullness warnings are issued for signature<>implementation conformance (PR #18186)
- Symbols: Add FSharpAssembly.IsFSharp (PR #18290)
- Type checker: don't suppress errors while checking expressions (PR #18311)
- Type parameter constraint
nullin generic code will now automatically implynot struct(Issue #18320, PR #18323) - Add a switch to determine whether to generate a default implementation body for overridden method when completing. PR #18341
- Use a more accurate range for CE Combine methods. PR #18394
- Enable TypeSubsumptionCache for IDE use. PR #18499
Changed
- FSharpCheckFileResults.ProjectContext.ProjectOptions will not be available when using the experimental Transparent Compiler feature. (PR #18205)
- Update
Obsoleteattribute checking to account forDiagnosticIdandUrlFormatproperties. (PR #18224) - Remove
Cancellable.UsingTokenfrom tests (PR #18276) - Added nullability annotations to
.Usingbuilder method forasync,taskand compiler-internal builders (PR #18292) - Warn when
unitis passed to anobj-typed argument (PR #18330) - Warning for "useless null handling" works with piped syntax constructs now (PR #18331)
- Make indent in generated overridden member code depend on the context, not fix to 4. (PR #18341)
- Adjust caller info attribute error message range (PR #18388)
- Make attribute targets mismatch a warning and not an error (PR #18492)
Breaking Changes
- Struct unions with overlapping fields now generate mappings needed for reading via reflection (Issue #18121, PR #18274)
43.9.202 - 2025-04-08
Fixed
- Fix missing TailCall warning in Sequential in use scope (PR #17927)
- Fix false negatives for passing null to "obj" arguments. Only "obj | null" can now subsume any type (PR #17757)
- Fix internal error when calling 'AddSingleton' and other overloads only differing in generic arity (PR #17804)
- Fix extension methods support for non-reference system assemblies (PR #17799)
- Ensure
frameworkTcImportsCachemutations are threadsafe. (PR #17795) - Disallow abstract member with access modifiers in sig file. (PR #17802)
- Fix concurrency issue in
ILPreTypeDefImpl(PR #17812) - Fix nullness inference for member val and other OO scenarios (PR #17845)
- Fix internal error when analyzing incomplete inherit member (PR #17905)
- Add warning when downcasting from nullable type to non-nullable (PR #17965)
- Fix missing nullness warning in case of method resolution multiple candidates (PR #17917)
- Fix failure to use bound values in
whenclauses oftry-withinseqexpressions (PR #17990) - Fix locals allocating for the special
copyOfStructdefensive copy (PR #18025) - Fix lowering of computed array expressions when the expression consists of a simple mapping from a
uint64orunativeintarray. PR #18081 - Add missing nullable-metadata for C# consumers of records,exceptions and DU subtypes generated from F# code. PR #18079
- Reduce excess memory usage in TransparentCompiler. PR #17543
- Fix a race condition in file book keeping in the compiler service (#18008)
- Fix trimming '%' characters when lowering interpolated string to a concat call PR #18123
- Completion: fix qualified completion in sequence expressions PR #18111
- Symbols: try to use ValReprInfoForDisplay in Mfv.CurriedParameterGroups (PR #18124)
- Shim/file system: fix leaks of the shim PR #18144
Added
- Let
dotnet fsi --helpprint a link to the documentation website. (PR #18006) - Deprecate places where
seqcan be omitted. (Language suggestion #1033, PR #17772) - Support literal attribute on decimals (PR #17769)
- Added type conversions cache, only enabled for compiler runs, guarded by language version preview (PR #17668)
- 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)
- Adding warning when consuming generic method returning T|null for types not supporting nullness (structs,anons,tuples) (PR #18057)
- Sink: report SynPat.ArrayOrList type (PR #18127)
- Show the default value of compiler options (PR #18054)
- Support ValueOption + Struct attribute as optional parameter for methods (Language suggestion #1136, PR #18098)
- Cancellable: add safer APIs to check the token (PR #18175)
Changed
- Make ILTypeDef interface impls calculation lazy. (PR #17392)
- Remove non-functional useSyntaxTreeCache option. (PR #17768)
- Better ranges for CE
let!anduse!error reporting. (PR #17712) - Better ranges for CE
do!error reporting. (PR #17779) - Better ranges for CE
return, yield, return! and yield!error reporting. (PR #17792) - Better ranges for CE
match!. (PR #17789) - Better ranges for CE
useerror reporting. (PR #17811) - Better ranges for
inheriterror reporting. (PR #17879) - Better ranges for
inheritstructerror reporting. (PR #17886) - Warn on uppercase identifiers in patterns. (PR #15816)
- Better ranges for
inheritobjects error reporting. (PR #17893) - Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag (PR #17871)
- Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag (PR #17871)
- CheckAndThrow can be invoked only from within Cancellable context (PR #18037)
- Make ILTypeDef base type calculation lazy. (PR #18005)
- Revert EnforceAttributeTargets Feature. (PR #18005)
Breaking Changes
- Aliasing
StructAttributewill now produce a warning (part of Language suggestion #18298, PR #18355)
43.9.200 - Unreleased
Fixed
- Fix Realsig+ generates nested closures with incorrect Generic (Issue #17797, PR #17877)
- Fix missing TailCall warning in Sequential in use scope (PR #17927)
- Fix false negatives for passing null to "obj" arguments. Only "obj | null" can now subsume any type (PR #17757)
- Fix internal error when calling 'AddSingleton' and other overloads only differing in generic arity (PR #17804)
- Fix extension methods support for non-reference system assemblies (PR #17799)
- Ensure
frameworkTcImportsCachemutations are threadsafe. (PR #17795) - Disallow abstract member with access modifiers in sig file. (PR #17802)
- Fix concurrency issue in
ILPreTypeDefImpl(PR #17812) - Fix nullness inference for member val and other OO scenarios (PR #17845)
- Add warning when downcasting from nullable type to non-nullable (PR #17965)
- Fix missing nullness warning in case of method resolution multiple candidates (PR #17917)
- Fix failure to use bound values in
whenclauses oftry-withinseqexpressions (PR #17990) - Fix locals allocating for the special
copyOfStructdefensive copy (PR #18025) - Fix lowering of computed array expressions when the expression consists of a simple mapping from a
uint64orunativeintarray. PR #18081 - Add missing nullable-metadata for C# consumers of records,exceptions and DU subtypes generated from F# code. PR #18079
- Reduce excess memory usage in TransparentCompiler. PR #17543
- Fix a race condition in file book keeping in the compiler service (#18008)
- Fix trimming '%' characters when lowering interpolated string to a concat call PR #18123
- Completion: fix qualified completion in sequence expressions PR #18111
- Symbols: try to use ValReprInfoForDisplay in Mfv.CurriedParameterGroups (PR #18124)
- Shim/file system: fix leaks of the shim PR #18144
- fsi: fix auto-loading of script file inside NuGet package (PR #18177)
- Fix for
Obsoleteattribute warning/error not taken into account when used with a unit of measure PR #18182
Added
- Let
dotnet fsi --helpprint a link to the documentation website. (PR #18006) - Deprecate places where
seqcan be omitted. (Language suggestion #1033, PR #17772) - Support literal attribute on decimals (PR #17769)
- Added type conversions cache, only enabled for compiler runs, guarded by language version preview (PR #17668)
- 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)
- Adding warning when consuming generic method returning T|null for types not supporting nullness (structs,anons,tuples) (PR #18057)
- Sink: report SynPat.ArrayOrList type (PR #18127)
- Show the default value of compiler options (PR #18054)
- Support ValueOption + Struct attribute as optional parameter for methods (Language suggestion #1136, PR #18098)
- Cancellable: add safer APIs to check the token (PR #18175)
Changed
- Make ILTypeDef interface impls calculation lazy. (PR #17392)
- Remove non-functional useSyntaxTreeCache option. (PR #17768)
- Better ranges for CE
let!anduse!error reporting. (PR #17712) - Better ranges for CE
do!error reporting. (PR #17779) - Better ranges for CE
return, yield, return! and yield!error reporting. (PR #17792) - Better ranges for CE
match!. (PR #17789) - Better ranges for CE
useerror reporting. (PR #17811) - Better ranges for
inheriterror reporting. (PR #17879) - Better ranges for
inheritstructerror reporting. (PR #17886) - Warn on uppercase identifiers in patterns. (PR #15816)
- Better ranges for
inheritobjects error reporting. (PR #17893) - Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag (PR #17871)
- Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag (PR #17871)
- CheckAndThrow can be invoked only from within Cancellable context (PR #18037)
- Make ILTypeDef base type calculation lazy. (PR #18005)
- Removed redundant hash directives around nullness syntax (Issue #18601, PR #18203, PR #18207)
Breaking Changes
- Aliasing
StructAttributewill now produce a warning (part of Language suggestion #1136, PR #18098) - The
baseTypefield inSynMemberDefn.Inherithas now typeSynType option, to fix internal error when analyzing incomplete inherit member (PR #17905)
43.9.100 - 2024-11-12
Fixed
- Fix wrong TailCall warning (Issue #17604, PR #17637)
- Compiler hangs when compiling inline recursive invocation (Issue #17376, PR #17394)
- Fix reporting IsFromComputationExpression only for CE builder type constructors and let bindings. (PR #17375)
- Optimize simple mappings in comprehensions when the body of the mapping has
let-bindings and/or sequential expressions before a single yield. (PR #17419) - C# protected property can be assigned in F# inherit constructor call. (Issue #13299, PR #17391)
- MethodAccessException on equality comparison of a record with private fields. (Issue #17447, PR #17391)
- Fix
functionimplicit conversion. (Issue #7401, PR #17487) - Compiler fails to recognise namespace in FQN with enabled GraphBasedChecking. (Issue #17508, PR #17510)
- Fix missing message for type error (FS0001). (Issue #17373, PR #17516)
- Nullness export - make sure option<> and other UseNullAsTrueValue types are properly annotated as nullable for C# and reflection consumers PR #17528
- MethodAccessException on equality comparison of a type private to module. (Issue #17541, PR #17548)
- Fixed checking failure when
globalnamespace is involved with enabled GraphBasedChecking (PR #17553) - Add missing byte chars notations, enforce limits in decimal notation in byte char & string (Issues #15867, #15868, #15869, PR #15898)
- Parentheses analysis: keep extra parentheses around unit & tuples in method definitions. (PR #17618)
- Fix IsUnionCaseTester throwing for non-methods/properties #17301
- Fix xmlc doc tooltip display for nullable types #17741
- Consider
open typeused when the type is an enum and any of the enum cases is used unqualified. (PR #17628) - Guard for possible StackOverflowException when typechecking non recursive modules and namespaces (PR #17654)
- Nullable - fix for processing System.Nullable types with nesting (PR #17736)
- Fixes for the optimization of simple mappings in array and list comprehensions. (Issue #17708, PR #17711)
Added
- Support for nullable reference types (PR #15181)
- Treat .ToString() on F# types as returning non-nullable string in --checknulls+ context (PR #17547)
- Parser: recover on missing union case fields (PR #17452)
- Parser: recover on missing union case field types (PR #17455)
- Sink: report function domain type (PR #17470)
- Allow access modifies to auto properties getters and setters (Language suggestion #430, PR 16687, PR 16861, PR 17522)
- Render C# nullable-analysis attributes in tooltips (PR #17485)
- Allow object expression without overrides. (Language suggestion #632, PR #17387)
- Enable FSharp 9.0 Language Version (Issue #17497), PR))
- Enable LanguageFeature.EnforceAttributeTargets in F# 9.0. (Issue #17514, PR #17516)
- Parser: better recovery for unfinished patterns (PR #17231, PR #17232))
- Enable consuming generic arguments defined as
allows ref structin C# (Issue #17597, display them in tooltips PR #17706) - Trivia for SynTypeConstraint.WhereTyparNotSupportsNull. (Issue #17721, PR #17745)
- Trivia for SynType.WithNull. (Issue #17720, PR #17745)
Changed
- Change compiler default setting realsig+ when building assemblies (Issue #17384, PR #17378)
- Change compiler default setting for compressedMetadata (Issue #17379, PR #17383)
- Treat
{ new Foo() }asSynExpr.ObjExpr(PR #17388) - Optimize metadata reading for type members and custom attributes. (PR #17364)
- Enforce
AttributeTargetson unions. (PR #17389) - Applied nullable reference types to FSharp.Compiler.Service itself (PR #15310)
- Ensure that isinteractive multi-emit backing fields are not public. (Issue #17439), (PR #17439)
- Better error reporting for unions with duplicated fields. (PR #17521)
- Better CE error reporting when using
use!withand!(PR #17671) - Better error reporting for let bindings. (PR #17601)
- Optimize ILTypeDef interface impls reading from metadata. (PR #17382)
- Make ILTypeDef interface impls calculation lazy. (PR #17392)
- Better error reporting for active patterns. (PR #17666)
- Multiple fsi sessions use separate temporary directories (PR #17760)
Breaking Changes
43.8.400 - 2024-08-13
Fixed
- Enforce
AttributeTargetson records. (PR #17207) - Fix a false positive of the
[<TailCall>]analysis in combination with async. (Issue #17237, PR #17241) - Extended #help directive in fsi to show documentation in the REPL. (PR #17140)
- Fix internal error when dotting into delegates with multiple type parameters. (PR #17227)
- Error for partial implementation of interface with static and non-static abstract members. (Issue #17138, PR #17160)
- Optimize simple mappings with preludes in computed collections. (PR #17067)
- Improve error reporting for abstract members when used in classes. (PR #17063)
- Improve error reporting when property has same name as DU case. (Issue #16646, PR #17088)
- Make typechecking of indexed setters with tuples on the right more consistent. (Issue #16987, PR #17017)
- Static abstract method on classes no longer yields internal error. (Issue #17044, PR #17055)
- Disallow calling abstract methods directly on interfaces. (Issue #14012, Issue #16299, PR #17021)
- Various parenthesization API fixes. (PR #16977)
- Files passed with -embed:relative/path/to/file are not embedded. (Issue #16768)
- Fix bug in optimization of for-loops over integral ranges with steps and units of measure. (Issue #17025, PR #17040, PR #17048)
- Fix calling an overridden virtual static method via the interface (PR #17013)
- Fix state machines compilation, when big decision trees are involved, by removing code split when resumable code is detected (PR #17076)
- Fix for exponential runtime in CE builders when using nested implicit yields PR #17096
- Fix several AND operator parser bugs and regressions (Issue #16447, Issue #17134, Issue #16309, PR #17113)
- Treat exceptions as types in a namespace for graph based type checking (Issue #17262, PR #17268)
- FS0243 - Unrecognized option: '--realsig-' #17561 (Issue #17561, PR #17268)
Added
- Generate new
Equalsoverload to avoid boxing for structural comparison (PR #16857) - Allow #nowarn to support the FS prefix on error codes to disable warnings (Issue #17206, PR #17209)
- Allow ParsedHashDirectives to have argument types other than strings (Issue #17240, PR #17209)
- Parser: better recovery for unfinished patterns (PR #17231)
- Expose inner exception information of TypeProviders to help diagnostics in IDE (PR #17251)
- Parser: recover on empty match clause (PR #17233)
- Support empty-bodied computation expressions. (Language suggestion #1232, RFC FS-1144 (PR #774), PR #17352)
Changed
- Enforce
AttributeTargets.Interface(PR #17173) - Minor compiler perf improvements. (PR #17130)
- Improve error messages for active pattern argument count mismatch (PR #16846, PR #17186)
- AsyncLocal diagnostics context. (PR #16779)
- Reduce allocations in compiler checking via
ValueOptionusage (PR #16822) - Use AsyncLocal instead of ThreadStatic to hold Cancellable.Token (PR #17156)
- Showing and inserting correct name of entities from unopened namespace/module (Issue #14375, PR #17261)
- Improve completion after method/property override (PR #17292)
- Support lazy custom attributes calculation for
ILTypeDefpublic API, improveExtensionAttributepresence detecting perf. (PR #16168)
43.8.300 - 2024-05-14
Fixed
- Fix a false positive of the
[<TailCall>]analysis in combination withyield!. (PR #16933) - Improve error reporting: ambiguous override method in object expression. (PR #16985)
- Don't blow the stack when traversing deeply nested sequential expressions. (PR #16882)
- Fix wrong range start of INTERP_STRING_END. (PR #16774, PR #16785)
- Fix missing warning for recursive calls in list comprehensions. (PR #16652)
- Code generated files with > 64K methods and generated symbols crash when loaded. Use inferred sequence points for debugging. (Issue #16399, #PR 16514)
nameof Moduleexpressions and patterns are processed to link files in--test:GraphBasedChecking. (PR #16550, PR #16743)- Graph Based Checking doesn't throw on invalid parsed input so it can be used for IDE scenarios (PR #16575, PR #16588, PR #16643)
- Various parenthesization API fixes. (PR #16578, PR #16666, PR #16901, PR #16973, PR #17012)
- Keep parens for problematic exprs (
if,match, etc.) in$"{(…):N0}",$"{(…),-3}", etc. (PR #16578) - Fix crash in DOTNET_SYSTEM_GLOBALIZATION_INVARIANT mode #PR 16471)
- Fix16572 - Fixed the preview feature enabling Is properties for union case did not work correctly with let .rec and .fsi files (PR #16657)
[<CliEvent>]member should not produce property symbol. (Issue #16640, PR #16658)- Fix discriminated union initialization. (#PR 16661)
- Allow calling method with both Optional and ParamArray. (#PR 16688, suggestions #1120)
- Return diagnostics that got suppressed by errors in previous files. (PR #16719)
- Fix release inline optimization, which leads to MethodAccessException if used with `assembly:InternalsVisibleTo`` attribute. (Issue #16105, (PR #16737)
- Enforce AttributeTargets on let values and functions. (PR #16692)
- Enforce AttributeTargets on union case declarations. (PR #16764)
- Disallow using base to invoke an abstract base method. (Issue #13926, PR #16773)
- Parser: more unfinished member recovery (PR #16835)
- Enforce AttributeTargets on implicit constructors. (PR #16845)
- Enforce AttributeTargets on structs and classes (PR #16790)
- Parser: fix pattern range for idents with trivia (PR #16824)
- Fix broken code completion after a record type declaration (PR #16813)
- Enforce AttributeTargets on enums (PR #16887)
- Completion: fix for unfinished record field decl (PR #16893)
- Enforce AttributeTargets on delegates (PR #16891)
- Obsolete attribute is ignored in constructor property assignment (PR #16900)
- Completion: fix completion in empty dot lambda prefix (#16829)
- Fix StackOverflow when checking non-recursive bindings in module or namespace in
fscAnyCpu/fsiAnyCpu. (PR #16908) - Removes signature file adjacency check in Transparent Compiler Issue #17082 PR #17085
Added
- The stackguard depth for ILPdbWriter.unshadowScopes can be modified via the environment variable
FSHARP_ILPdb_UnshadowScopes_StackGuardDepth(PR #16583) - Parser recovers on complex primary constructor patterns, better tree representation for primary constructor patterns. (PR #16425)
- Name resolution: keep type vars in subsequent checks (PR #16456)
- Higher-order-function-based API for working with the untyped abstract syntax tree. (PR #16462)
- PrettyNaming: make
DoesIdentifierNeedBacktickspublic (PR #16613) - Add switch to generate types and members with IL visibility that accurately represents their F# visibility. (PR #15484
- Allow returning bool instead of unit option for partial active patterns. (Language suggestion #1041, PR #16473)
- Symbols: Add GenericArguments to FSharpEntity (PR #16470)
- Parser: more 'as' pattern recovery (PR #16837)
- Add extended data for
DefinitionsInSigAndImplNotCompatibleAbbreviationsDiffer(FS0318). (PR #16811)) - Checker/patterns: recover on unresolved long identifiers (PR #16842)
- SynExprSequentialTrivia (Issue #16914, PR #16981)
Changed
- Autogenerated .Is* members for unions skipped for single-case unions. (PR 16571)
implicitCtorSynPatsinSynTypeDefnSimpleRepr.Generalis nowSynPat optioninstead ofSynSimplePats option. (PR #16425)SyntaxVisitorBase<'T>.VisitSimplePatsnow takesSynPatinstead ofSynSimplePat list. (PR #16425)- Reduce allocations in compiler checking via
ValueOptionusage (PR #16323, PR #16567) - Reverted #16348
ThreadStaticCancellationTokenchanges to improve test stability and prevent potential unwanted cancellations. (PR #16536) - Refactored parenthesization API. ([PR #16461])(https://github.com/dotnet/fsharp/pull/16461))
- Optimize some interpolated strings by lowering to string concatenation. (PR #16556)
- Speed up
for x in xs -> …in list & array comprehensions in certain scenarios. (PR #16948) - Integral range optimizations. (PR #16650, PR #16832, PR #16947)
43.8.202 - Unreleased
Fixed
nameof Module expressions and patterns are processed to link files in --test:GraphBasedChecking. (PR #16570, PR #16747)
43.8.200 - 2024-02-13
Fixed
- Correctly handle assembly imports with public key token of 0 length. (Issue #16359, PR #16363)
- Range of SynField (PR #16357)
- Limit a type to 65K methods, introduce a compile-time error if any class has over approx 64K methods in generated IL. (Issue #16398, #PR 16427)
Added
- Raise a new error when interfaces with auto properties are implemented on constructor-less types. (PR #16352)
- Allow usage of
[<TailCall>]with olderFSharp.Corepackage versions. (PR #16373) - Parser recovers on unfinished
aspatterns. (PR #16404) - Allow type-checking of unfinished object expressions. (PR #16413)
- Parser recovers on unfinished enum case declarations. (PR #16401)
- Parser recovers on unfinished record declarations. (PR #16357)
MutableKeywordto SynFieldTrivia (PR #16357)- Added support for a new parameterless constructor for
CustomOperationAttribute, which, when applied, will use method name as keyword for custom operation in computation expression builder. (PR #16475, part of implementation for fslang-suggestions/1250) - Compiler service API for getting ranges of unnecessary parentheses. (PR #16079 et seq.)
Changed
- Speed up unused opens handling for empty results. (PR #16502)
43.8.100 - 2023-11-14
Fixed
- Include the
get,setkeywords in the range ofSynMemberDefn.AutoProperty. (PR #15835)
43.11.100 - Unreleased
Fixed
- Fix
YieldFromFinal/ReturnFromFinalbeing incorrectly called in non-tail positions (for,use,use!,try/withhandler). (Issue #19402, PR #19403) - Fixed how the source ranges of warn directives are reported (as trivia) in the parser output (by not reporting leading spaces). (Issue #19405, PR #19408)
Added
- Added warning FS3884 when a function or delegate value is used as an interpolated string argument. (PR #19289)
- Add
#version;;directive to F# Interactive to display version and environment information. (Issue #13307, PR #19332)
43.10.300 - Unreleased
Fixed
- Fix strong name signature size to align with Roslyn for public signing (Issue #17451, PR #19242)
- Nullness: Fix UoM ToString returning
string | nullfor value types. (Issue #17539, PR #19262) - Nullness: Fix pipe operator nullness warning location to point at nullable argument. (Issue #18013, PR #19262)
- Nullness: Fix false positive warning when passing non-null AllowNullLiteral constructor result. (Issue #18021, PR #19262)
- Nullness: Allow
not nullconstraint on type extensions. (Issue #18334, PR #19262) - Nullness: Simplify tuple null elimination to prevent over-inference of non-null. (Issue #19042, PR #19262)
- Fixed Find All References not correctly finding active pattern cases in signature files. (Issue #19173, Issue #14969, PR #19252)
- Fixed Rename not correctly handling operators containing
.(e.g.,-.-). (Issue #17221, Issue #14057, PR #19252) - Fixed Find All References not correctly applying
#linedirective remapping. (Issue #9928, PR #19252) - Fixed
SynPat.Orpattern variables (non-left-most) incorrectly classified as bindings instead of uses. (Issue #5546, PR #19252) - Fixed Find All References not finding discriminated union types defined inside modules. (Issue #5545, PR #19252)
- Fixed synthetic event handler values appearing in Find All References results. (Issue #4136, PR #19252)
- Fixed Find All References not finding all usages of C# extension methods. (Issue #16993, PR #19252)
- Fixed Find All References on discriminated union cases not including case tester properties (e.g.,
.IsCase). (Issue #16621, PR #19252) - Fixed Find All References on record types not including copy-and-update expressions. (Issue #15290, PR #19252)
- Fixed Find All References on constructor definitions not finding all constructor usages. (Issue #14902, PR #19252)
- Fixed Find All References producing corrupted duplicate constructor symbol references with shifted ranges, and removed duplicate attribute symbols from type definition error-reporting. (Issue #19336, PR #19358)
- Fixed semantic classification regression where copy-and-update record fields were colored as type names, and union case tester dot was colored as union case. (PR #19311)
- Fix false FS1182 (unused variable) warning for query expression variables used in where, let, join, and select clauses. (Issue #422)
- Fix FS0229 B-stream misalignment when reading metadata from assemblies compiled with LangVersion < 9.0, introduced by #17706. (PR #19260)
- Fix FS3356 false positive for instance extension members with same name on different types, introduced by #18821. (PR #19260)
- Fix graph-based type checking incorrectly resolving dependencies when the same module name is defined across multiple files in the same namespace. (PR #19280)
- F# Scripts: Fix default reference paths resolving when an SDK directory is specified. (PR #19270)
- Improve static compilation of state machines. (PR #19297)
- Fix a bug where
let!anduse!were incorrectly allowed outside computation expressions. PR #19347
Added
FSharpType: add ImportILType (PR #19300)
Type checker: recover on argument/overload checking (PR #19314)
FSharpType: add more predefined type checks (PR #19325)
Introduced a separate
NotifyRelatedSymbolUsesink and[<Flags>] RelatedSymbolUseKindenum for related symbol lookups (union case testers, copy-and-update record types).GetUsesOfSymbolInFileandGetSemanticClassificationaccept an optionalrelatedSymbolKindsparameter to opt in. (PR #19361)Support
#exit;;as alias to#quit;;in F# Interactive. (PR #19329)FCS: capture additional types during analysis (PR #19305)
Changed
- Centralized product TFM (Target Framework Moniker) into MSBuild props file
eng/TargetFrameworks.props. Changing the target framework now only requires editing one file, and it integrates with MSBuild's--getPropertyfor scripts. - Overload resolution results are now cached, providing compile time improvements for code with repeated method calls. (Issue #18807)
- Symbols: safer qualified name getting (PR #19298)
Breaking Changes
43.10.200 - Unreleased
Fixed
- Fixed SRTP resolution regression causing FS0030 value restriction errors with FSharpPlus curryN-style patterns in .NET 9 SDK. (PR #19218)
- Fix FS3261 nullness warning when implementing INotifyPropertyChanged or ICommand CLIEvent properties. (Issue #18361, Issue #18349, PR #19221)
- Type relations cache: optimize key generation (Issue #19116) (PR #19120)
- Fixed QuickParse to correctly handle optional parameter syntax with
?prefix, resolving syntax highlighting issues. (Issue #11008753) (PR #19162) - Fix
--preferreduilangswitch leaking intofsi.CommandLineArgswhen positioned after script file (PR #19151) - Optimize empty string pattern matching to use null-safe .Length check instead of string equality comparison for better performance. (PR #19189)
- Fixed runtime crash when using interfaces with unimplemented static abstract members as constrained type arguments. (Issue #19184, PR #19185)
- Fix delegates with
[<OptionalArgument>]and caller info attributes failing to compile. (Issue #18868, PR #19069) - Type checker: mark generated event tree nodes as synthetic (PR #19213)
- Nullness: Fix nullness refinement in match expressions to correctly narrow type to non-null after matching null case. (Issue #18488, PR #18852)
- Scripts: Fix resolving the dotnet host path when an SDK directory is specified. (PR #18960)
- Fix excessive StackGuard thread jumping (PR #18971)
- Adjust conservative method-overload duplicate detection rules for nativeptr types (PR #18911)
- Checking: Fix checking nested fields for records and anonymous (PR #18964)
- Fix name is bound multiple times is not reported in 'as' pattern (PR #18984)
- Syntax Tree: fix return type info for let! / and! / use! (PR #19004)
- Fix: warn FS0049 on upper union case label. (PR #19003)
- Type relations cache: handle potentially "infinite" types (PR #19010)
- Disallow recursive structs with lifted type parameters (Issue #18993, PR #19031)
- Fix units-of-measure changes not invalidating incremental builds. (Issue #19049, PR #19050)
- Fix race in graph checking of type extensions. (PR #19062)
- Type relations cache: handle unsolved type variables (Issue #19037) (PR #19040)
- Fix insertion context for modules with multiline attributes. (Issue #18671, PR #19066)
- Fix
--typecheck-onlyfor scripts stopping after processing#load-ed script (PR #19048) - Fix object expressions in struct types generating invalid IL with byref fields causing TypeLoadException at runtime. (Issue #19068, PR #19070)
- Fix duplicate .cctor issue for discriminated unions with generic statics (Issue #18767, PR #18801)
- Fix early/unconditional execution of PackageFSharpDesignTimeTools target. (Issue #18924, Issue #12320, PR #18929)
Added
- Detect and error on static extension members extending types with the same simple name but different namespaces in the same module. (PR #18821)
- FSharpDiagnostic: add default severity (#19152)
- Add warning FS3879 for XML documentation comments not positioned as first non-whitespace on line. (PR #18891)
- FsiEvaluationSession.ParseAndCheckInteraction: add keepAssemblyContents optional parameter (#19155)
- Add FSharpCodeCompletionOptions (PR #19030)
- Type checker: recover on checking binding parameter constraints (#19046)
- Debugger: provide breakpoint ranges for short lambdas (#19067)
- Add support for triple quoted ASCII byte string (#19182)
Changed
- Parallel compilation features: ref resolution, graph based checking, ILXGen and optimization enabled by default (PR #18998)
- Make graph based type checking and parallel optimizations deterministic (PR #19028)
- Centralize compiler's target framework moniker logic into a single source of truth. (PR #19251)
Breaking Changes
SynExpr.LetOrUseholdsSynLetOrUse. (PR #19090)SynExprLetOrUseTriviais nowSynLetOrUseTrivia. (PR #19090)SynMemberDefn.LetBindingshas trivia. (PR #19090)SynModuleDecl.Lethas trivia. (PR #19090)- Removed support for
.mland.mlisource files. (PR #19143) - Removed
#lightand#indentdirectives (they are now a no-op; combined withoffthey give an error). (PR #19143) - Removed
--light,--indentation-syntax,--no-indendation-syntax,--ml-keywordsand--mlcompatibilitycompiler/fsi flags. (PR #19143) - Removed parsing support for long-deprecated ML (non-light) constructs. (PR #19143)
43.10.100 - 2025-11-11
Added
- Symbols: add Mfv.ApparentEnclosingType (PR #17494)
- Add opt-in warning attribute not valid for union case with fields PR #18532)
- Add support for
when 'T : Enumlibrary-only static optimization constraint. (PR #18546) - Add support for tail calls in computation expressions (PR #18804)
- Add
--typecheck-onlyflag support for F# Interactive (FSI) scripts to type-check without execution. (Issue #18686, PR #18687) - Diagnostics: add extended data for 'No constructors' error (PR #18863)
- FSharpType.Format: support top-level prefix generic types style. (PR #18897)
- FCS: allow getting captured types (PR #18878)
Fixed
- Fix F# compiler to prevent tail call emission when pinned locals are present (PR #18893)
- Fix SignatureHash to include constant values in hash computation (Issue #18758, PR #18771)
- Fix parsing errors using anonymous records and units of measures (PR #18543)
- Fix parsing errors using anonymous records and code quotations (PR #18603)
- Better error message for attribute targets. (PR #18641)
- Fixed: Allow
return,return!,yield,yield!type annotations without parentheses (PR #18533) - Allow
let!,use!,and!type annotations without requiring parentheses ((PR #18508 and PR #18682)) - Fix find all references for F# exceptions (PR #18565)
- Shorthand lambda: fix completion for chained calls and analysis for unfinished expression (PR #18560)
- Completion: fix previous namespace considered opened PR #18609
- Fix active pattern typechecking regression. (Issue #18638, PR #18642)
- Fix nullness warnings when casting non-nullable values to
IEquatable<T>to match C# behavior. (Issue #18759, PR #18770) - Error on invalid declarations in type definitions.(Issue #10066, PR #18813)
- Fix IsByRefLikeAttribute types being incorrectly suppressed in completion lists. Types like
Span<T>andReadOnlySpan<T>now appear correctly in IntelliSense. (PR #18784) - Fix SRTP nullness constraint resolution for types imported from older assemblies. AmbivalentToNull types now use legacy F# nullness rules instead of always satisfying
'T : nullconstraints. (Issue #18390, Issue #18344, PR #18785) - Fix Show XML doc for enum fields in external metadata (Issue #17939, PR #18800)
- Fix nullable types formatting in
FSharpType.Formatand tooltips to include parentheses. (PR #18842) - TypeMismatchDiagnosticExtendedData: fix expected and actual types calculation. (PR #18851)
- Format top-level generic types using a prefix style in inherit/interface declarations and flexible type annotations. (PR #18897)
- Parser: fix range for computed binding expressions (PR #18903)
- Tests: set test source for range debug printing (PR #18879)
- Checker: fix declaring type for abbreviated types extensions (PR #18909)
- Caches: type subsumption cache key perf regression (Issue #18925 PR #18926)
- Ensure that line directives are applied to source identifiers (issue #18908, PR #18918)
- Fix expected and actual types in ErrorFromAddingTypeEquation message and extended diagnostic data. (PR #18915)
- Editor: Fix Record fields completion in update record with partial field name. (PR #18946)
Changed
- Use
errorRinstead oferrorinCheckDeclarations.fswhen possible. (PR #18645) - Parser: Capture named fields block separators. (PR #18857)
- Type checker: use inner expr range in upcast constraints errors (PR #18850)
- Import
IEnumerableasseq. (PR #18865)
Breaking Changes
- Scoped Nowarn: Add the #warnon compiler directive (Language suggestion #278, RFC FS-1146 PR, PR #18049 and PR #18637)
- Simplify creation of
FSharpDiagnostics. In a few cases, errors without ranges were assigned to the currently checked file, while in other cases they carried an empty range. The latter is now true in all cases. In a few cases, ranges at eof were corrected, while in others they were not. They are now always left uncorrected. This is a prerequisit for #18553. (PR #18610). SynExprRecordFieldnow includes arangefield (PR #18617)- Mark
Range.Zeroas obsolete in favor ofRange.range0(PR #18664) - Use
Synbindingto modeland!(PR #18805) - Redesign #line processing. The original positions (unaffected by #line directives) are now kept in the AST, and
__LINE__and__SOURCE_LINE__show the original line numbers / file names. However, all diagnostics and debug information stays the same (shows the position transformed by the #line directives). (Issue #18553, PR #18699, PR 18828, PR 18829) - Unify
let,let!,useanduse!AST representation. (PR #18825)[^1]
Migration Guidance for AST Users
Note: The unified AST introduces two new boolean fields:
isFromSource: Indicates if the binding comes from user-written code (true) or is compiler-generated (false)isBang: Distinguishes computation expression bindings (let!/use!=true) from regular bindings (let/use=false)
1. Pattern Matching Updates
Before:
match expr with
| SynExpr.LetOrUse(isRec, isUse, bindings, body, range, trivia) ->
// Handle regular let/use
| SynExpr.LetOrUseBang(spBind, isUse, isFromSource, pat, rhs, andBangs, body, range, trivia) ->
// Handle let!/use!
After:
match expr with
| SynExpr.LetOrUse(isRec, isUse, isFromSource, isBang, bindings, body, range, trivia) ->
if isBang then
// This is a let!/use! expression
match bindings with
| firstBinding :: andBangs ->
match firstBinding with
| SynBinding(headPat = pat; expr = rhs) ->
// pat and rhs extracted from first binding
// andBangs contains the and! bindings
| [] -> // error case
else
// This is a regular let/use expression
2. Construction Updates
Before:
// Creating a let! expression
SynExpr.LetOrUseBang(
bindDebugPoint,
false, // isUse
true, // isFromSource
pat,
rhsExpr,
andBangs,
bodyExpr,
range,
trivia
)
After:
// Creating a let! expression
let firstBinding = SynBinding(
accessibility = None,
kind = SynBindingKind.Normal,
isInline = false,
isMutable = false,
attributes = [],
xmlDoc = PreXmlDoc.Empty,
valData = SynInfo.emptySynValData,
headPat = pat, // Pattern moved here
returnInfo = None,
expr = rhsExpr, // RHS moved here
range = range,
debugPoint = bindDebugPoint, // Debug point moved here
trivia = bindingTrivia
)
SynExpr.LetOrUse(
false, // isRecursive
false, // isUse
true, // isFromSource
true, // isBang (indicates let!)
firstBinding :: andBangs, // All bindings in single list
bodyExpr,
range,
trivia
)
3. Common Migration Patterns
Checking for computation expressions:
// Before
match expr with
| SynExpr.LetOrUseBang _ -> true
| _ -> false
// After
match expr with
| SynExpr.LetOrUse(isBang = true) -> true
| _ -> false
Extracting pattern and expression from let!:
// Before
| SynExpr.LetOrUseBang(_, _, _, pat, rhs, _, _, _, _) ->
processBinding pat rhs
// After
| SynExpr.LetOrUse(isBang = true; bindings = binding :: _) ->
match binding with
| SynBinding(headPat = pat; expr = rhs) ->
processBinding pat rhs
| _ -> // error
Processing and! bindings:
// Before
| SynExpr.LetOrUseBang(_, _, _, firstPat, firstRhs, andBangs, _, _, _) ->
processFirst firstPat firstRhs
for andBang in andBangs do
processAndBang andBang
// After
| SynExpr.LetOrUse(isBang = true; bindings = bindings) ->
match bindings with
| first :: rest ->
processBinding first
for andBang in rest do
processAndBang andBang
| [] -> // error
[^1]: See Migration Guidance for AST Users section for detailed information on how to update your code to work with the unified AST representation.
<summary>Performs operations on <see cref="T:System.String" /> instances that contain file or directory path information. These operations are performed in a cross-platform manner.</summary>
Path.Combine([<System.ParamArray>] paths: string array) : string
Path.Combine(path1: string, path2: string) : string
Path.Combine(path1: string, path2: string, path3: string) : string
Path.Combine(path1: string, path2: string, path3: string, path4: string) : string
(extension) System.Xml.Linq.XNode.XPathSelectElement(expression: string, resolver: System.Xml.IXmlNamespaceResolver) : System.Xml.Linq.XElement
Find all published versions of a package on NuGet
Process all MarkDown files from the given release folder
Path.GetFileNameWithoutExtension(path: System.ReadOnlySpan<char>) : System.ReadOnlySpan<char>
(+0 other overloads)
System.String.Split([<System.ParamArray>] separator: char array) : string array
(+0 other overloads)
System.String.Split(separator: string array, options: System.StringSplitOptions) : string array
(+0 other overloads)
System.String.Split(separator: string, ?options: System.StringSplitOptions) : string array
(+0 other overloads)
System.String.Split(separator: char array, options: System.StringSplitOptions) : string array
(+0 other overloads)
System.String.Split(separator: char array, count: int) : string array
(+0 other overloads)
System.String.Split(separator: char, ?options: System.StringSplitOptions) : string array
(+0 other overloads)
System.String.Split(separator: string array, count: int, options: System.StringSplitOptions) : string array
(+0 other overloads)
System.String.Split(separator: string, count: int, ?options: System.StringSplitOptions) : string array
(+0 other overloads)
System.String.Split(separator: char array, count: int, options: System.StringSplitOptions) : string array
(+0 other overloads)
Try and find the publish date on NuGet
type String = interface IEnumerable<char> interface IEnumerable interface ICloneable interface IComparable interface IComparable<string> interface IConvertible interface IEquatable<string> interface IParsable<string> interface ISpanParsable<string> new: value: nativeptr<char> -> unit + 8 overloads ...
<summary>Represents text as a sequence of UTF-16 code units.</summary>
--------------------
System.String(value: nativeptr<char>) : System.String
System.String(value: char array) : System.String
System.String(value: System.ReadOnlySpan<char>) : System.String
System.String(value: nativeptr<sbyte>) : System.String
System.String(c: char, count: int) : System.String
System.String(value: nativeptr<char>, startIndex: int, length: int) : System.String
System.String(value: char array, startIndex: int, length: int) : System.String
System.String(value: nativeptr<sbyte>, startIndex: int, length: int) : System.String
System.String(value: nativeptr<sbyte>, startIndex: int, length: int, enc: System.Text.Encoding) : System.String
<summary>Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of <see cref="T:System.IO.FileStream" /> objects.</summary>
File.ReadAllText(path: string, encoding: System.Text.Encoding) : string
<summary> Provides methods for parsing a Markdown string to a syntax tree and converting it to other formats. </summary>
Markdown.ToHtml(document: Syntax.MarkdownDocument, writer: TextWriter, ?pipeline: MarkdownPipeline) : unit
Markdown.ToHtml(markdown: string, ?pipeline: MarkdownPipeline, ?context: MarkdownParserContext) : string
Markdown.ToHtml(markdown: string, writer: TextWriter, ?pipeline: MarkdownPipeline, ?context: MarkdownParserContext) : Syntax.MarkdownDocument
In order for the heading to appear in the page content menu in fsdocs,
they need to follow a specific HTML structure.
F# Compiler Guide