-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[T124890272] Mark 2 Obsolete Functions(ZSTD_copy*Ctx) Deprecated in Zstd #3196
Conversation
Signed-off-by: Miles HU <yuanpu@fb.com>
This reverts commit 962746e.
The discussion for this task is here: facebook#3128. This task can probably be scoped to the first part: marking these functions deprecated. We'll later look at removal when we roll out v1.6.0.
Hi @mileshu! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
1 similar comment
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mileshu,
Sorry it's taken me a while to get to this review. Do you think you can continue to work on it? Or would you like us to take it over?
This looks overall pretty good. However, I think you could improve the deprecation message. By adding this macro, you are deprecating these functions now, not "soon". I think a better message would mention (a) that these functions have basically no use and certainly don't function in the way you would hope, and (b) we plan to remove them soon. Maybe:
ZSTD_DEPRECATED("This function will likely be removed in the next minor release. It is misleading and has very limited utility.")
How does that sound?
The discussion for this task is here: facebook#3128. This task can probably be scoped to the first part: marking these functions deprecated. We'll later look at removal when we roll out v1.6.0.
@felixhandte Sure, I've uploaded one more change as your request, please double check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks, @mileshu.
The discussion for this task is here: #3128.
This task can probably be scoped to the first part: marking these functions deprecated.
We'll later look at removal when we roll out v1.6.0.
ZSTD_copyCCtx and ZSTD_copyDCtx are tagged by ZSTD_DEPRECATED.
"make test" runs sanity tests and all are passed.
Commented line 33 in fuzzer.c, following warnings will be generated:
fuzzer.c:1882:37: warning: 'ZSTD_copyCCtx' is deprecated: will be deprecated soon [-Wdeprecated-declarations]
{ size_t const copyResult = ZSTD_copyCCtx(ctxDuplicated, ctxOrig, 0);
^
../lib/common/../zstd.h:2440:1: note: 'ZSTD_copyCCtx' has been explicitly marked deprecated here
ZSTD_DEPRECATED(" will be deprecated soon")
^
../lib/common/../zstd.h:1102:72: note: expanded from macro 'ZSTD_DEPRECATED'
^
fuzzer.c:1888:16: warning: 'ZSTD_copyCCtx' is deprecated: will be deprecated soon [-Wdeprecated-declarations]
CHECK( ZSTD_copyCCtx(ctxDuplicated, ctxOrig, 0) ); /* Begin_usingDict implies unknown srcSize, so match that */
^
../lib/common/../zstd.h:2440:1: note: 'ZSTD_copyCCtx' has been explicitly marked deprecated here
ZSTD_DEPRECATED(" will be deprecated soon")