From 9ba8c28b7a93b09fcdaf1ddd273e84a69ca8b328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=A4cker?= Date: Sun, 23 Nov 2025 04:48:15 +0100 Subject: [PATCH 1/3] Declare `Optimizer` as public `README.md` already mandates to use `SCIP.Optimizer` when using SCIP.jl together with JuMP.jl. Additionally, this seems to be the only way how both work together. So `Optimizer` effectively has already been public API. Make this implicit assumption explicit, so that users and code checkers are not being mislead. --- src/SCIP.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SCIP.jl b/src/SCIP.jl index 1f4c63f2..5cfa475b 100644 --- a/src/SCIP.jl +++ b/src/SCIP.jl @@ -9,6 +9,8 @@ import LinearAlgebra import MathOptInterface as MOI import OpenBLAS32_jll +public Optimizer + # assorted utility functions include("util.jl") From 0e1c582a1e1395886903d8e023056a96d59285d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=A4cker?= Date: Wed, 26 Nov 2025 16:38:48 +0100 Subject: [PATCH 2/3] Make `Optimizer` public only if supported This uses https://docs.julialang.org/en/v1.13-dev/manual/modules/#Export-lists --- src/SCIP.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SCIP.jl b/src/SCIP.jl index 5cfa475b..e4497aa8 100644 --- a/src/SCIP.jl +++ b/src/SCIP.jl @@ -9,7 +9,8 @@ import LinearAlgebra import MathOptInterface as MOI import OpenBLAS32_jll -public Optimizer +# Use version aware for public while Julia 1.10 is supported. +VERSION >= v"1.11.0-DEV.469" && eval(Meta.parse("public Optimizer")) # assorted utility functions include("util.jl") From 553047b22df4fdd44e77d5f32b09fec7976a7292 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Wed, 3 Dec 2025 12:29:14 +1300 Subject: [PATCH 3/3] Refactor version check for public Optimizer Moved version check for public Optimizer to a static block. --- src/SCIP.jl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SCIP.jl b/src/SCIP.jl index e4497aa8..0ddeb808 100644 --- a/src/SCIP.jl +++ b/src/SCIP.jl @@ -9,9 +9,6 @@ import LinearAlgebra import MathOptInterface as MOI import OpenBLAS32_jll -# Use version aware for public while Julia 1.10 is supported. -VERSION >= v"1.11.0-DEV.469" && eval(Meta.parse("public Optimizer")) - # assorted utility functions include("util.jl") @@ -49,4 +46,10 @@ include("compat.jl") # Event handler include("event_handler.jl") + +# Use version aware for public while Julia 1.10 is supported. +@static if VERSION >= v"1.11.0-DEV.469" + eval(Meta.parse("public Optimizer")) +end + end