Skip to content

feat: added error codes#73

Merged
zachcoleman merged 38 commits intouber:masterfrom
mojixcoder:feat-add-error-codes
Dec 27, 2024
Merged

feat: added error codes#73
zachcoleman merged 38 commits intouber:masterfrom
mojixcoder:feat-add-error-codes

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 12520764583

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 12519204618: 2.8%
Covered Lines: 582
Relevant Lines: 589

💛 - Coveralls

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.

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 😁

@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

@mojixcoder
Copy link
Contributor Author

Hello,
Just wanted to let you know that h3 core v4.2 got released 2 weeks ago.
Should we upgrade h3 deps before merging this? Or it’s not necessary.

@zachcoleman
Copy link
Collaborator

Hello, Just wanted to let you know that h3 core v4.2 got released 2 weeks ago. Should we upgrade h3 deps before merging this? Or it’s not necessary.

Thanks for reaching out. I have been away for holidays. I will look into this soon and I think you are right. We should probably be running the shell script to update to the new upstream version and then resolving conflicts as necessary.

If you'd like for your PR that's a good first step to also incorporate the upstream changes and verify the test suite.

@zachcoleman
Copy link
Collaborator

@mojixcoder I have merged the version upgrade PR. Can you rebase this one and/or resolve the conflicts?

I'll wait for a release for this commit 🥳

@mojixcoder
Copy link
Contributor Author

mojixcoder commented Dec 27, 2024

Can you please do something so that CI runs without requiring approval, at least for me or for people who have already committed to this project?
I'm not able to see the result of my changes immediately.

Copy link
Collaborator

@zachcoleman zachcoleman left a comment

Choose a reason for hiding this comment

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

looks good and looks like everything is passing 🥳

@zachcoleman zachcoleman merged commit 0b255e8 into uber:master Dec 27, 2024
4 checks passed
@zachcoleman zachcoleman mentioned this pull request Dec 27, 2024
@mojixcoder mojixcoder deleted the feat-add-error-codes branch December 28, 2024 16:33
ringsaturn added a commit to ringsaturn/pk that referenced this pull request Jan 4, 2025
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