Re: Setting environment variables

Mark Evenson <[email protected]> Wed, 3 May 2023 17:30:48 +0200
Newsgroups gmane.editors.j.devel
Message-ID <[email protected]>

> On May 2, 2023, at 21:16, Alan Ruttenberg <[email protected]> =
wrote:
>=20
[=E2=80=A6]
>=20
> It's true that I use aio. TBH I've never understood the point of =
separating the contribs from the base. File size isn't an issue any =
more. What's the upside of splitting them apart? A bit of extra time =
indexing the classes in the jar?

=46rom =
<https://github.com/armedbear/abcl/blob/master/doc/packaging-abcl.org>:

We create two separate jar artifacts in order to:
    =E2=80=A2 To place an upper bound of size of abcl.jar regardless of =
what we package in abcl-contrib.jar.
    =E2=80=A2 Clearly mark which parts of the code-base are covered =
under GPLv2+classpath from those that may have other licensing terms. By =
making the loading of =E2=80=9Ccontrib=E2=80=9D a dynamic operation, we =
defer possible infringement to the User who redistributes the resulting =
jar artifact.

>=20
> Conceptually, we should somehow place the implementation of setting =
environment variables via the C syscall as a patch in the contrib system =
in a new contrib called (?) USE-POSIX-SYSCALLS (terrible name, please =
change).  Such a new contrib would a) depend on=20
>  JNA and b) have to be used via=20
>=20
>    (asdf:make :use-posix-syscalls)
>=20
> I don't know what asdf:make does. I tried it in a situation =
(autoloading the java parser when #1 was used the first time) where I =
expected it to load a system and it didn't seem to.=20

ASDF:MAKE is a shorter synonym for ASDF:LOAD-SYSTEM as far as I =
understand things. =20

> Would it be sufficient to do something like:
>=20
> (defun ensure-jna-loaded ()
>   (or *jna-loaded*
>       (progn
>         (when (not (ignore-errors (find-java-class =
'jna.nativelibrary)))
>           (require 'abcl-asdf)
>           (add-to-classpath (funcall (intern "RESOLVE" 'abcl-asdf =
"net.java.dev.jna/jna/LATEST")))
>           (setq *jna-loaded* t)))))

Probably not:  you really want to depend on the ASDF encapsulation of =
JNA in 'contrib/mvn/jna.asd=E2=80=99, not the presence of yet another =
special (=E2=80=9C*jna-loaded*=E2=80=9D).    Since you are requiring =
ABCL-ASDF:RESOLVE to be present, you can make the assumption that both =
ASDF and ABCL-CONTRIB have been successfully REQUIREd.

[=E2=80=A6]

> Bottom line is that I don't know how to package this under whatever =
the assumptions are when not using abcl-aio

Alright.  I will try to take a stab at this after I figure out the way =
forward with the Gray streams/SLIME imbroglio.=20

--=20
"A screaming comes across the sky.  It has happened before but there is =
nothing=20
to compare to it now."