How to find out runtime version of Maxima? (confused by new format of eigenvectors() in 5.19.2)
Subject: How to find out runtime version of Maxima? (confused by new format of eigenvectors() in 5.19.2)
From: Alexander Shulgin
Date: Mon, 21 Sep 2009 10:07:56 +0300
On Thu, Sep 17, 2009 at 19:47, Robert Dodier <robert.dodier at gmail.com> wrote:
> On Thu, Sep 17, 2009 at 1:43 AM, Alexander Shulgin
> <alex.shulgin at gmail.com> wrote:
>
>> I'd rather see it as a function built into maxima (with test suite).
>> So that if releaser decides to use some keen version number, the
>> problems are caught before the release is done and users made unhappy.
>
> I really don't want to go there. Code which depends on the software
> version is a nightmare and I want to discourage it. From time to
> time there are version to version differences in existing Maxima
> functions; I'm opposed to banning such differences. Instead, if
> you have trouble with a new Maxima version, I will probably be
> able to help you update your code.
OK, I see your point.
However, it was quite a surprise that a function which used to return
values in certain format was changed after a minor version change
(5.19 -> 5.19.2). This is something like ABI change (though strictly
it's not), but it happens to break your code.
I'm no fan of version-based "if"s in the code either. At least I'd
like to be able to check the version of maxima at the start and refuse
to load if it doesn't match the expectations. Something like this:
if version_lessp(maxima_version(), "5.19.2") then error("unexpected
maxima version", maxima_version())
At this point it also might be wise to add a check if version is
higher (or equal) to 5.20 to issue a warning that code might not work
as expected.
> I have been listing incompatible changes at the top of the
> change log for the last several versions of Maxima.
> I hope that makes it easier to see where the problems might be.
Yep, and following the mailing list should be of great help here. :)
If I only did this before, the change in eigenvectors would be no
pain.
--
Regards,
Alex