Is there a way to downgrade to an older version of a pack, or of installing a particular release version? (I couldn’t see any options for this, but I’m very good at missing things in the documentation.)
I tried specifying a URL for version 0.0.2 of rdet, and it seemed to ignore the URL and instead fetched the latest version:
1 ?- pack_install(rdet, [url('https://github.com/rla/rdet.git')]). % pack_install(rdet, [url('https://github.com/rla/rdet.git')]). % Cloning into '/home/peter/.local/share/swi-prolog/pack/rdet'... Verify package status (anonymously) at "https://www.swi-prolog.org/pack/query" Y/n? y y % Contacting server at https://www.swi-prolog.org/pack/query ... ok % "rdet.git" was downloaded 1 times Package: rdet Title: Runtime determinacy checker Installed version: 1.0.0 Author: Raivo Laanemets <http://rlaanemets.com/> Home page: https://github.com/rla/rdet Run post installation scripts for pack "rdet" Y/n? n n false. 2 ?- pack_install(rdet, [url('https://github.com/rla/rdet.git'), git(true)]). pack_install(rdet, [url('https://github.com/rla/rdet.git'), git(true)]). false.
After some fiddling around, I figured out this work-around, but surely there’s an easier way:
git clone https://github.com/rla/rdet.git
git checkout -b v0.0.2 3f3a15b6cbdb1e0064e2002f07dbfe5979eb6f74
BTW, sometimes when
pack_install fails, it still ends up installing something. So, it seems safest to always do a
pack_remove whenever there’s a problem.
I think it should be enough to remove the pack and do
pack_install(Source), where Source is either the downloaded tar/zip file or a url to it.
That’s essentially what I ended up doing. But it seems that some of the options to
pack_install ought to do that but don’t (e.g., specifying the URL in the
pack_install command). Are these known problems? There’s a hint that they are known, e.g., this item in the documentation: " GIT URL (not well supported yet)"