Skip to content

Commit ef2333c

Browse files
committed
use @require instead of direct dependency
1 parent 0500442 commit ef2333c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ authors = ["Dominique Orban <dominique.orban@gmail.com>, Robert Baraldi <robertj
44
version = "0.1.1"
55

66
[deps]
7-
ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a"
87
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
98
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
109
NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6"
1110
Noise = "81d43f40-5267-43b7-ae1c-8b967f377efa"
11+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1212
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1313
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1414
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

src/RegularizedProblems.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ function __init__()
2424
include("testset_group_lasso.jl")
2525
end
2626
@require ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a" begin
27+
using Pkg
28+
v = Pkg.dependencies()[Base.UUID("54578032-b7ea-4c30-94aa-7cbd1cce6c9a")].version
29+
if v > v"0.7.2"
30+
@warn "ADNLPModels version $v > 0.7.2 installed. \
31+
To avoid compatibility issues with fh_model(), recommended versions are ≤ 0.7.2."
32+
end
33+
2734
@require DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" begin
2835
include("fh_model.jl")
2936
@require ProximalOperators = "a725b495-10eb-56fe-b38b-717eba820537" begin

0 commit comments

Comments
 (0)