-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the RegistryInstances
API in get_latest_version!
and get_existing_registries!
#449
Conversation
EDIT: This PR now uses RegistryInstances.jl (instead of Pkg internals). |
We'll also need a EDIT: We now have a |
to make use_existing_registries work on more recent versions of Julia.
Aren't CompatHelper.jl/test/dependencies.jl Lines 40 to 48 in cb50eed
clone_all_registries to use reachable_registries instead building a vector of paths but reachable_registries returns an empty list because git_clone doesn't seem to actually clone any registries. At least that's how I read the failure in https://github.com/JuliaRegistries/CompatHelper.jl/actions/runs/4144273670/jobs/7167123638#step:17:923
Is there a way to use real registries here? |
RegistryInstances
API in get_latest_version!
and get_existing_registries!
Broadly speaking, we have two sets of tests here: the unit tests and the integration tests. The unit tests frequently use mocking (via Mocking.jl). In contrast, the integration tests use no mocking, and thus are always using real resources. In the unit test you've linked, it looks like we mock the "git clone" functionality. So in its current state, this test is only testing the interface of function, not the behavior itself. The interface will be tested in the integration tests, but it's not always possible to cover all code paths in the integration tests (and we require 100% line coverage), so mocked unit tests can help hit other code paths. For this specific unit test, yeah, I think it's fine to switch it from being mocked to not-mocked. You'd first modify CompatHelper.jl/test/dependencies.jl Line 39 in cb50eed
|
As far as where to get the multiple registries:
|
8f20744
to
a7eab6b
Compare
@DilumAluthge I finally managed to get tests passing here. |
bors try |
Can you bump the minor version number? |
Done |
bors merge |
to make
use_existing_registries
work on more recent versions of Julia.We use
RegistryInstances
to avoid using Pkg internals.