Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

[ sisc-Bugs-1380458 ] compile-file fails to honour require-library and/or i: msg#00004

Subject: [ sisc-Bugs-1380458 ] compile-file fails to honour require-library and/or import
Bugs item #1380458, was opened at 2005-12-14 14:21
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379534&aid=1380458&group_id=23735

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Norman Gray (normang)
Assigned to: Nobody/Anonymous (nobody)
Summary: compile-file fails to honour require-library and/or import

Initial Comment:

COMPILE-FILE fails to honour REQUIRE-LIBRARY and/or IMPORT when 
they are used within a file being compiled.  Quoth Matthias Radestock: 
`compile-file only compiles code; it does not execute it'.

To reproduce:

Use test files:

% cat try1.scm
(require-library 'try2)
(module try1
    (try1-func)
  (import try2)
  (define (try1-func) (format #t "hello ~s~%" (try2-func))))
% cat try2.scm
(module try2
    (try2-func)
  (define (try2-func) "there"))
%

Using COMPILE-FILE to compile the first should work (the description in 
chs 9 & 10 of the SISC manual suggests as much, without being terribly 
explicit), but it doesn't:

% export SISC_HOME=/path/to/sisc-1.12.0-beta
% export CLASSPATH=.  # so try?.scm are in the classpath
% /path/to/sisc-1.12.0-beta/sisc
SISC (1.12.0-beta) - main
#;> (compile-file "try1.scm" "try1.scc")
Error: import from unknown module try2
file:../modules/debug.scm:6:42: <from call to sc-expand>
file:../modules/debug.scm:6:21: <from call to/argument of _analyze!>
file:../modules/debug.scm:6:10: <from call to/argument of apply>
file:../modules/libraries.scm:74:38: <from call to 
@debugging::compile>
file:../modules/libraries.scm:74:27: <indeterminate call>
?:?:?: <indeterminate call> [Repeated twice]
#;> ^D
%

Workaround: invoking REQUIRE-LIBRARY and IMPORT by hand 
successfully imports the try2.scm bindings, allowing COMPILE-FILE to 
work

% /Volumes/Boltzmann/tools/sisc-1.12.0-beta/sisc
SISC (1.12.0-beta) - main
#;> (find-resource "try2.scm") ; confirm the resource is findable
"file:/home/norman/try2.scm"
#;> (require-library 'try2)
(try2)
#;> (import try2)
#;> (compile-file "try1.scm" "try1.scc")
#t
#;> ^D
%


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379534&aid=1380458&group_id=23735


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click


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