Skip to content

Commit

Permalink
exports: only export resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Dec 30, 2023
1 parent d9fc971 commit 3efe652
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/Resolver.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
module Resolver

export registry_provider, resolve
export DepsProvider, PkgData, PkgInfo, SAT, PicoSAT
export
pkg_info, finalize, sat_add, sat_assume, is_satisfiable, is_unsatisfiable,
extract_solution!, optimize_solution!, with_temp_clauses
export resolve

include("DepsProvider.jl")
include("PkgInfo.jl")
Expand Down
14 changes: 11 additions & 3 deletions test/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ using Test
@isdefined(includet) ? includet("tiny_data.jl") : include("tiny_data.jl")
@isdefined(includet) ? includet("registry.jl") : include("registry.jl")

module TestResolver

using Resolver: resolve, DepsProvider, PkgData, PkgInfo, pkg_data, pkg_info
using Test

export test_resolver

function test_resolver(
deps :: DepsProvider{P},
reqs :: AbstractVector{P},
) where {P}
data = Resolver.pkg_data(deps, reqs)
data = pkg_data(deps, reqs)
test_resolver(data, reqs)
end

Expand Down Expand Up @@ -76,7 +83,7 @@ function test_resolver(
# @info "optimality testing full data"
info = data # type unstable but 🤷
else
info = Resolver.pkg_info(data, reqs)
info = pkg_info(data, reqs)
Π = prod(float(length(ip.versions)+1) for ip in values(info))
if Π > Π⁺
# @info "no optimality testing"
Expand Down Expand Up @@ -275,5 +282,6 @@ function each_potential_solution(
gen_solutions!()
end

# helpers
end # module

using .TestResolver

0 comments on commit 3efe652

Please sign in to comment.