Skip to content

Remove error messages for deprecated APIs #2857

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

Merged
merged 12 commits into from
Apr 6, 2020

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Apr 2, 2020

This PR removes error messages for APIs that are no longer supported and reduces the size for messages that warn about deprecated usage.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 2, 2020

Binary Size Report

Affected SDKs

SDKTypeBase (437c404)Head (6e63b62)Diff
@firebase/firestore/memorybrowser212492.00211022.00-1470.00 (-0.69%)
module210858.00209403.00-1455.00 (-0.69%)
esm2017169548.00168120.00-1428.00 (-0.84%)
main376232.00374564.00-1668.00 (-0.44%)
@firebase/firestorebrowser268827.00267357.00-1470.00 (-0.55%)
module266798.00265343.00-1455.00 (-0.55%)
esm2017215260.00213832.00-1428.00 (-0.66%)
main486884.00485216.00-1668.00 (-0.34%)
firebasefirebase.js846043.00844573.00-1470.00 (-0.17%)
firebase-firestore.memory.js255892.00254423.00-1469.00 (-0.57%)
firebase-firestore.js310955.00309486.00-1469.00 (-0.47%)
Metric Unit: byte

Test Logs

behavior.`);
logError(
"Support for 'timestampsInSnapshots: false' will be removed soon. " +
'You must update your code to handle Timestamp objects.'
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think of putting the helpful text about how to handle this in a file like packages/firestore/deprecation.md and then linked to it? Then this could be

"Support for 'timestampsInSnapshots: false' will be removed. " +
  'See https://github.com/firebase/firebase-js-sdk/packages/firestore/deprecation.md#timestamps'

It's almost as short but remains just as helpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I expanded on the comment in our API docs and added a GIST with the comment (since we can't permalink to the API doc).

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FWIW I went back to the original error message (but left the updates to the API documentation). This error message is so old that the number of people that see this probably does not warrant any extra steps.

@wilhuff wilhuff assigned schmidt-sebastian and unassigned wilhuff Apr 2, 2020
Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

LGTM

@wilhuff wilhuff assigned schmidt-sebastian and unassigned wilhuff Apr 3, 2020
Copy link
Contributor

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

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

LG with a few style nits. Thanks!

@schmidt-sebastian schmidt-sebastian merged commit fd7fbd7 into master Apr 6, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/smallererrors branch April 6, 2020 19:25
@firebase firebase locked and limited conversation to collaborators May 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants