Lisp HUG Maillist Archive

Is there a way to detect whether LW can save an image?

I am asking as maintainer of ASDF.  ASDF has operations that will save
an image and that will make a stand-alone executable.

I would like ASDF to signal an understandable error message when run on
a copy of LW that is incapable of doing these operations)

I believe that some versions (e.g., hobbyist) cannot do these operations
for license reasons.

Is there some way (e.g., a value in *FEATURES*) to tell if this is not
possible?  Alternatively, is there a distinctive error that LW will
raise if its license does not permit performing one or both of these
operations?

thank you,

r

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Is there a way to detect whether LW can save an image?

Robert Goldman <rpgoldman@sift.net> writes:

> Is there some way (e.g., a value in *FEATURES*) to tell if this is not
> possible?  Alternatively, is there a distinctive error that LW will
> raise if its license does not permit performing one or both of these
> operations?

CL-USER 19 > (fboundp 'save-image)
T

CL-USER 22 > (symbol-package 'save-image)
#<The HARLEQUIN-COMMON-LISP package, 0/8 internal, 353/512 external>

See http://www.lispworks.com/documentation/lw70/LW/html/lw-602.htm#pgfId-1438116

Georges
-- 
 Georges Ko                     gko@gko.net                      2016-08-20

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Is there a way to detect whether LW can save an image?


> On 20 Aug 2016, at 17:18, Georges Ko <gko@gko.net> wrote:
> 
> Robert Goldman <rpgoldman@sift.net> writes:
> 
>> Is there some way (e.g., a value in *FEATURES*) to tell if this is not
>> possible?  Alternatively, is there a distinctive error that LW will
>> raise if its license does not permit performing one or both of these
>> operations?
> 
> CL-USER 19 > (fboundp 'save-image)
> T
> 
> CL-USER 22 > (symbol-package 'save-image)
> #<The HARLEQUIN-COMMON-LISP package, 0/8 internal, 353/512 external>
> 
> See http://www.lispworks.com/documentation/lw70/LW/html/lw-602.htm#pgfId-1438116

Dear Georges,

(please allow me to chime in here, like Robert I am interested in this type of
check for ASDF)

I think the issue is not so much with `save-image`. (From my understanding,
that’s only unavailable on the personal edition which can be detected through the

  :lispworks-personal-edition

feature, although I’d appreciate it if someone could confirm this). The issue is rather
with `deliver`: The symbol will be available e.g. on the Hobbyist edition but the run-time
license check will fail(*). On the HobbyistDV edition, it would not. So a check that can
distinguish between Personal/Hobbyist and HobbyistDV/Professional/Enterprise would
help here. But something more specifically tailored towards the deliver-functionality
(and thus more future-proof) would be preferable. This applies to `save-image`, too.


Elias

(*) It looks like an untyped error to me, by which I mean (error <string>). But maybe I’m
overlooking something.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Is there a way to detect whether LW can save an image?

Hi,

This will not work:


CL-USER 1 > (fboundp 'save-image)
T

CL-USER 2 > (symbol-package 'save-image)
#<The HARLEQUIN-COMMON-LISP package, 5/8 internal, 271/512 external>

CL-USER 3 > (lisp-implementation-type)
"LispWorks Personal Edition"

CL-USER 4 > (lisp-implementation-version)
"6.1.1"

The same for lw:deliver. It looks like these functions are available but
with a "stub" which informs you what you cannot use them in this
version.
I've not able to find anything suspicious in *features* as well
comparing Personal and HobbyistDV editions.

Georges Ko <gko@gko.net> writes:

> Robert Goldman <rpgoldman@sift.net> writes:
>
>> Is there some way (e.g., a value in *FEATURES*) to tell if this is not
>> possible?  Alternatively, is there a distinctive error that LW will
>> raise if its license does not permit performing one or both of these
>> operations?
>
> CL-USER 19 > (fboundp 'save-image)
> T
>
> CL-USER 22 > (symbol-package 'save-image)
> #<The HARLEQUIN-COMMON-LISP package, 0/8 internal, 353/512 external>
>
> See http://www.lispworks.com/documentation/lw70/LW/html/lw-602.htm#pgfId-1438116
>
> Georges

-- 
Br,
/Alexey

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:31 UTC