Skip to content

v0.5.3

Choose a tag to compare

@github-actions github-actions released this 28 Mar 16:51
· 432 commits to main since this release

Chore

  • replace removed typfify::TypeSpace::to_string() with prettyplease
    The use of typify assumed that rustfmt was installed... which turned out not to be a great assumption. We've modified typify to remove the dependency on rustfmt-wrapper and have removed the interface that used it ToString::to_string(). Instead we recommend that consumers use prettyplease for build.rs uses such as the one in this crate. See oxidecomputer/typify#221

    Alternatively, the build.rs could just emit the tokens unformatted (to remove the build-time dependency on prettyplease and syn), but that seems annoying if and when you need to look at the generated code.

    FWIW syn is an existing dependency; prettyplease is the only new new crate I see in Cargo.lock.

    I can share the full diff between the old and new versions of the substrait_text.rs, but here's a sample:

    @@ -1593,22 +1831,27 @@
                 T: std::convert::TryInto<Option<super::SessionDependent>>,
                 T::Error: std::fmt::Display,
             {
    -            self.session_dependent = value.try_into().map_err(|e| {
    -                format!(
    -                    "error converting supplied value for session_dependent: {}",
    -                    e
    -                )
    -            });
                 self
    +                .session_dependent = value
    +                .try_into()
    +                .map_err(|e| {
    +                    format!(
    +                        "error converting supplied value for session_dependent: {}", e
    +                    )
    +                });
    +            self
             }
             pub fn variadic<T>(mut self, value: T) -> Self
             where
                 T: std::convert::TryInto<Option<super::VariadicBehavior>>,
                 T::Error: std::fmt::Display,
             {
    -            self.variadic = value
    +            self
    +                .variadic = value
                     .try_into()
    -                .map_err(|e| format!("error converting supplied value for variadic: {}", e));
    +                .map_err(|e| {
    +                    format!("error converting supplied value for variadic: {}", e)
    +                });
                 self
             }
             pub fn window_type<T>(mut self, value: T) -> Self

Commit Statistics

  • 1 commit contributed to the release.
  • 4 days passed between releases.
  • 1 commit was understood as conventional.
  • 1 unique issue was worked on: #73

Commit Details

view details
  • #73
    • Replace removed typfify::TypeSpace::to_string() with prettyplease (3991a0f)