diff --git a/.github/actions/check-compat-bounds/action.yml b/.github/actions/check-compat-bounds/action.yml index 05c8a16..1d9ac78 100644 --- a/.github/actions/check-compat-bounds/action.yml +++ b/.github/actions/check-compat-bounds/action.yml @@ -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 diff --git a/.github/actions/check-compat-bounds/check_compat_bounds.jl b/.github/actions/check-compat-bounds/check_compat_bounds.jl index fd14df9..479b22e 100644 --- a/.github/actions/check-compat-bounds/check_compat_bounds.jl +++ b/.github/actions/check-compat-bounds/check_compat_bounds.jl @@ -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) @@ -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)