ruby-rice / rice

Ruby Interface for C++ Extensions
http://ruby-rice.github.io/
Other
378 stars 63 forks source link

Do you follow semantic versioning? #184

Closed uvlad7 closed 1 year ago

uvlad7 commented 1 year ago

You've made some breaking changes in ver. 4.1.0, that's why I'm asking.

// Works in 4.0.4, fails to compile in 4.1.0
define_method("name", &function, Return().isValue());
// Works in 4.0.4, introduces a bug in 4.1.0
auto ret = Return();
ret.isValue();
define_method("name", &function, ret);
jasonroelofs commented 1 year ago

I'm guessing that isValue() is no longer returning anything? Probably missing a test case, will get that covered and this bug fixed.

jasonroelofs commented 1 year ago

I think you wanted to call Return().setValue() here, isValue() is an introspection method.

uvlad7 commented 1 year ago

No, and that's exactly the problem: isValue was a setter prior to 4.1.0 (and getIsValue was the corresponding getter), and now it became the getter and setValue is the setter. That's why this change can introduce bugs.

jasonroelofs commented 1 year ago

Ah right, this is called out in the changelog, and as it is a compiler error, it shouldn't be a source of bugs, just a small code change.

As for the original question, no, we don't adhere to "Semantic Versioning" as many call it. We try to keep breaking changes to a minimum between releases but this library is also rather niche, and not widely used, so the release structure isn't very formal either. Going to close this ticket as answered, if you do have a bug with isValue please open a ticket showing what you've found there.

uvlad7 commented 1 year ago

Well, just to highlight - the second example

auto ret = Return();
ret.isValue();
define_method("name", &function, ret);

won't cause a compiler error, may be a warning about an unused return value.