Skip to content

Bump serde_jcs#27

Merged
makew0rld merged 1 commit into
mainfrom
bump-serde-jcs-0.2
Jun 10, 2026
Merged

Bump serde_jcs#27
makew0rld merged 1 commit into
mainfrom
bump-serde-jcs-0.2

Conversation

@makew0rld

Copy link
Copy Markdown
Contributor

Created to fix https://github.com/eqtylab/integrity-monorepo/issues/1653

After this is merged and tagged, I can merge a similar PR to integrity-monorepo.

At least one of the errors from that issue is because ssi 0.16 upgrade brought in serde_jcs, but the old version panics on numbers.

serde_jcs 0.1.0's `Formatter::write_number_str` is a `todo!()` that panics
("not yet implemented: Handle number str (u128/i128)") whenever a JSON value
containing a number is JCS-canonicalized while serde_json's `arbitrary_precision`
feature is active in the build. Since the VC 2.0 migration (ssi 0.16) that
feature is force-enabled build-wide via did-ethr -> serde_json/arbitrary_precision
and Cargo feature unification, so every `serde_jcs::to_string` over number-bearing
JSON now panics -- breaking `cid compute --canonicalize json-jcs` and VC issuance
in the integrity-monorepo fixtures.

Upstream serde_jcs 0.2.0 implements write_number_str / write_i128 / write_u128,
fixing the panic. Canonical output is byte-identical for inputs 0.1.0 could
already serialize (both format numbers via ryu-js per the JCS ECMAScript number
grammar), so existing CIDs are unaffected; 0.2.0 only adds the number paths
0.1.0 left as `todo!()`.

Bump the pin in the two crates that compute JCS CIDs (integrity-cid and
integrity-lineage-models). ssi-jwk still pins ^0.1.0, so serde_jcs 0.1.0 remains
in the tree for it (JWK thumbprints, no numeric fields -> never hits the todo).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@makew0rld makew0rld requested a review from cameronfyfe June 10, 2026 17:26
@makew0rld makew0rld merged commit 72ed753 into main Jun 10, 2026
2 of 3 checks passed
@makew0rld makew0rld deleted the bump-serde-jcs-0.2 branch June 10, 2026 17:46
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.

2 participants