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

Crate does not compile on stable Rust < 1.36 #31

Closed
jean-noelp opened this issue Sep 13, 2019 · 10 comments · Fixed by #33
Closed

Crate does not compile on stable Rust < 1.36 #31

jean-noelp opened this issue Sep 13, 2019 · 10 comments · Fixed by #33

Comments

@jean-noelp
Copy link

jean-noelp commented Sep 13, 2019

Hello,

It seems that your librairie does not compile anymore since the 1.6.0, and also, all dependencies does not compile anymore too! (like test-junit)

error[E0506]: cannot assign to `self.state` because it is borrowed

   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/typed-arena-1.6.0/src/lib.rs:461:33

    |

451 |                     ref mut inner_iter,

    |                     ------------------ borrow of `self.state` occurs here

...

461 |                                 self.state = IterMutState::ChunkListRest { index, inner_iter };

    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `self.state` occurs here


error[E0506]: cannot assign to `self.state` because it is borrowed

   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/typed-arena-1.6.0/src/lib.rs:467:33

    |

451 |                     ref mut inner_iter,

    |                     ------------------ borrow of `self.state` occurs here

...

467 |                                 self.state = IterMutState::ChunkListCurrent { iter };

    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `self.state` occurs here

We are using the nightly-2019-03-06 rust version.

Do you confirm this error ?
Could you check your publication please ?
:/

@rodrimati1992
Copy link

rodrimati1992 commented Sep 14, 2019

Can confirm that I had the same error in the CI for one of my libraries,in a job that uses Rust 1.34 .

It would benefit this library to have a minimum required version in the README,and enforce it in CI if it doesn't bump it in minor versions.

@brendanzab
Copy link
Contributor

Yes, I've ran into this issue too, building on my pinned version of Rust, which used to build fine on Rust 1.32:

@brendanzab
Copy link
Contributor

brendanzab commented Sep 16, 2019

The PR that introduced this regression seems to be #30. It'd be nice if this could be fixed, and a specific rust version be pinned in the .travis.yml!

@brendanzab
Copy link
Contributor

brendanzab commented Sep 16, 2019

After some time trying different versions, it seems like Rust 1.36.0 works!

brendanzab added a commit to yeslogic/fathom that referenced this issue Sep 16, 2019
Due to a Rust [version regression in `typed-arena`](thomcc/rust-typed-arena#31) we can now only support Rust 1.36.  This adds a temporary minimum version of Rust 1.36, and allows failures for Rust 1.32 until this is resolved.
brendanzab added a commit to yeslogic/fathom that referenced this issue Sep 16, 2019
Due to a Rust [version regression in `typed-arena`](thomcc/rust-typed-arena#31) we can now only support Rust 1.36.  This adds a temporary minimum version of Rust 1.36, and allows failures for Rust 1.32 until this is resolved.
@fitzgen
Copy link
Collaborator

fitzgen commented Sep 16, 2019

This crate hasn't made any promises about maintaining compatibility with specific rust versions, just that it will always compile on the stable channel.

I think it is reasonable to add a stronger stability guarantee, but doing so requires the CI changes mentioned above and backporting the code to work with older rust versions. If someone is willing to do those things, I would be happy to review the PR and be willing to start making those stronger versioning guarantees from then on out.

@fitzgen fitzgen changed the title Lib does not compile! Crate does not compile on stable Rust < 1.36 Sep 16, 2019
@brendanzab
Copy link
Contributor

brendanzab commented Sep 16, 2019

I don't think it's necessary to make a promise on this, but I have found that just having a specific version in the .travis.yml makes me consider whether or not I want to break backwards compatibility on a library, especially if there is an easier work around. It's also nice documentation. :)

I might see if I can look at this today.

@brendanzab
Copy link
Contributor

Posted a patch at #33! Hope this helps!

@jean-noelp
Copy link
Author

Thank you, we'll check this patch!

@fitzgen
Copy link
Collaborator

fitzgen commented Sep 17, 2019

Published 1.6.1

@brendanzab
Copy link
Contributor

Thanks! Really appreciate your work on maintaining this! 👏

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 a pull request may close this issue.

4 participants