Bug#397529: slib 3a4-3 broken under Scheme implemenations other than SCM

2006-11-08 Thread Thomas Bushnell BSG
On Tue, 2006-11-07 at 15:12 -0800, Steve VanDevender wrote:

 There's really no way this can work in general.  Even if it were to be
 written as something like
 
 (if ...
 (begin
   (define ...)))
 
 to make it valid Scheme, it would produce a definition local to the
 scope of the 'begin'.

Yeah, I knew I was cheating.  I didn't realize that it would break this
badly.

Moreover, this is an RC bug; I've upgraded it to serious.

 At least in the case of SCM, particular SCM versions are rather closely
 tied to corresponding SLIB versions (5e2 needs 3a3, 5e3 needs 3a4)
 partly because SLIB 'require' support is integrated into SCM.  You may
 have noticed that Aubrey Jaffer has tended to release new versions of
 both SCM and SLIB simultaneously for some time now.  Other Schemes
 should work with various SLIB versions.

I agree with your suggestion here; I'll upload a fix.

Thomas



signature.asc
Description: This is a digitally signed message part


Bug#397529: slib 3a4-3 broken under Scheme implemenations other than SCM

2006-11-07 Thread Steve VanDevender
Package: slib
Version: 3a4-3

Example:

$ mzscheme
Welcome to MzScheme version 352, Copyright (c) 2004-2006 PLT Scheme Inc.
 (load /usr/share/slib/init/DrScheme.init)
/usr/share/slib/require.scm:27:4: define: not allowed in an expression context 
in: (define slib:features *features*)

 === context ===
repl-loop

 

This appears to relate to the code added to require.scm in slib 3a4-3:

 Accommodate scm versions  5e3 which set *features* but not
 slib:features
   -- [EMAIL PROTECTED], 10/24/2006
(if (and (eq? (scheme-implementation-type) 'SCM)
 (not (defined? slib:features)))
(define slib:features *features*))

There's really no way this can work in general.  Even if it were to be
written as something like

(if ...
(begin
  (define ...)))

to make it valid Scheme, it would produce a definition local to the
scope of the 'begin'.

At least in the case of SCM, particular SCM versions are rather closely
tied to corresponding SLIB versions (5e2 needs 3a3, 5e3 needs 3a4)
partly because SLIB 'require' support is integrated into SCM.  You may
have noticed that Aubrey Jaffer has tended to release new versions of
both SCM and SLIB simultaneously for some time now.  Other Schemes
should work with various SLIB versions.

I don't know if it's worth trying to make SCM versions before 5e3 work
with SLIB 3a4.  I'd suggest maybe just adjusting the package
dependencies to keep SCM 5e2 and SLIB 3a3 together, and SCM 5e3 and SLIB
3a4 together, and not try to hack backward compatibility into SLIB for
earlier SCM versions.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]