Skip to content

Conversation

@tottoto
Copy link
Contributor

@tottoto tottoto commented Oct 21, 2025

Motivation

cargo-public-api-crates seems to have version conflict at the dependencies.

error: failed to compile `cargo-public-api-crates v0.2.0 (https://github.com/davidpdrsn/cargo-public-api-crates#13bf827a)`, intermediate artifacts can be found at `/tmp/cargo-installDFx8K1`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Caused by:
  rustc 1.80.0-nightly is not supported by the following package:
    indexmap@2.12.0 requires rustc 1.82
  Either upgrade rustc or select compatible dependency versions with
  `cargo update <name>@<current-ver> --precise <compatible-ver>`
  where `<compatible-ver>` is the latest version supporting rustc 1.80.0-nightly

https://github.com/tower-rs/tower-http/actions/runs/18697143413/job/53317419830

Solution

Switches cargo-public-api-crates to cargo-check-external-types.

@jplatte
Copy link
Member

jplatte commented Dec 2, 2025

As of #619 we're using my fork of cargo-public-api-crates. Do you think it still makes sense to switch?

@tottoto tottoto force-pushed the cargo-check-external-types branch from 7030c22 to eff768b Compare December 3, 2025 08:52
@tottoto
Copy link
Contributor Author

tottoto commented Dec 3, 2025

I think a benefit of cargo-check-external-types is that it handles internal crates like pin-project-lite properly.

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

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

That's actually a somewhat recent bug that pin-project-lite is found as a public dependency by cargo-public-api-crates.. I think.

Anyways, we can switch. I also don't need to maintain cargo-public-api-crates anymore then :)

@jplatte
Copy link
Member

jplatte commented Dec 3, 2025

Mind doing the same for axum?

@tottoto
Copy link
Contributor Author

tottoto commented Dec 3, 2025

Sure. Opened tokio-rs/axum#3576.

@tottoto
Copy link
Contributor Author

tottoto commented Dec 3, 2025

I noticed that I posted #613 (comment) with a copy and paste mistake: the place of cargo-public-api-crates in the post was intended to be cargo-check-external-types. I fixed it.

@jplatte jplatte merged commit 81b8231 into tower-rs:main Dec 3, 2025
11 checks passed
@jplatte
Copy link
Member

jplatte commented Dec 3, 2025

Yeah I figured you meant it that way ;)

@tottoto tottoto deleted the cargo-check-external-types branch December 3, 2025 13:11
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