scsh-users
[Top] [All Lists]

Re: [Scsh-hackers] Packaging SSAX

To: scsh@zurich.csail.mit.edu
Subject: Re: [Scsh-hackers] Packaging SSAX
From: Michel Schinz <Michel.Schinz@epfl.ch>
Date: Fri, 12 Mar 2004 22:04:18 +0100
Cancel-lock: sha1:UGMu65DCvCPe608WKWZcJpzje+Q=
Sender: news <news@sea.gmane.org>
Michael Sperber <sperber@informatik.uni-tuebingen.de> writes:

[...]

> Since that port was pretty smooth to use, what you're saying doesn't
> bode well ... :-(

So, I checked the package found on your page, and it pretty much
matches the package found on Sourceforge. So I think I need to clarify
what I mean.

So, first of all, to reassure you, loading packages.scm and then
opening the various structures it contains works like a charm. In that
sense your port is indeed very smooth, thanks.

I'm starting to have problems as soon as I try to use stuff in
directories "examples", "benchmarks", "docs" and "tests". Let me
explain the problems I encounter for each case.

In directory "examples", the situation is as follows: file
"html-parser.scm" starts with a module declaration which looks like
it's meant for Bigloo. Files "outline.scm" and "remove-markup.scm" are
not valid, since they use symbols "NEW-LEVEL-SEED", "FINISH-ELEMENT"
and "CHAR-DATA-HANDLER" without quoting them (which is of course not
your fault, but still the file don't work as-is. I guess that an
earlier version of SSAX:make-parser was syntax). "remove-markup" has
an additional problem, namely that it uses macros "--" and "--!" which
are defined in the various "myenv.scm" files in "lib". Unfortunately,
I cannot find a version of "myenv" which runs on scsh.

In directory "tests", both files "vinput-parse.scm" and "vmyenv.scm"
contain "include" statements which cannot be processed by scsh. It
also seems to be a macro defined in the various "myenv.scm" files, but
we're back to the previous problem then.

The situation is pretty similar for files in directory "benchmarks".

In directory "docs", the existence of a file called "packages.scm"
gives me hope, but I don't manage to open the structure it contains
without getting errors, as the following session shows:

+----
| Welcome to scsh 0.6.6 (RC 1)
| Type ,? for help.
| > ,config ,load lib/packages.scm
| lib/packages.scm
| > ,config ,load docs/packages.scm
| docs/packages.scm
| > ,open sxml
| Load structure sxml (y/n)? y
| [with-output-to-string]
| [output lib/output.scm]
| [big-util /usr/local/stow/scsh-0.6.6rc/lib/scsh/big/big-util.scm]
| [assertions lib/assert.scm]
| [run-test lib/run-test.scm]
| [oleg-util lib/util.scm]
| [srfi-11 /usr/local/stow/scsh-0.6.6rc/lib/scsh/srfi/srfi-11.scm]
| [pp /usr/local/stow/scsh-0.6.6rc/lib/scsh/big/pp.scm]
| [sxml-tree-trans lib/SXML-tree-trans.scm]
| [sxml-to-html lib/SXML-to-HTML.scm
| Warning: Structure has undefined exports
|          #{Structure 247 sxml-to-html}
|          (string->goodhtml)
| ]
| [sxml docs/SXML.scm
| Warning: undefined variables
|          #{Package 254 sxml}
|          include
|          string->goodHTML
|          make-header
|          lookup-def
|          make-navbar
|          make-footer
| 
| Error: undefined variable
|        include
|        (package sxml)
| 1 sxml>
+----

The capitalisation of "goodhtml" can be fixed quite easily, and adding
"sxml-to-html-ext" to the list of structures opened by "sxml" helps,
but I still end up with undefined variables "include" and
"lookup-def". The latter can be added to the set of things exported
from "sxml-to-html-ext-interface" in "lib/packages.scm". But I still
don't know what to do about "include". I guess that replacing it by a
call to "load" could be a solution, but it starts getting messy in my
view...

As I said above, normal usage of the package seems to work fine, it's
just when one tries to use files from directories "examples", "docs",
"benchmarks" and "tests" that problems appear. This means that in my
current package definition, I only install the necessary ".scm" files
from the "lib" directory and the HTML version of the documentation. I
wish I could include more though, and that's why I posted my original
message. So if I missed something and can indeed get more things
working easily, I'm all ears. Otherwise, I'll just keep the current
solution.

Cheers,
Michel.


<Prev in Thread] Current Thread [Next in Thread>