Skip to content

Commit 0489466

Browse files
authored
chore(ci): drop the prepare-cli-workspace workaround (#678)
* chore(ci): drop the prepare-cli-workspace workaround The morphir CLI job rewrote Cargo.toml to exclude morphir-live, deleted Cargo.lock, regenerated it, and ran `cargo update -p extism`. That existed to dodge a toml_datetime conflict: morphir-live's dioxus -> gtk 0.18 -> proc-macro-crate 2.0.2 pinned toml_datetime to exactly 0.6.3, which blocked the extism version the CLI needs. That conflict was fixed in #677 by moving proc-macro-crate to 2.0.0, which frees toml_datetime and lets extism resolve to 1.13.0 with morphir-live still in the workspace. The workaround's final step, `cargo update -p extism`, was manually forcing the very upgrade the committed lockfile now encodes. Removing it also closes a real gap: the job deleted and regenerated Cargo.lock, so CI never validated the committed lockfile. It does now, meaning a lockfile regression gets caught instead of silently papered over. Verified by running the job's steps against the committed lockfile with --locked, which fails if the lockfile needs any change: cargo fmt --package morphir --check exit 0 cargo clippy --locked --package morphir --all-targets -Dwarnings exit 0 cargo test --locked --package morphir exit 0 cargo build --locked --release --package morphir exit 0 Cargo.lock was unmodified afterwards. * ci: pass --locked to cargo commands that resolve dependencies Removing prepare-cli-workspace was supposed to make CI validate the committed Cargo.lock, but on its own it does not. Without --locked, cargo silently rewrites the lockfile in the checkout when it is stale and the job passes against an uncommitted resolution, so a lockfile regression still slips through. This is not hypothetical: bumping the morphir-rust submodule in #677 caused a plain `cargo check` to re-resolve nbformat 1.0.0 -> 1.2.2 on its own, with no prompting. Add --locked to the commands that resolve dependencies in both the morphir-live and morphir CLI jobs. cargo fmt does not resolve, so it is left alone. Verified locally for the CLI job against the committed lockfile: clippy, test, and release build all pass with --locked, and Cargo.lock is unmodified afterwards. The morphir-live job's desktop build needs GTK system libraries that are unavailable locally, so CI is the check for that one. Raised by automated review on #678.
1 parent 0b12b59 commit 0489466

3 files changed

Lines changed: 7 additions & 97 deletions

File tree

.config/mise/config.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,6 @@ description = "Add a new submodule under ecosystem/. Usage: mise run submodules:
180180
run = "python .config/mise/tasks/submodules/add.py"
181181

182182
# ===== CI Tasks =====
183-
[tasks."ci:prepare-cli-workspace"]
184-
description = "Prepare Cargo workspace for CLI-only build (excludes morphir-live)"
185-
run = "python .config/mise/tasks/ci/prepare_cli_workspace.py"
186-
187183
[tasks."ci:validate-docs"]
188184
description = "Validate documentation files"
189185
run = "python .config/mise/tasks/ci/validate_docs.py"

.config/mise/tasks/ci/prepare_cli_workspace.py

Lines changed: 0 additions & 81 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,18 @@ jobs:
7474
run: cargo fmt --package morphir-live --check
7575

7676
- name: Run clippy
77-
run: cargo clippy --package morphir-live --all-targets -- -D warnings
77+
run: cargo clippy --locked --package morphir-live --all-targets -- -D warnings
7878

7979
- name: Run tests
80-
run: cargo test --package morphir-live
80+
run: cargo test --locked --package morphir-live
8181

8282
- name: Build (web)
83-
run: cargo build --release --package morphir-live
83+
run: cargo build --locked --release --package morphir-live
8484

8585
- name: Build (desktop)
86-
run: cargo build --release --package morphir-live --features desktop
86+
run: cargo build --locked --release --package morphir-live --features desktop
8787

8888
# morphir: CLI tool (depends on extism via morphir-daemon)
89-
# Uses separate dependency resolution to avoid conflict with dioxus-desktop
9089
morphir-cli:
9190
name: morphir CLI
9291
runs-on: ubuntu-latest
@@ -105,10 +104,6 @@ jobs:
105104
- name: Add Rust components
106105
run: rustup component add rustfmt clippy
107106

108-
# Generate fresh lockfile without dioxus-desktop to avoid toml_datetime conflict
109-
- name: Prepare CLI workspace
110-
run: mise run ci:prepare-cli-workspace
111-
112107
- name: Cache cargo
113108
uses: Swatinem/rust-cache@v2
114109
with:
@@ -119,13 +114,13 @@ jobs:
119114
run: cargo fmt --package morphir --check
120115

121116
- name: Run clippy
122-
run: cargo clippy --package morphir --all-targets -- -D warnings
117+
run: cargo clippy --locked --package morphir --all-targets -- -D warnings
123118

124119
- name: Run tests
125-
run: cargo test --package morphir
120+
run: cargo test --locked --package morphir
126121

127122
- name: Build
128-
run: cargo build --release --package morphir
123+
run: cargo build --locked --release --package morphir
129124

130125
# Docs: lightweight job for documentation changes (fast-path)
131126
# Note: This job intentionally does NOT install mise to stay fast

0 commit comments

Comments
 (0)