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

Expose rkyv features as features for chrono users. #1368

Merged
merged 2 commits into from
Dec 29, 2023

Commits on Dec 27, 2023

  1. Expose rkyv features as features for chrono users.

    rkyv by default serializes usize as u32. This isn't ideal
    on most modern platforms and unfortunately is configured through
    a feature flag.
    
    If we just set `default-features = false` in the rkyv Cargo
    dependency, the crate fails to compile because all the size features
    are mutually exclusive. On the other hand if we want to
    e.g., change the serialization of usize to 64-bit and
    we also want to use chrono this currently fails to compile
    because chrono always enables rkyv/size_32.
    
    This re-exports the relevant rkyv features so users can
    choose which serialization to enable. The approach
    is similar to what the ordered-float crate does:
    
    https://github.com/reem/rust-ordered-float/blob/8111b345372632893af0b8aa12152f3dc7278aba/Cargo.toml#L37
    
    Signed-off-by: Gerd Zellweger <[email protected]>
    gz committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    f26895a View commit details
    Browse the repository at this point in the history
  2. Change the CI --all-features to an explicit list.

    This is due to the mutually exclusive features in rkyv which
    we expose now. `--all-features` will now activate them and the crate
    will fail to compile rkyv. We work around this by defining
    an explicit list of all mutually exclusive features to.
    
    Unfortunately there isn't an easy way to share env variables
    among different YAML files
    (actions/runner#655).
    
    There also isn't a good way to specify `--all-features` minus
    "just a few" (rust-lang/cargo#3126)
    aside from giving the complete list.
    
    Signed-off-by: Gerd Zellweger <[email protected]>
    gz committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    70dfc07 View commit details
    Browse the repository at this point in the history