kornelski / rust-rgb

struct RGB for sharing pixels between crates
https://lib.rs/rgb
MIT License
97 stars 19 forks source link

Merge `v0.8` with `v0.9` #106

Closed ripytide closed 2 months ago

ripytide commented 2 months ago

This re-works the previous compatability legacy.rs file in favor of simply pasting in the entire v0.8 crate inside the v0.9 crate and then manually fixing conflicting trait implementations in favor of the v0.9 ones.

The benefit of this method is that doing the v0.8 semver release is now much easier as v0.9 with the legacy features is now a true super-set of v0.8:

❯ cargo semver-checks --release-type minor --all-features
     Parsing rgb v0.9.0 (current)
      Parsed [   2.737s] (current)
     Parsing rgb v0.8.37 (baseline, cached)
      Parsed [   0.061s] (baseline)
    Checking rgb v0.8.37 -> v0.9.0 (assume minor change)
     Checked [   0.017s] 69 checks; 69 passed, 6 unnecessary
    Finished [   2.842s] rgb

So the last v0.8 release can now just be:

pub use rgb::*;
kornelski commented 2 months ago

So this is meant to be released as v0.8?

ripytide commented 2 months ago

It's a super-set of v0.8 so yes it can be released as a v0.8 (as long as the legacy feature is enabled). But it can also be v0.9. Though I think my plan was to release this as v0.9 and then re-write v0.8 to be simply:

pub use rgb09::*;

as a semver-trick release

kornelski commented 2 months ago

I see. I was thinking in the other direction that v0.9 would import v0.8. I guess it works either way.