gannan08 / rdf-canonize-rs

Please see https://github.com/digitalbazaar/rdf-canonize-rs
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Compatibility error #15

Closed mattcollier closed 3 years ago

mattcollier commented 3 years ago

This test demonstrates the failure:

https://github.com/digitalbazaar/loop-bench/blob/b066d4782f20fb6ff6fc1d916ffe0d043f33b0aa/index23.js#L67-L68

The assertion will pass if the created date is modified to 2020-12-29T21:12:26 https://github.com/digitalbazaar/loop-bench/blob/b066d4782f20fb6ff6fc1d916ffe0d043f33b0aa/index23.js#L42

The assertion also fails if L42 is removed entirely.

mattcollier commented 3 years ago

I just rolled back to https://github.com/gannan08/rdf-canonize-rust/commit/b574368a9158772f0374c8c6648535cecadef079

And the test suite is green, but the merge event assertion is broken. I'm going to try to identify the minimum failing test case.

mattcollier commented 3 years ago

OK, this minimum document is a PASS

_:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/webledger#ContinuityMergeEvent> .
_:b0 <https://w3id.org/security#proof> _:b1 .
_:b2 <http://purl.org/dc/terms/created> "2018-12-21T23:40:20Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> _:b1 .
JS -------
_:c14n0 <http://purl.org/dc/terms/created> "2018-12-21T23:40:20.269Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> _:c14n2 .
_:c14n1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/webledger#ContinuityMergeEvent> .
_:c14n1 <https://w3id.org/security#proof> _:c14n2 .

Rust -----
_:c14n0 <http://purl.org/dc/terms/created> "2018-12-21T23:40:20.269Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> _:c14n2 .
_:c14n1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/webledger#ContinuityMergeEvent> .
_:c14n1 <https://w3id.org/security#proof> _:c14n2 .

Assertion Passed
mattcollier commented 3 years ago

OK, here's the minimum failure case:

_:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/webledger#ContinuityMergeEvent> .
_:b0 <https://w3id.org/security#proof> _:b1 .
_:b0 <https://w3id.org/webledger#parentHash> "67erx8opxkhZsdjbFpz5m2Y44ijaNwYDxcGHKtp1KiQk" .
_:b0 <https://w3id.org/webledger#parentHash> "7zRgrrxhxbZ1dWD9Rd1TSdZHUiJ1t6UEjxS7Bc9FNSAM" .
JS -------
_:c14n1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/webledger#ContinuityMergeEvent> .
_:c14n1 <https://w3id.org/security#proof> _:c14n0 .
_:c14n1 <https://w3id.org/webledger#parentHash> "67erx8opxkhZsdjbFpz5m2Y44ijaNwYDxcGHKtp1KiQk" .
_:c14n1 <https://w3id.org/webledger#parentHash> "7zRgrrxhxbZ1dWD9Rd1TSdZHUiJ1t6UEjxS7Bc9FNSAM" .

Rust -----
_:c14n0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/webledger#ContinuityMergeEvent> .
_:c14n0 <https://w3id.org/security#proof> _:c14n1 .
_:c14n0 <https://w3id.org/webledger#parentHash> "67erx8opxkhZsdjbFpz5m2Y44ijaNwYDxcGHKtp1KiQk" .
_:c14n0 <https://w3id.org/webledger#parentHash> "7zRgrrxhxbZ1dWD9Rd1TSdZHUiJ1t6UEjxS7Bc9FNSAM" .