Skip to content

Releases: fable-compiler/Fable

5.0.0-rc.7

07 Apr 16:10

Choose a tag to compare

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() and Guid.CreateVersion7(DateTimeOffset) (by @OnurGumus)
  • [All] Add missing Array, List, and Seq random choice/shuffle/sample members and tests (by @ncave)
  • [Dart/Rust] Add missing System.Random implementations 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 Import expressions (by Repo Assist)
  • [Beam] Fix System.Random.Next(0) implementation (by @ncave)
  • [Python] Fix System.Random seeded implementation (by @ncave)
  • [Beam] Fix System.Random seeded implementation to use per-instance state (by @dbrattli)
  • [Dart] Fix Array.compareWith comparing lengths before elements, producing wrong results for arrays with common prefixes (fixes #2961)
  • [Python] Fix unsafe option unwrapping in DateTimeOffset.get_Offset and regex replacements (by @dbrattli)
  • [All] Replace unsafe option .Value unwrapping 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 Guid to use cryptographically strong random values (by @ncave)
  • [Python] Fix DateTimeOffset millisecond constructor and property (by @ncave)
  • [Python] Implement missing DateTimeOffset members and fix equality/comparison to use UTC-normalized instants (by @dbrattli)
  • [Python] Add DateOnly and TimeOnly support (by @dbrattli)
  • [Python] Fix String.IndexOf/LastIndexOf with StringComparison argument emitting it as a start-index instead of a compile error (by @repo-assist)
  • [Beam] Fix String.IndexOf/LastIndexOf with StringComparison argument incorrectly treating the enum value as a start index
  • [JS/TS/Python] Fix Async.StartChild with timeout always timing out even when the computation finishes before the deadline (fixes #4481) (by @MangelMaxime)

5.0.0-rc.6

31 Mar 19:15

Choose a tag to compare

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 float Parse (by @ncave)
  • [Python] Add Math.DivRem support 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.Concat with 4+ arguments not being supported (by @dbrattli)
  • [TS/Python] Fix thisArg type for overloads in structs (#4453) (by @ncave)
  • [TS/Python] Fix invalid this argument type in structs (#4453) (by @ncave)
  • [JS/TS] Fix N format specifier (ToString("N0"), String.Format("{0:N0}", ...)) producing a trailing dot when precision is 0 (fix #2582) (by @MangelMaxime)
  • [JS/TS] Fix C0 and P0 format 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 await on else branch of ternary expressions in async closures (by @dbrattli)
  • [Beam] Fix |> ignore on cross-module Emit calls generating variable bindings that shadow Emit case-clause variables (by @dbrattli)
  • [Beam] Fix containsIdentRef not checking Call ThisArg (by @dbrattli)
  • [All] Fix CLI color not resetting after error messages (fixes #3755) (by @MangelMaxime)
  • [JS/TS] StringEnum now respect CompiledValue and CompiledName (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.Escape and Regex.Unescape handling (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 returning undefined instead 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)

5.0.0-rc.5

20 Mar 10:48

Choose a tag to compare

5.0.0-rc.5 Pre-release
Pre-release

Added

[All] Add support for [<InlineIfLambda>] (by @MangelMaxime)

5.0.0-rc.4

19 Mar 19:09

Choose a tag to compare

5.0.0-rc.4 Pre-release
Pre-release

Fixed

  • [JS/TS] Fix Array.zeroCreate producing null for 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 && .Value option pattern with Option.exists in Fable2Rust.fs (code scanning alert 1125)
  • [JS/TS] Fix Unchecked.defaultof<char> being emitted as null instead of '\0' (by @MangelMaxime)
  • [JS/TS] Fix static val mutable fields declared with [<DefaultValue>] not being zero-initialized (fix #2739) (by @MangelMaxime)
  • [JS/TS/Python] Fix record/struct types augmented with static let or static member val generating 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> as MutableArray<T> (by @MangelMaxime)
  • [JS/TS] Fix ResizeArray index getter/setter not throwing IndexOutOfRangeException when 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 unbound MatchValue variable — 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 invalid module:*() Erlang code when binding is used as a value (by @dbrattli)
  • [Beam] Fix string slicing and Substring with compound expressions producing wrong binary:part length 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 Emit expressions with case leaking variables into surrounding scope — auto-wrap in IIFE for scope isolation (by @dbrattli)

5.0.0-rc.3

10 Mar 14:39

Choose a tag to compare

5.0.0-rc.3 Pre-release
Pre-release

Added

  • [Beam] Auto-generate rebar3 scaffold (rebar.config, .app.src) after compilation; .erl files now placed in src/ subdirectories (by @dbrattli)
  • [Beam] Support [<ImportAll>] + [<Erase>] interface pattern for typed FFI bindings (by @dbrattli)

Fixed

  • [Beam] Fix dropped top-level side effects — multiple ActionDeclaration main/0 functions 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 CompiledName on 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.GetGenericArguments and Type.GetInterface for reflection (by @dbrattli)
  • [TS] Correctly resolve type references for TypeScriptTaggedUnion (by @MangelMaxime and @jrwone0)
  • [TS] Expose optional stack property on Exception (by @MangelMaxime)
  • [Python] Fix nonlocal/global declarations generated inside match/case bodies causing SyntaxError (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)

5.0.0-rc.2

03 Mar 19:31

Choose a tag to compare

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.erl and fix Random seeded/NextBytes tests (by @dbrattli)

Fixed

  • [Python] Fix __hash__ to return native int instead of int32 for Python 3.14 compatibility (by @dbrattli)
  • [Python] Fix PyPI publish workflow version pattern to support rc tags (by @dbrattli)
  • [Beam] Bundle fable-library-beam in NuGet package so dotnet fable --lang beam works (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-ts for Browser environment (by @goswinr)

5.0.0-rc.1

26 Feb 22:24

Choose a tag to compare

5.0.0-rc.1 Pre-release
Pre-release

Added

  • [Beam] Add Erlang/BEAM target (--lang beam). Compiles F# to .erl source files. 2086 tests passing. (by @dbrattli)

Fixed

  • [Python] Fix type var scoping for PEP 695 annotations: emit Any for type vars outside function scope and prevent non-repeated generic params from leaking into ScopedTypeParams (by @dbrattli)
  • [JS/TS] Ignore extra args in FSharpType functions (by @olivercoad)

5.0.0-alpha.24

13 Feb 20:43

Choose a tag to compare

5.0.0-alpha.24 Pre-release
Pre-release

Fixed

  • [Python] Fix Array.length, .Length, Array.isEmpty, and ResizeArray.Count to use len() instead of .length property for plain Python list interop (by @dbrattli)
  • [Python] Fix Task<T> pass-through returns not being awaited in if/else and try/with branches (by @dbrattli)
  • [Python] Fix :? T as x type test pattern in closures causing UnboundLocalError due to cast() shadowing outer variable (by @dbrattli)
  • [All] Prevent Fable from freezing when running a sub-process via --run (fix #3631) (by @MangelMaxime)
  • [All] Improve console width detection when rewritting console output (by @MangelMaxime)

4.29.0

13 Feb 20:47

Choose a tag to compare

Fixed

  • [All] Prevent Fable from freezing when running a sub-process via --run (fix #3631) (by @MangelMaxime)
  • [All] Improve console width detection when rewritting console output (by @MangelMaxime)

5.0.0-alpha.23

03 Feb 14:07

Choose a tag to compare

5.0.0-alpha.23 Pre-release
Pre-release

Changed

  • [Python] Changed DU representation to use separate classes for each case (by @dbrattli)
  • [Python] Fable will no longer auto-generate __str__ or __hash__ for custom types. Use the Py.Stringable and Py.Hashable marker interfaces to generate these methods (by @dbrattli)

Added

  • [Python] Added ABC base classes for F# types and Py marker interfaces for Python interop (by @dbrattli)
  • [Python] Add tuple pattern matching with guards and improve match statement generation (by @dbrattli)
  • [Python] Add Python 3.10+ match statement support for pattern matching (by @dbrattli)

Fixed

  • [Python] Fix curry/uncurry to handle arbitrary number of arguments (by @dbrattli)
  • [Python] Fix type annotations for protocols, Option casting, and abstract classes (by @dbrattli)
  • [Python] Fix type annotations for curried functions and numeric types (by @dbrattli)
  • [Python] Fix type annotations for inref, IList, DateKind, and regex collections (by @dbrattli)
  • [Python] Fix type annotations for protocols, ABCs, Atom, and Set module (by @dbrattli)
  • [Python] Fix type annotations for async functions, date operations, and None handling (by @dbrattli)
  • [Python] Fix type annotations for tuple indexing, generic defaults, and reflection (by @dbrattli)
  • [All] Fix StringBuilder.Chars getter and setter (by @MangelMaxime)

Removed

  • [All] Remove --legacyCracker flag, MSBuild cracker is now the default and the only cracker supported (by @MangelMaxime)