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

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

Closed
trysetnull opened this issue May 6, 2024 · 5 comments · Fixed by #909 or #926
Closed

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

trysetnull opened this issue May 6, 2024 · 5 comments · Fixed by #909 or #926

Comments

@trysetnull
Copy link

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
Copy link
Owner

juhaku commented May 6, 2024

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

@juhaku
Copy link
Owner

juhaku commented May 15, 2024

Related #926 #918

@ok300
Copy link

ok300 commented Oct 7, 2024

@juhaku can you please publish a minor point release with this fix?

Now I have to pin

utoipa-gen = { version = "=4.2.0" }

otherwise Cargo goes for 4.3.0.

🙏

@juhaku
Copy link
Owner

juhaku commented Oct 7, 2024

@ok300 Fix for this has been released here https://github.com/juhaku/utoipa/releases/tag/utoipa-gen-4.3.1 and is found from crates.io: https://crates.io/crates/utoipa-gen/4.3.1

@ok300
Copy link

ok300 commented Oct 7, 2024

Thank you sir!

@juhaku juhaku moved this from Done to Released in utoipa kanban Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Released
3 participants