Skip to content

Incan v0.3.0

Latest

Choose a tag to compare

@dannymeijer dannymeijer released this 05 Jun 16:29
Immutable release. Only release title and notes can be modified.

Incan 0.3

Incan 0.3 is the release where the 0.2 foundation starts to feel like a practical application platform. The 0.2 line made namespaces, library manifests, and Rust boundaries more explicit; 0.3 builds on that by adding richer source-level language features, a much broader standard library, stronger testing and formatting workflows, and a lot of hardening around generated Rust, package boundaries, decorators, aliases, vocab surfaces, and ownership planning.

The headline is not just “more syntax.” The release moves common project patterns into documented language and stdlib surfaces so users can write less Rust-shaped scaffolding, while compiler behavior increasingly flows through shared metadata and argument-planning paths instead of local special cases.

Highlights

  • Richer language surface: exact numeric widths, fixed-scale decimal annotations, loop expressions, if let / while let, union narrowing, pattern alternation, value enums, enum methods, computed properties, decorators, aliases, partial callable presets, generators, iterator adapters, Result combinators, and explicit type-token overloads such as cast(expr, int).
  • Broader standard library: std.collections, OrdinalMap, std.graph, std.json, std.regex, std.datetime, std.logging, std.telemetry, std.fs, std.io, std.tempfile, std.uuid, std.encoding, std.hash, std.compression, std.result, std.async, and std.testing.
  • Stronger Rust interop: Rust trait adoption from Incan source, associated types, derived and inspected Rust metadata, keyword arguments for inspected Rust calls, raw identifier field access, generated-Rust lint suppression, better Rust callable alias handling, and closure context for Rust callback APIs.
  • Better package and metadata behavior: public aliases, partial presets, decorator-backed metadata, facade reexports, checked API projections, public dependency-owned unions, and package-boundary call surfaces now behave much closer to ordinary local source.
  • Vocab and DSL support: scoped DSL surfaces now support expression-position declarations, helper calls, leading-dot references, expression-list metadata, compound clauses, query-block-style brace forms, and dependency-provided vocab activation in tests and formatting.
  • Testing and tooling improvements: incan test supports inline module tests: workflows, fixtures, parametrization, markers, resource-aware parallelism, JSON Lines, JUnit XML, shuffling, durations, and cleaner batch isolation. incan fmt, incan lock, lifecycle commands, checked API metadata, generated references, docs builds, and install actions are also more release-ready.
  • Compiler hardening: ownership/coercion emission now goes through a shared argument-use plan, duckborrowing covers more real call sites, union wrapper identity is preserved more consistently, decorated defaults survive imports and reexports, and formatter/parser paths share more context across ordinary source, packages, tests, and vocab blocks.

Migration notes

Most ordinary 0.2 programs should continue to compile. The main adoption notes are:

  1. Expect one intentional formatter pass. incan fmt now follows the 0.3 vertical-spacing and fluent-chain style more consistently, including vocab/query block preservation.
  2. Numeric vocabulary is broader. Existing int and float code keeps working, but local names such as decimal, numeric, bigint, integer, smallint, real, or double may now collide with canonical numeric forms.
  3. Testing helpers should be imported explicitly from std.testing; the language assert statement remains always available.
  4. Lockfiles are less noisy. Routine build / test runs reuse stale lock payloads instead of rewriting committed lockfiles; run incan lock when you intentionally refresh the lock.
  5. Most new language features are additive. Existing match, while True, helper-function, and nested-match code does not need to be rewritten immediately.

Known limitations

  • Decimal arithmetic is not yet general language behavior. The 0.3 decimal surface covers typed annotations, literal validation, formatting, generated Rust representation, and display.
  • incan fmt is much more capable, but still conservative rather than a complete pretty-printer overhaul for every nested expression shape.
  • std.regex is a safe-default regular-expression surface, not a Python/PCRE compatibility layer. Lookaround, pattern backreferences, and other backtracking-only features are tracked separately for a future std.re surface.
  • Native Windows filesystem behavior is not part of the 0.3 contract. std.fs documents Unix-like host behavior until the stdlib has an explicit platform split.

Docs

Start here for the full release notes and migration detail:

Useful entry points: