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
8 changes: 3 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
name = "RuntimeGeneratedFunctions"
uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com> and contributors"]
version = "0.5.20"
version = "0.5.21"

[deps]
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[compat]
Aqua = "0.8"
BenchmarkTools = "1"
ExprTools = "0.1"
SHA = "0.7, 1"
SafeTestsets = "0.1, 1"
SciMLTesting = "1"
SciMLTesting = "1.5"
Serialization = "1.10"
Test = "1"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "BenchmarkTools", "SafeTestsets", "SciMLTesting", "Test"]
test = ["BenchmarkTools", "SafeTestsets", "SciMLTesting", "Test"]
14 changes: 12 additions & 2 deletions src/RuntimeGeneratedFunctions.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
module RuntimeGeneratedFunctions

using ExprTools, Serialization, SHA
import Base.Experimental: @opaque
using ExprTools: ExprTools, combinedef, splitdef
using SHA: SHA, SHA1_CTX, update!
using Serialization: Serialization, AbstractSerializer, deserialize, serialize

export RuntimeGeneratedFunction, @RuntimeGeneratedFunction, drop_expr

# `init` and `get_expression` are documented, downstream-relied-on entry points
# (see README and the `@autodocs` API page) that are intentionally not exported
# to keep them namespaced under `RuntimeGeneratedFunctions.`. Declare them public
# so downstream packages can qualify-access them and pass ExplicitImports'
# `check_all_qualified_accesses_are_public`.
@static if VERSION >= v"1.11"
eval(Expr(:public, :init, :get_expression))
end

const _rgf_docs = """
@RuntimeGeneratedFunction(function_expression)
@RuntimeGeneratedFunction(context_module, function_expression, opaque_closures=true)
Expand Down
2 changes: 1 addition & 1 deletion test/qa/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ RuntimeGeneratedFunctions = {path = "../.."}
[compat]
Aqua = "0.8"
SafeTestsets = "0.1, 1"
SciMLTesting = "1"
SciMLTesting = "1.5"
Test = "1"
julia = "1.10"
25 changes: 14 additions & 11 deletions test/qa/qa.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
using RuntimeGeneratedFunctions, Aqua
@testset "Aqua" begin
Aqua.find_persistent_tasks_deps(RuntimeGeneratedFunctions)
Aqua.test_ambiguities(RuntimeGeneratedFunctions, recursive = false)
Aqua.test_deps_compat(RuntimeGeneratedFunctions)
Aqua.test_piracies(RuntimeGeneratedFunctions)
Aqua.test_project_extras(RuntimeGeneratedFunctions)
Aqua.test_stale_deps(RuntimeGeneratedFunctions)
Aqua.test_unbound_args(RuntimeGeneratedFunctions)
Aqua.test_undefined_exports(RuntimeGeneratedFunctions)
end
using RuntimeGeneratedFunctions, SciMLTesting, Test

# `Base.deepcopy_internal` and `Serialization.serialize_type` are the
# documented-by-convention extension points used to customize `deepcopy` and
# `Serialization.serialize`, respectively. Neither owner declares them public, but
# overriding/calling them is the only supported way to get the required behavior,
# so they are ignored rather than rewritten.
run_qa(
RuntimeGeneratedFunctions;
explicit_imports = true,
ei_kwargs = (;
all_qualified_accesses_are_public = (; ignore = (:deepcopy_internal, :serialize_type)),
),
)
Loading