[racket] Scriblogify Error -- I'm baaack!

From: Patrick King (slowthought at gmail.com)
Date: Fri Oct 26 22:38:25 EDT 2012

When last I wrote on my problems with Scriblogify, I attributed them to
Windows 7 security... I was way too optimistic, and way too ashamed to
bother the community again. I have found a couple smoking guns since then,
and found that they, too, had nothing to do with my problem. The following
is repeatable in Racket 5.3 and Windows 7:

The following are all part of a project "ScriblogifyBug", which contains
folders "Private", where I hide implementation details, and "Blog", where I
boast about my implementation. Like a good little programmer, I use
rackunit to create custom tests relevant to my code, and use submodules to
implement tests. Like an enthusiastic Racketeer, I blog via
Scribble and Scriblogify.

#lang racket/base
;; begin Private/my-test-mod.rkt
(require rackunit)
(provide (all-defined-out)
         (all-from-out rackunit))

  (check-my-func f)
  (procedure? f))
;; end Private/my-test-mod.rkt

#lang racket/base
;; begin Private/my-racket-mod.rkt
(provide f)

(module+ test
  (require "my-test-mod.rkt"))

(define (f x y)
  (+ x y))

(module+ test
  (printf "Tests running.~n")
  (check-eq? 1 1)
  (check-my-func f))
;; end Private/my-racket-mod.rkt

#lang scribble/manual
@; begin Blog/my-scribble-doc.scrbl
@(require racket/sandbox scribble/eval)
@title{Trapping the Scriblogify Bug}

I expect this file to render fine via the @italic{Scribble HTML} button
within DrRacket,
and it does. However, I am curious why I must explicitly require
"my-test-mod.rkt", which
is only called from within the test submodule of "my-racket-mod.rkt".

Let's demonstate my nifty new function, @racket[f].

@(interaction #:eval(make-evaluator 'racket/base
                                    (sandbox-output 'string)
                                    (sandbox-error-output 'string)

              ;                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
              ;                               Why must I explicitly require
              (f 1 2))

I also expect this file to fail to render via @italic{raco scriblogify
and it does, yielding the error
@italic{"current-directory: `exists' access denied for
~\ScriblogifyBug\Blog\"}. With different
tweaks, I've gotten
similar 'exists' errors for the files in ../Private, involving
current-directory or similar
functions described in @bold{14.2 Filesystem} in the documentation, so I
suspect a Windows
specific path quirk. For instance, if I put all three files in the same
directory (modifying
the @racket{require}s in "my-scribble-doc.scrbl" accordingly), I get the
@italic{"file-exists?: `exists' access denied for C:\Program
Files\Racket\.\racket.exe"}. I
am not sure how to interpret "\.\", and C:\Program Files\Racket certainly
exists on my system,
as does C:\Program Files\Racket\Racket.exe (so there's the path issue and
the case issue).
@; end Blog/my-scribble-doc.scrbl

So, in summary, two issues:

a) Scribble needs help finding and interpreting files found within
submodules that I would expect to be both findable and irrelevant. When
explicitly told every potentially relevant file, it can figure out that it
can ignore it, when rendered within DrRacket.

2) Scriblogify doesn't find the help sufficient, when run from the command

c) One common clue, various path related errors that might be Windows

Ok, me sticking with Windows is an issue, one that I hope to rectify in the
next six months as certain work-related constraints are relaxed.

All thoughts appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121026/e694943c/attachment.html>

Posted on the users mailing list.