From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aibo.runbox.com (aibo.runbox.com [91.220.196.211]) by sourceware.org (Postfix) with ESMTPS id 671003858D38 for ; Thu, 16 Jul 2020 04:58:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 671003858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bothner.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=per@bothner.com Received: from [10.9.9.74] (helo=submission03.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1jvvyv-0007un-JR for kawa@sourceware.org; Thu, 16 Jul 2020 06:58:53 +0200 Received: by submission03.runbox with esmtpsa [Authenticated alias (524175)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1jvvyr-0002KP-29 for kawa@sourceware.org; Thu, 16 Jul 2020 06:58:49 +0200 Subject: Re: SRFI 170 (POSIX API) for Kawa To: kawa@sourceware.org References: From: Per Bothner Message-ID: <5865887e-6b2a-7868-ffa1-c8ea7bdcde6d@bothner.com> Date: Wed, 15 Jul 2020 21:58:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: kawa@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Kawa mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 04:58:56 -0000 On 7/15/20 5:02 PM, Jamison Hope wrote: > I agree [JNR] shouldn't be a required dependency. But it would also be > handy to be able to use the SRFI in conjunction with a stock binary > Kawa release, and not have to do a custom configuration. > > Per, can the srfi loading in ImportFromLibrary.java cross jar > boundaries? IIRC ImportFromLibrary.java doesn't know anything about jar boundaries. It just searches in the classpath. If so, one option might be for SRFI97Map to map 170 to > some other named class that isn't included in kawa.jar, and then > provide a separately-compiled kawa-srfi170.jar or whatever that did > rely on JNR-Posix or other such native code. Then if that other jar > is in the CLASSPATH, then (import (srfi 170)) loads/uses it, and if > not, then it doesn't work, or maybe we instead fall back on a > Java-only subset. Should be possible, as long as we make sure failure modes (error messages etc) are reasonable. There may be some interaction with Java 9 modules; it's been a while since I looked into those. > I've never used JNR. My impression is that it's like JNA but.. > better? Or at least newer? I believe newer. -- --Per Bothner per@bothner.com http://per.bothner.com/