fix: parse signal min/max as NumericValue#76
Merged
nyurik merged 4 commits intooxibus:mainfrom Mar 20, 2026
Merged
Conversation
7113604 to
af80d9f
Compare
trnila
commented
Feb 24, 2026
| min: | ||
| Uint: 0 | ||
| max: | ||
| Uint: 18446744073709551615 |
Member
Author
There was a problem hiding this comment.
The fix for failing compilation on dbc-codegen.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
c8dd3a7 to
ba5bc06
Compare
Min/max values like 18446744073709551615 cannot be represented as f64 without the loss of precision. Use NumericValue to parse the value as i64, u64 or f64.
5f475f0 to
3a07492
Compare
Member
|
i'm ok with the breaking change if it makes ecosystem better - plus its not that significant it seems... |
Merged
nyurik
added a commit
that referenced
this pull request
Mar 20, 2026
## 🤖 New release
* `can-dbc`: 8.1.0 -> 9.0.0 (⚠ API breaking changes)
### ⚠ `can-dbc` breaking changes
```text
--- failure copy_impl_added: type now implements Copy ---
Description:
A public type now implements Copy, causing non-move closures to capture it by reference instead of moving it.
ref: rust-lang/rust#100905
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.46.0/src/lints/copy_impl_added.ron
Failed in:
can_dbc::NumericValue in /tmp/.tmpiaRx6y/can-dbc/src/ast/numeric_value.rs:7
```
<details><summary><i><b>Changelog</b></i></summary><p>
<blockquote>
## [9.0.0](v8.1.0...v9.0.0) -
2026-03-20
### Fixed
- parse signal min/max as `NumericValue`
([#76](#76))
- ast/message_id: use 0x1FFF_FFFF (1<<29 - 1) instead of 2^29 in test
([#77](#77))
</blockquote>
</p></details>
---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Min/max values like
18446744073709551615cannot be represented asf64without the loss of precision - they are represented as18446744073709552000instead.Use
NumericValueto parse the value asi64,u64orf64, but its API breaking change.This will fix uncompilable test case in dbc_codegen.
Not sure if we should enforce both min and max are the same
NumericValueenum variant or create a newLimittype? But this is maybe the responsibility of dbc-codegen?