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

Semantic Versioning: ZeroWidthJoiner Removal #58

Open
trynity opened this issue Dec 22, 2021 · 6 comments
Open

Semantic Versioning: ZeroWidthJoiner Removal #58

trynity opened this issue Dec 22, 2021 · 6 comments

Comments

@trynity
Copy link

trynity commented Dec 22, 2021

ZeroWidthJoiner was removed after v0.0.9: https://github.com/mattn/go-runewidth/blob/v0.0.9/runewidth.go#L14

The next version was v0.0.10, but this introduced a breaking API change.

While being v0 means you can introduce breaking API changes, would it be possible to get a v1 release that can ensure API stability?

It's fine to just keep cutting new versions when API changes happen, but right now it makes managing Go Module dependencies rather painful, since it just assumes patch versions don't introduce breaking changes.

@mattn
Copy link
Owner

mattn commented Dec 22, 2021

I'm thinking global variable ZeroWidthJoiner is not used for everyone properly since the variable is overwritten in init function.

@mattn
Copy link
Owner

mattn commented Dec 22, 2021

However, I'm also considering upgrading the minor version.

@rivo
Copy link

rivo commented Feb 16, 2022

To my knowledge, I was the only one using it and I'm ok with this change.

@W1M0R
Copy link

W1M0R commented Apr 6, 2023

This also reintroduces the following issues when building older projects that were pinned to a version of tview that relied on ZeroWidthJoiner:

  1. undefined: runewidth.ZeroWidthJoiner rivo/tview#205
  2. Fresh repo has broken dependency on runewidth rivo/tview#189

To resolve the issue, I updated the project go.mod file to use the latest tview at the time, e.g.

        // github.com/rivo/tview v0.0.0-20210111184519-c818a0c789ee // original
        // github.com/mattn/go-runewidth v0.0.8 // indirect - via tview above
	github.com/rivo/tview v0.0.0-20230406072732-e22ce9588bb4 // updated
	github.com/mattn/go-runewidth v0.0.14 // indirect - via tview above

I would have preferred to stick with the original pinned tview, but all of my attempts to pin a matching and compatible go-runewidth version in the go.mod file was not successful.

Even though go-runewidth v0.0.8 has the ZeroWidthJoinerField field, somehow go seems to be looking at a version that doesn't have the field.

Not sure what to make of it, and probably not that important, but just presenting the info in case it helps someone else.

@rivo
Copy link

rivo commented Apr 6, 2023

Special ZeroWidthJoiner handling was a mistake. We didn't understand Unicode fully back then. tview was the only project using this flag and it hasn't used it anymore for quite a long time. So there's currently no other project that needs ZeroWidthJoiner and it makes sense to remove it.

I would think that if there's an old project which uses an old version of tview, it would also reference the correct go-runewidth version which still has ZeroWidthJoiner so I'm also not sure why there's an error message related to that.

I would have preferred to stick with the original pinned tview

In any case, tview is backwards compatible. You could upgrade tview to the latest version and your program should still work.

@W1M0R
Copy link

W1M0R commented Apr 7, 2023

Thanks for the feedback @rivo. I've upgraded to the latest version of your package, and everything seems to be working well. Thanks for your backwards-compatibility efforts!

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

No branches or pull requests

4 participants