Skip to content

Replace serde deps with minicbor - #38

Open
emostov wants to merge 6 commits into
aws:mainfrom
emostov:zeke-remove-serde
Open

Replace serde deps with minicbor#38
emostov wants to merge 6 commits into
aws:mainfrom
emostov:zeke-remove-serde

Conversation

@emostov

@emostov emostov commented Oct 10, 2022

Copy link
Copy Markdown

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.

Comment thread Makefile

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

Copy link
Copy Markdown
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.

emostov added 6 commits March 8, 2023 21:05
`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

emostov commented Apr 26, 2023

Copy link
Copy Markdown
Author

@petreeftime any updates here?

@petreeftime

Copy link
Copy Markdown
Contributor

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

@emostov

emostov commented Jul 3, 2023

Copy link
Copy Markdown
Author

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
Copy Markdown
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
Copy Markdown
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