[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generating compiled scm (.go) files as part of LilyPond build

From: Andy Wingo
Subject: Re: Generating compiled scm (.go) files as part of LilyPond build
Date: Sat, 29 Jan 2011 12:21:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi Ian,

[re-adding the list; please keep the list CC'd on all guile-related

On Fri 28 Jan 2011 22:37, Ian Hulin <address@hidden> writes:

> Are you going to fix the double extension bug for defaulted/cached
> output names? I.e. compiling c++.scm will produce an output filename of
> c++.scm.go in the cache.

As far as I'm concerned this isn't a bug.  It only happens for writes to
the fallback path.  Appending an extension instead of replacing an
extension makes the algorithm more robust (e.g, doesn't confuse `foo'
and `foo.scm'.

>> Basically compiled-file-name doesn't do any path searches.  It simply
>> computes a place in ~/.cache in which to cache the result of compiling
>> FILE.
> Yuk! This means we will need to have custom routines in our code to work
> out and specify the output path we want.

There is not a DWIM answer, for various reasons -- but the combinatorics
between %load-path, %load-compiled-path, %load-extensions,
%load-compiled-extensions, and the actual `load' procedure should give
you an idea.  The autocompilation strategy is as good as we can get
without you actually telling Guile where you want your files.

> It also means that autocompilation is a hindrance rather than a help,
> since it hi-jacks the compiled files into the cache.

What is the problem with writing to the cache?  It is a cache.  It's
doing it's job.

>> Load (system base compile) then, no?
> OK, this is another V1.8/V2.0 conditional kludge we need to put in the
> LilyPond initialization code.

Compiling files is a 2.0 thing, of course...

>>> It looks like (compiled-file-name) uses a hard-coded default setting for
>>> %load-compiled-files to use as the root for cache.
>> It doesn't use that path at all.  It uses %compile-fallback-path.
> Is this now documented?

No.  Would you like to document it?

Things are not perfect as they are, but they get better by people
writing code and documentation.  Contributions will help us get there.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]