The :REQUIRE directive seems undocumented.
Under what circumstances is it acceptable?
thanks, r
On Sun, Feb 23, 2014 at 12:11 PM, Robert Goldman rpgoldman@sift.net wrote:
The :REQUIRE directive seems undocumented.
Under what circumstances is it acceptable?
If I remember the intent and interpret the source code correctly, it is always acceptable, but highly non-portable, and is thus better guarded by a (:feature :sbcl (:require :sb-posix)) or (:feature :ecl (:require :sockets)) or some such.
The result being that your component depends on a system that when loaded calls (require name).
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org The college idealists who fill the ranks of the environmental movement seem willing to do absolutely anything to save the biosphere, except take science courses and learn something about it. — P.J. O'Rourke
Faré wrote:
On Sun, Feb 23, 2014 at 12:11 PM, Robert Goldman rpgoldman@sift.net wrote:
The :REQUIRE directive seems undocumented.
Under what circumstances is it acceptable?
If I remember the intent and interpret the source code correctly, it is always acceptable, but highly non-portable, and is thus better guarded by a (:feature :sbcl (:require :sb-posix)) or (:feature :ecl (:require :sockets)) or some such.
The result being that your component depends on a system that when loaded calls (require name).
I see. We had done something like that, but by having a pseudo-system type called REQUIRE-SYSTEM, and setting it up to use REQUIRE for (PERFORM LOAD-OP SYSTEM)....
I have a documentation patch that describes REQUIRE now. Should push it soon.
Cheers, r
On Sun, Feb 23, 2014 at 10:33 PM, Robert Goldman rpgoldman@sift.net wrote:
Faré wrote:
On Sun, Feb 23, 2014 at 12:11 PM, Robert Goldman rpgoldman@sift.net wrote:
The :REQUIRE directive seems undocumented.
Under what circumstances is it acceptable?
If I remember the intent and interpret the source code correctly, it is always acceptable, but highly non-portable, and is thus better guarded by a (:feature :sbcl (:require :sb-posix)) or (:feature :ecl (:require :sockets)) or some such.
The result being that your component depends on a system that when loaded calls (require name).
I see. We had done something like that, but by having a pseudo-system type called REQUIRE-SYSTEM, and setting it up to use REQUIRE for (PERFORM LOAD-OP SYSTEM)....
I have a documentation patch that describes REQUIRE now. Should push it soon.
REQUIRE-SYSTEM is actually used underneath by the :REQUIRE syntax, unless the implementation provides the system through a regular ASDF system (which SBCL used to do until they took my ASDF3 patch).
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Judge and party — the ultimate nature of a monopoly government.
Faré wrote:
On Sun, Feb 23, 2014 at 10:33 PM, Robert Goldman rpgoldman@sift.net wrote:
Faré wrote:
On Sun, Feb 23, 2014 at 12:11 PM, Robert Goldman rpgoldman@sift.net wrote:
The :REQUIRE directive seems undocumented.
Under what circumstances is it acceptable?
If I remember the intent and interpret the source code correctly, it is always acceptable, but highly non-portable, and is thus better guarded by a (:feature :sbcl (:require :sb-posix)) or (:feature :ecl (:require :sockets)) or some such.
The result being that your component depends on a system that when loaded calls (require name).
I see. We had done something like that, but by having a pseudo-system type called REQUIRE-SYSTEM, and setting it up to use REQUIRE for (PERFORM LOAD-OP SYSTEM)....
I have a documentation patch that describes REQUIRE now. Should push it soon.
REQUIRE-SYSTEM is actually used underneath by the :REQUIRE syntax, unless the implementation provides the system through a regular ASDF system (which SBCL used to do until they took my ASDF3 patch).
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Judge and party — the ultimate nature of a monopoly government.
So I believe what happens is that use of :REQUIRE triggers the automatic generation of a REQUIRE-SYSTEM for the corresponding module, and then its loading, when necessary, is handled by REQUIRE. Yes?
So I believe what happens is that use of :REQUIRE triggers the automatic generation of a REQUIRE-SYSTEM for the corresponding module, and then its loading, when necessary, is handled by REQUIRE. Yes?
Well, :REQUIRE triggers the generation of a REQUIRE-SYSTEM only if the implementation doesn't provide the module via a regular system (as SBCL used to do). Then, the actual loading is done by the corresponding PERFORM method, which calls CL:REQUIRE. To make what you say more ambiguous, the PERFORM may be the result of an OPERATE 'LOAD-OP that is itself a product of calling REQUIRE, and some of the complexity is due to prevent circularity.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org "I think sex is better than logic, but I can't prove it." — Monty Python