-
Notifications
You must be signed in to change notification settings - Fork 324
Releases: fable-compiler/Fable
Releases · fable-compiler/Fable
5.2.0
🚀 Features
🐞 Bug Fixes
- (beam) Collapse array-literal process-dict ref round-trips in FFI/Emit calls (#4626) (234ee08)
- (beam) Make Emit $N substitution a single left-to-right pass (#4631) (48af8db)
- (js/ts) Throw an error when trying to set non-property memeber inside of
jsOptions(#4624) (2d9673f) - (js/ts) Reject JS-permissive date strings that .NET TryParse rejects (#4588) (09003de)
- (js/ts) Make Exception.ToString() return the message instead of "Exception" (#4635) (4c36f76)
- (python) Avoid union case field name collision with Union.name (#4647) (ff5df24)
- (python) Make [] union static members work (#4634) (#4636) (15eb83e)
Assets 2
3 people reacted
5.1.0
🚀 Features
- (js/ts/python) Add missing standard DateTime format specifiers for JS/TS and Python (#4547) (90f5eb7)
- (js/ts/python) Add missing StringBuilder.Append overloads for numeric types (#4568) (b402c30)
🐞 Bug Fixes
- Check MSBuild exit code instead of stderr for project cracker failure detection (#4564) (914a616)
- [JS/TS] Fix DatetimeOffset.ToString("s") (#4596) (3ce6f3f)
- [Rust] Update hashing and datetime tests (#4613) (9d39037)
- (all) Duplicate LetRec bindings during inline expansion (#4592) (62612a5)
- (all) Forward --pathmap: option to FCS so CallerFilePath respects (PathMap) (#4585) (764c383)
- (all) Fix super call in multi-level generic class hierarchy using wrong mangled name (#4414) (db1d4d2)
- (beam) Handle string binaries in Seq enumerator (#4591) (6e78058)
- (js/ts) Fix JSX props with long string values causing compile error (fixes #3839) (#4545) (d828a46)
- (js/ts) Fix datetime custom format off by one year (#4558) (83bdbb5)
- (js/ts) Hex format specifier uses no padding unless precision is specified (#4603) (ba9857a)
- (js/ts) Fix Decimal.GetBits returning incorrect mantissa after round arithmetic result (#4561) (345bcd4)
- (js/ts) Fix G/g format specifier corrupting exponential notation when trimming trailing zeros (#4587) (773c098)
- (js/ts) Add support for
matchclauses inJSX.create(#4620) (616edca) - (js/ts) Don't spread last arg in String.Concat call (#4621) (3de580e)
- (js/ts) Inline AttachMembers members at call sites (#4622) (63bcd3d)
- (js/ts/python) Fix FSharpOption not recognized as union type in F# reflection (#4529) (d78a37d)
- (python) Fix regex lookbehind patterns being incorrectly converted (#4560) (4ce5cd7)
- (python) Avoid duplicate captured argument in hoisted guards (#4610) (#4611) (90aec48)
- (ts) Enforce browser-only compatibility in fable-library-ts tsconfig (#4563) (10c81c1)
Assets 2
12 people reacted
5.0.0
Fixed
- [Python] Fix derived classes of generic abstract classes not being instantiable due to mismatched mangled method names between abstract stubs and overrides (by @dbrattli)
- [Dart/Rust] Fix
ResizeArrayreference equality (by @ncave) - [JS/TS/Python/Beam] Fix
ResizeArray(System.Collections.Generic.List) equality to use reference equality instead of structural equality (fixes #3718) - [Beam] Fix
List.Conscall replacement and test (by @ncave) - [Beam/Dart/Python/TypeScript] Fix
Array.Equalsto use reference equality instead of structural equality (by @ncave) - [Dart/Python/TypeScript/Rust] Fix
Seq.foldBack2for sequences with different lengths (by @ncave) - [All] Fix missing
HashSetimplementations and tests (by @ncave) - [Rust] Fix
Array/HashMap/HashSetinternal representation (by @ncave) - [Rust] Fix F# classes reference equality semantics (by @ncave)
- [Python] Fix missing
Arraymodule implementations and tests (by @ncave) - [Python] Fix object expressions implementing interfaces with
[<CLIEvent>]members no longer produce unimplementable abstract Protocol members (fixes #3039) - [Python] Fix
DateTime.TryParseincorrectly assigningDateTimeKind.Localto naive datetime strings (should beDateTimeKind.Unspecified) (fixes #3654) - [JS/TS] Fix
String.ContainsignoringStringComparisonargument (second argument was silently discarded) - [Python] Fix
String.ContainsignoringStringComparisonargument (second argument was silently discarded) - [All] Fix
--noRestorenot skipping MSBuildCracker restores (by @ randrag)
Assets 2
13 people reacted
5.0.0-rc.7
5.0.0-rc.7
Pre-release
Pre-release
Added
- [Python/Beam] Add F# quotation support — construction, pattern matching, and evaluation via
LeafExpressionConverter.EvaluateQuotation(by @dbrattli) - [JS/TS] Add F# quotation support — construction, pattern matching, and evaluation (by @OnurGumus)
- [All] Add support for
Guid.CreateVersion7()andGuid.CreateVersion7(DateTimeOffset)(by @OnurGumus) - [All] Add missing
Array,List, andSeqrandom choice/shuffle/sample members and tests (by @ncave) - [Dart/Rust] Add missing
System.Randomimplementations and tests (by @ncave) - [Beam] Implement missing DateTimeOffset members, add DateOnly and TimeOnly support (by @dbrattli)
Fixed
- [All] Fix unnecessary object allocations during AST traversal when visiting
Importexpressions (by Repo Assist) - [Beam] Fix
System.Random.Next(0)implementation (by @ncave) - [Python] Fix
System.Randomseeded implementation (by @ncave) - [Beam] Fix
System.Randomseeded implementation to use per-instance state (by @dbrattli) - [Dart] Fix
Array.compareWithcomparing lengths before elements, producing wrong results for arrays with common prefixes (fixes #2961) - [Python] Fix unsafe option unwrapping in
DateTimeOffset.get_Offsetand regex replacements (by @dbrattli) - [All] Replace unsafe option
.Valueunwrapping with safe alternatives in Python/Replacements.fs and Rust/Fable2Rust.fs (code scanning alerts IONIDE-006) - [All] Add
[<return: Struct>]to partial active patterns in Dart and Rust targets to reduce allocations (code scanning alerts IONIDE-009) - [JS/TS] Fix
Guidto use cryptographically strong random values (by @ncave) - [Python] Fix
DateTimeOffsetmillisecond constructor and property (by @ncave) - [Python] Implement missing
DateTimeOffsetmembers and fix equality/comparison to use UTC-normalized instants (by @dbrattli) - [Python] Add
DateOnlyandTimeOnlysupport (by @dbrattli) - [Python] Fix
String.IndexOf/LastIndexOfwithStringComparisonargument emitting it as a start-index instead of a compile error (by @repo-assist) - [Beam] Fix
String.IndexOf/LastIndexOfwithStringComparisonargument incorrectly treating the enum value as a start index - [JS/TS/Python] Fix
Async.StartChildwith timeout always timing out even when the computation finishes before the deadline (fixes #4481) (by @MangelMaxime)
Assets 2
2 people reacted
5.0.0-rc.6
5.0.0-rc.6
Pre-release
Pre-release
Fixed
- [Dart] Enable explicit variable typing for more data types (by @ncave)
- [Dart] Fix tests for
round,sign,truncate,log,log2,log10,pow,DivRem,Min,Max,Clamp,MinMagnitude,MaxMagnitude,cosh,sinh,tanh, and floatParse(by @ncave) - [Python] Add
Math.DivRemsupport for int, int64, and bigint (by @dbrattli) - [Python] Fix modulo with negative numbers using Python floored semantics instead of .NET truncated semantics for bigint (fixes #4462) (by @dbrattli)
- [Beam] Fix
System.String.Concatwith 4+ arguments not being supported (by @dbrattli) - [TS/Python] Fix thisArg type for overloads in structs (#4453) (by @ncave)
- [TS/Python] Fix invalid
thisargument type in structs (#4453) (by @ncave) - [JS/TS] Fix
Nformat specifier (ToString("N0"),String.Format("{0:N0}", ...)) producing a trailing dot when precision is 0 (fix #2582) (by @MangelMaxime) - [JS/TS] Fix
C0andP0format specifiers producing trailing dot (e.g.,"¤1,000."→"¤1,000") (by @MangelMaxime) - [All] Fix captured side-effect-free values (e.g. empty ResizeArray) being incorrectly inlined into object expression getters in release mode, causing a new instance to be created on each getter call (fixes #3779) (by @MangelMaxime)
- [Python] Fix missing
awaiton else branch of ternary expressions in async closures (by @dbrattli) - [Beam] Fix
|> ignoreon cross-module Emit calls generating variable bindings that shadow Emit case-clause variables (by @dbrattli) - [Beam] Fix
containsIdentRefnot checkingCallThisArg (by @dbrattli) - [All] Fix CLI color not resetting after error messages (fixes #3755) (by @MangelMaxime)
- [JS/TS]
StringEnumnow respectCompiledValueandCompiledName(by @shayanhabibi) - [JS/TS] Fix invalid syntax emitted when negating negative literals (fix #4251) (by @MangelMaxime)
- [Rust] Fix negative counting in CallInfo.GenericArgs (by @ncave)
- [Rust] Fix inline bindings and captured idents tracking (by @ncave)
- [Rust] Fix
return!in async computation expressions so inner async workflows are returned and awaited correctly (by @mizzle-mo) - [JS/TS] Improve
Regex.EscapeandRegex.Unescapehandling (by @MangelMaxime) - [All] Fix allow plugins to target .NET6 target framework (by @MangelMaxime)
- [Python] Fix function references passed as arguments inside tail-call optimised functions gaining unnecessary default parameters for outer TCO variables they don't reference (fix #3877)
- [TS] Fix abstract instance methods not emitted in TypeScript when class uses
[<AttachMembers>](fixes #3506) (by @MangelMaxime) - [JS/TS] Fix
Unchecked.defaultof<'T>for struct types with fields returningundefinedinstead of zero-initialized values (by @MangelMaxime) - [JS/TS] Fixed quotation for union string cases (by @MangelMaxime)
- [Python] Fix
Unchecked.defaultof<'T>for struct types with fields returning incorrect values instead of zero-initialized instances (by @MangelMaxime) - [Python] Fix
Unchecked.defaultof<char>returning""(empty string) instead of"\u0000"(null character) (by @MangelMaxime) - [Python] Improve
Unchecked.defaultof<_>for declared entities (by @MangelMaxime)
Contributors
ncave, dbrattli, and 3 other contributors
Assets 2
3 people reacted
5.0.0-rc.5
5.0.0-rc.5
Pre-release
Pre-release
Added
[All] Add support for [<InlineIfLambda>] (by @MangelMaxime)
Assets 2
1 person reacted
5.0.0-rc.4
5.0.0-rc.4
Pre-release
Pre-release
Fixed
- [JS/TS] Fix
Array.zeroCreateproducingnullfor user-defined struct (value type) elements instead of a default-initialized instance (by @MangelMaxime) - [All] Fix interpolated string holes missing format specifiers in State.fs and Python/Replacements.fs (code scanning alerts 1144, 1145, 1512)
- [Rust] Replace unsafe
.IsSome && .Valueoption pattern withOption.existsin Fable2Rust.fs (code scanning alert 1125) - [JS/TS] Fix
Unchecked.defaultof<char>being emitted asnullinstead of'0円'(by @MangelMaxime) - [JS/TS] Fix
static val mutablefields declared with[<DefaultValue>]not being zero-initialized (fix #2739) (by @MangelMaxime) - [JS/TS/Python] Fix record/struct types augmented with
static letorstatic member valgenerating extra constructor parameters for each static field, causing constructor arguments to be assigned to wrong slots (by @MangelMaxime) - [TS] Annotate
System.Collections.Generic.IList<T>asMutableArray<T>(by @MangelMaxime) - [JS/TS] Fix
ResizeArrayindex getter/setter not throwingIndexOutOfRangeExceptionwhen index is out of bounds (fix #3812) (by @MangelMaxime) - [Beam] Fix unused term warning in try/catch when exception variable is not referenced (by @dbrattli)
- [Beam] Fix "no effect" warning for pure BIF calls (
self/0,node/0) in non-final block positions (by @dbrattli) - [Beam] Fix
reraise()generating unboundMatchValuevariable — use raw Erlang reason variable for re-throw (by @dbrattli) - [Beam] Fix
Erlang.receive<'T>()resolving to timeout overload due to F# unit argument (by @dbrattli) - [JS/TS] Generate comments for members in class decorated with
[<AttachMembers>](by @MangelMaxime) - [Beam] Fix
[<ImportAll>]generating invalidmodule:*()Erlang code when binding is used as a value (by @dbrattli) - [Beam] Fix string slicing and
Substringwith compound expressions producing wrongbinary:partlength due to missing parentheses in emitted Erlang (by @dbrattli) - [Beam] Fix non-ASCII characters in string literals being truncated to single bytes — emit
<<"..."/utf8>>instead of<<"...">>(by @dbrattli) - [Beam] Fix
Emitexpressions withcaseleaking variables into surrounding scope — auto-wrap in IIFE for scope isolation (by @dbrattli)
Assets 2
3 people reacted
5.0.0-rc.3
5.0.0-rc.3
Pre-release
Pre-release
Added
- [Beam] Auto-generate rebar3 scaffold (
rebar.config,.app.src) after compilation;.erlfiles now placed insrc/subdirectories (by @dbrattli) - [Beam] Support
[<ImportAll>]+[<Erase>]interface pattern for typed FFI bindings (by @dbrattli)
Fixed
- [Beam] Fix dropped top-level side effects — multiple
ActionDeclarationmain/0functions are now merged (by @dbrattli) - [Beam] Fix
%%escape in string interpolation producing double%instead of single (by @dbrattli) - [Beam] Fix double-quoted atoms for uppercase
CompiledNameon DU cases (e.g.''EXIT''→'EXIT') (by @dbrattli) - [Beam] Fix cross-project imports producing self-recursive calls when source files share the same name (by @dbrattli)
- [Beam] Support
Type.GetGenericArgumentsandType.GetInterfacefor reflection (by @dbrattli) - [TS] Correctly resolve type references for
TypeScriptTaggedUnion(by @MangelMaxime and @jrwone0) - [TS] Expose optional
stackproperty onException(by @MangelMaxime) - [Python] Fix
nonlocal/globaldeclarations generated insidematch/casebodies causingSyntaxError(by @dbrattli) - [Python] Fix exception variable captured in deferred closures causing
NameError(PEP 3110 scoping) (by @dbrattli) - [JS/TS] Support format specifiers and single hole in JSX string templates (by @MangelMaxime)
- [All] Fix generic parameter resolution in inline functions with static member constraints (by @Programmerino and @MangelMaxime)
Contributors
dbrattli, MangelMaxime, and 2 other contributors
Assets 2
3 people reacted
5.0.0-rc.2
5.0.0-rc.2
Pre-release
Pre-release
Added
- [Beam] Add arithmetic tests and support for DivRem, MinMagnitude, MaxMagnitude, Decimal rounding, BigInt.Log (by @dbrattli)
- [Beam] Add
fable_random.erland fix Random seeded/NextBytes tests (by @dbrattli)
Fixed
- [Python] Fix
__hash__to return nativeintinstead ofint32for Python 3.14 compatibility (by @dbrattli) - [Python] Fix PyPI publish workflow version pattern to support
rctags (by @dbrattli) - [Beam] Bundle
fable-library-beamin NuGet package sodotnet fable --lang beamworks (by @dbrattli) - [Beam] Fix optional arguments by unwrapping at call sites and padding missing trailing args (by @dbrattli)
- [Beam] Fix generic constraint interface dispatch (by @dbrattli)
- [Beam] Fix class constructor field invokes and explicit val fields (by @dbrattli)
- [Beam] Fix mutable record field mutation (by @dbrattli)
- [JS/TS] Allows compiling
fable-library-tsfor Browser environment (by @goswinr)
Assets 2
1 person reacted
5.0.0-rc.1
5.0.0-rc.1
Pre-release
Pre-release
Added
- [Beam] Add Erlang/BEAM target (
--lang beam). Compiles F# to.erlsource files. 2086 tests passing. (by @dbrattli)
Fixed
- [Python] Fix type var scoping for PEP 695 annotations: emit
Anyfor type vars outside function scope and prevent non-repeated generic params from leaking intoScopedTypeParams(by @dbrattli) - [JS/TS] Ignore extra args in FSharpType functions (by @olivercoad)
Assets 2
3 people reacted