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
Support checking for offline updates against a local registry #277
Conversation
Out of town this weekend, I can try the changes on Monday. |
This doesn't seem to change the behaviour for me. Still getting the same error. |
This unblocks using cargo-outdated in CI for us, any chance we can get this merged? |
@anp Thanks for this! I'd like to make sure the lint and format checks pass could you try to push a commit to trigger the checks (might have to rebase ontop of the latest upstream changes). I'm not sure why they didn't trigger here. |
5e8c230
to
ca46b17
Compare
Branch was force pushed, but needs approval for running workflows: https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks |
Useful for testing against a local registry and ensuring crates.io isn't accessed.
Loading them directly from SourceId::load fails to account for registry override configuration, causing a panic when querying for updates for crates that aren't on crates.io. Change-Id: I5e47f8f69b78a70db689b2f755a889cf942d3268
ca46b17
to
2a5bf77
Compare
Rebased on the latest master. |
bors r+ |
Build succeeded: |
It seems that
TempProject::find_updates
callsSourceId::load
to get a registry for queries, but that function doesn't pay attention to registry overrides in the config.SourceConfigMap::load
does take them into account, and everything else seems to work fine once the override is correctly configured.I tested this by adding
127.0.0.1 localhost
to/etc/hosts
to prevent cargo from accessing the servers.I intend to add a more thorough test for CI here but wanted to make sure this seems like the right fix to maintainers beforehand.It looks like CI isn't running much in the way of tests so I'm hesitant to build out a whole harness just for this, let me know what your preference is.EDIT: For context, the motivation here is to allow isolated CI testing of a crate update workflow tool without taking a dependency on crates.io itself.