Skip to content

Commit 20a8adb

Browse files
committed
Make tag = :hash the default on Julia 1.11+
1 parent 8118888 commit 20a8adb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/config.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,14 @@ Base.eltype(cfg::AbstractConfig) = eltype(typeof(cfg))
105105

106106
function maketag(kind::Union{Symbol,Nothing}, f, X)
107107
if kind === :default
108-
return Tag(f, X)
108+
@static if VERSION v"1.11"
109+
return SmallTag(f, X)
110+
else
111+
# On ≤1.10, the hash of a type cannot be computed at compile-time,
112+
# making `SmallTag(...)` type-unstable, so `Tag(...)` is left as
113+
# as the default.
114+
return Tag(f, X)
115+
end
109116
elseif kind === :type
110117
return Tag(f, X)
111118
elseif kind === :hash

0 commit comments

Comments
 (0)