-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Cycle detected with significant destructor from 1.58 #93296
Comments
The way to reproduce this locally is to activate the |
Thank you, you are right. I am now able to reproduce this locally. I found #92725, but haven't made the connection because of the "closures" bit. |
thanks @steffahn for the tip. This issue looks to be duplicate, so I'm going to close it. (but feel free to reopen if it's not) |
Rust 2021 Move to rust version 2021 Steps: - Bumpt rust to 1.61 to run `cargo fix --edition`. I encountered [this](rust-lang/rust#93296), which was resolved by bumping rust. - `cargo fix --edition` - `find ./ -type f -name "*Cargo\.toml" -exec sed -i 's/2018/2021/g' {} \;` - Manually remove clippy warnings. Mostly removing inline `std::convert::TryFrom`, which now is automatically imported. - `allow[clippy::await_holding_lock]` for `replica_test` and and ledger canister notified test. - `find ./ -type f -name "*BUILD\.bazel" -exec sed -i '/2021/d' {} \;` - Go back to rust 1.60 Special attention is required for these files, where `cargo fix --edition` did a larger change ``` bitcoin/adapter/src/connectionmanager.rs http_handler/src/lib.rs messaging/src/state_machine/tests.rs nns/integration_tests/src/fuzz.rs transport/src/data_plane.rs xnet/endpoint/src/lib.rs ./experimental/ ./bazel/ rustfmt.conf ./third_party/ ``` See merge request dfinity-lab/public/ic!7306
MWE: https://github.com/SuperFluffy/google_proto_struct_mwe (see branches master, 1.57, 1.56, nightly).
I am getting a confusing error message when compiling a generated struct (see below). This compiles in 1.56 and 1.57, but no longer in 1.58.* or nightly.
Note that I cannot reproduce this locally! It happily builds on my local machine (MacOS M1, rustc 1.58.1), but it does not in CI (ubuntu-latest, 1.58.1).I can reproduce this locally, as pointed out in #93296 (comment)
Code
The code reproduced below is constructed by prost-build. It can be generated from scratch or imported via prost-types. The error occurs in both cases.
I have inlined the code into the repository to demonstrate the issue without extra dependencies.
I have made an MWE here: https://github.com/SuperFluffy/google_proto_struct_mwe
The error as copied verbatim can be seen in this github action: https://github.com/SuperFluffy/google_proto_struct_mwe/runs/4935446281
I expected to see this happen:
It should compile. It used to compile, but it started breaking with 1.58.0 and 1.58.1, and also nightly. It works in 1.57 and 1.56.
Instead, this happens:
Compilation error, see above
Meta
Works
Does not work
Backtraces
Nothing in there; see the CI reports with
RUST_BACKTRACE=1
enabled.Version it worked on
1.57
(see 1.57 branch on cI)Version with regression
1.58
The text was updated successfully, but these errors were encountered: