vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
1.16k stars 138 forks source link

Run-time deprecation warning for native Windows, 32-bit systems and ParFORM #573

Open tueda opened 1 week ago

tueda commented 1 week ago

This is an implementation of deprecation messages like those in https://github.com/vermaseren/form/issues/475#issuecomment-2146949223 but at runtime startup rather than at build time, for Windows, 32bit builds and ParFORM.

End users may not build binaries themselves. 32-bit binaries and ParFORM are distributed by various distributors. We can distribute native Windows binaries if https://github.com/vermaseren/form/pull/511 is merged and Delete Windows binaries in deploy.yml is removed. This patch will cause these end users to see annoying deprecation warnings.

The deprecation warning looks like, for example, for ParFORM:

DeprecationWarning: We are considering deprecating the MPI version (ParFORM).
If you would like support to continue, please leave a comment at:

    https://github.com/vermaseren/form/issues/xxxxx

Otherwise, it will be discontinued in the future.
To suppress this warning, use the --ignore-deprecation command line option or
set the environment variable FORM_IGNORE_DEPRECATION=1.

This warning can be suppressed by the (undocumented) --ignore-deprecation option or the environment variable FORM_IGNORE_DEPRECATION=1.

TODO: we need 3 separate issues for users to leave comments regarding the deprecation.

coveralls commented 1 week ago

Coverage Status

coverage: 50.178% (+0.01%) from 50.167% when pulling eb3658c1cfeec0ad36739b10a29861eccc18fca0 on tueda:runtime-deprecation-warning into bc0dae9ca6d470d308ca2c99ab5b8a269566686a on vermaseren:master.

jodavies commented 1 week ago

A run-time message seems good, as you say users may just use the distributed binaries rather than compiling themselves. This would be the first "--" option, is it more consistent to use a single "-" like -pipe? I have no strong opinion there.

tueda commented 1 week ago

I was considering the convention for long-name options in GNU tools (other than GCC), but this makes sense (-pipe already exists). I'll switch it to -ignore-deprecation.

If you have a better name than -ignore-deprecation/FORM_IGNORE_DEPRECATION, then let me know.