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

[font-types] Make serde feature explicitly require std #528

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Jul 4, 2023

Previously it would have been possible to disable default features and also enable the serde feature, which would have caused compilation to fail. This now makes explicit that the serde feature requires std.

JMM

@dfrg
Copy link
Member

dfrg commented Jul 4, 2023

Do we actually need this? Do any of the types in this crate actually require std for serde?

I’m also curious about having std as a default feature. There doesn’t appear to be any way to turn this off from read-fonts.

@cmyr
Copy link
Member Author

cmyr commented Jul 5, 2023

Good Q actually? The thing that caused this to jump out at me was the custom deserialize for Tag, where one of the methods requires formatting with std::fmt types, but maybe those are also available in core?

@dfrg
Copy link
Member

dfrg commented Jul 5, 2023

I think core::fmt covers the same functionality as std but I’m not sure how that interacts with serde and custom (de)serialization.

Currently we run `cargo check` with no-std just to sanity check that we
can compile, but we don't run tests, and they were borked.
@cmyr
Copy link
Member Author

cmyr commented Jul 5, 2023

okay you're totally right. I've changed this patch to now just fix one broken test case, and removed the serde->std requirement.

Copy link
Member

@dfrg dfrg left a comment

Choose a reason for hiding this comment

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

🚢

@cmyr cmyr merged commit c6b4066 into main Jul 6, 2023
7 checks passed
@cmyr cmyr deleted the fixup-serde-feature branch July 6, 2023 14:47
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