Closed ShaneMurphy2 closed 6 months ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Not sure if I did the CI modification correctly, please take a look.
Addresses #436
Looks like one thing I still need to iron out (besides the CLA 😬) is the situation where serde1
is enabled but the user explicitly writes #[service(derive = [Serialize, Deserialize])]
. That currently causes a conflicting implementation error. I guess I would need to scan through the paths in the meta list and look for Serialize
or Deserialize
. Of course, that wouldn't fix someone importing Serialize
under a different name.
the situation where serde1 is enabled but the user explicitly writes #[service(derive = [Serialize, Deserialize])]
Oh, this is what I meant to address by my 4th bullet of https://github.com/google/tarpc/issues/436#issuecomment-1961860313: only implicitly derive serialize when derive = [...]
is not present.
the situation where serde1 is enabled but the user explicitly writes #[service(derive = [Serialize, Deserialize])]
Oh, this is what I meant to address by my 4th bullet of #436 (comment): only implicitly derive serialize when
derive = [...]
is not present.
Gotcha, will work on it.
Should be good now, I think I incorrectly updated the CI file though. Either way, do we wanna bikeshed the name a bit? Is derive
clear? I should also update the documentation for the macro.
Cleaned up the implementation a bit.
Added some docs and should fix CI 🤞
Still seeing some test failures:
Still seeing some test failures:
Hm, tests passed locally, and those outputs look the same except for the number of candidate traits. Interesting.
Still seeing some test failures:
Hm, tests passed locally, and those outputs look the same except for the number of candidate traits. Interesting.
sometimes I've seen these changes based on whether the tests were run with nightly vs stable rustc?
Still seeing some test failures:
Hm, tests passed locally, and those outputs look the same except for the number of candidate traits. Interesting.
sometimes I've seen these changes based on whether the tests were run with nightly vs stable rustc?
I think it's that the test matrix in CI is enabling features that bring in dependencies that provide a serialize method under a trait. Because of that, the compiler is suggesting more items, causing the output to be different. I could re-generate the stderr files with all feature enabled, but I'm not sure if that would cause CI to fail in a different spot when it toggles the feature off. I think I'll try refactoring the test to use fully qualified syntax to the serialize method so that the error message is not ambiguous.
That should fix it, I'm a little worried about how brittle these tests are though. Let me know if you think they're more trouble than they're worth.
Oh looks like the CLA hasn't been signed, either? Is that something you can take a look at?
Oh looks like the CLA hasn't been signed, either? Is that something you can take a look at?
Yeah, legal is looking at it. Should just be due diligence and not a problem.
That should fix it, I'm a little worried about how brittle these tests are though. Let me know if you think they're more trouble than they're worth.
Forgot to overwrite the .stderr files 🤦
Green!
Re: CLA, the legal team is either at a conference or out sick, so it might be a few more days.
Re: CLA, the legal team is either at a conference or out sick, so it might be a few more days.
Approved, just waiting for wheels to turn.
Should be good to re-run the pipeline!
Thanks a lot! This is a great generalization.
Replace the bespoke "derive_serde" with a more flexible "derive = [, , ...]" form.
Deprecate the old "derive_serde" form, and emit deprecation warnings.
Add trybuild tests in a separate test crate to ensure the deprecation, features, and error messages all behave as expected. This technique of a separate trybuild test crate is borrowed from tokio/tests-build. Update CI to run this new crate's tests under the serde matrix.