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
7 changes: 6 additions & 1 deletion .github/actions/check-compat-bounds/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ runs:
esac

if [ "$run_check" = "true" ]; then
julia --color=yes "$SCRIPT_PATH" "$WORKSPACE_ROOT"
# The script reads the registries through RegistryInstances, so give it a
# throwaway environment of its own rather than the workspace being checked.
script_env="$(mktemp -d)"
julia --color=yes --project="$script_env" -e \
'using Pkg; Pkg.add(Pkg.PackageSpec(; name = "RegistryInstances", version = "0.1"))'
julia --color=yes --project="$script_env" "$SCRIPT_PATH" "$WORKSPACE_ROOT"
else
echo "Skipping compat-bounds check (mode=$MODE, actor=${GITHUB_ACTOR:-unset})."
fi
8 changes: 6 additions & 2 deletions .github/actions/check-compat-bounds/check_compat_bounds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
# workspace-root : defaults to pwd()

using Pkg
# The registry abstraction is an implementation detail of `Pkg` whose signatures
# change between Julia minor versions. RegistryInstances exports the same names
# as public API under semver, so read the registries through it instead.
using RegistryInstances: reachable_registries, registry_info
using TOML

function parse_args(args)
Expand Down Expand Up @@ -128,10 +132,10 @@ end

function registry_versions(uuid::Base.UUID)
versions = VersionNumber[]
for reg in Pkg.Registry.reachable_registries()
for reg in reachable_registries()
entry = get(reg.pkgs, uuid, nothing)
entry === nothing && continue
info = Pkg.Registry.registry_info(entry)
info = registry_info(entry)
for (v, vinfo) in info.version_info
vinfo.yanked && continue
push!(versions, v)
Expand Down