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

Would you be open to changing the signatures in maptile/tilecover ? #82

Closed
thisisaaronland opened this issue Jan 15, 2022 · 4 comments
Closed

Comments

@thisisaaronland
Copy link

Specifically, changing the return values from maptile.Set to (maptile.Set, error)

My concern is that the /maptile/tilecover/polygon.go code triggers a panic if it encounters an invalid geometry and it would be helpful for the package to return an error that I can handle in my application code rather than all the scaffolding necessary to trap and recover from a panic.

I am happy to do the work to produce a PR but figured I would see whether this was interesting to you, first.

@paulmach
Copy link
Owner

I created this PR to return an error #87

I'm not sure what the protocol is for changing the signature. Can I just minor version bump it since we're not 1.0 yet? If that is a big deal we can just an addition methods like PolygonWithError. But that's not great.

@thisisaaronland
Copy link
Author

I think the consensus is that pre 1.0 things are considered to be a "moving target" and there is an expectation that changes may still ripple down to other people's code. That's been my approach but I didn't want to assume it was yours :-)

@paulmach
Copy link
Owner

I merged #87 to change the signature to return an error. This is the only change in v0.7.0 so if there are issues I can pull that release. I don't expect there to be issues.

@thisisaaronland
Copy link
Author

Thanks!

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

2 participants