using most recent .asd file, if multiple are present

Robert Goldman rpgoldman at sift.info
Tue Mar 20 18:55:43 UTC 2018


I think what you want might be more easily done through intervening in 
Quicklisp, instead of in ASDF.  "Newest" as defined by the filesystem 
might not correspond to "newest" in the intuitive sense, depending on 
how the files get there.  In quick lisp, maybe you could make these 
different projects correspond to different distributions or something.

When I want to deal with multiple projects (my company's projects aren't 
quicklisp-based), I do it by staring up my lisp session, and then 
executing a form that initializes the ASDF search path to point to only 
the directories associated with that project.  That has been the easiest 
way I have found to avoid version clashes and other inconsistencies 
(like accidentally breaking the project by pulling in a new library 
without ensuring that it's available to my colleagues).

Best,
r


On 20 Mar 2018, at 13:00, Robert Dodier wrote:

> Hi,
>
> I wonder if it's possible that if multiple .asd's with the same name
> are present, I can ensure that  the .asd with the most recent
> timestamp is used.
>
> The use case I have in mind is that I'm trying to set up a system to
> download automatically-generated tarballs which contain a snapshot of
> a project. Snapshots contain whatever was available (in Git) at the
> time the tarball is generated. These are unpacked (by Quicklisp) and
> all files in the tarball are given timestamps equal to the time at
> which the tarball was unpacked (not the time the tarball was generated
> and not the time of the most recent file modification or commit).
>
> Each tarball has a different name (derived from Git project name +
> most recent commit hash) so there will be multiple .asd files with the
> same name in different directories. But since they all have different
> time stamps, I think I'm in good shape: I just need to be able to
> identify the most recent one.
>
> I see the ASDF manual says: "When looking in a tree, if one system is
> found, the search succeeds. If multiple systems are found, the
> consequences are unspecified: the search may succeed with any of the
> found systems, or an error may be raised. ASDF currently returns the
> first system found, ...".
>
> Is there any way to intervene to return a specific system,
> specifically the most recent one?
>
> Thank you once again for your help,
> Robert Dodier



More information about the asdf-devel mailing list