Skip to content

CXX-2978 deprecate functor.hpp #1124

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 6 commits into from
Apr 10, 2024
Merged

CXX-2978 deprecate functor.hpp #1124

merged 6 commits into from
Apr 10, 2024

Conversation

kevinAlbs
Copy link
Collaborator

@kevinAlbs kevinAlbs commented Apr 9, 2024

Summary

Remove undocumented entities in Deprecate use of functor.hpp.

Background & Motivation

I expect the entities in functor.hpp are not intended for public use.

The API policy notes:

The public API is the set of documented entities that are declared or defined in a public header file

The functor.hpp public header is kept to make this change in a minor release. A compile-time warning is added to warn of future removal. If this seems over cautious, the functor.hpp header can be removed in this PR.

Here is a patch build (with a temporary commit to include functor.hpp) to test the #pragma warning: https://spruce.mongodb.com/version/66156de826a8050007e0f117

@kevinAlbs kevinAlbs marked this pull request as ready for review April 10, 2024 16:30
@kevinAlbs kevinAlbs requested a review from eramongodb April 10, 2024 16:30
@eramongodb
Copy link
Contributor

Although the quoted API policy (hopefully) encodes prior intent, I do not think it is entirely safe to apply it to existing noabi interfaces which were implemented and used prior to the explicitly encoded API policy w.r.t. documentation of public interfaces. I believe it is safer to include this in a API major version release. If we want to risk this API breaking change in a minor release with the assumption that no users should be affected by this removal, we should acknowledge so in the release notes and be prepared for a patch release to restore the feature if necessary. Recommend including a CHANGELOG entry in this PR for this reason.

Copy link
Collaborator Author

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

If we want to risk this API breaking change in a minor release

I would rather err on caution and remove in a major release. Even if there is little risk of
impact, IMO there is little cost to keeping the header and entities until a major release.

The entities have been added back. Updated CXX-2978 to note this is deprecation only. Filed CXX-3003 with fixVersion 4.0.0 for future removal.

@kevinAlbs kevinAlbs requested a review from eramongodb April 10, 2024 17:07
@kevinAlbs kevinAlbs changed the title CXX-2978 remove undocumented entities in functor.hpp CXX-2978 deprecate functor.hpp Apr 10, 2024
@kevinAlbs kevinAlbs merged commit 071dfd7 into mongodb:master Apr 10, 2024
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