Command line scripts that use a -c or -x argument no longer work

I recently switched to SWI-Prolog version 8 (8.0.3), it looks like a few things happened with command line processing. My scripts that previously accepted -c as an option no longer accept this. It looks like this is being interpreted directly by swipl and not passed to my program.

this can be seen with the following:

footest:

#!/usr/bin/env swipl 

:- initialization main.

main(Argv):-
        writeln(Argv),
        halt.

as expected:

$ footest -a foo.yaml
[-a,foo.yaml]

however:

$ footest -c foo.yaml
ERROR: source_sink `'foo.yaml'' does not exist

Same thing for -x.

It’s not clear if this is intentional or if there is any way I can get my -c option back, without writing some kind of wrapper script?

I think we should consider this a mistake. Given saved states, #! scripts and plan running Prolog there are quite a few options though :frowning: I’ll have a look.

Pushed ea88f5f4b6bfe3ad87bbc86a930125fdf2b18842 to swipl-devel to fix this. Considering tabling is probably important to you, the devel series is more promising anyway :slight_smile:

1 Like