Description of load-op in the manual is unclear

Bug #1532586 reported by Denis Budyak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Fix Released
Low
Faré

Bug Description

Quote from the manual:

"But for code that you are actively developing, debugging, or
otherwise modifying, you should use load-system, so ASDF will pick on
your modifications and transitively re-build the modified files and
everything that depends on them. "

What does "everything that depends on them" mean?

I have
sys1.asd:
(asdf:defsystem :sys1 :serial t :components ((:file "sys1-file1")))
; EOF

and
sys2.asd
(asdf:defsystem :sys2 :serial t :depends-on (:sys1) :components
((:file "sys2-file2")))
; EOF

I do (asdf:load-system :sys2), then I touch sys1-file1.lisp, then I do
(asdf:load-system :sys1)

:sys2 does not get recompiled.

This is what I always knew and expected to see, but, according to
manual, it should have been recompiled, as :sys2 depends on :sys1,
and, hence, from the modified sys1-file1.lisp.

Now I don't know is this a "misbug" in asdf or a defeciency in the
manual. If this is a misbug, another question arises: is there a
"canonical" way to reload all systems that are currently loaded into
the image and sources of which have changed since last load?

Changed in asdf:
status: New → Confirmed
Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

I'm marking this bug as "confirmed." I was hoping that it would be a simple matter of tweaking that one sentence.

Unfortunately, when I read this section of the manual, it has the feel of a hunk of text that mixes multiple versions by multiple authors and, to be blunt, it's a confusing mess. There are lots of dips way down into fussy implementation details, there's all kinds of specific details about some lisp implementations hooking REQUIRE to use ASDF, etc., etc.

So this hunk of the manual really needs an entire rewrite. It should be rewritten to use the @defun macro for the functions.

For most uses (i.e., where there isn't a gigantic system you don't want to recompile, LOAD-SYSTEM will be fine, and REQUIRE-SYSTEM might cause missed updates. My guess is that REQUIRE-SYSTEM is for cases where there are big systems that you want to avoid scanning or updating. I'm not sure how common this is.

Revision history for this message
Faré (fahree) wrote :

REQUIRE-SYSTEM was meant to be used by implementations that hooked their CL:REQUIRE to use ASDF.

CL:REQUIRE doesn't try to reload existing modules. REQUIRE-SYSTEM copies this behavior of not checking for updates to already-loaded dependencies, as opposed to LOAD-SYSTEM, that does.

After fixing the latest bug #1531887, I now realize this somewhat messes up with timestamps. Oh well.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

See this bit of the documentation:

Note that @code{cl:require} and @code{require-system} are appropriate to load code
that is not being modified during the current programming session.
This notably includes the implementation-provided extension modules that @code{cl:require} can load.

I suppose it might have been intended to say "require-system behaves analogously to require" but it reads to me as if we are saying that REQUIRE-SYSTEM will load "...the implementation-provided extension modules that @code{cl:require} can load."

Reading your response, I suspect that this was not the intent.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :
Revision history for this message
Faré (fahree) wrote :

Fixed in ccf5373.

Changed in asdf:
assignee: nobody → Faré (fahree)
importance: Undecided → Low
milestone: none → asdf3.2
status: Confirmed → Fix Committed
Changed in asdf:
milestone: asdf3.2 → 3.1.7
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.