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

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tueda
Copy link
Collaborator

@tueda tueda commented Nov 13, 2024

This is an implementation of deprecation messages like those in #475 (comment) 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 #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.

@tueda tueda marked this pull request as draft November 13, 2024 06:47
@tueda tueda force-pushed the runtime-deprecation-warning branch from 66a0e6f to 7d40204 Compare November 13, 2024 06:53
@coveralls
Copy link

coveralls commented Nov 13, 2024

Coverage Status

coverage: 50.732% (-0.008%) from 50.74%
when pulling 33a8f45 on tueda:runtime-deprecation-warning
into 1d5e40b on vermaseren:master.

@jodavies
Copy link
Collaborator

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
Copy link
Collaborator Author

tueda commented Nov 14, 2024

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.

@tueda tueda force-pushed the runtime-deprecation-warning branch from 7d40204 to eb3658c Compare November 14, 2024 05:15
@tueda tueda force-pushed the runtime-deprecation-warning branch from eb3658c to 27ece86 Compare December 20, 2024 07:33
@tueda tueda force-pushed the runtime-deprecation-warning branch from 27ece86 to dbbf3bc Compare January 28, 2025 08:28
@tueda tueda changed the title Run-time deprecation warning for native Windows, 32-bit systems and ParFORM Run-time deprecation warning for native Windows, 32-bit systems, ParFORM and Checkpoint Jan 28, 2025
@tueda
Copy link
Collaborator Author

tueda commented Jan 28, 2025

Added a deprecation warning for the checkpoint as well, as discussed during the video call.

Though it says we are considering the deprecation of the checkpoint mechanism, I maintained the checkpoint code for the deprecation warning flag.

FORM prints deprecation warnings at startup for native Windows, 32-bit
(ILP32) and ParFORM (MPI) versions, as well as for the use of the
checkpoint mechanism. This encourages users who need support for these
deprecated features to leave a comment on the corresponding GitHub
issues.

The warnings can be suppressed by using the -ignore-deprecation
command-line option or by setting the environment variable
FORM_IGNORE_DEPRECATION=1.
@tueda tueda force-pushed the runtime-deprecation-warning branch from dbbf3bc to 33a8f45 Compare January 28, 2025 10:28
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.

3 participants