@@ -12,13 +12,17 @@ julia> POMDPs.add("MCTS")
1212"""
1313function add (solver_name:: AbstractString , v:: Bool = true )
1414 @assert solver_name in SUPPORTED_PACKAGES string (" The JuliaPOMDP package: " , solver_name, " is not supported" )
15- full_url = string (REMOTE_URL, solver_name, " .jl" )
1615 if solver_name in REGISTERED_PACKAGES
1716 Pkg. add (solver_name)
1817 else
1918 try
20- Pkg. clone (full_url)
21- Pkg. checkout (solver_name, BRANCH06)
19+ Pkg. cd (clone_without_resolving, solver_name)
20+ try
21+ Pkg. checkout (solver_name, BRANCH06)
22+ catch
23+ warn (" could not checkout 0.6-version of $solver_name " )
24+ end
25+ Pkg. resolve ()
2226 Pkg. build (solver_name)
2327 catch ex
2428 if isa (ex, Base. Pkg. PkgError) && ex. msg == " $solver_name already exists"
@@ -123,6 +127,23 @@ function available()
123127 end
124128end
125129
130+
131+ function clone_without_resolving (pkg:: AbstractString )
132+ # copied from Pkg.clone
133+ url = string (REMOTE_URL, pkg, " .jl" )
134+ info (" Cloning $pkg from $url " )
135+ ispath (pkg) && throw (Pkg. PkgError (" $pkg already exists" ))
136+ try
137+ Base. LibGit2. with (Base. LibGit2. clone (url, pkg)) do repo
138+ Base. LibGit2. set_remote_url (repo, url)
139+ end
140+ catch err
141+ isdir (pkg) && Base. rm (pkg, recursive= true )
142+ rethrow (err)
143+ end
144+ end
145+
146+
126147# This does not appear to work
127148#=
128149"""
0 commit comments