Closed yozhgoor closed 2 years ago
I wanted to fix an error message when I try to migrate from the 2018 edition to the 2021 in a project but I don't see it on the fork
The error message look like this:
error[E0391]: cycle detected when computing when `topojson::geometry::Value` has a significant destructor
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/topojson-0.5.0/src/geometry.rs:21:1
|
21 | pub enum Value {
| ^^^^^^^^^^^^^^
|
= note: ...which immediately requires computing when `topojson::geometry::Value` has a significant destructor again
note: cycle used when computing when `topojson::geometry::Geometry` has a significant destructor
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/topojson-0.5.0/src/geometry.rs:87:1
|
87 | pub struct Geometry {
| ^^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0391`.
Cool! :rocket: What do you think about the error message? Do you mind if I open an issue about that to merge this PR?
I've never seen that error before and I didn't really get the specifics. Are you saying that:
toopjson
cargo clean
?My understanding is that dependencies should keep working when you change editions. If I got it right, can you put together a simple test case? I tried to reproduce it with an empty project with the topojson
dependency, but it builds fine. Which compiler version are you using?
rustc 1.60.0
at the moment. You get it right, I also tried on a empty project and no problem too.
I'm gonna investigate the issue on my side to see if I can find something useful. It probably comes from my implementation.
I'll keep you update in that case, thanks for your time!
This is a small change, can someone from the project review and/or merge it?
I think I have bors rights, but I've only contributed to other parts of GeoRust and I don't know the maintainers here.
In the meanwhile, it might even make sense to go to the 2021 edition. Some people would prefer to bump the version to 0.6
here, but it's not clear-cut. Personally, I don't think MSRV changes are semver-breaking.
bors r=pjsier,lnicola,urschrei
:lock: Permission denied
Existing reviewers: click here to make lnicola a reviewer
I don't have access to bors on this repo for some reason
@frewsxcv seems to have bors access. Can you add some other folks?
(https://github.com/georust/topojson/pull/6#issuecomment-439750356)
done
bors r=pjsier,lnicola,urschrei
Configuration problem: bors.toml: not found
bors try
bors r=pjsier,lnicola,urschrei
Timed out.
I think we need different workflow job names in bors.toml
:
bors try
Already running a review
bors r-
bors try
Already running a review
¯_(ツ)_/¯
See https://github.com/georust/topojson/blob/master/bors.toml.
status
needs to list the job names that bors was to wait for. The CI here uses different job names, not ci result
.
I just tried to change that: https://github.com/georust/topojson/blob/master/.github/workflows/test.yml#L20
bors retry
Already running a review
bors r-
error[E0391]: cycle detected when computing when `topojson::geometry::Value` has a significant destructor --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/topojson-0.5.0/src/geometry.rs:21:1 | 21 | pub enum Value { | ^^^^^^^^^^^^^^ | = note: ...which immediately requires computing when `topojson::geometry::Value` has a significant destructor again note: cycle used when computing when `topojson::geometry::Geometry` has a significant destructor --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/topojson-0.5.0/src/geometry.rs:87:1 | 87 | pub struct Geometry { | ^^^^^^^^^^^^^^^^^^^ For more information about this error, try `rustc --explain E0391`.
I had this issue too when I migrated to 2021 on a private project... I think (not sure) I solved it by adding Box on types of fields that was recursive.
So let's say I have an enum A that is recursive (some variants have Box<A>
in their fields). Then I have a struct B that uses the enum A in a field. I added Box on the field in struct B to fix the issue struct B { field_a: Box<A> }
.
I'm really not certain about this, it's been a long time.
bors try
Already running a review
bors try
Already running a review
I have no idea why bors is being like this, but I'm happy to manually merge this now that CI has passed, in the interest of moving forward. @cecton thanks for the info: there doesn't seem to be an issue on current stable – it may have been transient.
Timed out.
I have no idea why bors is being like this,
clearly he's bored, you're not treating it well
@cecton thanks for the info: there doesn't seem to be an issue on current stable – it may have been transient.
all the work i did for nothing :weary: (good thing I don't remember)
Hello there!
This PR migrate the project to the
2021
edition usingcargo fix --edition