bugGNU Octave - Bugs: bug #61067, Error message suggestion from pkg...

 
 

bug #61067: Error message suggestion from pkg could be better, or eliminated

Submitter:  None
Submitted:  Fri 20 Aug 2021 09:57:04 PM UTC
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Sat 21 Aug 2021 04:58:25 PM UTC, comment #3: 

OP here. The change makes it behave much better for unintentional errors like the one posted here. Thank you for the very fast turnaround!

Anonymous
Sat 21 Aug 2021 01:06:35 PM UTC, comment #2: 

I don't think that ever worked with the existing algorithm. I also don't know how that could be related to file encoding.

Anyway, I pushed a change that should be improving the suggestion for cases like these here:
https://hg.savannah.gnu.org/hgweb/octave/rev/d3298a58049e

Marking as ready for test.

Markus M├╝tzel <mmuetzel>
Project Member
Sat 21 Aug 2021 12:03:10 PM UTC, comment #1: 

Confirmed.
Quite some fun to play with it by just dropping the last character:

>> pkg install -forge -verbose communicatio
error: get_forge_pkg: package not found: "communicatio".  Maybe you meant "econometrics?"
error: called from
    get_forge_pkg at line 90 column 5
    get_forge_download at line 32 column 14
    pkg at line 502 column 31
>> pkg install -forge -verbose communicati
error: get_forge_pkg: package not found: "communicati".  Maybe you meant "optiminterp?"
error: called from
    get_forge_pkg at line 90 column 5
    get_forge_download at line 32 column 14
    pkg at line 502 column 31
>> pkg install -forge -verbose communicat
error: get_forge_pkg: package not found: "communicat".  Maybe you meant "statistics?"
error: called from
    get_forge_pkg at line 90 column 5
    get_forge_download at line 32 column 14
    pkg at line 502 column 31

... and so on.

I'd suspect that this is an example of something that used to work fine, but later changes elsewhere had the side effect of screwing this one up. If so, a candidate change might be (just a hunch) changes in Octave's default encoding.

As to eliminating this part: I'm always for better ergonomics and avoiding putting off less experienced and unwary users; so I'd like to keep the suggestion. Of course as it stands it has the opposite effect (it does put off users) so IMO it should be fixed.

Philip Nienhuis <philipnienhuis>
Project Member
Fri 20 Aug 2021 09:57:04 PM UTC, original submission:  

I made a mistake in naming a Forge package to install. It should have been communications (plural) but I typed the singular. But the alternative named in the error message from pkg was unhelpful in this case ("generate_html").

pkg install -forge communication
error: get_forge_pkg: package not found: "communication".  Maybe you meant "generate_html?"
error: called from
    get_forge_pkg at line 90 column 5
    get_forge_download at line 32 column 14
    pkg at line 502 column 31

The code for this behavior is in the end of the file scripts/pkg/private/get_forge_pkg.m. It looks like the line "t = strsplit (html)" gives the wrong value to t{1}, so the distance function is led astray. Could the suggestion be disabled perhaps?

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  •  

    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 project members can vote.

     

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-08-23 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Release6.3.0 dev
    2021-08-21 mmuetzel StatusConfirmed Ready For Test
        Releasedev 6.3.0
    2021-08-21 philipnienhuis StatusNone Confirmed
        Operating SystemGNU/Linux Any

    Back to the top


    Powered by Savane 3.9