-
Notifications
You must be signed in to change notification settings - Fork 144
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
Remove themis_version() API #388
Conversation
Unfortunately, the status constants are defined as macros so bindgen is not able to type them properly as themis_status_t. Do it manually.
@ilammy please grep all source and config files to check if |
@vixentael I've reviewed the code, it seems that Lines 17 to 19 in 29ebf63
|
Now when I see
https://www.slac.stanford.edu/comp/unix/gnu-info/cpp_1.html#SEC36 |
@Lagovas why don't we just remove the deprecated code from the files altogether with a new release? First we mark it deprecated (but still have to maintain it) and then completely remove the code at some later point. Though I do see a merit of specifying the version in the deprecation attributes: we can mark the code as deprecated since some version and use that version as a reminder for us that some functionality has been deprecated for too long and should actually be removed. |
to not maintain it manually and leave it for pre-processor if we will forget to remove legacy code and to provide explicit version when it will be removed. I saw that other libraries use deprecation warnings in some versions in a row and document in their releases what will be removed in a future and in which release it will be done. For example, it do django (python web framework), rust |
Hm... For that we will need some machine-readable version first. Then we can probably invent something like this using some advanced macrology: THEMIS_DEPRECATED(SINCE(0,11,0), UNTIL(0,12,0), AT_MOST(0,13,0),
"use 'bar' instead"
)
void foo(void); which will then cascade attributes:
But that looks like overengineering to me, TBH. |
it was just thoughts about for what we can leave version) if we decided to remove version and we don't need it, it's okay to remove |
As discussed in #324 and offline, remove
themis_version()
function and all related API for querying Themis and Soter versions at run-time. There is no replacement and this is obviously a breaking change.This API was not really widely used and it is a bit bothersome to maintain. It is recommended to not depend on Themis version at run-time. Applications should link against a particular version of Themis during build or development (whatever is applicable to the language environment). The version should be selected by the package manager: either the system one for Themis core, or language-specific for language bindings.
themis_version()
was used tests to print a version banner, that's not really important. It was also used by Rust binding to verify that FFI calls can be made, replace it with some other function. And it was also exported for Ruby programs, drop the export. The other use I'm aware of is in my Homebrew formula, that can be dealt with exactly as with Rust.Note that the code still contains hardcoded versions in Makefile as well as in PHP and PHP7 bindings. These are going to stay for technical reasons.
Closes #324