bugGNU roff - Bugs: bug #59481, m4/groff.m4: tweak warnings for...

 
 

bug #59481: m4/groff.m4: tweak warnings for missing uchardet library

Submitter:  Dave <barx>
Submitted:  Thu 19 Nov 2020 12:03:34 AM UTC
   
 
Category:  Preprocessor preconv Severity:  2 - Minor
Item Group:  Build/Installation Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 05 Feb 2023 07:34:26 AM UTC, comment #6: 

Removing patch annotation since I proceeded to resolve the reported problem in callous ignorance of Dave's patch.


commit 0b64b73c7a1b6001b46d2e083431320030fe96cc
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat May 21 08:01:01 2022 -0500

    [build]: Refactor uchardet-related macros.

    * m4/groff.m4 (GROFF_UCHARDET_CHECK): Rename this...
      (GROFF_UCHARDET_NOTICE): ...to this.

    * configure.ac: Update call site.

    * m4/groff.m4 (GROFF_UCHARDET_NOTICE): Tighten wording of message
      reported to user.

    Make code style more readable and use indentation style that (mostly)
    prevails in the file.

commit 8c9b0e5e497659e00ca035d3cff09d5ac31f99c9
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue May 24 19:13:54 2022 -0500

    m4/groff.m4: Fix grammar nit in message.

    * m4/groff.m4 (GROFF_UCHARDET_CHECK): Fix grammar nit in failure message
      when user demands uchardet support but the library cannot be located.


G. Branden Robinson <gbranden>
Group administrator
Wed 01 Jun 2022 05:24:35 AM UTC, comment #5: 

Looks to me like those address the issues I raised.  Closing.

Dave <barx>
Group Member
Tue 31 May 2022 11:55:40 PM UTC, comment #4: 
G. Branden Robinson <gbranden>
Group administrator
Sun 14 Mar 2021 05:33:50 AM UTC, comment #3: 

Updated patch attached.  The question in the post cited in comment #2 was never addressed, but based on the reasoning in that post, I went ahead and removed the questionable part of the warning.  Bertrand, please speak up if you have any objection to this.

(file #51057)

Dave <barx>
Group Member
Sat 21 Nov 2020 01:38:56 PM UTC, comment #2: 

Now-bogus patch removed.

New patch pending, awaiting an answer to a question (http://lists.gnu.org/archive/html/groff/2020-11/msg00112.html) to Bertrand about the need for the "preconv might not work properly" part of the first warning.

Dave <barx>
Group Member
Thu 19 Nov 2020 12:20:26 AM UTC, comment #1: 

Serendipity: at the same time I was filing this bug report, Bertrand was filing commit 34130e9f, which solved the primary problem.  The comma splice and the "Could not found" wording remain; I can update the patch, but might wait a bit in case more changes got committed while I was writing this comment.

Dave <barx>
Group Member
Thu 19 Nov 2020 12:03:34 AM UTC, original submission:  

Overview


The attached patch concerns the warnings generated by "configure" on a system that doesn't have a uchardet library.  It slightly alters the text of these warnings.

These warnings were introduced in commit 75c0873c.  As Branden points out (http://lists.gnu.org/archive/html/groff/2020-11/msg00084.html), this commit was in groff 1.22.4 and has garnered no complaint until now, so there is no particular urgency to apply this patch.

The problem


If uchardet is not found, these two warnings appear:


configure:20532: WARNING: uchardet library not found, preconv might not work properly


configure:26790: WARNING:
  uchardet library was not found; preprocessor 'preconv', which uses it to detect
  the input file encoding, might not work properly (to check how and in which
  order 'preconv' tries to determine the file encoding, see its man page).


The vagueness of the phrase "might not work properly" can imply the problem is more serious than it is.  If the warning explained exactly what might not work, users could determine for themselves how serious it is (which, in most cases, is not very: this library's absence only eliminates one method (out of six documented) of determining the input's encoding--and the method in question is an educated guess, so it "might not work" even with the uchardet library).

The solution


The attached patch fixes the first warning by removing the "preconv might not work properly" part altogether.  This one is generated at the time the library's absence is discovered; the consequences of this absence should be saved for the later, more visible, more verbose warning.  (As trivial side effects, this also eliminates the comma splice and keeps the message under 80 columns.)

The second is rewritten to say:


  uchardet library was not found; preprocessor 'preconv' will skip this method
  of attempting to determine the input encoding.  (To check how and in what
  order 'preconv' tries to determine the encoding, see its man page.)


In addition to being more precise about the effect, I've also edited "input file encoding" down to simply "input encoding" (since preconv's input needn't be from a file) and shortened the lines to be under 80 columns.

The patch also corrects one nonstandard English construction in a related warning.

Further refinements welcome.

Dave <barx>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #51057:  groff.m4.patch added by barx (867B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by barx
  • -email is unavailable- added by barx (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 14 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-02-05 gbranden Summary[PATCH] m4/groff.m4: tweak warnings for missing uchardet library m4/groff.m4: tweak warnings for missing uchardet library
    2022-06-01 barx StatusNeed Info Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2022-05-31 gbranden StatusNone Need Info
        Assigned toNone gbranden
    2021-03-14 barx Attached File- Added groff.m4.patch, #51057
        StatusNeed Info None
        Summarym4/groff.m4: tweak warnings for missing uchardet library [PATCH] m4/groff.m4: tweak warnings for missing uchardet library
        Carbon-Copy- Added bgarrigues
    2020-11-21 barx StatusNone Need Info
        Summary[PATCH] m4/groff.m4: tweak warnings for missing uchardet library m4/groff.m4: tweak warnings for missing uchardet library
    2020-11-21 barx Attached File#50302 Removed
    2020-11-19 barx Attached File- Added groff.m4.patch, #50302

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code