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: 6 additions & 6 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions THIRD-PARTY-LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2534,9 +2534,9 @@ limitations under the License.
** itoa; version 1.0.18 -- https://crates.io/crates/itoa
** libc; version 0.2.189 -- https://crates.io/crates/libc
** manyhow-macros; version 0.11.4 -- https://crates.io/crates/manyhow-macros
** openjd-expr; version 0.3.0 -- https://crates.io/crates/openjd-expr
** openjd-model; version 0.5.1 -- https://crates.io/crates/openjd-model
** openjd-sessions; version 0.5.1 -- https://crates.io/crates/openjd-sessions
** openjd-expr; version 0.4.0 -- https://crates.io/crates/openjd-expr
** openjd-model; version 0.5.2 -- https://crates.io/crates/openjd-model
** openjd-sessions; version 0.5.2 -- https://crates.io/crates/openjd-sessions
** pin-project-lite; version 0.2.17 -- https://crates.io/crates/pin-project-lite
** portable-atomic; version 1.15.0 -- https://crates.io/crates/portable-atomic
** proc-macro2; version 1.0.107 -- https://crates.io/crates/proc-macro2
Expand Down
6 changes: 3 additions & 3 deletions rust-bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ name = "_openjd_rs"
crate-type = ["cdylib", "rlib"]

[dependencies]
openjd-expr = "0.3.0"
openjd-model = "0.5.0"
openjd-sessions = "0.5.0"
openjd-expr = "0.4.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

openjd-expr 0.3.0 -> 0.4.0 is a SemVer-breaking bump for a 0.x crate, and this PR changes no binding source. Two of the mirrored enums in rust-bindings/src/expr/profile.rs fail silently rather than at compile time, so neither cargo build nor the existing test suite would catch drift here.

1. ExprRevision — silent mislabeling. From<ExprRevision> for PyExprRevision (profile.rs:105-115) has a wildcard arm mapping any unknown upstream variant back to V2026_02, guarded by allow(unreachable_patterns). If 0.4.0 added a revision and moved ExprRevision::CURRENT to it, then ExprProfile() — which resolves to ExprRevision::CURRENT at profile.rs:395 — would build a profile on the new revision while the revision getter reports ExprRevision.V2026_02, and the Python ExprRevision.CURRENT classattr (profile.rs:61) would still be pinned to the old variant. The wildcard suppresses the non-exhaustive-match warning, so the build stays green. No test asserts the mapping either: test_equality.py:190 only compares CURRENT == CURRENT, and test_pickle.py:80 only round-trips the literal V2026_02 — both pass regardless. __repr__ at profile.rs:487-491 has the same wildcard.

2. ExprExtension — import-time panic. PyExprExtension::ALL (profile.rs:152-160) maps over ExprExtension::ALL through From<ExprExtension>, whose body is unreachable!("ExprExtension has no variants in this crate version") (profile.rs:178-183). If 0.4.0 shipped the first ExprExtension variant, this panics — and because ALL is a classattr, it fires during module import, not on first use.

Worth confirming against the 0.4.0 release notes that neither enum gained a variant. If they did not, consider replacing the ExprRevision wildcard with a loud failure — matching how ExprValue and TypeCode already handle this at expr_value.rs:179 and expr_type.rs:76 — so the next bump breaks the build instead of quietly reporting the wrong revision.

openjd-model = "0.5.2"
openjd-sessions = "0.5.2"
tokio = { version = "1", features = ["rt-multi-thread"] }
uuid = { version = "1", features = ["v4"] }
serde_json = "1"
Expand Down
Loading