Repository navigation
Dependencies: take craft-libs main at 453b0da782 - #3228
6 commits merged into
Conversation
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.
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
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.
|
d71fb54 moves the |
|
@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 |
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.
|
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.
|
ef12e7a moves every craft-libs pin from On the cargo build host (Linux, Rust 1.100.0): fmt check, |
|
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 ( |
tanish2k09
left a comment
There was a problem hiding this comment.
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.
1c5e4f4
Every craft-libs git dependency now uses craft-libs
mainat453b0da782ccef39be9a6dac8d27c80b553ef1cc: the entries inCargo.toml, its[patch.crates-io]entries forkrilla,hayro-syntaxandhayro-jbig2, andcraft-web-apiandcraft-web-hostinapps/cadcraft-web/Cargo.toml. Before this change they were pinned at eleven different commits.Cargo.locknow has one entry for each craft-libs crate, addscraft-dds, whichcraft-image-codecsnow uses, and addsharfrust0.13.3 andread-fonts0.43.3 from crates.io, whichcraft-font-catalognow uses. This movescraft-updatepaste9829954, 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-cliconfigure 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_workernow re-exportsallow_in_process, and each test or test helper that converts DWG in its own process calls it first. The last step ofapps/cadcraft-cli/tests/dwg_worker.rsnow 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
dd/MM/yyyyor a number such as%lu2) from a drawing saved before DWG 2007 is kept when the drawing is saved as DWG 2007 or later (DWG: field formats survive saving an older drawing as DWG 2007 or later craft-libs#1580).Updater::tick, whichcrates/ui-egui/src/updates_ui.rscalls every frame, no longer reads the installed files. A Flatpak installed from a repository is updated throughflatpak update, and the launcher's bundle no longer replaces it (feat(update): support remote Flatpak updates and experimental OCI migration (official-head replacement) craft-libs#1318, cover the Flatpak repository guard and update command craft-libs#1956). Choosing Later on the prompt for a downloaded update no longer closes CADCraft once the open drawings are saved; the update still installs when CADCraft exits (update: Later on a ready update no longer closes the app after a save craft-libs#1262).crates/engine/src/doc_path.rs): docpath: hold a non-Unicode document's root to the namespace rules craft-libs#534 applies the same root rules to a document path that is not Unicode as to any other path, and refuses the link when the platform splits that path differently.Z, a smoothSorTsegment starts from the current point instead of reflecting the control point from before the close (craft-svg: bound entity scans and reset smooth controls after Z craft-libs#1878). A damaged gzip member after the first one in an SVGZ file is an error instead of being dropped (Reject damaged later SVGZ members craft-libs#1698).craft-dds, which also reads BC4 and BC5 textures and refuses premultiplied-alpha DX10 textures (DDS textures: normal maps and grayscale maps save compressed (BC5/BC4), and DDS saves and opens faster craft-libs#1774).9b7b748f, pushed tomainwithout a pull request).craft_ui::ComboBox.window.cadcraftare waiting, another call is refused with a busy error before it reaches the app (web-api: refuse calls beyond an in-flight limit, and say who can call window.<app> craft-libs#733;apps/cadcraft-web/src/api.rs:37uses the default limit ofPageApi::new).Testing
On the cargo build host (Linux, Rust 1.100.0), on
ef12e7a9(base16341b66, the currentmain):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.f81c52b9(craft-libs3af2280ee3), each of the 2,537 tests incadcraft-io,cadcraft-engineandcadcraft-cliwas also run in its own process, so that no test passes only because another one opted in first; all passed apart from one that readsCARGO_PKG_NAME, which onlycargo testsets.cargo xtask wasm: passes.cargo tree -dlists no craft-libs crate twice.#3204 changes the
rfdline next to thecraft-updateline, and the two conflict inCargo.tomlandCargo.lock. #3170 and #3171 (Torentje) each conflict with this branch inCargo.lock, and #2938 (copoka) conflicts with it inCargo.lockandapps/cadcraft-web/Cargo.toml.Summary by CodeRabbit
Chores
Tests