Skip to content

Dependencies: take craft-libs main at 453b0da782 - #3228

Merged
6 commits merged into
storytold:mainfrom
dotCooCoo:chore/craft-libs-3af2280
Nov 20, 2026
Merged

6 commits merged into
storytold:mainfrom
dotCooCoo:chore/craft-libs-3af2280

Conversation

@dotCooCoo

@dotCooCoo dotCooCoo commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Every craft-libs git dependency now uses craft-libs main at 453b0da782ccef39be9a6dac8d27c80b553ef1cc: the entries in Cargo.toml, its [patch.crates-io] entries for krilla, hayro-syntax and hayro-jbig2, and craft-web-api and craft-web-host in apps/cadcraft-web/Cargo.toml. Before this change they were pinned at eleven different commits. Cargo.lock now has one entry for each craft-libs crate, adds craft-dds, which craft-image-codecs now uses, and adds harfrust 0.13.3 and read-fonts 0.43.3 from crates.io, which craft-font-catalog now uses. This moves craft-update past e9829954, the commit #3057 pins it at, and includes storytold/craft-libs#1580, which #551 needs. #3057 changes the same lines, so the two conflict.

DWG conversion needs a worker

storytold/craft-libs#1345 makes craft-dwg refuse a DWG conversion when no worker process is configured, instead of running the decoder in the calling process. A configured worker that cannot start is now an error. The app and cadcraft-cli configure their worker at startup (apps/cadcraft/src/main.rs:281, apps/cadcraft-cli/src/main.rs:8), so they still open and save DWG files. When a program cannot find its own path at startup, craft-dwg sets no worker, and DWG open and save now report an error there instead of converting in the program's process.

On the moved tree with no other change, 200 tests failed with "DWG: no worker is configured". cadcraft_io::dwg_worker now re-exports allow_in_process, and each test or test helper that converts DWG in its own process calls it first. The last step of apps/cadcraft-cli/tests/dwg_worker.rs now checks that a worker that cannot start is an error. Apart from the manifests and the re-export, every change is in test code.

The opt-in is process-wide and each test makes it, so a DWG test added by another open pull request (#3148, #2886, #2851 and #3036 add or extend some) fails, or passes only when an opted-in test ran first, until it calls cadcraft_io::dwg_worker::allow_in_process().

Merged craft-libs changes that change what CADCraft does

Testing

On the cargo build host (Linux, Rust 1.100.0), on ef12e7a9 (base 16341b66, the current main):

  • cargo fmt --all -- --check: passes.
  • cargo check --workspace --tests: passes.
  • cargo clippy --workspace --all-targets --locked -- -D warnings: passes.
  • cargo test --workspace --no-fail-fast --locked: 139 test binaries, 3,768 passed, 0 failed, 26 ignored.
  • On the earlier head f81c52b9 (craft-libs 3af2280ee3), each of the 2,537 tests in cadcraft-io, cadcraft-engine and cadcraft-cli was also run in its own process, so that no test passes only because another one opted in first; all passed apart from one that reads CARGO_PKG_NAME, which only cargo test sets.
  • cargo xtask wasm: passes.
  • cargo tree -d lists no craft-libs crate twice.

#3204 changes the rfd line next to the craft-update line, and the two conflict in Cargo.toml and Cargo.lock. #3170 and #3171 (Torentje) each conflict with this branch in Cargo.lock, and #2938 (copoka) conflicts with it in Cargo.lock and apps/cadcraft-web/Cargo.toml.

Summary by CodeRabbit

  • Chores

    • Updated supporting components used across CAD, document, and interface features.
  • Tests

    • Updated automated checks for drawing-file conversion, saving, and round trips using in-process DWG processing.
    • Clarified expected errors when the DWG worker cannot start.
    • No user-facing behavior changes are indicated.

Every craft-libs git dependency (Cargo.toml, its [patch.crates-io]
entries and apps/cadcraft-web/Cargo.toml) moves from eleven different
revisions to craft-libs main at 3af2280ee3434a2c860012df2f440652621c2c81.
Cargo.lock keeps one copy of each craft-libs crate and adds harfrust
0.13.3 and read-fonts 0.43.3, which craft-font-catalog now needs.

craft-dwg at this revision refuses to convert DWG when no worker process
is configured (storytold/craft-libs#1345). The app and the CLI configure
one at startup and are unaffected. The tests that read or write DWG in
their own process now call cadcraft_io::dwg_worker::allow_in_process(),
which cadcraft-io re-exports. dwg_worker.rs now checks that a worker
that cannot start is an error instead of a fallback to this process.
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Selected craft-libs dependencies and PDF backend patches now use revision 453b0da782ccef39be9a6dac8d27c80b553ef1cc. The I/O crate exports the in-process DWG worker control. DWG-related tests enable in-process execution, and the CLI worker test checks the error returned when the configured worker cannot start.

Changes: DWG worker updates

Layer / File(s) Summary
Align craft-libs revisions
Cargo.toml, apps/cadcraft-web/Cargo.toml
Selected dependencies and PDF backend patches now reference revision 453b0da782ccef39be9a6dac8d27c80b553ef1cc.
Expose and test worker controls
crates/io/src/lib.rs, apps/cadcraft-cli/tests/dwg_worker.rs
The I/O crate re-exports allow_in_process. The CLI worker test enables in-process conversion for baseline generation and expects a “could not start” error when the configured worker cannot start.
Enable in-process execution in DWG tests
apps/cadcraft-cli/tests/*, crates/engine/tests/*, crates/io/src/*, crates/io/tests/*
DWG-related tests enable in-process worker execution before their existing operations. Other test setups and assertions remain unchanged.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Suggested reviewers: dylanmtaylor, skylartaylor

Merge Risk: Minimal · previous review 4d238

This updates dependency revisions and adjusts tests to opt into in-process DWG conversion. No concrete merge-blocking issue was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names a dependency bump to craft-libs main at a specific commit, which is the main change in the changeset: the Cargo.toml and Cargo.lock pins, and the apps/cadcraft-web/Cargo.toml pins, all…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names a dependency bump to craft-libs main at a specific commit, which is the main change in the changeset: the Cargo.toml and Cargo.lock pins, and the apps/cadcraft-web/Cargo.toml pins, all move to revision 453b0da782. The title is short, specific, and uses no vague terms. The test changes that call allow_in_process() are a consequence of the bump and are not named, which is acceptable because the title need not cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between ef12e7a and 4d2381a.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 1

  • Cargo.toml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Moves the allow_in_process call below the local use items in ten tests, matching the order every other function body in these files uses. Behavior does not change.
@dotCooCoo

Copy link
Copy Markdown
Contributor Author

d71fb54 moves the allow_in_process() call below the local use items in ten tests (in crates/io/src/tests.rs, crates/io/src/roundtrip/tests.rs, three files in crates/io/tests/it/ and apps/cadcraft-cli/tests/it/usage.rs), the order the other function bodies in these files use. Behavior does not change. The ten tests pass, and clippy with -D warnings passes on cadcraft-io and cadcraft-cli. The branch still merges cleanly with main at 16341b6.

@vangel76

Copy link
Copy Markdown
Contributor

@dotCooCoo could this bump go to a craft-libs main commit that includes craft-libs #1580 (merge commit a3c1f3a6, "DWG: field formats survive saving an older drawing as DWG 2007 or later")? 3af2280ee3 is just before it. cadcraft #551 needs #1580 for field formats in DWG 2007+, and with your allow_in_process changes in place the newer pin would cover both. Thanks!

Every craft-libs git dependency moves from 3af2280ee3 to craft-libs main
at be0b1e655229e34f1ad263ef3d2170e46449c39b, which includes
storytold/craft-libs#1580: DWG fields from a drawing saved before DWG
2007 keep their format when it is saved as DWG 2007 or later.
Cargo.lock adds craft-dds, which craft-image-codecs now uses.
@dotCooCoo dotCooCoo changed the title Dependencies: take craft-libs main at 3af2280ee3 Dependencies: take craft-libs main at be0b1e6552 Nov 16, 2026
@dotCooCoo

dotCooCoo commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Moved the pin to craft-libs main at be0b1e6552, which includes storytold/craft-libs#1580 (a3c1f3a6), in e9638ef.

Every craft-libs git dependency and patch entry moves from be0b1e6552 to
craft-libs main at 453b0da782. Cargo.lock changes only the revision of
each craft-libs package.
@dotCooCoo dotCooCoo changed the title Dependencies: take craft-libs main at be0b1e6552 Dependencies: take craft-libs main at 453b0da782 Nov 17, 2026
@dotCooCoo

Copy link
Copy Markdown
Contributor Author

ef12e7a moves every craft-libs pin from be0b1e6552 to craft-libs main at 453b0da782. Cargo.lock changes only the revision of each craft-libs package; no crate is added or removed and no version changes. No CADCraft code changed. The description now lists the merged craft-libs changes that reach CADCraft: storytold/craft-libs#1262, storytold/craft-libs#1159, storytold/craft-libs#1270, storytold/craft-libs#1833 and storytold/craft-libs#1207.

On the cargo build host (Linux, Rust 1.100.0): fmt check, cargo check --workspace --tests, clippy with -D warnings and cargo xtask wasm pass, and cargo test --workspace --no-fail-fast --locked passed 3,768 tests in 139 binaries, with 0 failed and 26 ignored. main is still 16341b66, and the branch merges into it cleanly.

@dotCooCoo

Copy link
Copy Markdown
Contributor Author

Correction to my comment above: storytold/craft-libs#1159 does not reach CADCraft, because its staging cleanup runs only in the launcher's AppImage install (craft_update::install) and CADCraft updates through craft_update::updater::Updater; I removed it from the description.

@tanish2k09 tanish2k09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 4d2381a against current main (a770fa5); it merges cleanly.

  • Pins and lock: every craft-libs rev moves to 453b0da7, nothing is removed, and the three new lock entries (craft-dds, harfrust 0.13.3, read-fonts 0.43.3) are MIT or MIT/Apache-2.0.
  • DWG behaviour: with craft-libs#1345 a conversion without a worker is refused. The app and the CLI already call use_own_worker, so the only user-visible change is an error instead of an in-process conversion when the worker can't start, which is the safer outcome. craft-libs#1580 changes saved DWG bytes only for drawings with FIELDs.
  • DXF: the old craft-dxf pin already had every fix, so saved DXF bytes don't change.
  • Tests: I looked for DWG tests in the merged tree that skip allow_in_process() and found none that reach the bridge.

One thing to follow up outside this PR: allow_in_process sets a process-wide flag that is never cleared, so a DWG test that forgets the call passes or fails depending on which test ran first in its binary. A thread-scoped opt-in in craft-dwg would make a forgotten call fail every time. Open PRs with DWG tests (#3148, #2886, #2851, #3036) will need the call once this is in.

Not built locally yet; this rests on the Linux gate and your per-test runs. I'm running our Windows gate on it before merging. Thanks for the careful description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants