public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: Peter Lane <peter@peterlane.info>, kawa@sourceware.org
Subject: Re: environments and eval with user-defined library
Date: Fri, 24 Feb 2017 07:48:00 -0000	[thread overview]
Message-ID: <60db2e8d-15cf-67ab-20b6-d9e9762a65a1@bothner.com> (raw)
In-Reply-To: <b826247d-6335-b280-d5d5-e5d1ee111b24@peterlane.info>

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(WrappedException.java:121)
>     at gnu.expr.Compilation.setupLiterals(Compilation.java:2984)
>     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
per@bothner.com   http://per.bothner.com/

      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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=60db2e8d-15cf-67ab-20b6-d9e9762a65a1@bothner.com \
    --to=per@bothner.com \
    --cc=kawa@sourceware.org \
    --cc=peter@peterlane.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).