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

feat: added error codes #73

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

mojixcoder
Copy link
Contributor

@mojixcoder mojixcoder commented Oct 10, 2024

Breaking changes are introduced to the package's API.
Closes #56

@coveralls
Copy link

coveralls commented Oct 10, 2024

Pull Request Test Coverage Report for Build 11289136607

Details

  • 170 of 172 (98.84%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+2.8%) to 98.812%

Changes Missing Coverage Covered Lines Changed/Added Lines %
h3.go 170 172 98.84%
Totals Coverage Status
Change from base Build 11280669949: 2.8%
Covered Lines: 582
Relevant Lines: 589

💛 - Coveralls

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.20"]
go-version: ["1.21"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you aren't keeping 1.20 in this list and dropping it entirely?

I don't develop in Go, so not sure what the community stance is on backwards compatibility in libraries.

@@ -1,3 +1,3 @@
module github.com/uber/h3-go/v4

go 1.20
go 1.21
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, why change the minimum version here? Are you using a feature that only exists in 1.21?

Copy link
Contributor Author

@mojixcoder mojixcoder Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, usually most of the libraries support 3 latest versions of Go. Makes it easier for maintainers to maintain the package.
So it depends on h3-go’s backward comptability policies.
I can downgrade to Go 1.20 as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. As I said, I don't develop in Go, so I will leave that decision to @zachcoleman and/or @jogly

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only care we support the versions of Go that Go cares to support (https://go.dev/doc/devel/release), and their policy is 2 versions. Go is at 1.23 now so I support dropping 1.20 😁

h3.go Outdated Show resolved Hide resolved
h3.go Outdated Show resolved Hide resolved
@zachcoleman
Copy link
Collaborator

Overall, introducing breaking changes (even rightfully so), I personally want to think on for a bit. The repo versions with major and minor for upstream h3 (ref). So maybe this is fine, but definitely feels like this cutover will break a lot if users seemingly upgrade the patch version due to these semantics. @jogly Do you have an opinion on this?

@jogly
Copy link
Collaborator

jogly commented Oct 10, 2024

I've hemmed and hawed on this for a while myself. I agree w your hesitation, and am unwilling to release breaking changes as a patch version for the reasons you mention. My latest thought is to publish this in a v4.2 prerelease branch/tag and wait until core is at 4.2 to make it a full release.

Another thought would be to consider an alternate strategy where we keep the package functions' signature as-is, and introduce an h3 struct with the signatures from this PR. Then the package functions could call an unexported default structs' functions and swallow the error for backwards compatibility and ergonomics.

@mojixcoder
Copy link
Contributor Author

mojixcoder commented Oct 11, 2024

I've hemmed and hawed on this for a while myself. I agree w your hesitation, and am unwilling to release breaking changes as a patch version for the reasons you mention. My latest thought is to publish this in a v4.2 prerelease branch/tag and wait until core is at 4.2 to make it a full release.

Why not a major release like v5?
This change introduces breaking changes to almost all APIs. Do you want to keep h3-go versions same as h3 versions?

@zachcoleman
Copy link
Collaborator

I've hemmed and hawed on this for a while myself. I agree w your hesitation, and am unwilling to release breaking changes as a patch version for the reasons you mention. My latest thought is to publish this in a v4.2 prerelease branch/tag and wait until core is at 4.2 to make it a full release.

Why not a major release like v5? This change introduces breaking changes to almost all APIs. Do you want to keep h3-go versions same as h3 versions?

That has been the standard to date in the repo:

h3-go/CHANGELOG.md

Lines 6 to 8 in d58e7c6

This project tracks the **major** and **minor** versions set upstream by
[`h3`](github.com/uber/h3), and introduces backwards-compatible updates and/or
fixes via **patches** with patch version bumps.

@zachcoleman
Copy link
Collaborator

I'm inclined to want to be patient and make this cutover on an h3-core 4.2 release. I reached out to h3-core team on Slack and they're inclined to release soon. I think a little patience here can go a long way and save some complicated work.

Ref: https://h3-core.slack.com/archives/CPU7D1TRD/p1728850733866769

@zachcoleman
Copy link
Collaborator

Thank you for your patience @mojixcoder... there's still no movement on the core library right now. I just wanted to poke this and let you know I'm checking frequently and we will act quickly after a core library releases and your contribution is very much appreciated ❤️.

@mojixcoder
Copy link
Contributor Author

mojixcoder commented Nov 8, 2024

No worries, you can merge it whenever the core library is ready and thanks for your kind words @zachcoleman

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

Successfully merging this pull request may close these issues.

Request for v4 parity
5 participants