From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names. Date: Fri, 29 Apr 2011 19:16:25 +0200 Message-ID: References: <1297784103-18322-1-git-send-email-janneke-list@xs4all.nl> <1297784103-18322-3-git-send-email-janneke-list@xs4all.nl> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1304097409 6926 80.91.229.12 (29 Apr 2011 17:16:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 29 Apr 2011 17:16:49 +0000 (UTC) Cc: guile-devel@gnu.org To: Jan Nieuwenhuizen Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Apr 29 19:16:45 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QFrJ1-0003bh-Uc for guile-devel@m.gmane.org; Fri, 29 Apr 2011 19:16:40 +0200 Original-Received: from localhost ([::1]:60490 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFrJ1-0000pO-5d for guile-devel@m.gmane.org; Fri, 29 Apr 2011 13:16:39 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFrIy-0000pC-66 for guile-devel@gnu.org; Fri, 29 Apr 2011 13:16:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFrIv-00087w-Ny for guile-devel@gnu.org; Fri, 29 Apr 2011 13:16:36 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:60881 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFrIv-00087b-L6 for guile-devel@gnu.org; Fri, 29 Apr 2011 13:16:33 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 8F7BE56F3; Fri, 29 Apr 2011 13:18:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=KIgVD7Kn1znT36lAef00gQAEXrc=; b=s87/s/ HWnXcwvDP6CujQTzMO9Xy5A7xX99/8R9S3Pwt79xtS1iHge334lr4yfAeGd9PPHI caWxp4mNpvipSv3v7nKRs24w62Bt9rENGyyC3n/VWXWio07nrkMsRY6bSFbBTOmZ bGxitklW1h4MbHy0U/ejOlqBGYaemUwOjeHkA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=vb19M3iYuEZKMndRyiswzsAlpkEKvQsP VLOKaRu5qIxaIw7grzktneW+i0hxloR21Q3jlItrMTzPeKsiT47jBBjdNzqsGX2V EmidTz9GEUQCffjbk5pOpZvwexXeTy4av/e5r9n3pgWbyvaYMV2AkEyxYWlhUS8T rM3Sl4OqXbE= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 611A156F2; Fri, 29 Apr 2011 13:18:33 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 9ED6856F1; Fri, 29 Apr 2011 13:18:31 -0400 (EDT) In-Reply-To: <1297784103-18322-3-git-send-email-janneke-list@xs4all.nl> (Jan Nieuwenhuizen's message of "Tue, 15 Feb 2011 16:35:00 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: B5D6CEF8-7284-11E0-9BD2-E8AB60295C12-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12381 Archived-At: Hi Jan, On Tue 15 Feb 2011 16:35, Jan Nieuwenhuizen writes: > From: Jan Nieuwenhuizen > > 2011-02-04 Jan Nieuwenhuizen > > * module/system/base/compile.scm (compiled-file-name): Add > directory separator and remove colon for Mingw. Fixes > compilation on Windows. > --- > module/system/base/compile.scm | 9 +++++++-- > 1 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm > index 7d46713..8c72e54 100644 > --- a/module/system/base/compile.scm > +++ b/module/system/base/compile.scm > @@ -100,11 +100,16 @@ > ".go") > (else (car %load-compiled-extensions)))) > (and %compile-fallback-path > - (let ((f (string-append > + (let* ((c (canonicalize-path file)) > + (f (string-append > %compile-fallback-path > ;; no need for '/' separator here, canonicalize-path > ;; will give us an absolute path > - (canonicalize-path file) > + (if (eq? (string-ref c 1) #\:) > + ;; on Mingw remove drive-letter separator `:' to > + ;; obtain valid file name > + (substring c 2) > + c) > (compiled-extension)))) > (and (false-if-exception (ensure-writable-dir (dirname f))) > f)))) I don't much like this approach. Besides mixing in a heuristic on all machines that is win32-specific, it makes c:/foo.scm collide with d:/foo.scm in the cache, and fails to also modify load.c which also does autocompilation in other contexts. I think we need a proper path library, and unfortunately I think it needs to be implemented at least partly in C, due to circularity issues. See http://docs.racket-lang.org/reference/pathutils.html for an example of what I'm talking about. Is anyone interested in implementing a path library? Andy -- http://wingolog.org/