leonelquinteros/gotext

v1.5.0 is a breaking change

m90 opened this issue · 3 comments

m90 commented

Please describe your issue

In v1.4.0 one could use a Po instance like this:

po := gotext.Po{}
po.Parse(b)

After upgrading to v1.5.0 this panics:

panic: NewPo() was not used to instantiate this object

and one has to use:

po := gotext.NewPo()
po.Parse(b)

instead.

This was introduced in 01a5eea

Is this a bug, an improvement, a proposal or something else? Describe it.

Following Semver this is a breaking change and would need to be released as v2.0.0.
I am aware Go modules make releasing a v2 very painful so I don't know if it's worth it. Could the previous behavior potentially be kept intact after the change?

Comments

The "migration" needed here is relatively simple and comes with a good error message, so I don't face any real problems here. The issue is mostly for making it visible for others who might run into the same problem.

@m90 As you said, releasing a v2 for a low maintenance project is not an option for me now. That's the reason we're using the minor versioning number to include breaking changes during v1.
I guess after we decide to make the jump to v2, v3, v4, vN will follow quickly and also not sure that's something we want to do and maintain.

I'll leave this issue open, just in case somebody wants to work on it.

Upgrading to v1.5.0 broke my code and I now need to fix it. It's not the end of the world and I appreciate the effort to provide this nice library.

But I wished semantic versioning was respected. It exists for a reason. If you the maintainer won't commit to a stable API under the v1 release, then staying at v0 is probably a better option. Moving up to v2, v3, v4 is not ideal like you said, but still better than randomly breaking people's work.

Hi @mfcochauxlaberge ,

I understand your frustration, I hope you're able to recover fast from this incident.

As you said, at this point we realise that staying at v0 would have been a better choice, but now it's late for that.

I totally accept contributions for moving to v2, but nobody wanted to take the task, and now it would not make any difference for your use case, as v1.5.0 is already out there, but in future releases I will totally take this into account.

Thanks for sharing!