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

remove bare Serialize and Deserialize progenitor patch imperatives #739

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

ahl
Copy link
Contributor

@ahl ahl commented Aug 7, 2024

This doesn't update progenitor as it would require oxidecomputer/omicron#6258 as well, but I've tested both together locally with an updated progenitor.

@ahl ahl requested a review from gjcolombo August 7, 2024 19:57
Copy link
Contributor

@gjcolombo gjcolombo left a comment

Choose a reason for hiding this comment

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

LGTM--thanks for taking the time to do this.


PciPath = { derives = [
Copy, Clone, Debug, Ord, Eq, PartialEq, PartialOrd, Serialize, Deserialize
Copy, Clone, Debug, Ord, Eq, PartialEq, PartialOrd
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can also remove Clone and Debug from this one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks

@ahl ahl merged commit 399ce1a into master Aug 8, 2024
11 checks passed
@ahl ahl deleted the progen-update branch August 8, 2024 00:12
@davepacheco
Copy link

Recording here for future searchability: this fixes a problem I ran into when trying to deal with oxidecomputer/testbed#62. While trying to pull a fix for oxidecomputer/falcon#81 into my testbed clone, updating libfalcon also wound up updating propolis-client and progenitor and typify. But the new Progenitor (post oxidecomputer/progenitor#882) doesn't use serde::{Deserialize, Serialize} and so it doesn't work with propolis-client prior to this PR. In particular, my testbed build failed with:

error: cannot find derive macro `Deserialize` in this scope
  --> /home/dap/.cargo/git/checkouts/propolis-12517f89d3d9f483/722bedc/lib/propolis-client/src/lib.rs:8:1
   |
8  | / progenitor::generate_api!(
9  | |     spec = "../../openapi/propolis-server.json",
10 | |     interface = Builder,
11 | |     tags = Separate,
...  |
31 | |     }
32 | | );
   | |_^
   |
   = help: consider importing this derive macro:
           serde::Deserialize
   = note: this error originates in the macro `progenitor::generate_api` (in Nightly builds, run with -Z macro-backtrace for more info)

This PR should fix that, though in testbed#62 I also avoided pulling in the new progenitor because it wasn't what I was trying to do.

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.

3 participants