From 495730305ffcc4c94d048fa99594911e0dc9d3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20H=C3=B6ij?= Date: Sun, 15 Feb 2026 21:21:39 +0100 Subject: [PATCH] Update to 0.0.17 and swipl-10 --- pack.pl | 2 +- prolog/tus/parse.pl | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pack.pl b/pack.pl index e4cb1f5..abaead7 100644 --- a/pack.pl +++ b/pack.pl @@ -1,5 +1,5 @@ name('tus'). -version('0.0.14'). +version('0.0.17'). keywords(['tus', 'file', 'upload', 'http']). title('TUS file transport protocol in prolog'). home( 'https://github.com/terminusdb/tus' ). diff --git a/prolog/tus/parse.pl b/prolog/tus/parse.pl index 7fb3878..37c3880 100644 --- a/prolog/tus/parse.pl +++ b/prolog/tus/parse.pl @@ -22,7 +22,12 @@ when( ( ground(Assoc) ; ground(Parts)), - assoc_metadata_parts(Assoc, Parts) + % once/1 needed for SWI-Prolog 10: assoc_metadata_parts/2 has two clauses + % that can both match when Assoc is unbound, leaving a choicepoint. + % SWI-Prolog 10 preserves choicepoints in delayed goals more strictly than v9. + % The predicate logically has exactly one solution, so once/1 eliminates + % the choicepoint warning while preserving correct semantics. + once(assoc_metadata_parts(Assoc, Parts)) ), atomic_list_concat(Parts, ',', Atom).