-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Upgrade to zcbor 0.6.0 #51219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to zcbor 0.6.0 #51219
Conversation
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
((((*input)._record_bt >= INT64_MIN) && | ||
((*input)._record_bt <= INT64_MAX)) || | ||
((((*input)._record_bt >= -9223372036854775807LL) && | ||
((*input)._record_bt <= 9223372036854775807LL)) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for the switch from defines to literals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines are to be reverted back, as you already noticed. INT64_MIN and INT64_MAX shall be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Array size calculation coming from ZCBOR side is a nice addition.
((((*input)._record_bt >= INT64_MIN) && | ||
((*input)._record_bt <= INT64_MAX)) || | ||
((((*input)._record_bt >= -9223372036854775807LL) && | ||
((*input)._record_bt <= 9223372036854775807LL)) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines are to be reverted back, as you already noticed. INT64_MIN and INT64_MAX shall be used.
@jheiskan81 Please review. |
587728e
to
6867b47
Compare
@oyvindronningstad Out of curiosity, I was under the impression that this code was autogenerated and there's not much room for modifications? |
@rlubos The generated code is formatted with clang-format, and then a patch is applied. |
@@ -37,9 +36,8 @@ static bool encode_repeated_record_bn(zcbor_state_t *state, const struct record_ | |||
bool tmp_result = ((((zcbor_int32_put(state, (-2)))) && | |||
(zcbor_tstr_encode(state, (&(*input)._record_bn))))); | |||
|
|||
if (!tmp_result) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this clang rules different than normal zephyr. I was wondering that {
} is mandatory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the clang-format automatically uses the zephyr rules.
f2337c8
to
a4d3558
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
a4d3558
to
0e97245
Compare
0e97245
to
d66f14c
Compare
doc/releases/release-notes-3.3.rst
Outdated
changes for Zephyr: | ||
|
||
* In the zcbor codebase, the ``ARRAY_SIZE`` macro has been renamed to | ||
``ZCBOR_ARRAY_SIZE`` to not collide with Zephyr's ``ARRAY_SIZE_`` macro. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``ZCBOR_ARRAY_SIZE`` to not collide with Zephyr's ``ARRAY_SIZE_`` macro. | |
``ZCBOR_ARRAY_SIZE`` to not collide with Zephyr's ``ARRAY_SIZE`` macro. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to
:c:macro:`ARRAY_SIZE`
@@ -253,7 +253,7 @@ manifest: | |||
revision: e8920192b66db4f909eb9cd3f155d5245c1ae825 | |||
path: modules/lib/uoscore-uedhoc | |||
- name: zcbor | |||
revision: a0d6981f14d4001d6f0d608d1a427f9bc6bb6d02 | |||
revision: 0.6.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be a commit ID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have tags now on zcbor fork. The tags are the same as in upstream.
Brings a few quality-of-life improvements for Zephyr, notably: - No more collision with ARRAY_SIZE() - C++ improvements Add entry in release notes. Signed-off-by: Øyvind Rønningstad <[email protected]>
Since it's better at resolving conflicts. Commit regenerated files before applying patch. Signed-off-by: Øyvind Rønningstad <[email protected]>
zcbor 0.6.0 has changed the argument order to put code/convert/validate first. Signed-off-by: Øyvind Rønningstad <[email protected]>
Also do clang-format and apply patch. Signed-off-by: Øyvind Rønningstad <[email protected]>
File created by commiting changes and running git diff HEAD~1.. > lwm2m_senml_cbor.patch Signed-off-by: Øyvind Rønningstad <[email protected]>
d66f14c
to
5467512
Compare
@carlescufi You gave me 1minute to approve ;). I know that I am to slow with reviews, but at least give me a chance :D. |
The West manifest in Zephyr 3.3 contains a tag (instead of a SHA) for zcbor [1]. OE standard practice is to always specifiy revisions using SHAs, so in the Jinja template, use the new resolve_revision filter to resolve any tags. [1] zephyrproject-rtos/zephyr#51219 (comment) Signed-off-by: Peter Hoyes <[email protected]> Signed-off-by: Naveen Saini <[email protected]>
The West manifest in Zephyr 3.3 contains a tag (instead of a SHA) for zcbor [1]. OE standard practice is to always specifiy revisions using SHAs, so in the Jinja template, use the new resolve_revision filter to resolve any tags. [1] zephyrproject-rtos/zephyr#51219 (comment) Signed-off-by: Peter Hoyes <[email protected]> Signed-off-by: Naveen Saini <[email protected]>
No description provided.