Skip to content

Commit b7d973f

Browse files
authored
Work around deprecation of Base.isbindingresolved in julia nightly (#322)
1 parent 607e012 commit b7d973f

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## Unreleased - 2025-XX-XX
9+
10+
### Changed
11+
12+
- Avoid deprecation warnings concerning `Base.isbindingresolved` with julia nightly. ([#322])
813

914
## Version [v0.8.10] - 2024-01-26
1015

src/exports.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
# avoid Base.isbindingresolved deprecation in https://github.com/JuliaLang/julia/pull/57253
2+
function isbindingresolved(m::Module, s::Symbol)
3+
@static if VERSION >= v"1.12.0-"
4+
return true
5+
else
6+
return Base.isbindingresolved(m, s)
7+
end
8+
end
9+
110
function walkmodules(f, x::Module)
211
f(x)
312
for n in names(x; all = true)
413
# `isdefined` and `getproperty` can trigger deprecation warnings
5-
if Base.isbindingresolved(x, n) && !Base.isdeprecated(x, n)
14+
if isbindingresolved(x, n) && !Base.isdeprecated(x, n)
615
isdefined(x, n) || continue
716
y = getproperty(x, n)
817
if y isa Module && y !== x && parentmodule(y) === x

0 commit comments

Comments
 (0)