FSharp.Compiler.Service
43.9.300 - 2025-05-13
Fixed
- Fix missing TailCall warning in TOp.IntegerForLoop (PR #18399)
- Fix classification of
nameof
innameof<'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.token
from 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
obj
to genericT
no longer requiresnot null
constraint 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
null
highlighting 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#
Experimental
attribute. (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
null
in 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
Obsolete
attribute checking to account forDiagnosticId
andUrlFormat
properties. (PR #18224) - Remove
Cancellable.UsingToken
from tests (PR #18276) - Added nullability annotations to
.Using
builder method forasync
,task
and compiler-internal builders (PR #18292) - Warn when
unit
is 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
frameworkTcImportsCache
mutations 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
when
clauses oftry-with
inseq
expressions (PR #17990) - Fix locals allocating for the special
copyOfStruct
defensive copy (PR #18025) - Fix lowering of computed array expressions when the expression consists of a simple mapping from a
uint64
orunativeint
array. 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 --help
print a link to the documentation website. (PR #18006) - Deprecate places where
seq
can 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
use
error reporting. (PR #17811) - Better ranges for
inherit
error reporting. (PR #17879) - Better ranges for
inherit
struct
error reporting. (PR #17886) - Warn on uppercase identifiers in patterns. (PR #15816)
- Better ranges for
inherit
objects 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
StructAttribute
will 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
frameworkTcImportsCache
mutations 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
when
clauses oftry-with
inseq
expressions (PR #17990) - Fix locals allocating for the special
copyOfStruct
defensive copy (PR #18025) - Fix lowering of computed array expressions when the expression consists of a simple mapping from a
uint64
orunativeint
array. 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
Obsolete
attribute warning/error not taken into account when used with a unit of measure PR #18182
Added
- Let
dotnet fsi --help
print a link to the documentation website. (PR #18006) - Deprecate places where
seq
can 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
use
error reporting. (PR #17811) - Better ranges for
inherit
error reporting. (PR #17879) - Better ranges for
inherit
struct
error reporting. (PR #17886) - Warn on uppercase identifiers in patterns. (PR #15816)
- Better ranges for
inherit
objects 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
StructAttribute
will now produce a warning (part of Language suggestion #1136, PR #18098) - The
baseType
field inSynMemberDefn.Inherit
has 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
function
implicit 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
global
namespace 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 type
used 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 struct
in 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
AttributeTargets
on 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
AttributeTargets
on 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
Equals
overload 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
ValueOption
usage (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
ILTypeDef
public API, improveExtensionAttribute
presence 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 Module
expressions 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
DoesIdentifierNeedBackticks
public (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)
implicitCtorSynPats
inSynTypeDefnSimpleRepr.General
is nowSynPat option
instead ofSynSimplePats option
. (PR #16425)SyntaxVisitorBase<'T>.VisitSimplePats
now takesSynPat
instead ofSynSimplePat list
. (PR #16425)- Reduce allocations in compiler checking via
ValueOption
usage (PR #16323, PR #16567) - Reverted #16348
ThreadStatic
CancellationToken
changes 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.Core
package versions. (PR #16373) - Parser recovers on unfinished
as
patterns. (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)
MutableKeyword
to 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,set
keywords in the range ofSynMemberDefn.AutoProperty
. (PR #15835)
43.10.100 - Unreleased
Added
- Add opt-in warning attribute not valid for union case with fields PR #18532)
- Add support for
when 'T : Enum
library-only static optimization constraint. (PR #18546) - Add support for tail calls in computation expressions (PR #18804)
- Add
--typecheck-only
flag support for F# Interactive (FSI) scripts to type-check without execution. (Issue #18686) - Diagnostics: add extended data for 'No constructors' error (PR #18863)
Fixed
- Fix SignatureHash to include constant values in hash computation (Issue #18758)
- 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) - 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. - Fix SRTP nullness constraint resolution for types imported from older assemblies. AmbivalentToNull types now use legacy F# nullness rules instead of always satisfying
'T : null
constraints. (Issue #18390, Issue #18344) - Fix Show XML doc for enum fields in external metadata (Issue #17939, PR #18800)
- Fix nullable types formatting in
FSharpType.Format
and tooltips to include parentheses. (PR #18842) - TypeMismatchDiagnosticExtendedData: fix expected and actual types calculation. (Issue )
Changed
- Use
errorR
instead oferror
inCheckDeclarations.fs
when possible. (PR #18645) - Parser: Capture named fields block separators. (PR #18857)
- Type checker: use inner expr range in upcast constraints errors (PR #18850)
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). SynExprRecordField
now includes arange
field (PR #18617)- Mark
Range.Zero
as obsolete in favor ofRange.range0
(PR #18664) - Use
Synbinding
to 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!
,use
anduse!
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.
namespace System
namespace System.IO
namespace System.Xml
namespace System.Xml.XPath
namespace Markdig
module Common
val path: string
type Path =
static member ChangeExtension: path: string * extension: string -> string
static member Combine: path1: string * path2: string -> string + 4 overloads
static member EndsInDirectorySeparator: path: ReadOnlySpan<char> -> bool + 1 overload
static member Exists: path: string -> bool
static member GetDirectoryName: path: ReadOnlySpan<char> -> ReadOnlySpan<char> + 1 overload
static member GetExtension: path: ReadOnlySpan<char> -> ReadOnlySpan<char> + 1 overload
static member GetFileName: path: ReadOnlySpan<char> -> ReadOnlySpan<char> + 1 overload
static member GetFileNameWithoutExtension: path: ReadOnlySpan<char> -> ReadOnlySpan<char> + 1 overload
static member GetFullPath: path: string -> string + 1 overload
static member GetInvalidFileNameChars: unit -> char array
...
<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>
<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(paths: System.ReadOnlySpan<string>) : string
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
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
val fcsMajorVersion: string
val versionPropsDoc: System.Xml.Linq.XDocument
(extension) System.Xml.Linq.XNode.XPathSelectElement(expression: string) : System.Xml.Linq.XElement
(extension) System.Xml.Linq.XNode.XPathSelectElement(expression: string, resolver: System.Xml.IXmlNamespaceResolver) : System.Xml.Linq.XElement
(extension) System.Xml.Linq.XNode.XPathSelectElement(expression: string, resolver: System.Xml.IXmlNamespaceResolver) : System.Xml.Linq.XElement
val nugetPackage: string
val availableNuGetVersions: Set<string>
val getAvailableNuGetVersions: packageName: string -> Set<string>
Find all published versions of a package on NuGet
Find all published versions of a package on NuGet
val processFolder: path: string -> processFile: (string -> string) -> string
Process all MarkDown files from the given release folder
Process all MarkDown files from the given release folder
val file: string
val versionInFileName: string
[<return:NotNullIfNotNullAttribute ("path")>]
Path.GetFileNameWithoutExtension(path: string) : string
Path.GetFileNameWithoutExtension(path: System.ReadOnlySpan<char>) : System.ReadOnlySpan<char>
Path.GetFileNameWithoutExtension(path: System.ReadOnlySpan<char>) : System.ReadOnlySpan<char>
val versionParts: string array
System.String.Split(separator: System.ReadOnlySpan<char>) : string array
(+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)
(+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)
val version: string
val title: string
member Set.Contains: value: 'T -> bool
val tryGetReleaseDate: packageName: string -> version: string -> string option
Try and find the publish date on NuGet
Try and find the publish date on NuGet
union case Option.None: Option<'T>
union case Option.Some: Value: 'T -> Option<'T>
val d: string
val nugetBadge: string
Multiple items
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
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
field string.Empty: string
val content: string
type File =
static member AppendAllBytes: path: string * bytes: byte array -> unit + 1 overload
static member AppendAllBytesAsync: path: string * bytes: byte array * ?cancellationToken: CancellationToken -> Task + 1 overload
static member AppendAllLines: path: string * contents: IEnumerable<string> -> unit + 1 overload
static member AppendAllLinesAsync: path: string * contents: IEnumerable<string> * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
static member AppendAllText: path: string * contents: ReadOnlySpan<char> -> unit + 3 overloads
static member AppendAllTextAsync: path: string * contents: ReadOnlyMemory<char> * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 3 overloads
static member AppendText: path: string -> StreamWriter
static member Copy: sourceFileName: string * destFileName: string -> unit + 1 overload
static member Create: path: string -> FileStream + 2 overloads
static member CreateSymbolicLink: path: string * pathToTarget: string -> FileSystemInfo
...
<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>
<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) : string
File.ReadAllText(path: string, encoding: System.Text.Encoding) : string
File.ReadAllText(path: string, encoding: System.Text.Encoding) : string
type Markdown =
static member Convert: markdown: string * renderer: IMarkdownRenderer * ?pipeline: MarkdownPipeline * ?context: MarkdownParserContext -> obj
static member Normalize: markdown: string * ?options: NormalizeOptions * ?pipeline: MarkdownPipeline * ?context: MarkdownParserContext -> string + 1 overload
static member Parse: markdown: string * ?trackTrivia: bool -> MarkdownDocument + 1 overload
static member ToHtml: markdown: string * ?pipeline: MarkdownPipeline * ?context: MarkdownParserContext -> string + 3 overloads
static member ToPlainText: markdown: string * writer: TextWriter * ?pipeline: MarkdownPipeline * ?context: MarkdownParserContext -> MarkdownDocument + 1 overload
static member Version: string
<summary> Provides methods for parsing a Markdown string to a syntax tree and converting it to other formats. </summary>
<summary> Provides methods for parsing a Markdown string to a syntax tree and converting it to other formats. </summary>
Markdown.ToHtml(document: Syntax.MarkdownDocument, ?pipeline: MarkdownPipeline) : string
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
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
val transformH3: version: string -> input: string -> string
In order for the heading to appear in the page content menu in fsdocs,
they need to follow a specific HTML structure.
In order for the heading to appear in the page content menu in fsdocs,
they need to follow a specific HTML structure.