Skip to main content
Version: 0.1

Release notes

G# is pre-1.0. The repository's version base is currently 0.1, and product versions are derived by Nerdbank.GitVersioning from that base and the Git commit. Until the project reaches a stable compatibility promise, release notes should be read as implementation status notes rather than a long-term compatibility contract.

Unreleased

The G# compiler, language server, and VS Code extension absorbed a large stack of additions this cycle. The summary below groups them by area; each item links to the design decision (ADR) or implementation reference.

Added

  • Documentation comments (ADR-0057) — Markdown-authored /// documentation comments that round-trip losslessly to CLR XML doc. Hover renders the merged documentation for both G# declarations and imported CLR APIs. New warnings: GS0227 (unattached), GS0228 (missing on public, opt-in), GS0229 (@param mismatch), GS0230 (unsupported Markdown), GS0231 (unknown tag).
  • Named delegate types (ADR-0059) — type Name = delegate func(...) declares a real CLR MulticastDelegate-derived type so C# consumers see a conventional handler type and G# events can carry first-class custom delegate types. Diagnostics GS0233GS0234.
  • ref/out/in parameters (ADR-0060) — Declaration-site and call-site ref-kind modifiers, including inline out var/let/_ declarations. Diagnostics GS0235GS0243. Passing a value to an in parameter without writing in at the call site is the warning GS0242 rather than a silent spill (a deliberate departure from C#).
  • Ref-aliasing locals (ADR-0060 follow-up) — let ref m = arr[i] / var ref v = c.Field produces a local whose IL slot is T& and aliases another lvalue. Diagnostics GS0256GS0258.
  • Ref returns (ADR-0060 follow-up, issue #490) — func f(...) ref T { return ref <expr> }. Diagnostics GS0248GS0255 cover the surrounding rules (escape, async/iterator ban, override match).
  • Conditional ref-arguments (ADR-0061) — narrow ref cond ? a : b form inside ref-kind argument payloads; diagnostics GS0260GS0262.
  • Generalized ternary expression (ADR-0062) — cond ? a : b is now a normal expression. GS0259 is retired in value contexts; the new GS0263 covers the "no common type" failure.
  • Method overloading and optional parameters (ADR-0063) — user G# functions can carry overload sets (differing by parameter types or ref-kinds) and optional parameters with compile-time-constant defaults. Diagnostics GS0264GS0267.
  • Named arguments at call sites (issue #343) — Foo(timeout: 30, retries: 3) for free functions, user methods, user constructors, extension functions, and inherited CLR methods (including delegate Invoke). Diagnostics GS0244GS0247. The legacy name = value form is still accepted for .copy(...) and attribute argument lists.
  • scoped parameter modifier (ADR-0058) — constrains a ref struct / managed-pointer parameter from escaping; enforced by GS9004 / GS9006.
  • data struct synthesis completed (ADR-0029, issue #410) — every data struct synthesizes Equals(object), Equals(T), GetHashCode(), ToString(), op_Equality, op_Inequality, and Deconstruct(...). Hand-written versions are rejected (GS0232).
  • Editor features — hover for CLR XML docs (#397), live pull-based diagnostics (#362), CodeLens reference counts on members of structs, interfaces, and enums (#403), implicit this for properties/methods/events (#412), hover for this (#413), bare static-member access from instance methods (#485), chained-member hover (#402), and six VS Code color themes inspired by the G# logo (Ember, Magma, Synthwave — Dark + Light each, #357).

Changed

  • The website spec, feature matrix, FAQ, bridges page, guide pages, and design-decisions index were refreshed to match the compiler ground truth — most visibly, "Parameters do not have default-value syntax" and "Named arguments — Partial" are no longer correct and were rewritten.
  • The repo docs/lexical.md block-comment paragraph (which incorrectly claimed block comments were not implemented) is corrected, and a documentation-comments subsection was added.
  • The VS Code TextMate grammar adds the missing contextual keywords (data, inline, record, delegate, event, prop, init, shared, scoped, accessor names get/set/add/remove/raise, ref-kinds ref/out), operators (:=, ?., ??, ?/:, !!, ..., =>), an @Annotation scope, and a /// documentation-comment scope with @tag highlighting. The VS Code snippet set was rewritten to match current grammar.

Fixed

  • Numerous IL-emit hardening rounds (issues #418, #419, #420, #421) and a new ilverify gate (#478) ensure emitted assemblies pass CLR verification.
  • Determinism golden test (#475) freezes emitted bytes for byte-for-byte reproducibility.
  • FieldAccessException on class auto-properties (#399).
  • CodeLens 0-refs and stale-tree fixes (#414).

Known issues

  • The full ref-safe-to-escape escape analysis is partial; GS0257 is reserved for a future pass.
  • Async state-machine emit shapes that are not yet supported continue to report GS0190.

0.1

The 0.1 version base identifies the current pre-1.0 line. This is not a dated stable release announcement; it summarizes the major capabilities implemented in the repository today.

Language and libraries

  • Packages, imports, import aliases, top-level declarations, and multi-file or multi-package compilation.
  • Width-bearing primitive names such as int32, uint64, float32, and float64, plus bool, char, string, object, decimal, nint, nuint, and void.
  • Nullable T? types with nil, ?., ?:, and !!.
  • Structs, classes, interfaces, enums, data struct, record as a data struct alias, and inline struct value wrappers.
  • Generic functions and types with square-bracket type parameters and arguments, constraints, method inference, and CLR variance support where applicable.
  • Fixed arrays, slices, maps, tuples, function values, delegates, sequence[T], async sequence[T], and iterator yield support.
  • Control flow including if, for, for in or range forms, switches, switch expressions, try, catch, finally, throw, using, and defer.
  • Go-shaped concurrency with go, scope, channels, channel send and receive, make(chan T), close, and select.
  • async func, await, async lambdas, awaitable-shape support, and await for over async sequences.
  • CLR interop for imported constructors, methods, overload resolution, fields, properties, indexers, events, delegates, extension methods, optional CLR arguments, operators, conversions, attributes, and generic types.

Tooling

  • gsc compiler driver with an interpreter path when no /out: is supplied and an emit path for managed executables or libraries.
  • Managed PE and metadata emission without Roslyn, optional reference assemblies, target-framework-aware reference resolution, runtime configuration output, and Portable PDB support.
  • MSBuild SDK support through Gsharp.NET.Sdk, .gsproj projects, dotnet build, dotnet run, templates, and SDK-side response-file invocation.
  • VS Code extension and language server support for diagnostics, hover, definitions, references, symbols, formatting, completions, signature help, rename, code actions, code lens, semantic tokens, inlay hints, and debugging integration.
  • Stable diagnostic IDs in the GS#### form, with warning suppression and warning-as-error controls.

Known pre-1.0 notes

  • The language is still evolving; source compatibility may change before a stable release.
  • Some surfaces are intentionally documented as current implementation behavior rather than final specification guarantees.
  • The Playground page exists, but browser-hosted execution is deferred.

Future release-note format

Use reverse chronological order. Each version entry should identify the version and, when a real release process exists, its date. Do not invent dates or version numbers; derive versions from the repository's release process.

## X.Y.Z

Short summary of the release.

### Added

- New language, tooling, documentation, or interop capabilities.

### Changed

- Behavior changes, breaking changes, renamed features, or migration notes.

### Fixed

- Bug fixes, diagnostics corrections, emit or interpreter parity fixes, tooling fixes.

### Known issues

- Important limitations users should know before upgrading.