<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">In upgrade.lisp we see:</p>
<pre style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px" bgcolor="#F7F7F7"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0" bgcolor="#F7F7F7"> (defun upgrade-asdf ()
"Try to upgrade of ASDF. If a different version was used, return T.
We need do that before we operate on anything that may possibly depend on ASDF."
(let ((*load-print* nil)
(*compile-print* nil))
(handler-bind (((or style-warning) #'muffle-warning))
(symbol-call :asdf :load-system :asdf :verbose nil))))
</code></pre>
<p dir="auto">This suggests to me that upgrading will require finding "asdf.asd". So I would have thought that this would rely on finding the source in <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">asdf/</code> -- where there's "asdf.asd" -- rather than the merged single file in "asdf.lisp".</p>
<p dir="auto">On 19 Jan 2021, at 9:05, Wilfredo Velazquez wrote:</p>
</div>
<div style="white-space:normal"></div>
<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><div id="3B448632-795F-4540-84F9-D1C042C8726D"><div dir="ltr">Can I upgrade ASDF by simply placing the built asdf.lisp file in ~/common-lisp/asdf/asdf.lisp and omitting everything else? Will ASDF find it?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 19, 2021 at 9:44 AM Robert Goldman <<a href="mailto:rpgoldman@sift.info">rpgoldman@sift.info</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto"><strong>Warning -- opinionated rant follows!</strong></p>
<p dir="auto">On 18 Jan 2021, at 20:50, Eric Timmons wrote:</p>
<blockquote style="border-left:2px solid rgb(119,119,119);color:rgb(119,119,119);margin:0px 0px 5px;padding-left:5px">
<p dir="auto">That's not quite right. It could definitely be more friendly, but there<br>
are a few ways to better control it.</p>
<p dir="auto">To completely prevent ~/common-lisp/ from being traversed you could put<br>
an :ignore-inherited-configuration directive somewhere in the<br>
CL_SOURCE_REGISTRY envvar or<br>
$XDG_CONFIG_DIRS/common-lisp/source-registry.conf. But that approach<br>
also would prevent the files in<br>
$XDG_CONFIG_DIRS/common-lisp/source-registry.conf.d from being parsed<br>
(as well as any system level config). It might be nice to allow an<br>
inheritance config directive to be specified in the configuration<br>
directory parsing if it isn't already (there's an implicit<br>
:inherit-configuration tacked on the end of the directory based config).</p>
<p dir="auto">Another option is to drop a .cl-source-registry.cache file in<br>
~/common-lisp/ or one of the sub directories.<br>
<a href="https://common-lisp.net/project/asdf/asdf.html#Caching-Results" style="color:rgb(119,119,119)" target="_blank">https://common-lisp.net/project/asdf/asdf.html#Caching-Results</a>. ASDF<br>
will stop recursing if it finds that file and just use the info it<br>
contains.</p>
</blockquote>
<p dir="auto">This is true, but it causes just the kind of problems I have alluded to -- your ASDF configuration is now smeared all over your system, and debugging it becomes essentially impossible.</p>
<p dir="auto">I have repeatedly had to help people where I work who have put one of these magical -- and invisible -- files or configurations somewhere, forgotten it, and then don't understand why some aspect of their configuration is misbehaving. Now I tell people <em>only</em> to configure things in their lisp init files, <em>not</em> to use magical directories, and <em>not</em> to use environment variables. Then if something goes wrong, you know where to look for the culprit.</p>
<p dir="auto">Note also that if ASDF isn't configured in your lisp init file, but by a config file or environment variable, <em>it will be configured as it loads</em>. This means that all of your debugging tools are taken away from you. There will be no tracing, because by the time you can set up a trace, the damage will be done.</p>
<p dir="auto"><code style="background-color:rgb(247,247,247);border-radius:3px;margin:0px;padding:0px 0.4em" bgcolor="#F7F7F7">asdf:*central-registry*</code> is terribly inefficient, <em>but it is simple</em> and <em>it can be inspected when things go wrong</em>. None of these other schemes share that feature. I have tried to trace the control flow for interpreting the configuration DSL and it's a mass of twisty passages all exactly alike. Lots of key functionality is in variables, or in anonymous lambdas, making tracing effectively impossible. (Adding configuration logging would be a big help)</p>
<p dir="auto">So -- if you are at Google or some other shop where you have a zillion systems coming together, yes, <code style="background-color:rgb(247,247,247);border-radius:3px;margin:0px;padding:0px 0.4em" bgcolor="#F7F7F7">*central-registry*</code> is too slow, and will kill you. For most of us, though, using one of the alternatives is premature optimization.</p>
<p dir="auto">I am a strong believer that the only way to keep track of the burgeoning complexity of today's systems is to <em>localize</em> and <em>simplify</em> configuration, rather than disperse it. For some reason, the dispersion faction is winning the design game, though. I'm not sure why -- perhaps there's some notion of tidiness and elegance that encourages all of these configuration layering (look how elegant! You can override things or accept the default!) and dispersion (there's an individual config file for every purpose, instead of one monster -- and I admit my <code style="background-color:rgb(247,247,247);border-radius:3px;margin:0px;padding:0px 0.4em" bgcolor="#F7F7F7">.emacs</code> is a thing to strike fear in the heart).</p>
<p dir="auto">Also not a fan of invisible config files. Yeah -- it's ok to have dot files in your home dir so that you don't get overwhelmed, but why is it a good idea to hide the file in your repo that configures the CI so that <code style="background-color:rgb(247,247,247);border-radius:3px;margin:0px;padding:0px 0.4em" bgcolor="#F7F7F7">ls</code> won't show it to you?</p>
<p dir="auto">Finally, <em>everything</em> will break, so make sure you know how the poor user will debug it when it does. Make sure things are traceable in CL. Log things. Make your error messages understandable. Lots of ASDF doesn't follow this principle, and I would love to move towards making it easier to diagnose and debug.</p>
</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Wilfredo Velázquez-Rodríguez<br></div></div></div></div></div></blockquote>
<div style="white-space:normal">
<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
</blockquote></div>
<div style="white-space:normal">
</div>
</div>
</body>
</html>