This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: the right way to compile and load modules




On 05/13/2014 08:52 PM, Per Bothner wrote:
On 05/13/2014 07:05 PM, mikel evins wrote:
factest:
      [kawa] (compiling factest.scm to factest)
      [kawa] /Users/mikel/Workshop/fabric/src/fact.scm:3:9: warning - no use of fact
      [kawa] factest.scm:3:1: warning - no declaration seen for fact

Not quite sure what is going on, but:

The problem is that the --main option "bleeds through" to the
require'd class fact.  And the --main option changes the default to
"export nothing".  (This can be a performance win, since it allows
some optimizations.)

A work-around: leave off the --main.  Recent versions of Kawa
treat:
  $ java kawa.repl -C foo.scm
  $ java kawa.repl foo
as equivalent to:
  $ java kawa.repl --main -C foo.scm
  $ java foo

(If you do specify --main, you can still invoke java kawa.repl foo.)
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]