Skip to content
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

Replace serde deps with minicbor #38

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

emostov
Copy link

@emostov emostov commented Oct 10, 2022

Issue #, if available:

#19

Description of changes:

serde_cbor is deprecated. This PR removes serde_cbor and it's associated dependencies, replacing them with minicbor, a library that is currently maintained. This has the added benefit of slimming down the dependency tree, reducing dependency review burden.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -1,7 +1,7 @@
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.

SRC_PATH = $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
HOST_MACHINE = $(shell uname -m)
HOST_MACHINE = x86_64
Copy link
Author

Choose a reason for hiding this comment

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

This old setup won't work on macos arm64 from best I can understand. I needed to make the changes in this file in order to get things working on my local machine. Happy to revert the changes here if they are not desired.

From what I understand, to get reproducible results across docker host platforms, we can pin this to something like x86 and then just make sure to specify the platform when both building and running the docker image.

`serde_cbor` is deprecated. This PR removes `serde_cbor` and its associated dependencies, replacing them with `minicbor`, a library that is currently maintained. This has the added benefit of slimming down the dependency tree, reducing dependency review burden.
@emostov
Copy link
Author

emostov commented Apr 26, 2023

@petreeftime any updates here?

@petreeftime
Copy link
Contributor

Last time I tested this, it didn't work for me. I'll take another look.

@emostov
Copy link
Author

emostov commented Jul 3, 2023

Last time I tested this, it didn't work for me. I'll take another look.

@petreeftime can anything be done to move this forward?

@petreeftime
Copy link
Contributor

I no longer work on this project, so I will not be able to help, but it seems that minicbor_derive only supports encoding and decoding with indexed fields, rather than fields which are named, as the NSM provides, so the unit tests might work since they self generate the data, but the answers from the NSM will not work. As such, serialization and deserialization needs to be done by hand and cannot work otherwise.

@meerd @shtaked

@petreeftime
Copy link
Contributor

IMO, adding some unit tests with actual API responses from NSM would make it easy to discover such issues and prevent backwards incompatibility.

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