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-2979 Rename SingleResult DecodeBytes to Raw #1395

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

prestonvasquez
Copy link
Collaborator

GODRIVER-2979

Summary

Deprecate SingleResult.DecodeBytes in Go Driver v1 and update it to call SingleResult.Raw.

Background & Motivation

The method SingleResult.DecodeBytes is a misnomer because it does not decode the result, but returns the raw bytes. It would be better to rename it SingleResult.Raw instead.

@prestonvasquez prestonvasquez requested a review from a team as a code owner September 18, 2023 23:01
@prestonvasquez prestonvasquez requested review from blink1073 and removed request for a team September 18, 2023 23:01
@blink1073
Copy link
Member

We should start a migration guide and add this as the first item.

@prestonvasquez
Copy link
Collaborator Author

prestonvasquez commented Sep 19, 2023

We should start a migration guide and add this as the first item.

@blink1073 what are your thoughts on approaching this? We have a ticket for creating a migration guide, GODRIVER-2705, but there are still open questions. Using the deprecation grammar might be enough for now since it will let users know to switch off the deprecated SingleResult.DecodeTypes in favor of SingleResult.Raw . One approach is to use these grammars to search for "Deprecated" methods in v1.x docs and note their migration patterns in the release notes.

Here are a few example release notes:

Rust Example:

We could keep a running list of breaking changes on GODRIVER-2705 ?

@blink1073
Copy link
Member

I like the idea of having the running list of deprecations in GODRIVER-2705, so that users can follow that ticket for updates.

@prestonvasquez
Copy link
Collaborator Author

prestonvasquez commented Sep 26, 2023

I like the idea of having the running list of deprecations in GODRIVER-2705, so that users can follow that ticket for updates.

I've updated GODRIVER-2705 to note this deprecation. I am checking with @qingyang-hu on his thoughts extending this list with hist work on GODRIVER-2617 : https://jira.mongodb.org/browse/GODRIVER-2617?focusedCommentId=5732353&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-5732353

@blink1073
Copy link
Member

Update: we've decided to list *new* deprecations in GODRIVER-2705 as part of the 2.0 effort.

@prestonvasquez prestonvasquez merged commit da5f54a into mongodb:v1 Oct 2, 2023
@prestonvasquez prestonvasquez deleted the GODRIVER-2979 branch October 2, 2023 19:10
prestonvasquez added a commit to prestonvasquez/mongo-go-driver that referenced this pull request Oct 5, 2023
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.

2 participants