RejectedSoftware Forums

Sign up

Can I temporarily override where to search for a package?

So I've pushed a new tag in one of my repos, but the "trigger manual update" button is greyed out and I have to wait for the server to run an update on its own.

The thing is I don't want to be blocked in the meantime, I want to use the latest version of the package that I've pushed to github in one of my other projects. Can I use some sort of local override to search for a package on disk if one is not found online?

Re: Can I temporarily override where to search for a package?

On Wed, 07 May 2014 14:53:32 GMT, Andrej Mitrovic wrote:

So I've pushed a new tag in one of my repos, but the "trigger manual update" button is greyed out and I have to wait for the server to run an update on its own.

The thing is I don't want to be blocked in the meantime, I want to use the latest version of the package that I've pushed to github in one of my other projects. Can I use some sort of local override to search for a package on disk if one is not found online?

With the latest git master of DUB, you would just have to check out locally and use dub add-local or dub add-path to register the package. DUB would then determine the latest git tag in the repository and prefer it to the same or any earlier versions on the registry. A dub upgrade or dub upgrade --prerelease may also be necessary to update dub.selections.json.

For 0.9.21 and earlier, it may be possible to achieve the same using dub add-local path/to/package vX.Y.Z. But this is basically exactly the situation that is to be solved with 0.9.22. Earlier versions made it highly inconvenient to develop with version based dependencies, which is why most of them were ~branch based so far.

Re: Can I temporarily override where to search for a package?

On Wed, 07 May 2014 15:16:16 GMT, Sönke Ludwig wrote:

snip

Thanks for the info!

Is there a specific reason why updates aren't instantaneous when I hit the "Trigger manual update" button?

Re: Can I temporarily override where to search for a package?

Am 09.05.2014 17:15, schrieb Andrej Mitrovic:

On Wed, 07 May 2014 15:16:16 GMT, Sönke Ludwig wrote:

snip

Thanks for the info!

Is there a specific reason why updates aren't instantaneous when I hit the "Trigger manual update" button?

The packages are added to an update queue and then processed
sequentially. And every 15 minutes, all packages are added to the queue.
I've already though about allowing the manual trigger to prioritize a
particular package, but that would open up some potential for abuse.

Everything could be much faster, but GitHub throttles API access to
about 1 request per second, so even with aggressive caching it takes
quite a while to update all of the 240 projects.

There was already some initiative to look into using push notifications
instead of polling, but that would require every GitHub repository to
explicitly grant authorization to a dub-registry OAuth application.