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

[T124890272] Mark 2 Obsolete Functions(ZSTD_copy*Ctx) Deprecated in Zstd #3196

Merged
merged 5 commits into from
Aug 2, 2022

Conversation

mileshu
Copy link

@mileshu mileshu commented Jul 13, 2022

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")

Miles HU added 3 commits July 8, 2022 15:01
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.
@facebook-github-bot
Copy link

Hi @mileshu!

Thank you for your pull request and welcome to our community.

Action Required

In 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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

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
@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

Copy link
Contributor

@felixhandte felixhandte left a 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?

Miles HU added 2 commits August 1, 2022 22:45
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.
@mileshu
Copy link
Author

mileshu commented Aug 2, 2022

@felixhandte Sure, I've uploaded one more change as your request, please double check.

Copy link
Contributor

@felixhandte felixhandte left a comment

Choose a reason for hiding this comment

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

Great! Thanks, @mileshu.

@felixhandte felixhandte merged commit 7e6278a into facebook:dev Aug 2, 2022
@terrelln terrelln mentioned this pull request Dec 21, 2022
6 tasks
@Cyan4973 Cyan4973 mentioned this pull request Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants