From 662d903723beb0636cefcadaba283f1cd7568164 Mon Sep 17 00:00:00 2001 From: Cody Tapscott Date: Thu, 17 Oct 2024 07:41:58 -0400 Subject: [PATCH] Avoid depending on `SymbolicsNemoExt` in `SymbolicsGroebnerExt` This is no longer supposed to be allowed in 1.11, but that change was unfortunately added in the 1.11.1 patch release instead of 1.11.0 like it was intended. --- ext/SymbolicsGroebnerExt.jl | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/ext/SymbolicsGroebnerExt.jl b/ext/SymbolicsGroebnerExt.jl index 66d069060..0c605d645 100644 --- a/ext/SymbolicsGroebnerExt.jl +++ b/ext/SymbolicsGroebnerExt.jl @@ -317,15 +317,23 @@ function Symbolics.solve_multivar(eqs::Vector, vars::Vector{Num}; dropmultiplici sol end -# Helps with precompilation time -PrecompileTools.@setup_workload begin - @variables a b c x y z - simple_linear_equations = [x - y, y + 2z] - equations_intersect_sphere_line = [x^2 + y^2 + z^2 - 9, x - 2y + 3, y - z] - PrecompileTools.@compile_workload begin - symbolic_solve(simple_linear_equations, [x, y], warns=false) - symbolic_solve(equations_intersect_sphere_line, [x, y, z], warns=false) - end -end + +# XXX: on 1.11, SymbolicsNemoExt isn't actually loaded during the pre-compilation of SymbolicsGroebnerExt, +# so we can't run a workload using its definitions yet. (The new restriction was added in 1.11 because +# of "AB" issues where an extension A and B would mutually expect the other to load "first") +# +# This can be re-enabled when it is possible for an extension A to explicitly declare that it depends on +# an extension B. + +# # Helps with precompilation time +# PrecompileTools.@setup_workload begin + # @variables a b c x y z + # simple_linear_equations = [x - y, y + 2z] + # equations_intersect_sphere_line = [x^2 + y^2 + z^2 - 9, x - 2y + 3, y - z] + # PrecompileTools.@compile_workload begin + # symbolic_solve(simple_linear_equations, [x, y], warns=false) + # symbolic_solve(equations_intersect_sphere_line, [x, y, z], warns=false) + # end +# end end # module