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

GODRIVER-2722 Remove/unexport unnecessary interfaces. #1669

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

qingyang-hu
Copy link
Collaborator

GODRIVER-2722

Summary

Remove/un-export unnecessary interfaces.

@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the priority-3-low Low Priority PR for Review label Jun 7, 2024
Copy link
Contributor

mongodb-drivers-pr-bot bot commented Jun 7, 2024

API Change Report

./bson

incompatible changes

BytesReader: removed
BytesWriter: removed
CodecZeroer: removed
Proxy: removed

@qingyang-hu qingyang-hu marked this pull request as ready for review June 10, 2024 13:40
prestonvasquez
prestonvasquez previously approved these changes Jun 10, 2024
Comment on lines 22 to 23
type zeroer interface {
IsZero() bool
Copy link
Collaborator

Choose a reason for hiding this comment

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

Considering the recent relevance of IsZero, it's possible we may need to keep the Zeroer interface exported.

bson/proxy.go Outdated
Comment on lines 12 to 13
type proxy interface {
ProxyBSON() (interface{}, error)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should consider completely removing the ProxyBSON feature. Based on searching for uses in open-source repos, it seems completely unused.

Comment on lines 184 to 187
if cz, ok := encoder.(interface {
IsTypeZero(interface{}) bool
}); ok {
empty = cz.IsTypeZero(rv.Interface())
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should consider completely removing the IsTypeZero feature. Based on searching for uses in open-source repos, it seems completely unused.

prestonvasquez
prestonvasquez previously approved these changes Jun 27, 2024
matthewdale
matthewdale previously approved these changes Jul 15, 2024
Copy link
Collaborator

@matthewdale matthewdale 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! 👍

@qingyang-hu qingyang-hu merged commit dbbbae7 into mongodb:master Jul 15, 2024
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-3-low Low Priority PR for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants