apjanke / octave-packajoozle

A just-for-fun reworking of GNU Octave's `pkg` tool
GNU General Public License v3.0
4 stars 1 forks source link

unknown command `1` during install #37

Closed cbm755 closed 5 years ago

cbm755 commented 5 years ago

In git master with a fairly recent Octave 6.0.0:

>> pkg install packajoozle-0.1.0.tar.gz
/tmp/octave-help-dnOAMM:423: unknown command `1'
/tmp/octave-help-teW4yf:420: unknown command `1'
warning: function /home/cbm/.local/share/octpkgs/6.0.0/packajoozle-0.1.0/shims/pre-5.0/isfolder.m shadows a core library function
cbm755 commented 5 years ago

Oops, also on Octave 4.2.2:

>> pkg install packajoozle-0.1.0.tar.gz
/tmp/octave-help-TdCBRz:415: unknown command `1'
/tmp/octave-help-O2fj9r:412: unknown command `1'
lostbard commented 5 years ago

I also see in octave 5.1.0

apjanke commented 5 years ago

Looks like this is happening in the doc_cache_create step.

>> doc_cache_create foo.index inst
/var/folders/_4/9mx5ryp52bb_z6drbcbrhwl40000gn/T/octave-help-J2BrQa:418: unknown command `1'
/var/folders/_4/9mx5ryp52bb_z6drbcbrhwl40000gn/T/octave-help-J2BrQa:425: unknown command `xseealso'
/var/folders/_4/9mx5ryp52bb_z6drbcbrhwl40000gn/T/octave-help-J2BrQa:425: misplaced {
/var/folders/_4/9mx5ryp52bb_z6drbcbrhwl40000gn/T/octave-help-J2BrQa:425: misplaced }
apjanke commented 5 years ago

Yeah, it's during the doc_cache_create for pkj itself.

stopped in /Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.1_0/4.4.1/share/octave/4.4.1/m/help/doc_cache_create.m at line 111
111:     [text, first_sentence, status] = handle_function (f, text, format);
debug> dbstep
/var/folders/_4/9mx5ryp52bb_z6drbcbrhwl40000gn/T/octave-help-3h6HUh:418: unknown command `1'
/var/folders/_4/9mx5ryp52bb_z6drbcbrhwl40000gn/T/octave-help-Uin13S:415: unknown command `1'
stopped in /Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.1_0/4.4.1/share/octave/4.4.1/m/help/doc_cache_create.m at line 114
114:     if (status != 0)
debug> f
f = pkj
debug> dbstack
stopped in:

  -->         doc_cache_create>create_cache at line 114 [/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.1_0/4.4.1/share/octave/4.4.1/m/help/doc_cache_create.m]
          gen_doc_cache_in_dir>@<anonymous> at line 143 []
      doc_cache_create>gen_doc_cache_in_dir at line 144 [/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.1_0/4.4.1/share/octave/4.4.1/m/help/doc_cache_create.m]
                           doc_cache_create at line 55 [/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.1_0/4.4.1/share/octave/4.4.1/m/help/doc_cache_create.m]
             install>generate_lookfor_cache at line 793 [/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.1_0/4.4.1/share/octave/4.4.1/m/pkg/private/install.m]
                                    install at line 223 [/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.1_0/4.4.1/share/octave/4.4.1/m/pkg/private/install.m]
                                        pkg at line 437 [/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.1_0/4.4.1/share/octave/4.4.1/m/pkg/pkg.m]

It doesn't like something in the texinfo for pkj. If I remove the texinfo, then the message goes away.

>> pkg install packajoozle-0.1.0.tar.gz
>>
cbm755 commented 5 years ago

malform texinfo:

diff --git a/inst/pkj.m b/inst/pkj.m
index 22db61f..e01a578 100644
--- a/inst/pkj.m
+++ b/inst/pkj.m
@@ -316,7 +316,7 @@
 ## @example
 ## pkj review strings-1.2.0.tar.gz
 ## pkj review /path/to/my/local/clone/of/octave-strings
-## pkj review strings@1.2.0
+## pkj review strings@@1.2.0
 ## pkj review -verbose strings-1.2.0.tar.gz
 ## # Abort on first error
 ## pkj review -verbose -fail-fast strings-1.2.0.tar.gz
cbm755 commented 5 years ago

Hopefully doctest will fail on these sorts of things after https://savannah.gnu.org/patch/?9464 (if its an error and not a warning)

apjanke commented 5 years ago

Fixed in https://github.com/apjanke/octave-packajoozle/commit/9036490bf382f2c17d98e04293fbb7707122145c.

Message is gone.

>> pkg install packajoozle-0.1.0.tar.gz
>>

Added a followup to catch this in pkj review in https://github.com/apjanke/octave-packajoozle/issues/45.