Skip to content

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.721% (-0.02%) from 50.74%
when pulling 58403cc 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.

@tueda tueda force-pushed the runtime-deprecation-warning branch from dbbf3bc to 33a8f45 Compare January 28, 2025 10:28
@tueda tueda force-pushed the runtime-deprecation-warning branch from 33a8f45 to fe26015 Compare February 25, 2025 03:35
@tueda tueda marked this pull request as ready for review February 25, 2025 03:35
@tueda
Copy link
Collaborator Author

tueda commented Feb 25, 2025

Now the issue numbers are linked to actual issues.

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 fe26015 to 58403cc Compare February 25, 2025 07:57
@jodavies jodavies requested review from jodavies and removed request for jodavies February 25, 2025 14:37
Copy link
Collaborator

@jodavies jodavies left a comment

Choose a reason for hiding this comment

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

This looks fine, let's see if anyone ever comments...

@tueda tueda merged commit 7b48c35 into form-dev:master Feb 26, 2025
70 checks passed
@tueda
Copy link
Collaborator Author

tueda commented Feb 26, 2025

OK, it's been merged.

@tueda
Copy link
Collaborator Author

tueda commented Feb 26, 2025

I haven't cherry-picked it into 4.3.

I don't remember why (maybe I simply missed them), but should all of the last arguments of PADPOSITION be incremented? So, it should be:

#ifdef WITHFLOAT
#ifdef WITHPTHREADS
	PADPOSITION(17,30,62,84,(sizeof(pthread_rwlock_t)+sizeof(pthread_mutex_t)*2)+2);
#else
	PADPOSITION(17,28,62,84,2);
#endif
#else
#ifdef WITHPTHREADS
	PADPOSITION(17,30,62,84,(sizeof(pthread_rwlock_t)+sizeof(pthread_mutex_t)*2)+2);
#else
	PADPOSITION(17,28,62,84,2);
#endif
#endif

The commit 7b48c35 incremented only the last argument of the second PADPOSITION.

@jodavies
Copy link
Collaborator

Right, yes. In practice I don't think the explicit padding is required these days but we shouldn't let the numbers get "out of date" in the macros.

@jodavies jodavies mentioned this pull request Feb 26, 2025
@tueda
Copy link
Collaborator Author

tueda commented Feb 27, 2025

OK, I'll push the fix. Thanks.

@tueda
Copy link
Collaborator Author

tueda commented Feb 27, 2025

It seems that when I was editing the code, I overlooked the code blocks that were greyed out by VS Code (for vorm)... I need to be more careful...

image

@tueda tueda deleted the runtime-deprecation-warning branch February 27, 2025 10:00
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