Skip to content

Commit

Permalink
Adjust to upcoming Julia 1.12 change in implicit world age increment (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno authored Nov 19, 2024
1 parent fa7c42b commit c0bb4c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/schemas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,8 @@ macro version(record_type, declared_fields_block=nothing)
declared_field_names_types = Expr(:tuple, Expr(:parameters, (Expr(:kw, f.name, esc(f.type)) for f in declared_field_infos)...))
constraints = [Base.Meta.quot(ex) for ex in declared_constraint_statements]

latestworld = isdefined(Core, :var"@latestworld") ? :(@Core.latestworld) : nothing

return quote
if !isdefined((@__MODULE__), :__legolas_schema_name_from_prefix__)
throw(SchemaVersionDeclarationError("no prior `@schema` declaration found in current module"))
Expand All @@ -890,7 +892,9 @@ macro version(record_type, declared_fields_block=nothing)
else
Base.@__doc__($(Base.Meta.quot(record_type)))
$(esc(:eval))($Legolas._generate_schema_version_definitions(schema_version, parent, $declared_field_names_types, schema_version_declaration))
$latestworld
$(esc(:eval))($Legolas._generate_validation_definitions(schema_version))
$latestworld
$(esc(:eval))($Legolas._generate_record_type_definitions(schema_version, $(Base.Meta.quot(record_type)), [$(constraints...)]))
end
end
Expand Down

0 comments on commit c0bb4c3

Please sign in to comment.