SWI-Prolog/swipl

SWI-Prolog 8.4.2 plunit regression - append_args/3: Unknown procedure: '$messages':to_list/2

matko opened this issue · 1 comments

matko commented

8.4.2 seems to have a regression in how test output is handled. This regression seems to only exist in 8.4.2, and not in 8.4.1 or in the dev branch.

Given the following file test.pl:

:-begin_tests(example).
test('throw error') :-
    throw(error(example_error, _)).
:-end_tests(example).

Running these tests on 8.4.2 results in this error:

$ swipl --version
SWI-Prolog version 8.4.2 for x86_64-linux
$ swipl -f test.pl -g run_tests
% PL-Unit: example 
% No tests to run
ERROR: -g run_tests: append_args/3: Unknown procedure: '$messages':to_list/2

Neither 8.4.1 nor 8.5.5 display this behavior:

$ swipl --version
SWI-Prolog version 8.4.1 for x86_64-linux
$ swipl -f test.pl -g run_tests
% PL-Unit: example 
ERROR: /home/matthijs/plunit-regression/test.pl:2:
	test throw error: received error: Unknown error term: example_error
 done
% 1 test failed
% 0 tests passed
ERROR: -g run_tests: false
$ swivm use v8.5.5
Now using SWI-Prolog v8.5.5
$ swipl --version
SWI-Prolog version 8.5.5 for x86_64-linux
$ swipl -f test.pl -g run_tests
% PL-Unit: example 
ERROR: /home/matthijs/plunit-regression/test.pl:2:
	test throw error: received error: Unknown error term: example_error
 done
% 1 test failed
% 0 tests passed
ERROR: -g run_tests: false

All version installs were done through swivm.

Thanks. That is a duplicate of #21 (just moved from swipl-devel where it was reported). The github repo already has a fix. That will go into 8.4.2. There are no plans for that version yet though.