juhaku / utoipa

Simple, Fast, Code first and Compile time generated OpenAPI documentation for Rust
Apache License 2.0
2.01k stars 160 forks source link

utoipa-gen-4.3.0 leaks crate-private type #908

Closed trysetnull closed 1 month ago

trysetnull commented 1 month ago

My Cargo.toml is referencing utoipa as follows:

[dependencies]
utoipa = { version = "4", features = ["yaml"] }

However, compilation of my library fails since version 4.3.0 (dependency on utoipa-gen 4.3.0) with the following compile error:

error[E0446]: crate-private type `parse_utils::Str` in public interface
    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/utoipa-gen-4.3.0/src/lib.rs:2847:5
     |
2847 |     pub fn parse_next_literal_str_or_include_str(input: ParseStream) -> syn::Result<Str> {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private type
...
2921 |     pub(super) enum Str {
     |     ------------------- `parse_utils::Str` declared as crate-private

For more information about this error, try `rustc --explain E0446`.

utopia-gen 4.2.0 is working for me.

juhaku commented 1 month ago

Oh man, thank you for noticing, I will make another release soon to fix this.

juhaku commented 1 month ago

Related #926 #918