Hi,
I have a few questions about controlling ASDF execution of compile/load operations:
1. Suppose I have performed successful `load-op` on a certain system. After some time and no changes to the source code of the system nor its dependencies, I run `load-system` again on the same system. How can I ensure that no compile/load action is performed?
2. Suppose I have a system `foo` that depends on `bar`. Now, I explicitly call `(load-system :bar)`. How can I ensure that when I call `(load-system :foo)` no compile/load action is performed on `bar`?
Sorry, maybe, these questions are trivial, but I couldn't find definite answers in the docs.
--- Vsevolod Dyomkin +38-096-111-41-56 skype, twitter: vseloved
On 5/30/16 May 30 -11:04 AM, Vsevolod Dyomkin wrote:
Hi,
I have a few questions about controlling ASDF execution of compile/load operations:
- Suppose I have performed successful `load-op` on a certain system.
After some time and no changes to the source code of the system nor its dependencies, I run `load-system` again on the same system. How can I ensure that no compile/load action is performed?
This should simply happen. If unnecessary operations occur when you do this then either (a) you have found a bug in ASDF or (b) you have found a "bug" in a system definition.
I put "bug" in scare quotes there, since a system definition should provide a conservative estimate of when recompilation is necessary. Sometimes it may not be possible for ASDF to tell whether or not a recompilation is necessary -- it has only limited information to go on -- and in that case the conservative thing to do is to perform operations that might not be necessary.
For example, I work with a somewhat pathological system that makes changes in the state of memory that do not follow good dependency practices. That system must always be reloaded in its entirety if anything in it changes. But most systems do not have that issue (thank goodness)!
Question: why do you say "no compile/LOAD [emphasis mine] is performed"? If you request a load, then you get a load. I believe you mean "After some time and no changes ... AND I HAVE NOT RESTARTED MY LISP," correct?
- Suppose I have a system `foo` that depends on `bar`. Now, I
explicitly call `(load-system :bar)`. How can I ensure that when I call `(load-system :foo)` no compile/load action is performed on `bar`?
That should automatically happen: ASDF should check bar, note that no changes have been made to it, and take the previous load as sufficient.
- Suppose I have a system `foo` that depends on `bar`. Now, I
explicitly call `(load-system :bar)`. How can I ensure that when I call `(load-system :foo)` no compile/load action is performed on `bar`?
That should automatically happen: ASDF should check bar, note that no changes have been made to it, and take the previous load as sufficient.
Unhappily, ASDF fails to register a dependencies if you call load-system (or operate in general) while either loading a .asd file or performing an action. This is actually the same bug as defsystem-depends: on.https://bugs.launchpad.net/asdf/+bug/1500578
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org The 'private sector' of the economy is, in fact, the voluntary sector; and the 'public sector' is, in fact, the coercive sector. ― Henry Hazlitt