8

On mac, I have installed rakudo-star 2023.02 from Homebrew. Then I tried to zef install rakudoc, but it aborted installing due to test failures. It seems that the development of rakudoc had stalled for quite a while. So I zef install p6doc, and happily read raku documentations without bothering to leave terminal's window, just to find that the documents p6doc uses are out-of-date.

The docs have been installed in /usr/local/Cellar/rakudo-star/2023.02/share/perl6/site/doc. I went to https://github.com/Raku/doc to get the latest doc directory and replace my old doc directory with the downloaded one, then rebuilt p6doc's index with p6doc build. But p6doc won't use the new docs such that when I p6doc Str, it says No such type 'Str'.

How do I update the docs p6doc reads to the latest ones? Thanks a lot in advance.

1 Answer 1

5

p6doc is no longer current; rakudoc is the current incarnation of the command line tool.

I was able to read the Str docs on the command line, with the following steps (with a local clone of each repo):

$ cd ~/sandbox
$ git clone [email protected]:Raku/rakudoc.git
$ git clone [email protected]:Raku/doc.git
$ cd rakudoc
$ zef install --deps-only .
$ RAKUDOC=~/sandbox/doc raku -I. bin/rakudoc -D -b # Indexing 417...
$ RAKUDOC=~/sandbox/doc raku -I. bin/rakudoc -D Type/Str # TITLE class Str

zef install rakudoc as of right now is missing some bugfixes on HEAD. You could zef install . from a git clone to get the unreleased working version, and I've opened a ticket to get a new release moving.

Looks like the big difference is you currently need Type/Str.

EDIT:

We had the env var pointing at the wrong folder, and I've cut a new release, so we can install via zef:

$ zef install rakudoc
$ cd ~/sandbox
$ git clone [email protected]:Raku/doc.git
$ RAKUDOC=~/sandbox/doc/doc rakudoc -D -b # Indexing 417...
$ RAKUDOC=~/sandbox/doc/doc rakudoc -D Str # TITLE class Str
$ RAKUDOC=~/sandbox/doc/doc rakudoc -D .polymod #all polymod methods
5
  • 1
    Coke, I appreciate your kind help. After running the commands you provide, now I can read Type/Str doc, but rakudoc still doesn't know Str, Str.tans or open etc. It seems that we have to provide the path Type/Str then rakudoc knows to go to Type directory to get the Str doc. If so, we just have to p6doc <fullpath>/Str.rakudoc to open and read the latest doc file without all the work of trying to install rakudoc from github.
    – AlvaPan
    Mar 9 at 3:18
  • 2
    Thanks, added a bug report to the github repo to track this issue.
    – Coke
    Mar 9 at 13:05
  • 2
    @AlvaPan If you are able to accept this answer that would be nice given that the bug is also now fixed. Thanks.
    – raiph
    Mar 31 at 20:22
  • 2
    @Coke and @raiph, thanks a lot for your perseverant devotion to Raku and great help to me. Now it works as I have expected. At present, I install rakudoc using git clone as Coke instructs me to. Hopefully, we will be able to zef install rakudoc soon.
    – AlvaPan
    Apr 2 at 8:59
  • Added another edit - installing via zef should work now for rakudoc. Enjoy.
    – Coke
    Apr 3 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.