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

Switch to using the latest Perl::Tidy (version 20240903) alternate approach. #2633

Closed
wants to merge 2 commits into from

Conversation

drgrice1
Copy link
Member

A new --valign-signed-numbers option has been added in the version of Perl::Tidy and is the default. That option has been disabled to reduce the number of code changes. Although it only changes one line of the webwork2 code. It changes a lot more in the pg code.

The bin/dev_scripts/run-perltidy.pl script now insists on this specific version of perltidy instead of this version or newer. This is because every time a new version of perltidy comes out, it changes things. So developers really need to be using the same version or it will not be consistent with the github workflow result.

Also, the version requirement in the check_modules.pl script has been removed. Only developers need a specific version of perltidy. Those running webwork2 can use other versions. This is only used for formatting problems in the PG problem editor, and using other versions may result in slightly different formatting there, but that is not so consequential that we need to require a specific version. Note that this change depends on the corresponding pg pull request (openwebwork/pg#1146), because in that pull request the -vxl='q' option has been removed. Otherwise version 20220613 or newer of perltidy would still be needed.

The first commit makes the changes for the switch to the new version, and the second commit is merely the result of running perltidy with the new version and rules.

@drgrice1 drgrice1 force-pushed the perltidy-update-alt branch 2 times, most recently from 4c586a8 to 7d2b14c Compare November 25, 2024 02:31
This commit just makes the changes in the scripts, but does not yet run
perltidy with the new setup.  That will be done in the next commit.

A new `--valign-signed-numbers` option has been added in the version of
Perl::Tidy and is the default.  That option has been disabled to reduce
the number of code changes.  Although it only changes one line of the
webwork2 code. It changes a lot more in the pg code.

Note that the `bin/dev_scripts/run-perltidy.pl` script now insists on
this specific version of perltidy instead of this version or newer.
This is because every time a new version of perltidy comes out, it
changes things.  So developers really need to be using the same version
or it will not be consistent with the github workflow result.

Also, the version requirement in the check_modules.pl script has been
removed.  Only developers need a specific version of perltidy.  Those
running webwork2 can use other versions.  This is only used for
formatting problems in the PG problem editor, and using other versions
may result in slightly different formatting there, but that is not so
consequential that we need to require a specific version. Note that this
change depends on the corresponding pg pull request, because in that
pull request the `-vxl='q'` option has been removed.  Otherwise version
20220613 or newer of perltidy would still be needed.
@drgrice1 drgrice1 force-pushed the perltidy-update-alt branch from 7d2b14c to 72f26b0 Compare December 3, 2024 21:38
@somiaj
Copy link
Contributor

somiaj commented Dec 10, 2024

Closing as we went with #2632.

@somiaj somiaj closed this Dec 10, 2024
@drgrice1 drgrice1 deleted the perltidy-update-alt branch December 11, 2024 00:48
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