Open johnnychen94 opened 3 years ago
I don't think we should apply this relaxed behavior by default. Perhaps we can provide a keyword argument, and when the user sets this keyword argument to a certain value, then we apply the relaxed behavior, but otherwise we apply the regular behavior.
I have no idea what this code is good for. load_registry_dep_uuids
creates a temporary depot, installs a couple of registries, then loops over the registries to see if they actually match the list of registries that were just installed? If it were me I would just replace _include_this_registry
with true
, so I guess I'm missing something vital.
IIRC, we added _include_this_registry
in https://github.com/JuliaRegistries/RegistryCI.jl/pull/367 to fix a bug (https://github.com/JuliaRegistries/RegistryCI.jl/pull/361#issuecomment-798948649).
Before #367, instead of _include_this_registry
, we had this code:
if spec.url ∈ registry_deps_names || spec.name ∈ registry_deps_names
After #367, that code became:
if _include_this_registry(spec, registry_deps_names)
Sorry, I still don't understand why there is an if
statement there in the first place.
Sorry for the late review, but I agree with Gunnar that it looks like we create a fresh depot, then add the registries the user specifies, so it seems like we could just include them all and not have a check. What could the check filter out?
Hmmmm..... it's been so long that I don't remember why the code is structured this way.
Should we try changing the if
conditional to if true
and see if anything breaks?
Sure
Sometimes one might prefer to use a fork URL for various reasons(e.g., private network, slow connection to GitHub). The current
_include_this_registry
check fails silently by returning false. This causes some hard to figure error:This change introduces a
lowercase(basename(x))
alternative and uses the set intersection operation to simplify the logic.A debug log for easier review: