On Sun, Jan 26, 2025 at 02:07:02PM +0200, Eli Zaretskii wrote: > > > I'm open to other suggestions for how to avoid this problem. There was > > > some confusion about whether this was a warning or an error, and whether > > > it was "build-breaking", but that's possibly not relevant. > > > > It is relevant, because if it is not "build-breaking", it is less important > > to add warnings to newer versions of Texinfo. > > We have other warnings in makeinfo that are not fatal errors, but are > still emitted. The reason is that the produced Info file might be > sub-optimal if those warnings are disregarded.
The warnings in this case are not for the produced Info file. texi2any still warns about missing punctuation when there would be an issue with the produced Info file. > > It is not a "bug" as you label it, as there is nothing wrong with the > > input for newer versions of Texinfo and no need to warn about this input. > > It could be called a "feature request" for backwards compatibility. > > Suppose a project using Texinfo for its documentation does want to > support older versions of makeinfo -- what would you suggest to use > for that? It seems to me like makeinfo, being the tool that parses > the Texinfo source, is in the best position to produce such warnings. > If these warnings are off by default, to be turned on by a > configuration variable or a command-line option, I see no harm in > having them. The harm is in the effort it would take to implement and maintain them. I don't think Texinfo is unique in not maintaining optional version checks for all of its features. Projects should declare a minimum version of texi2any to support for developers to use. The most reliable check of backwards compatibility is to actually test processing a manual with an older version. > The alternative is for the Texinfo-using projects to > develop specialized tools that would detect these issues, which > doesn't sound justified to me. If the issue with . and , was a major problem, it should have come up more since February 2016 (9 years ago). Even if we did add an option to output a warning (which would probably only take a few lines of code, as we still output a warning in some cases), there would still be 10 years worth or so of Texinfo releases out there that did not issue a warning, so contributors to the manual would still often not get a warning. Either the project could rely on occasional reports from people still using the older Texinfo releases, or there could an automatic periodic build of the manual using an older Texinfo version on one of the developer's machines. It appears that the report here is coming from someone complaining on someone else's behalf, and not a problem that they are directly having themselves. > This is a broader subject. Indeed, makeinfo lacks version-checking > directives, so one cannot safely use new language features if one > wants to support older Texinfo releases. This causes very slow > acceptance of new features, and consequently sub-optimal output. There is the @ifcommanddefined command which is documented in the Texinfo manual, along with a discussion of how this can be used with any version of Texinfo, even before the @ifcommanddefined command was introduced. This would be sufficient to allow using any new commands conditionally. > It would be good if Texinfo had such version-checking directives added at > some point. For example: > > @ifversion @atleast 10.1 > ... stuff that only Texinfo 10.1 and newer supports ... > @end ifversion What I can see happening is that this stuff gets added to a Texinfo source file and then never gets removed, confusing people indefinitely. In this case, such an @ifversion command doesn't seem to add much over what we have already in @ifcommanddefined. It wouldn't really help with the @xref issue we were discussing. I don't know if the @ifcommanddefined commands are used very much. > > > I understand the decision to drop the warning was deliberate, but > > > wouldn't it be possible to make it an optional warning, disabled by > > > default? The warning could indicate which version of texinfo stopped > > > warning about this by default and when it was released, so there would > > > be an incentive to disable the option at a future point. > > > > It seems like a lot of work and complexity for little benefit. > > The benefit is that projects which want to support old releases of > Texinfo will be able to adopt the new features much faster. And in > some cases, the detection of violations of the older language rules > will be more reliable. In the case of checking for . and , following @xref, the "new feature" was a removal of an arbitrary restriction, which was supposed to make authoring Texinfo files easier.