Skip to content

Commit 0fc63f6

Browse files
jClugstorclaude
andcommitted
Treat Evolutionary.trace! override as real piracy (mark test broken)
The Evolutionary.trace! override dispatches Evolutionary's own function on Evolutionary.AbstractOptimizer, changing Evolutionary's tracing globally — that is genuine type piracy, not a SciML-interface extension, so it shouldn't be suppressed via treat_as_own. Keep treat_as_own for the actual SciML trait methods and mark the piracy test `broken = true` so the trace! piracy is tracked rather than hidden. It should be replaced with a non-pirating callback hook. Verified with Aqua.test_piracies: recorded as Broken (not Fail/Error). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ee23c7f commit 0fc63f6

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

  • lib/OptimizationEvolutionary/test/qa

lib/OptimizationEvolutionary/test/qa/qa.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ using Test
33
using Evolutionary
44

55
@testset "Aqua" begin
6-
# OptimizationEvolutionary implements the SciML optimization interface for
7-
# Evolutionary, so the trait/interface methods it adds extend SciML's *own*
8-
# functions rather than committing type piracy — mark those functions as own.
9-
# Evolutionary.trace! is also extended (to feed Evolutionary's tracing into
10-
# our callbacks); it has no SciML function to attribute it to, so mark that
11-
# function as own too.
6+
# SciML trait/interface methods are our own, not piracy — mark them as such.
7+
# The Evolutionary.trace! override IS genuine piracy (changes Evolutionary's
8+
# tracing globally); mark the piracy test broken until it's replaced.
129
SB = OptimizationEvolutionary.SciMLBase
1310
Aqua.test_all(
1411
OptimizationEvolutionary;
1512
piracies = (
13+
broken = true,
1614
treat_as_own = [
1715
SB.__solve,
1816
SB.allowsbounds,
@@ -23,7 +21,6 @@ using Evolutionary
2321
SB.requiresconsjac,
2422
SB.requiresgradient,
2523
SB.requireshessian,
26-
Evolutionary.trace!,
2724
],
2825
)
2926
)

0 commit comments

Comments
 (0)