Git Product home page Git Product logo

Comments (9)

mvdnes avatar mvdnes commented on August 18, 2024

The problem is in that Heap is not Send.
We decided to mirror the constraints to the std lib in commit 8d819cc.

As a static variable needs to be Sync, we now require input to the Mutex to be Send before we add a Sync bound ourself. It was a safety bug on our part. See the output of rustc:

src/alloc.rs:64:54: 64:70 note: `*mut u8` cannot be sent between threads safely
src/alloc.rs:64:54: 64:70 note: required because it appears within the type `alloc_buddy_simple::Heap<'static>`
src/alloc.rs:64:54: 64:70 note: required because it appears within the type `core::option::Option<alloc_buddy_simple::Heap<'static>>`
src/alloc.rs:64:54: 64:70 note: shared static variables must have a type that implements `Sync`

While technically correct this breaks semver, since 0.4 is rather new and this is a bug on the others part, I think I am going to leave it this way.

from spin-rs.

mvdnes avatar mvdnes commented on August 18, 2024

Closing due to inactivity.
If you still have some opinion on this, don't hesitate to comment!

from spin-rs.

jethrogb avatar jethrogb commented on August 18, 2024

Sorry, I ran into this just as I went on a trip, but I'm back now.

I understand the rationale for making the change and agree with it.

It's the semver breakage that I'm concerned about (and so are my users). I'm not sure I agree with the "rather new" argument, I developed my code originally against 0.3, but when 0.4.0 came out I noticed everything still worked without any changes in my case so I just updated the dependency to 0.4, expecting it to work in the future.

On the other hand; I'm not sure whether racy code is much better than compile-time errors.

Anyway, no need to dwell on this now, the damage is already done (unless you're willing to make a new 0.4.3 release that's the same as 0.4.0 and continue 0.4.2 as 0.5.0, but that seems cumbersome). I would request you think about breakge when you make changes like these in future though.

from spin-rs.

Ericson2314 avatar Ericson2314 commented on August 18, 2024

There is a Cargo blacklist thing that will prevent a specific version from being resolved. (I don't know the name from memory.)

from spin-rs.

jethrogb avatar jethrogb commented on August 18, 2024

I think you mean yank?

from spin-rs.

Ericson2314 avatar Ericson2314 commented on August 18, 2024

Yup, that's the one.

from spin-rs.

mvdnes avatar mvdnes commented on August 18, 2024

Thanks for the input.
At this point yanking all 0.4.1+ versions could also cause breakage unfortunately, because of the introduction of new features in 0.4.2.

That 0.4.1 was a breaking change did not occur to me in time. Next time I will be more careful.

from spin-rs.

Ericson2314 avatar Ericson2314 commented on August 18, 2024

You could yank 0.4–0.41, which would retroactively make it a proper breaking change. And then the broken ones would be the ones getting the blame too.

from spin-rs.

jethrogb avatar jethrogb commented on August 18, 2024

Not really, because yanking doesn't stop dependencies from being able to download them (no leftpad issues with Rust!)

from spin-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.