-
-
Notifications
You must be signed in to change notification settings - Fork 165
Rework check_modules.pl. #2741
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
Rework check_modules.pl. #2741
Conversation
I forgot to mention that the script options have been fixed. Also, the "all" option has been removed. There is no need for an option that is the default behavior. |
I also forgot to mention that the script also looks up which of |
Note, I normally don't install |
The script now uses the settings in the course environment for external programs and to check the database driver (DBD::mysql or DBD::MariaDB). In order for that to work, first the script checks that all of the needed modules are found, load, and are at the sufficient version. That is except for the database driver module. If any are not found, then the script exits with a message stating that it is unable to continue without the required modules. If all modules are good, then the script checks the database driver module next. For this it "runtime" loads the course environment and its dependencies (as well as a runtime detection of the webwork2 root and lib directories). This is to address issue openwebwork#2740. In addition the following modules are removed that are no longer needed: * Array::Utils * Email::Sender::Simple - still used but is a dependency of Email::Stuffer and doesn't need to be checked separately * HTML::Tagset * HTML::Template * IO::Socket::SSL * Net::LDAPS * Net::SMPT * Net::SSLeay * PadWalker * Path::Class * Safe - we use our local version (WWSafe.pm) and still check Opcode which it uses * Statistics::R::IO * Template `npm` is added to the list of required applications. Most of these things were noted in issue openwebwork#1917.
75fe00f
to
5dd5066
Compare
I removed |
What happens if someone uses the |
Yeah, I was going to point that out. If you use the |
I don't think anyone really uses the options. They didn't even work before this pull request. The script always just ran all checks. |
Yea, that is what it appeared. Maybe remove the |
If someone has already checked modules, and know they are all good, then they might just want to only check programs. So I think there is no reason to remove the option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works in my tests.
One thing I noticed is if for some reason a key doesn't exist in $externalPrograms
, it does error properly, but the error I found just slightly off, ** latex2pdf not found in $PATH
, since there really isn't a bin called latex2pdf
, would something like ** latex2pdf is not defined in site.conf
be more useful? Not really an issue, just something I noticed in my testing.
I was using this site as part of my hunt for the minimal list of modules that PG alone needs. It does list |
@somiaj: Without rather heavily restructuring the script there is no way to do what you are asking. |
@Alex-Jordan: The |
By the way, we don't actually directly use |
OK, that's a good reason to remove it. In general, suppose perl module X depends on module Y. But not consistently across perl versions. Then suppose a person uses cpan or cpanm to install module X and their perl version does not have X depending on Y. I would wonder whether cpan or cpanm would automatically install Y. My guess is no, and whatever the list is here, we should not trim the list based solely on one module being a dependency of another. That's just a comment on how we could think about this list. |
|
We recommend |
By the way, we still check for (and directly use) |
That's all good, makes sense. I am just making a larger point beyond the Email packages. For example, at least one perl version has |
I am not sure that I agree. We recommend using You mention We don't check for Perl, and can't with the |
By the way |
Another reason for not checking dependencies is that we do check that a module loads. If a dependency is missing, then the module will not load, and the reason that the module failed to load will be shown. That reason will state the missing dependency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this and it works as expected. I removed a perl module and it caught that. I messed up a path in site.conf to a xelatex and it caught that.
The script now uses the settings in the course environment for external programs and to check the database driver (DBD::mysql or DBD::MariaDB). In order for that to work, first the script checks that all of the needed modules are found, load, and are at the sufficient version. That is except for the database driver module. If any are not found, then the script exits with a message stating that it is unable to continue without the required modules.
If all modules are good, then the script checks the database driver module next. For this it "runtime" loads the course environment and its dependencies (as well as a runtime detection of the webwork2 root and lib directories).
This is to address issue #2740.
In addition the following modules are removed that are no longer needed:
npm
is added to the list of required applications.Most of these things were noted in issue #1917.