Skip to content

Commit

Permalink
Merge pull request #1310 from topolarity/ct/fix-1.11.1
Browse files Browse the repository at this point in the history
Avoid depending on `SymbolicsNemoExt` in `SymbolicsGroebnerExt`
  • Loading branch information
ChrisRackauckas authored Oct 18, 2024
2 parents 4fa78cc + 662d903 commit 4ad4fea
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions ext/SymbolicsGroebnerExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4ad4fea

Please sign in to comment.