SWI-Prolog / packages-jpl

JPL: The Prolog <-> Java interface
BSD 2-Clause "Simplified" License
52 stars 32 forks source link

test installation #79

Closed JanWielemaker closed 4 years ago

JanWielemaker commented 4 years ago

I pushed 45be8ec3ba9178daf4efdabc8cac1e4f255ad64c as a work around for the installed tests. As is, it seems we create jpltest-VERSION.jar and a symlink jpltest.jar there. When using -DINSTALL_TESTS=ON, the symlink got installed, but points nowhere. I thought just adding the versioned file, but that creates a symlink in the install tree which we want to avoid to allow for platforms that do not have symlinks. So, I install the versioned file now as the plain jpltest.jar. That works.

I wonder though, what is the use of the versioned file? It is only a temporary file tight to specific version of Prolog/JPL.

I can live with the situation as is, but if the symlink has no value I'd rather just have jpltest.jar.

ssardina commented 4 years ago

We can remove the version for jpltest.jar; as far as I knew it was only used at development time, not at install. However you are saying one can actually install that jar when using -DINSTALL_TESTS=ON? But will those classes work? Need to check as they start the SWI engine assuming the source tree, etc...

Now, more importantly, I did change jpl.jar to jpl-<version>.jar and have jpl.jar as symbolic link to it. This is mostly because we now have a few versions for JPL and wanted the user to know exactly what version they are using.

But it's not a big issue, we can remove that and just have un-versioned jars if compatibility (Windows?) can be an issue.

JanWielemaker commented 4 years ago

However you are saying one can actually install that jar when using -DINSTALL_TESTS=ON? But will those classes work?

You can configure using -DINSTALL_TESTS=ON and then on the installed system run ?- test_installation. Works fine (only tests embedding Java in Prolog though). This is mostly intended for cross-compilation where you cannot run the test suite on the build host or you want tor some other reason to test the system in the deployment environment. Yes, I think a non-versioned version is easier wrt. portability :cry:

ssardina commented 4 years ago

OK I will remove the version tomorrow. :thumbsup:

ssardina commented 4 years ago

Done, removed versions and symb links from both jpl.jar and jpltest.jar. I ran the ? - test_installation and all passes well. :+1: