Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ jobs:
- run: python3 scripts/check-tree-size.py
- run: python3 scripts/check-release-version.py --shared-crates

crates:
# Package and build the shared crates exactly as crates.io would, without
# uploading. cargo 1.90 fails to verify a batch whose crates depend on each
# other ("no hash listed"); 1.97.1 can. The rust job still builds them with
# the pinned 1.90 toolchain.
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install 1.97.1 --profile minimal
- run: cargo +1.97.1 publish --dry-run --locked -p weft-model -p weft-expr -p weft-backend -p weft-postgresql-emit

rust:
runs-on: ubuntu-24.04
timeout-minutes: 40
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Release

# Pushing a tag vX.Y.Z tests, builds, smoke-tests and publishes umf-weft.
# Pushing a tag vX.Y.Z tests, builds, smoke-tests and publishes umf-weft to
# PyPI and the shared crates to crates.io.
# A manual run (workflow_dispatch) builds and smoke-tests only; it publishes
# nothing unless it is started on a tag with dry_run set to false.
on:
Expand Down Expand Up @@ -172,8 +173,25 @@ jobs:
with:
packages-dir: dist

crates:
# Publish the shared crates (SHARED_CRATES in scripts/check-release-version.py)
# to crates.io at the release version, in dependency order. Needs the
# owner's CARGO_REGISTRY_TOKEN secret in the crates-io environment. cargo
# 1.97.1 for the reason in ci.yml's crates job.
if: ${{ github.ref_type == 'tag' && (github.event_name == 'push' || inputs.dry_run == false) }}
needs: [ci, version, wheels, sdist, wasm, smoke]
runs-on: ubuntu-24.04
timeout-minutes: 30
environment: crates-io
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install 1.97.1 --profile minimal
- run: cargo +1.97.1 publish --locked -p weft-model -p weft-expr -p weft-backend -p weft-postgresql-emit
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

github-release:
needs: [version, publish, wasm]
needs: [version, publish, crates, wasm]
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
Expand Down
6 changes: 4 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Databricks). Rust core in `crates/`, Python bindings in `crates/weft-python`, WA
Preserve unknown model content and refuse what cannot be preserved.
- Python bindings share the Rust core. No JavaScript sidecar for the Python API.
- Release: bump the version in `pyproject.toml`, `crates/weft-python/pyproject.toml` and
`crates/weft-python/Cargo.toml`, add a `CHANGELOG.md` section, then push tag `vX.Y.Z`
from main. `scripts/check-release-version.py` enforces agreement.
`Cargo.toml` (`[workspace.package]` and the four shared-crate pins in
`[workspace.dependencies]`), add a `CHANGELOG.md` section, then push tag `vX.Y.Z`
from main. The tag publishes the wheel to PyPI and the shared crates to crates.io.
`scripts/check-release-version.py` enforces agreement.
- Only claim what CI tests; label the rest experimental.
20 changes: 14 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Older releases: see [GitHub Releases](https://github.com/DocumentDrivenDX/weft/r

## Unreleased

- New crate `weft-model` 0.1.0 (own semver; `crates/weft-model/README.md`): UMF
- New crate `weft-model` (published to crates.io; `crates/weft-model/README.md`): UMF
0.10 document preparation, name and identity resolution, logical types,
descriptors, exact literals, exact instants and diagnostics, moved out of
`weft-core` so other compilers can depend on them. `weft-core` re-exports them
Expand All @@ -25,15 +25,15 @@ Older releases: see [GitHub Releases](https://github.com/DocumentDrivenDX/weft/r
field-domain normalizer from `security_ontology`) moves to
`weft_model::core_literal`; `weft_core::security_literals` re-exports it.
Diagnostic codes are unchanged.
- New crate `weft-expr` 0.1.0 (own semver; `crates/weft-expr/README.md`): typed
- New crate `weft-expr` (published to crates.io; `crates/weft-expr/README.md`): typed
`Field`/`Value` operands, comparison operators and their typing rule, exact
arithmetic domains and expressions, and the `weft.update-selection/1`
predicate format of CONTRACT-009. `weft-core` re-exports the operand,
comparison and arithmetic types under their old paths. The mutation frontend
builds selections with it, and `inspect_selection` and the PostgreSQL mutation
lowering decode them with one shared walker instead of two hand-written ones.
Wire shapes and refusal messages are unchanged.
- New crate `weft-backend` 0.1.0 (own semver; `crates/weft-backend/README.md`):
- New crate `weft-backend` (published to crates.io; `crates/weft-backend/README.md`):
the CONTRACT-002 backend boundary. Manifest types and validation (accepted
interface versions and language pairs come from the frontend), the `Frontend`
and `Backend<F>` traits, a `TargetArtifact` emit output (`sql::Emission` for
Expand All @@ -42,7 +42,7 @@ Older releases: see [GitHub Releases](https://github.com/DocumentDrivenDX/weft/r
(`WeftPlans`) and keeps its `Backend` trait, `Context`, `Registry` and type
paths, so backend implementations compile unchanged; check order, refusal
codes and the `Compilation` wire shape are unchanged.
- New crate `weft-postgresql-emit` 0.1.0 (own semver;
- New crate `weft-postgresql-emit` (published to crates.io;
`crates/weft-postgresql-emit/README.md`): PostgreSQL identifier quoting,
parameter slots, string literals, typed casts with the `C` collation and exact
result decoders, moved out of `weft-postgresql` (which re-exports
Expand All @@ -60,8 +60,16 @@ Older releases: see [GitHub Releases](https://github.com/DocumentDrivenDX/weft/r
Experimental: only unit tests exercise them.
- `bun scripts/module-boundaries-update.ts` regenerates the dependency and
public-declaration inventory in `docs/helix/02-design/module-boundaries.json`.
`scripts/check-release-version.py --shared-crates` (run in CI) checks that each
shared crate's README states its Cargo version.
- The shared crates are published to crates.io by the release workflow, at the
release version. The Cargo workspace version is now the release version
(0.4.58), and `weft-python` inherits it; `compilerVersion` in compile
responses stays `weft/0.1.0` (`weft_core::COMPILER_VERSION`), so responses do
not change. `scripts/check-release-version.py` checks the workspace version
against the tag and, with `--shared-crates` (run in CI), that each shared crate
inherits it and is pinned at exactly it. CI packages and builds the four crates
as crates.io would on every pull request (`cargo publish --dry-run`). The
bundled UMF 0.10 schema moves to `crates/weft-model/schema/` so the crate
carries it.

## 0.4.58 - 2026-11-11

Expand Down
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@
members = ["crates/weft-databricks","crates/weft-postgresql","crates/weft-runtime","crates/weft-python","crates/weft-wasm","tests/register-backend/probe","tests/frontend/wasm-probe","crates/weft-core","crates/weft-model","crates/weft-expr","crates/weft-backend","crates/weft-postgresql-emit"]
resolver = "2"
[workspace.package]
version = "0.1.0"
# The weft release version: the umf-weft wheel, the vX.Y.Z tag and the published
# shared crates all carry it. scripts/check-release-version.py checks agreement.
version = "0.4.58"
edition = "2021"
publish = false
license = "MIT OR Apache-2.0"
repository = "https://github.com/DocumentDrivenDX/weft"
[workspace.dependencies]
# Shared crates, published to crates.io at the workspace version. Keep each
# `version` equal to [workspace.package] version.
weft-model = { path = "crates/weft-model", version = "=0.4.58" }
weft-expr = { path = "crates/weft-expr", version = "=0.4.58" }
weft-backend = { path = "crates/weft-backend", version = "=0.4.58" }
weft-postgresql-emit = { path = "crates/weft-postgresql-emit", version = "=0.4.58" }
serde = { version = "=1.0.228", features = ["derive"] }
serde_json = { version = "=1.0.145", features = ["arbitrary_precision", "raw_value"] }
sha2 = "=0.10.9"
Expand Down
10 changes: 6 additions & 4 deletions crates/weft-backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[package]
license = "MIT OR Apache-2.0"
name = "weft-backend"
# Own semver, independent of the workspace and wheel versions. See README.md.
version = "0.1.0"
# Published to crates.io at the weft release version. See README.md.
version.workspace = true
edition.workspace = true
publish.workspace = true
publish = ["crates-io"]
repository.workspace = true
readme = "README.md"
rust-version = "1.90"
description = "Backend manifests, the assess/lower/emit boundary, registry and SQL emission carrier shared by weft and other compilers"

[dependencies]
weft-model = { path = "../weft-model" }
weft-model.workspace = true
serde.workspace = true
serde_json.workspace = true
13 changes: 7 additions & 6 deletions crates/weft-backend/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# weft-backend 0.1.0
# weft-backend

The backend boundary of CONTRACT-002, shared by weft's compiler (`weft-core`)
and other compilers (Fireweed's `fireweed-compiler`): backend manifests and
Expand All @@ -12,11 +12,12 @@ SQL text.

## Version

Own semver, independent of the workspace and the `umf-weft` wheel;
`weft_backend::VERSION` reports it. While the major version is 0, a minor bump
may break the public surface below; a patch bump may not. Manifest and
compilation wire shapes, refusal codes and the order of pipeline checks are
part of the surface.
Published to crates.io with every weft release, at the release version: the
`vX.Y.Z` tag, the `umf-weft` wheel and all four shared crates (`weft-model`,
`weft-expr`, `weft-backend`, `weft-postgresql-emit`) carry the same number, and
`weft_backend::VERSION` reports it. Depend on them at one exact version, for example
`weft-backend = "=0.4.58"`. While weft is 0.x any release may change the public
surface below; `CHANGELOG.md` records each change. Manifest and compilation wire shapes, refusal codes and the order of pipeline checks are part of the surface.

## Public surface

Expand Down
2 changes: 1 addition & 1 deletion crates/weft-backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ pub mod boundary;
pub mod manifest;
pub mod sql;

/// This crate's contract version (`README.md`).
/// The weft release version this crate was built at (see `README.md`).
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
6 changes: 3 additions & 3 deletions crates/weft-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ bounded-current-string-candidate=["current-query-refinement-candidate"]
current-query-refinement-candidate=[]

[dependencies]
weft-model = { path = "../weft-model" }
weft-expr = { path = "../weft-expr" }
weft-backend = { path = "../weft-backend" }
weft-model.workspace = true
weft-expr.workspace = true
weft-backend.workspace = true
umf-core = { git = "https://github.com/DocumentDrivenDX/umf.git", tag = "umf-v0.10.11", default-features = false, features = ["full-core"], optional = true }
umf-codegen = { git = "https://github.com/DocumentDrivenDX/umf.git", tag = "umf-v0.10.11", optional = true }
base64 = "=0.22.1"
Expand Down
2 changes: 1 addition & 1 deletion crates/weft-core/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ impl Compiler {
.collect()
};
Ok(
json!({"interfaceVersion":version,"status":"compiled","diagnostics":[],"dialect":dialect,"compilerVersion":concat!("weft/",env!("CARGO_PKG_VERSION")),"modelPins":catalog.pins(),
json!({"interfaceVersion":version,"status":"compiled","diagnostics":[],"dialect":dialect,"compilerVersion":crate::COMPILER_VERSION,"modelPins":catalog.pins(),
"backend":{"backendId":compiled.backend_id,"backendVersion":compiled.backend_version,"targetProfile":compiled.target_profile.id,"interfaceVersion":manifest.interface_version},
"targetContext":compiled.target_profile,"bindingSha256":compiled.binding_sha256,"logicalPlan":logical_plan,"sql":compiled.emission.sql,"parameters":compiled.emission.parameters,"columns":columns,"obligations":compiled.emission.obligations,
"qualification":{"status":if candidate{"candidate"}else{"conformance-verified"},"evidence":evidence,"assumptions":[],"operations":compiled.qualifications}}),
Expand Down
2 changes: 1 addition & 1 deletion crates/weft-core/src/compile04.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ impl Compiler {
.collect();
let response = json!({
"interfaceVersion":"weft-compile/0.4.0", "status":"compiled", "diagnostics":[],
"dialect":"weft-sql/0.4.0", "compilerVersion":concat!("weft/",env!("CARGO_PKG_VERSION")),
"dialect":"weft-sql/0.4.0", "compilerVersion":crate::COMPILER_VERSION,
"modelPins":catalog.pins(), "logicalPlan":plan,
"backend":{"backendId":compiled.backend_id,"backendVersion":compiled.backend_version,
"targetProfile":compiled.target_profile.id,"interfaceVersion":"weft-backend/0.3.0"},
Expand Down
2 changes: 1 addition & 1 deletion crates/weft-core/src/compile041.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl Compiler {
.collect();
let response = json!({
"interfaceVersion":"weft-compile/0.4.1", "status":"compiled", "diagnostics":[],
"dialect":"weft-sql/0.4.1", "compilerVersion":concat!("weft/",env!("CARGO_PKG_VERSION")),
"dialect":"weft-sql/0.4.1", "compilerVersion":crate::COMPILER_VERSION,
"modelPins":catalog.pins(), "logicalPlan":plan,
"backend":{"backendId":compiled.backend_id,"backendVersion":compiled.backend_version,
"targetProfile":compiled.target_profile.id,"interfaceVersion":"weft-backend/0.3.0"},
Expand Down
2 changes: 1 addition & 1 deletion crates/weft-core/src/compile042.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ impl Compiler {
.collect();
let response = json!({
"interfaceVersion":"weft-compile/0.4.2", "status":"compiled", "diagnostics":[],
"dialect":"weft-sql/0.4.2", "compilerVersion":concat!("weft/",env!("CARGO_PKG_VERSION")),
"dialect":"weft-sql/0.4.2", "compilerVersion":crate::COMPILER_VERSION,
"modelPins":catalog.pins(), "logicalPlan":plan,
"backend":{"backendId":compiled.backend_id,"backendVersion":compiled.backend_version,
"targetProfile":compiled.target_profile.id,"interfaceVersion":"weft-backend/0.3.0"},
Expand Down
4 changes: 4 additions & 0 deletions crates/weft-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/// The `compilerVersion` every compile response reports. A wire identity, fixed
/// independently of the crate's release version so that releases do not change
/// emitted responses.
pub const COMPILER_VERSION: &str = "weft/0.1.0";
#[cfg(feature="engine-temporal")]
pub mod application_temporal;
// SPDX-License-Identifier: MIT OR Apache-2.0
Expand Down
10 changes: 6 additions & 4 deletions crates/weft-expr/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[package]
license = "MIT OR Apache-2.0"
name = "weft-expr"
# Own semver, independent of the workspace and wheel versions. See README.md.
version = "0.1.0"
# Published to crates.io at the weft release version. See README.md.
version.workspace = true
edition.workspace = true
publish.workspace = true
publish = ["crates-io"]
repository.workspace = true
readme = "README.md"
rust-version = "1.90"
description = "Typed field, literal, comparison and exact-arithmetic expressions and the weft.update-selection/1 predicate format"

[dependencies]
weft-model = { path = "../weft-model" }
weft-model.workspace = true
serde.workspace = true
serde_json.workspace = true
12 changes: 7 additions & 5 deletions crates/weft-expr/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# weft-expr 0.1.0
# weft-expr

The typed expression and predicate core shared by weft's compiler (`weft-core`)
and other compilers that type programs against UMF models (Fireweed's
Expand All @@ -11,10 +11,12 @@ diagnostics. It parses no source text and lowers nothing to a backend.

## Version

Own semver, independent of the workspace and the `umf-weft` wheel;
`weft_expr::VERSION` reports it. While the major version is 0, a minor bump may
break the public surface below; a patch bump may not. Wire shapes and diagnostic
codes are part of the surface.
Published to crates.io with every weft release, at the release version: the
`vX.Y.Z` tag, the `umf-weft` wheel and all four shared crates (`weft-model`,
`weft-expr`, `weft-backend`, `weft-postgresql-emit`) carry the same number, and
`weft_expr::VERSION` reports it. Depend on them at one exact version, for example
`weft-expr = "=0.4.58"`. While weft is 0.x any release may change the public
surface below; `CHANGELOG.md` records each change. Wire shapes and diagnostic codes are part of the surface.

## Public surface

Expand Down
2 changes: 1 addition & 1 deletion crates/weft-expr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ pub mod compare;
pub mod operand;
pub mod selection;

/// This crate's contract version (`README.md`).
/// The weft release version this crate was built at (see `README.md`).
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
8 changes: 5 additions & 3 deletions crates/weft-model/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[package]
license = "MIT OR Apache-2.0"
name = "weft-model"
# Own semver, independent of the workspace and wheel versions. See README.md.
version = "0.1.0"
# Published to crates.io at the weft release version. See README.md.
version.workspace = true
edition.workspace = true
publish.workspace = true
publish = ["crates-io"]
repository.workspace = true
readme = "README.md"
rust-version = "1.90"
description = "UMF model loading, identity resolution, logical typing and exact values shared by weft and other compilers"

Expand Down
Loading
Loading