From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9450 invoked by alias); 14 May 2014 03:59:19 -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 9438 invoked by uid 89); 14 May 2014 03:59:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: st11p02mm-asmtp001.mac.com Received: from st11p02mm-asmtpout001.mac.com (HELO st11p02mm-asmtp001.mac.com) (17.172.220.236) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 May 2014 03:59:17 +0000 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from [192.168.1.75] (99-3-56-155.lightspeed.fyvlar.sbcglobal.net [99.3.56.155]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7u4-27.08(7.0.4.27.7) 64bit (built Aug 22 2013)) with ESMTPSA id <0N5J0067RPQLVX90@st11p02mm-asmtp001.mac.com> for kawa@sourceware.org; Wed, 14 May 2014 03:59:11 +0000 (GMT) Subject: Re: the right way to compile and load modules From: mikel evins In-reply-to: <5372E86B.9020600@bothner.com> Date: Wed, 14 May 2014 03:59:00 -0000 Cc: mikel evins , kawa@sourceware.org Message-id: <61B59A7F-0868-48D1-9C18-DFDD6C09850E@me.com> References: <9F312D97-98C6-4F47-BDD9-B6CAF3868A28@me.com> <5371CFD0.7070708@bothner.com> <7D1A5D60-5997-4B7A-9176-8F6FA315F016@me.com> <54132084-D633-4AAA-B2A4-9008FF37F779@me.com> <5372CA25.7050602@bothner.com> <5372E86B.9020600@bothner.com> To: Per Bothner X-MANTSH: 1TEIXWV4bG1oaGkdHB0lGUkdDRl5PWBoaGxEKTEMXGx0EGx0YBBIZBBsTEBseGh8 aEQpYTRdLEQptfhcaEQpMWRcbGhsbEQpZSRcRClleF2hjeREKQ04XSxseGmJCH2lpH29TGXhzB x5vGhkfE2sSEQpYXBcZBBoEGxsHTU4fGBgYGUsFGx0EGx0YBBIZBBsTEBseGh8bEQpeWRdhW2M cWhEKTEYXYmtrEQpDWhcTEwQZBB8cBBsfHxEKRFgXGREKREkXGBEKQkUXaxNfH11ATxlsZFoRC kJOF2xwYHlAHWJSaRpiEQpCTBdmYXpbYW1oUl5eYBEKQmwXZEt5RHMBQx0dGh8RCkJAF2NhZwV EQ2RgSVNTEQpwaBdlcmx7f0hiGW8YTxEKcGgXYkdjX1oTZ2RcZWsRCnBoF2caSUIdRXsBfEJAE QpwaBdgQmB4Zkhea10bcxEKcGgXb0VOGkFEaXN7W1MRCnB/F29HbVtSH3pveFldEQpwXxdnSFh bbxwYTEtfYhEKcGwXb0FJAWl+cBNeEm4RCnBMF3pAbVhzGmIbTW1JEQ== X-CLX-Spam: false X-CLX-Score: 1011 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.96,1.0.14,0.0.0000 definitions=2014-05-14_01:2014-05-13,2014-05-14,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1405140056 X-IsSubscribed: yes X-SW-Source: 2014-q2/txt/msg00058.txt.bz2 On May 13, 2014, at 10: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: > > Compiling fact.scm creates fact.class. > Compiling factest.scm *recompiles* fact.scm (reasonable because you > only specify the source file name), but it does so *differently* than > the first time (i.e. without the fact function being exported), and > then overwrites fact.class with the bad version. > > Still need to look into what is going on, but I suggest replacing the > (require "fact.scm") > by: > (require fact) Here's why I'm not doing that: $ ant factest Buildfile: /Users/mikel/Workshop/fabric/build.xml fact: [kawa] (compiling fact.scm to fact) factest: [kawa] (compiling factest.scm to factest) [kawa] factest.scm:3:1: invalid specifier for 'require' BUILD FAILED > However, this may not work when importing into the REPL. As you can see, it doesn't work for me when compiling, either. > What you're doing is somewhat unusual (and thus poorly tested): > Compiling ahead-of-time, and then in a different module requiring the > source file rather than the compiled module. I'm not married to what I'm currently doing. I'm happy to do anything else that 1. actually works 2. enables me to build a jar containing the compiled code of the project 3. enables me to load (or require or import or inject or assimilate or devour or adjoin or intertwingle or whatever you want to call it) all of the project sources into an interactive session for further development and testing. Just tell me what to do and I'm there. > Fairly soon I want to combine the functions of import and > require, and both use some kind of search path. However, > that is orthogonal to the problem that fact is sometimes > not exported - which is a bug. > -- > --Per Bothner > per@bothner.com http://per.bothner.com/