On Wed, Jan 21, 2026 at 11:40:08PM +0100, Patrice Dumas wrote: > Hello, > > If TEXINFO_XS_PARSER=0, and TEXINFO_XS=required, there is a fatal error > set the TEXINFO_XS environment variable to 'omit' to use the pure Perl > modules > because the Parser is non XS. > > I think that it could be possible to make TEXINFO_XS=required more > useful, by using the following rule: > > With TEXINFO_XS=required, if TEXINFO_XS_PARSER=0, or > TEXINFO_XS_STRUCTURE=0, or TEXINFO_XS_CONVERT=0 and the name of the > loaded file is undef (because it has been detected in the code calling > XSLoader that the user does not want an XS module), and there is a > fallback module, let it be. Still die if a module that does not have a > fallback (with overrides only) does not load, or a function override > fails.
I don't understand this. The point of TEXINFO_XS=required is to ensure that the XS code is run. This is used for testing the XS code and that it runs correctly. What would be the point of allowing the XS code not to run? That would mean that we could be trying to test the XS code, set TEXINFO_XS=required, and get an apparent success, and yet it was the pure Perl code that was run instead. The current behaviour of TEXINFO_XS=required is quite easy to understand but now you are proposing that its behaviour depends on the value of several other environment variables as well as the results of configure-time checks. If the behaviour you describe is useful, we could devise another value for TEXINFO_XS than "required" to switch to such behaviour. > > In addition to being more useful in general, as TEXINFO_XS=required > could be used to enforce something relevant, I would like to have > TEXINFO_XS=required as the default for the tests, not really to test > that configuration, but such that the tester knows better what > is the configuration tested. (I thought about that after Eli report). > > > Another situation that it is not really helpful is the case of disabled > XS by configure and TEXINFO_XS=required. It fails with: > use of XS modules was disabled when Texinfo was built > set the TEXINFO_XS environment variable to 'omit' to use the pure Perl modules > > It makes some sense, but it is 'obviously' inconsistent. Maybe in that > case there should simply be a message stating the inconsistency, and > everything would be as if TEXINFO_XS=omit had been specified. Note that > this would be consistent with what currently happens if a Perl > interpreter is embedded and TEXINFO_XS=omit has been specified, as it > does not make sense, TEXINFO_XS is reset to '', with a message: > ignoring TEXINFO_XS environment variable set to 'omit' for embedded Perl > > For TEXINFO_XS=required and disabled XS, the messages could be > use of XS modules was disabled when Texinfo was built > resetting TEXINFO_XS environment variable to 'omit' > > -- > Pat >
