public inbox for
 help / color / mirror / Atom feed
From: Per Bothner <>
To: Peter Lane <>,
Subject: Re: environments and eval with user-defined library
Date: Fri, 24 Feb 2017 07:48:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Sorry I almost forgot about this question.

On 02/18/2017 08:36 AM, Peter Lane wrote:
> I've been using eval and environment as follows:
> #|kawa:1|# (define env (environment '(srfi 1)))
> #|kawa:2|# (environment-bound? env 'iota)
> #t
> #|kawa:3|# (eval '(iota 10) env)
> (0 1 2 3 4 5 6 7 8 9)
> Although this works for builtin libraries (like srfi 1), this does not appear to work for my own libraries, e.g. below.

Could be a classpath issue.  Could also be this just doesn't work for
libraries loaded from source a compile on-the-fly,  That has
probably not been tested as much as one would like.

> Caused by: java.lang.ClassNotFoundException: lib.test
>     at gnu.mapping.WrappedException.rethrow(
>     at gnu.expr.Compilation.setupLiterals(
>     at lib.test.<clinit>(test.sld)
>     ... 14 more

Notice how the class lib.test is complaining that lib.test isn't found ...
Probably some ClassLoader not being set up right.
Possible a missing call to Compilation.usedClass.

If you can make a simple self-contained test-case I'll look into it.
	--Per Bothner

      reply	other threads:[~2017-02-24  7:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-18 16:36 Peter Lane
2017-02-24  7:48 ` Per Bothner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).