Problem accessing docs

I've had this problem for a while, since about two updates ago, but I've just worked around it. I thought maybe now, with the latest version 8.15 out, might be a good time to fix it. I am also using Racket a lot more than I used to :slight_smile:

Basically, whenever I try to access the docs from within Racket, the browser simply refuses to display them, saying that they are not readable. Which is strange, because if I open the *.html files in any text editor, they seem perfectly readable to me! I have taken to putting the online link to the docs on my browser's menu bar, so I'm not completely lost, but I do consider this a pretty suboptimal arrangement.

Any ideas?
Using Racket 8.6 under Ubuntu 22.04 Jammy.
Racket is not on my 'Snap' list, so I guess I never installed it that way. Can't remember how I installed it anyway. Maybe script, more likely apt, but no idea really.

If I deinstall everything and install afresh would I be alright? Any preferred procedure?

Thanks

What about your browser? Was it installed via Snap?

Yup, browsers (both FF and Chromium) installed by Snap.

Would this matter?

Yes. See Ubuntu Linux (22.04, and 23.10) and Racket documentation? - #2 by LiberalArtist

1 Like

Jeez, inspired by your question, I tried copying the doc directory from .racket to a different place in the home directory, and from there it works fine! Just what are these browsers up to? Seems ridiculous.

How can I change my Racket settings to point to a different directory now?
Seems like so much senseless hassle... :face_with_symbols_over_mouth:

PS. Thanks @soegaard

OK, I see, the problem is not the browsers per se, but the snap installation that does not allow them access to "invisible" directories. Yegads.

I'll have to think about that. Seriously not liking snap ATM.

=====

Anyway, I have loads of other programs installed under snap (emacs, kate, julia, many utilities, etc) and none of them have any problem opening .xxxx directories or files.
Ho-hum, very boring.

Some people install Firefox directly on Linux: Download Mozilla Firefox for Linux — Fast, Private & Free - from Mozilla.

IIUC it has none of the app sandbox restrictions of the Snap.

After the initial install, the update experience is similar to Windows or macOS: Periodically, Firefox itself will tell you it can be updated, and do that for you.

Caveat: I haven't yet tried this myself. Because I haven't yet had problems with the Flatpak builds of Firefox on Debian or Fedora. (And if I did, Flatpak lets you easily tweak app sandbox permissions -- more so than Snap, although Snap might have improved in this regard since I last checked c. a year ago, idk.)

1 Like

Thanks Greg

That's probably what I'll do, seems the quickest/neatest.

I'm still wondering about the 'sandbox' thing, though, as I said most of my Snap-installed programs have absolutely no problem reading (and writing) 'dot' directories and files. Why should they? We have permissions for that very purpose. Is it just a browser issue? Hijacking permissions seems rather cavalier.

Right, well here I am again and no improvement in situation:

Today, while doing a raco setup trying to get my wonky 8.6 installation to co-operate, I crashed it beyond recovery. Fantastic! An opportunity for a nice new clean 8.15 install... (ubuntu 22.04 still)

I download the *.sh file from the main site and ran the script, bog-standard 'unix-style' installation. Nice fresh DrRacket 8.15 greeted me. Great, I thought, now at last I'll be able to browse the local docs.

Sadly, no such luck. It still tries to browse the docs with Firefox and then says the index.html file is not there, when it patently is.

Furthermore, a problem I had trying to launch scribble, which I thought would vanish with the new installation is still there

$ scribble --html racket-cas.scrbl
eval:2:0: collection not found
  for module path: racket-cas
  collection: "racket-cas"
  in collection directories:
   /usr/share/racket/collects/
   ... [166 additional linked and package directories]
  location...:
   eval:2:0
  context...:
   /usr/share/racket/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /usr/share/racket/pkgs/sandbox-lib/racket/sandbox.rkt:921:7
   /usr/share/racket/pkgs/sandbox-lib/racket/sandbox.rkt:891:2: user-process

All ideas hints suggestions welcome.
Can't have the situation continuing like this.

Just checking: Have you installed racket-cas for both version 8.6 and for 8.15?
Is your scribble command the one from 8.6 or the one from 8.15?

I have a hunch, the scribble command is from 8.15, but that racket-cas is installed only for version 8.6.

Have you installed racket-cas for both version 8.6 and for 8.15?

Not sure what you mean by this. When we communicated earlier I was using 8.6, then everything crashed and I made a completely new install with 8.15.

I don't 'install' racket-cas for some version, other than that first loading and running of racket-cas.rkt, I just use the files by requiring them from where they reside. The racket-cas.scrbl was just downladed with all the others.

Anyway thanks for the response, I want to try some other scribble tests before I say anything more, don't want to generate too much noise.
(I'll open a new thread later, when I have more on this)

I have just sorted the docs problem by de-installing FF from snap and re-installing under apt. It was a diabolical experience, since by default apt just installs FF via snap, and I hadn't noticed! The process took hours, too, because that's how long snap takes to save snapshots before it deletes the program. 1.5 GB snapshot! Evil creature. Eventually got it done OK following the Mozilla instructions.

It might be nice in the future if Racket could be configured for where the docs live, to save this kind of hassle.

Anyway, all's good for now.

Have you installed racket-cas for both version 8.6 and for 8.15?

Not sure what you mean by this.

The question was due to these lines:

$ scribble --html racket-cas.scrbl
eval:2:0: collection not found
  for module path: racket-cas

They suggest that racket-cas isn't registered as a package.

1 Like

'They' suggest correctly! :grinning:

Not only had I not installed it, I did not even realize that I could or should install it.
I was just requireing via the filename and everything was working fine. I guess I misunderstood the instructions.

Thanks for clearing up the mystery.

Anyway all done now, and scribble worked (although still complained a bit, minor, I guess)

scribble --html racket-cas.scrbl
 [Output to racket-cas.html]
Warning: some cross references may be broken due to undefined tags:
 (dep ((lib "racket/private/base.rkt") require))
 (dep ((lib "racket/base.rkt") require))
 (dep ((lib "racket/private/pre-base.rkt") require))
 (dep ((lib "racket/private/reqprov.rkt") require))

BTW, when I was installing the package, I got a whole bunch of error too, I don't think they're major, seem to be only related to generate-quizlet-exercises.rkt. It looks like our old friend, the x: unbound identifier may be at play again.

Anyway, I don't care, it's fine as it is for me now, just FYI

raco setup: 3 making: <pkgs>/racket-cas-master/examples
raco setup: 2 making: <pkgs>/racket-cas-master/racket-cas
raco setup: 1 making: <pkgs>/racket-cas-master/racket-cas-doc
Code/Racket/racket-cas/racket-cas-master/examples/generate-quizlet-exercises.rkt:88:29: x: unbound identifier
  in: x
  compilation context...:
   /home/alex/Code/Racket/racket-cas/racket-cas-master/examples/generate-quizlet-exercises.rkt
  location...:
   Code/Racket/racket-cas/racket-cas-master/examples/generate-quizlet-exercises.rkt:88:29
  context...:
   /usr/share/racket/collects/compiler/private/cm-minimal.rkt:700:0: compile-zo*
   /usr/share/racket/collects/compiler/private/cm-minimal.rkt:634:0: compile-zo*/cross-compile
   /usr/share/racket/collects/compiler/private/cm-minimal.rkt:450:15
   /usr/share/racket/collects/compiler/private/cm-minimal.rkt:436:12: build
   /usr/share/racket/collects/compiler/private/cm-minimal.rkt:407:0: maybe-compile-zo
   /usr/share/racket/collects/compiler/private/cm-minimal.rkt:210:0: compile-root
   /usr/share/racket/collects/compiler/private/cm-minimal.rkt:105:4
   /usr/share/racket/collects/setup/parallel-build.rkt:385:9
   /usr/share/racket/collects/setup/parallel-do.rkt:471:25
   /usr/share/racket/collects/setup/parallel-do.rkt:457:20: loop
raco setup: --- creating launchers ---                             [22:19:41]
raco setup: --- installing man pages ---                           [22:19:41]
raco setup: --- building documentation ---                         [22:19:41]
raco setup: --- installing collections ---                         [22:19:41]
raco setup: --- post-installing collections ---                    [22:19:41]
raco setup: --- summary of errors ---                              [22:19:41]
raco setup: error: during making for <pkgs>/racket-cas-master/examples
raco setup:   Code/Racket/racket-cas/racket-cas-master/examples/generate-quizlet-exercises.rkt:88:29: x: unbound identifier
raco setup:     in: x
raco setup:     compiling: <pkgs>/racket-cas-master/examples/generate-quizlet-exercises.rkt
drracket install: packages installed, although setup reported errors

Thanks for the bug report.
You are right that generate-quizlet-exercises.rkt isn't critical (it's just an example).

I think the errors about missing tags from rendering the documentation can be fixed by adding the following switches to the scribble command:

+m  --redirect-main http://docs.racket-lang.org

The +m flag loads cross-reference information for all installed documentation.
And the redirect flag makes the links go to the web-page (instead of the local documentation).

1 Like

Yup, the switches fixed the scribble error.

By the by, if the package builds successfully then raco setup will do more than just raco make; among other things, it can coordinate raco scribble to build the docs. So I would expect the setup to build the documentation, and I do not normally run scribble on manuals (only on standalone documents).

1 Like