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

Explicitly cargo update in path dependency workspaces. #901

Merged
merged 2 commits into from
Sep 2, 2024

Conversation

obi1kenobi
Copy link
Owner

Resolves a variant of #167 described here:
#167 (comment)

This issue was observed during a CI run of #900, where an older
tokio-stream version was using a brand-new tokio with stronger
guarantees: several types had newly become UnwindSafe.

Since the baseline tokio-stream was a registry version, it was using
a fresh lockfile with the latest dependencies. The current arm,
meanwhile, was a path dependency fixed to a specific commit, where
cargo had decided to reuse an older version of tokio without the
UnwindSafe trait on those types.

This presented as a (phantom) breaking change: the older tokio-stream's
types were UnwindSafe due to auto-trait propagation from a newer tokio
while the newer tokio-stream with an older tokio did not have that trait.

The solution is to explicitly run cargo update inside path dependency
workspaces we create. This way, both path dependency and index-based
rustdoc JSON generation happens with the latest versions of the target
library's own dependencies.

@obi1kenobi obi1kenobi enabled auto-merge (squash) September 2, 2024 15:43
Resolves a variant of #167 described here:
#167 (comment)

This issue was observed during a CI run of #900, where an older
tokio-stream version was using a brand-new tokio with stronger
guarantees: several types had newly become `UnwindSafe`.

Since the baseline tokio-stream was a registry version, it was using
a fresh lockfile with the latest dependencies. The current arm,
meanwhile, was a path dependency fixed to a specific commit, where
cargo had decided to reuse an older version of tokio without the
`UnwindSafe` trait on those types.

This presented as a (phantom) breaking change: the older tokio-stream's
types were `UnwindSafe` due to auto-trait propagation from a newer tokio
while the newer tokio-stream with an older tokio did not have that trait.

The solution is to explicitly run `cargo update` inside path dependency
workspaces we create. This way, both path dependency and index-based
rustdoc JSON generation happens with the latest versions of the target
library's own dependencies.
@obi1kenobi obi1kenobi force-pushed the update_path_dependency_lockfile branch from b6fb4bd to 9b1139f Compare September 2, 2024 15:46
@obi1kenobi obi1kenobi merged commit 8c4c51c into main Sep 2, 2024
32 checks passed
@obi1kenobi obi1kenobi deleted the update_path_dependency_lockfile branch September 2, 2024 15:51
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.

1 participant