Skip to content

Commit 4d4c78a

Browse files
Merge pull request #807 from SebastianM-C/rm_pkg
refactor: remove dependency on Pkg
2 parents ccc63d2 + c609481 commit 4d4c78a

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

Diff for: Project.toml

-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1212
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
1313
LoggingExtras = "e6f89c97-d47a-5376-807f-9c37f3926c36"
1414
OptimizationBase = "bca83a33-5cc9-4baa-983d-23429ab6bcbb"
15-
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1615
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1716
ProgressLogging = "33c8b6b6-d38a-422a-b730-caa89a2f386c"
1817
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
@@ -30,7 +29,6 @@ LinearAlgebra = "1.10"
3029
Logging = "1.10"
3130
LoggingExtras = "0.4, 1"
3231
OptimizationBase = "1.3.3"
33-
Pkg = "1"
3432
Printf = "1.10"
3533
ProgressLogging = "0.1"
3634
Reexport = "1.2"

Diff for: src/Optimization.jl

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ end
1313

1414
using Logging, ProgressLogging, ConsoleProgressMonitor, TerminalLoggers, LoggingExtras
1515
using ArrayInterface, Base.Iterators, SparseArrays, LinearAlgebra
16-
using Pkg
1716

1817
import OptimizationBase: instantiate_function, OptimizationCache, ReInitCache
1918
import SciMLBase: OptimizationProblem,

Diff for: src/utils.jl

-15
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,6 @@ function _check_and_convert_maxtime(maxtime)
5252
end
5353
end
5454

55-
function check_pkg_version(pkg::String, ver::String;
56-
branch::Union{String, Nothing} = nothing)
57-
deps = Pkg.dependencies()
58-
pkg_info = Dict{String, Pkg.Types.PackageInfo}()
59-
for (uuid, dep) in deps
60-
dep.is_direct_dep || continue
61-
dep.version === nothing && continue
62-
pkg_info[dep.name] = dep
63-
end
64-
65-
return (isnothing(branch) | (pkg_info[pkg].git_revision == branch)) ?
66-
pkg_info[pkg].version >= VersionNumber(ver) :
67-
pkg_info[pkg].version > VersionNumber(ver)
68-
end
69-
7055
# RetCode handling for BBO and others.
7156
using SciMLBase: ReturnCode
7257

0 commit comments

Comments
 (0)