Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "SciMLBase"
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
version = "2.155.1"
version = "2.155.2"
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com> and contributors"]

[deps]
Expand Down Expand Up @@ -100,7 +100,7 @@ Markdown = "1.10"
Measurements = "2"
MonteCarloMeasurements = "1"
Mooncake = "0.4, 0.5"
Moshi = "0.3.6"
Moshi = "0.3.11"
PartialFunctions = "1.1"
PreallocationTools = "0.4.31, 1.0"
PrecompileTools = "1.2.1"
Expand Down
4 changes: 2 additions & 2 deletions src/clock.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
abstract type AbstractClock end

@data Clocks <: AbstractClock begin
ContinuousClock
ContinuousClock()
struct PeriodicClock
dt::Union{Nothing, Float64, Rational{Int}}
phase::Float64 = 0.0
end
SolverStepClock
SolverStepClock()
struct EventClock
id::Symbol
end
Expand Down
14 changes: 14 additions & 0 deletions test/clock.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,17 @@ end
@test clocktype(PeriodicClock(1 // 2, 3.14)) === (1 // 2, 3.14)
@test clocktype(pi) === "other" broken = true
end

@testset "SciMLBase precompiles without deprecation warnings" begin
# Moshi's bare singleton variant syntax (`ContinuousClock` rather than
# `ContinuousClock()`) only warns while the `@data` block is macroexpanded, so a
# forced recompile is the only way to observe it from a test.
script = """Base.compilecache(Base.identify_package("SciMLBase"))"""
cmd = `$(Base.julia_cmd()) --startup-file=no --project=$(Base.active_project()) -e $script`
buf = IOBuffer()
run(pipeline(ignorestatus(cmd), stdout = buf, stderr = buf))
output = String(take!(buf))
occursin("deprecated", output) &&
@info "SciMLBase precompilation output" output
@test !occursin("deprecated", output)
end
Loading