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

Make some errors serializable #5992

Merged
merged 3 commits into from
Jul 19, 2024
Merged

Conversation

sagudev
Copy link
Contributor

@sagudev sagudev commented Jul 19, 2024

Description
In servo we need errors to be serializable.

Reviewable per commits (each commit builds by itself)

Testing
It compiles.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@sagudev sagudev requested a review from a team as a code owner July 19, 2024 13:55
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
@ErichDonGubler
Copy link
Member

I don't see any blocking issues with this. I want to tag in @cwfitzgerald for thoughts on supporting this as a temperature check, but I don't see any issues with the implementation beyond what I've submitted comments for.

wgpu-core/src/instance.rs Show resolved Hide resolved
@cwfitzgerald
Copy link
Member

No problems with this landing, the only thing I'm unsure about is that these serializes have no in-codebase justification, so could be broken at some point. I don't know what to do about that problem, just noting it.

@sagudev
Copy link
Contributor Author

sagudev commented Jul 19, 2024

No problems with this landing, the only thing I'm unsure about is that these serializes have no in-codebase justification, so could be broken at some point. I don't know what to do about that problem, just noting it.

We could add test (or const asserts) that some types implements (de)serialize (like it's done for Sync/Send), but I think that would make things complicated. (de)serialize can be trivially added again if needed by consumers (mostly browsers).

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Lezdoit

@cwfitzgerald cwfitzgerald enabled auto-merge (rebase) July 19, 2024 17:37
@cwfitzgerald cwfitzgerald merged commit fc87033 into gfx-rs:trunk Jul 19, 2024
25 checks passed
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