v0.29.0b1
Pre-releasesee https://ubcode.useblocks.com/development/changelog.html#release-0-29-0b1
✨ New Features
-
Source code traceability with codelinks
ubCode now supports tracing requirements directly in source code comments, creating a live bidirectional link between documentation and code. This implements the sphinx-codelinks marker format natively in the IDE. Embed standardised markers in C++, Python, Rust, C#, or YAML comments and ubCode extracts them into need objects automatically.
One-line need definitions let you create a new need from a single comment:
# @Function Bar, IMPL_4, impl, [SPEC_1] def bar(): ...
Note: Need-ID references (
@need-ids:) are not yet supported and are planned for a future release.The
.. src-trace::RST directive includes traced needs in your documentation, scoped by project, file, or directory.IDE features delivered through the language server:
- Real-time diagnostics for malformed one-line markers (source:
ubcode-codelinks; codes includetoo_few_fields,too_many_fields,missing_square_brackets, etc.) - Hover on markers shows a rich card with the need's type, ID, title, metadata fields, and link targets
- Find References from a source code marker navigates to all RST documents that backlink via field values or
:need:roles - Autocomplete for the
:project:option in.. src-trace::directives, populated from[codelinks.projects.*]keys in ubproject.toml
Parsing is implemented in Rust (via tree-sitter) and runs incrementally — only changed files are re-parsed, keeping the feedback loop fast.
See the usage guide and configuration reference for details.
- Real-time diagnostics for malformed one-line markers (source:
-
ubc build list-documents --codelinksCLI optionThe
ubc build list-documentscommand now supports listing files from configured codelinks projects:--codelinks/--no-codelinksto include codelinks source files,--codelinks-project <name>to filter to a specific project, and--source-documents/--no-source-documentsto toggle RST/MD source documents. These can be combined, e.g.--codelinks --no-source-documentsto list only codelinks files. -
Configuration redirect with ubproject.redirect.toml
A new redirect file mechanism lets ubCode find the ubproject.toml for files that live outside the documentation folder (e.g. source code files traced via codelinks). Place a ubproject.redirect.toml containing
path = "../docs"in your source directory and ubCode follows the redirect during its configuration file search. Circular redirects are detected and handled gracefully.See the configuration reference for details.
👌 Improvements
-
Labels on diagnostic source locations
Diagnostics in the ubCode Issues panel now annotate each source location with a descriptive label (e.g. needimport-source, external-source), making it easier to understand the role of each location when a diagnostic spans multiple files, such as link constraint violations.
-
Expanded and reorganised the user documentation, including new configuration examples and a codelinks usage guide.