From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118069 invoked by alias); 24 Feb 2017 07:48:00 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 118030 invoked by uid 89); 24 Feb 2017 07:47:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=kawa, HTo:D*info X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Feb 2017 07:47:57 +0000 Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1chAbZ-0008MI-FG; Fri, 24 Feb 2017 08:47:53 +0100 Received: from 70-36-239-163.dsl.dynamic.fusionbroadband.com ([70.36.239.163] helo=localhost.localdomain) by mailfront11.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1chAbQ-00059x-Go; Fri, 24 Feb 2017 08:47:44 +0100 Subject: Re: environments and eval with user-defined library To: Peter Lane , kawa@sourceware.org References: From: Per Bothner Message-ID: <60db2e8d-15cf-67ab-20b6-d9e9762a65a1@bothner.com> Date: Fri, 24 Feb 2017 07:48:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q1/txt/msg00053.txt.bz2 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.(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/